|
|
@@ -5,10 +5,12 @@ import com.iformall.common.ErrorCode; |
|
|
import com.iformall.common.ResultData; |
|
|
import com.iformall.common.ResultData; |
|
|
import com.iformall.controller.base.BaseController; |
|
|
import com.iformall.controller.base.BaseController; |
|
|
import com.iformall.domain.po.WxScoreRules; |
|
|
import com.iformall.domain.po.WxScoreRules; |
|
|
|
|
|
import com.iformall.domain.po.base.TenantEntity; |
|
|
import com.iformall.enums.EnumCreditLockedStatus; |
|
|
import com.iformall.enums.EnumCreditLockedStatus; |
|
|
import com.iformall.service.WxScoreRulesService; |
|
|
import com.iformall.service.WxScoreRulesService; |
|
|
import io.swagger.annotations.Api; |
|
|
import io.swagger.annotations.Api; |
|
|
import io.swagger.annotations.ApiOperation; |
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.slf4j.Logger; |
|
|
import org.slf4j.Logger; |
|
|
import org.slf4j.LoggerFactory; |
|
|
import org.slf4j.LoggerFactory; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
@@ -40,7 +42,11 @@ public class WxScoreRulesController extends BaseController { |
|
|
@SystemControllerLog(description = "成长值-积分-配置-新增") |
|
|
@SystemControllerLog(description = "成长值-积分-配置-新增") |
|
|
public ResultData add(@RequestBody WxScoreRules wxScoreRules) { |
|
|
public ResultData add(@RequestBody WxScoreRules wxScoreRules) { |
|
|
logger.debug("[" + getIpAddr() + "] WxScoreRulesController::add"); |
|
|
logger.debug("[" + getIpAddr() + "] WxScoreRulesController::add"); |
|
|
wxScoreRules.updateTenantInfo(getTenantInfo()); |
|
|
|
|
|
|
|
|
TenantEntity tenantEntity = getTenantInfo(); |
|
|
|
|
|
if (StringUtils.isNotBlank(tenantEntity.getSubTenantId())) { |
|
|
|
|
|
return new ResultData(ErrorCode.USER_NO_PERMISSION.getCode(), "广场用户无此权限"); |
|
|
|
|
|
} |
|
|
|
|
|
wxScoreRules.updateTenantInfo(tenantEntity); |
|
|
wxScoreRulesService.saveOrUpdate(wxScoreRules); |
|
|
wxScoreRulesService.saveOrUpdate(wxScoreRules); |
|
|
return new ResultData(); |
|
|
return new ResultData(); |
|
|
} |
|
|
} |
|
|
@@ -65,7 +71,11 @@ public class WxScoreRulesController extends BaseController { |
|
|
if (null == wxScoreRules.getCreditLocked()) { |
|
|
if (null == wxScoreRules.getCreditLocked()) { |
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "creditLocked不能为空"); |
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "creditLocked不能为空"); |
|
|
} |
|
|
} |
|
|
wxScoreRules.updateTenantInfo(getTenantInfo()); |
|
|
|
|
|
|
|
|
TenantEntity tenantEntity = getTenantInfo(); |
|
|
|
|
|
if (StringUtils.isNotBlank(tenantEntity.getSubTenantId())) { |
|
|
|
|
|
return new ResultData(ErrorCode.USER_NO_PERMISSION.getCode(), "广场用户无此权限"); |
|
|
|
|
|
} |
|
|
|
|
|
wxScoreRules.updateTenantInfo(tenantEntity); |
|
|
try { |
|
|
try { |
|
|
wxScoreRulesService.updateCreditLocked(wxScoreRules); |
|
|
wxScoreRulesService.updateCreditLocked(wxScoreRules); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
|