Просмотр исходного кода

//credit_score_rules

release_toaliyun_real
xhxu 3 лет назад
Родитель
Сommit
afc00336a4
1 измененных файлов: 18 добавлений и 5 удалений
  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 Просмотреть файл

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


Загрузка…
Отмена
Сохранить