fix-租买灵活协议
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user