Browse Source

update login user

release_toaliyun_real
xhxu 4 years ago
parent
commit
773eeb0f21
3 changed files with 8 additions and 2 deletions
  1. +1
    -1
      mallinkAdmin/src/main/resources/db/migration/V2021110800001__addSaleType.sql
  2. +6
    -1
      mallinkBApi/src/main/java/com/iformall/controller/BaseController.java
  3. +1
    -0
      mallinkBApi/src/main/java/com/iformall/controller/WxInfoController.java

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

@@ -6,6 +6,6 @@ INSERT INTO `mallink`.`mall_permission`(`id`, `name`, `parent_id`, `available`,
INSERT INTO `mallink`.`mall_permission`(`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) VALUES (500, '抖音用户概览', 5, 'Y', NULL, 1, NULL, NULL, 'ttuserHome', 'icon-yonghushuju', 0, 500); INSERT INTO `mallink`.`mall_permission`(`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) VALUES (500, '抖音用户概览', 5, 'Y', NULL, 1, NULL, NULL, 'ttuserHome', 'icon-yonghushuju', 0, 500);




INSERT INTO `mallink`.`mall_sale_type`(`id`, `name`, `type`, `period`, `menus`) VALUES (11, '抖音尊享', 11, 12, '[1, 2, 4, 5, 6, 50, 105, 110, 201, 202, 211, 212, 221, 222, 409, 411, 416, 500, 502, 504, 505, 506, 511, 512, 591, 595, 602, 606, 610, 613, 641, 680, 711, 901, 902]');
INSERT INTO `mallink`.`mall_sale_type`(`id`, `name`, `type`, `period`, `menus`) VALUES (11, '抖音尊享', 11, 12, '[1, 2, 4, 5, 6, 50, 105, 110, 201, 202, 211, 212, 221, 222, 409, 411, 416, 500, 502, 504, 505, 506, 511, 512, 591, 595, 602, 606, 610, 641, 680, 711, 901, 902]');





+ 6
- 1
mallinkBApi/src/main/java/com/iformall/controller/BaseController.java View File

@@ -6,6 +6,7 @@ import com.iformall.domain.po.*;
import com.iformall.domain.po.base.BaseCUserEntity; import com.iformall.domain.po.base.BaseCUserEntity;
import com.iformall.domain.po.tt.TtCUser; import com.iformall.domain.po.tt.TtCUser;
import com.iformall.enums.EnumAppPlat; import com.iformall.enums.EnumAppPlat;
import com.iformall.service.CUserTokenService;
import com.iformall.utils.RedisCacheUtils; import com.iformall.utils.RedisCacheUtils;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;


@@ -47,7 +48,7 @@ public class BaseController {
private FmOpenService openService; private FmOpenService openService;


@Autowired @Autowired
private WxBuserService wxBuserService;
private CUserTokenService cUserTokenService;
@Autowired @Autowired
MaUtil maUtil; MaUtil maUtil;
@@ -145,6 +146,10 @@ public class BaseController {
return user; return user;
} }


public void updateCacheCUser(String token,Object cuser) {
cUserTokenService.updateTokenCache(token, cuser);
}

@Deprecated @Deprecated
public String getTenantId() { public String getTenantId() {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();


+ 1
- 0
mallinkBApi/src/main/java/com/iformall/controller/WxInfoController.java View File

@@ -164,6 +164,7 @@ public class WxInfoController extends BaseController {
if (StringUtils.isNotBlank(buUser.getParentTenantId())) { if (StringUtils.isNotBlank(buUser.getParentTenantId())) {
request.setAttribute(Constant.PARENT_TENANT_ID, buUser.getParentTenantId()); request.setAttribute(Constant.PARENT_TENANT_ID, buUser.getParentTenantId());
} }
updateCacheCUser(cUser.getToken(), cUser);
return new ResultData(resultMap); return new ResultData(resultMap);


} }


Loading…
Cancel
Save