fix-租买灵活协议

This commit is contained in:
xl
2024-07-05 15:37:37 +08:00
parent 0222c40684
commit 39260b4830
3 changed files with 32 additions and 0 deletions

View File

@@ -293,4 +293,24 @@ public class AgreementController {
public CommonResult<Boolean> userRebateactivitiesSave(@RequestBody @NotEmpty String agreement) {
return CommonResult.success(systemConfigService.updateOrSaveValueByName(SysConfigConstants.REBATE_ACTIVITIES_RULE, agreement));
}
/**
* 租买灵活协议
*/
@PreAuthorize("hasAuthority('platform:system:agreement:renting:buying:info')")
@ApiOperation(value = "租买灵活协议 详情")
@RequestMapping(value = "/rentingandbuyinginfo", method = RequestMethod.GET)
public CommonResult<String> rentingAndBuyingInfo() {
return CommonResult.success(systemConfigService.getAgreementByKey(SysConfigConstants.RENTING_AND_BUYING_RULE));
}
/**
* 租买灵活协议
*/
@PreAuthorize("hasAuthority('platform:system:agreement:renting:buying:save')")
@ApiOperation(value = "租买灵活协议 保存")
@RequestMapping(value = "/rentingandbuyingsave", method = RequestMethod.POST)
public CommonResult<Boolean> rentingAndBuyingSave(@RequestBody @NotEmpty String agreement) {
return CommonResult.success(systemConfigService.updateOrSaveValueByName(SysConfigConstants.RENTING_AND_BUYING_RULE, agreement));
}
}

View File

@@ -901,4 +901,9 @@ public class SysConfigConstants {
* 返佣计划规则
*/
public static final String REBATE_ACTIVITIES_RULE = "rebate_activities";
/**
* 返佣计划规则
*/
public static final String RENTING_AND_BUYING_RULE = "renting_and_buying";
}

View File

@@ -8,6 +8,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@@ -123,4 +124,10 @@ public class AgreementController {
public CommonResult<String> userRebateactivitiesInfo() {
return CommonResult.success(systemConfigService.getAgreementByKey(SysConfigConstants.REBATE_ACTIVITIES_RULE));
}
@ApiOperation(value = "租买灵活协议 详情")
@RequestMapping(value = "/rentingandbuyinginfo", method = RequestMethod.GET)
public CommonResult<String> rentingAndBuyingInfo() {
return CommonResult.success(systemConfigService.getAgreementByKey(SysConfigConstants.RENTING_AND_BUYING_RULE));
}
}