Browse Source

//credit_score_rules

release_toaliyun_real
xhxu 3 years ago
parent
commit
afc00336a4
1 changed files with 18 additions and 5 deletions
  1. +18
    -5
      mallinkAdmin/src/main/java/com/iformall/controller/mem/WxScoreRulesController.java

+ 18
- 5
mallinkAdmin/src/main/java/com/iformall/controller/mem/WxScoreRulesController.java View File

@@ -70,8 +70,9 @@ public class WxScoreRulesController extends BaseController {
wxScoreRules.setType(record.getType());
// return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"type 为空");
}
EnumScoreRules ScoreRulesEnum = EnumScoreRules.getEnum(wxScoreRules.getType());
if(ScoreRulesEnum == null){
wxScoreRules.setTenantId(record.getTenantId());
EnumScoreRules scoreRulesEnum = EnumScoreRules.getEnum(wxScoreRules.getType());
if(scoreRulesEnum == null){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"type 不符合规范");
}
if(StringUtils.isBlank(wxScoreRules.getRules())){
@@ -133,10 +134,22 @@ public class WxScoreRulesController extends BaseController {
@ApiOperation("更新商户积分功能设置")
@PostMapping("updateCreditLocked")
@SystemControllerLog(description = "更新积分开关状态")
public ResultData updateCreditLocked(@RequestBody Map<String, Object> map) {
public ResultData updateCreditLocked(@RequestBody Map<String, String> map) {
logger.debug("[" + getIpAddr() + "] WxScoreRulesController::updateCreditLocked");
Long sysId = (Long) map.get("sysId");
Integer creditLocked = (Integer) map.get("creditLocked");
String sysIdStr = map.get("sysId");
String creditLockedStr = map.get("creditLocked");

if(StringUtils.isBlank(sysIdStr) || StringUtils.isBlank(creditLockedStr)){
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL);
}
Long sysId = null;
Integer creditLocked = null;
try{
sysId = Long.parseLong(sysIdStr);
creditLocked = Integer.parseInt(sysIdStr);
}catch(Exception e){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR);
}

if(sysId == null || creditLocked == null){
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL);


Loading…
Cancel
Save