Browse Source

[集团版][修改]:集团用户权限修改

release_toaliyun_real
Stormeye Wu 6 years ago
parent
commit
203d2d4843
2 changed files with 13 additions and 3 deletions
  1. +12
    -2
      mallinkAdmin/src/main/java/com/iformall/controller/mem/WxScoreRulesController.java
  2. +1
    -1
      mallinkAdmin/src/main/resources/db/migration/V201911121100__GROUP_MENU.sql

+ 12
- 2
mallinkAdmin/src/main/java/com/iformall/controller/mem/WxScoreRulesController.java View File

@@ -5,10 +5,12 @@ import com.iformall.common.ErrorCode;
import com.iformall.common.ResultData;
import com.iformall.controller.base.BaseController;
import com.iformall.domain.po.WxScoreRules;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.enums.EnumCreditLockedStatus;
import com.iformall.service.WxScoreRulesService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -40,7 +42,11 @@ public class WxScoreRulesController extends BaseController {
@SystemControllerLog(description = "成长值-积分-配置-新增")
public ResultData add(@RequestBody WxScoreRules wxScoreRules) {
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);
return new ResultData();
}
@@ -65,7 +71,11 @@ public class WxScoreRulesController extends BaseController {
if (null == wxScoreRules.getCreditLocked()) {
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 {
wxScoreRulesService.updateCreditLocked(wxScoreRules);
} catch (Exception e) {


+ 1
- 1
mallinkAdmin/src/main/resources/db/migration/V201911121100__GROUP_MENU.sql View File

@@ -1,3 +1,3 @@
update `mall_sale_type` set `menus` =
'[1, 2, 5, 6, 8, 10, 50, 101, 102, 104, 105, 106, 108, 203, 204, 206, 207, 501, 502, 503, 504, 505, 506, 507, 509, 511, 512, 522, 523, 591, 595, 601, 611, 621, 622, 623, 624, 625, 626, 627, 901, 902]'
'[1, 2, 5, 6, 8, 10, 50, 101, 102, 104, 105, 106, 108, 203, 204, 206, 501, 502, 503, 504, 505, 506, 507, 509, 511, 512, 522, 523, 591, 595, 601, 611, 621, 622, 623, 624, 625, 626, 627, 901, 902]'
where id = 100;

Loading…
Cancel
Save