Procházet zdrojové kódy

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

release_toaliyun_real
Stormeye Wu před 6 roky
rodič
revize
203d2d4843
2 změnil soubory, kde provedl 13 přidání a 3 odebrání
  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 Zobrazit soubor

@@ -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) {


+ 1
- 1
mallinkAdmin/src/main/resources/db/migration/V201911121100__GROUP_MENU.sql Zobrazit soubor

@@ -1,3 +1,3 @@
update `mall_sale_type` set `menus` = 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; where id = 100;

Načítá se…
Zrušit
Uložit