Browse Source

fix:上测试 分布式事物2

pull/31/head
pref_mail@163.com 9 months ago
parent
commit
f1466547af
  1. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/BasicDataApplication.java
  2. 8
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java
  3. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/TrunkLineApplication.java

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/BasicDataApplication.java

@ -13,7 +13,9 @@ import org.springblade.core.cloud.feign.EnableBladeFeign;
*
* @author lmy
*/
@EnableBladeFeign
@SeataCloudApplication
public class BasicDataApplication {
public static void main(String[] args) {

8
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java

@ -169,12 +169,19 @@ public class BasicdataWarehouseServiceImpl extends BaseServiceImpl<BasicdataWare
String defaultRoleId = DictBizCache.getValue(DictBizConstant.DEFAULT_MALL_ROLE_ID, DictBizConstant.DEFAULT_MALL_ROLE_ID);
if(StringUtil.isBlank(defaultRoleId)){
defaultRoleId="1111";
}
log.info(">>>>>>> 当前登录的人 {} 角色信息 {}",user.getAccount(),user.getRoleId());
// 最大的管理员
if (ObjectUtil.isEmpty(user.getRoleId())) {
return null;
}
log.info(">>>>1 {}",user.getRoleId());
log.info(">>>>2 {}",defaultRoleId);
if (user.getRoleId().contains(defaultRoleId)) {
// 当前这登录的用户为商场用户
@ -265,6 +272,7 @@ public class BasicdataWarehouseServiceImpl extends BaseServiceImpl<BasicdataWare
// 根据当前登陆人的信息和角色判断查询是所属仓库 还是服务仓库
try {
BladeUser user = AuthUtil.getUser();
String json = redis.get(CacheNames.tenantKeyObj(user.getTenantId(), CacheNames.USER_WAREHOUSE_KEY, user.getUserId()));
if (StringUtil.isBlank(json)) {
List<BasicdataWarehouseEntity> myWarehouseList = getMyWarehouseList();

3
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/TrunkLineApplication.java

@ -17,14 +17,17 @@
package com.logpm.trunkline;
import org.springblade.common.constant.ModuleNameConstant;
import org.springblade.core.cloud.feign.EnableBladeFeign;
import org.springblade.core.launch.BladeApplication;
import org.springblade.core.transaction.annotation.SeataCloudApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
/**
* Demo启动器
*
* @author Chill
*/
@EnableBladeFeign
@SeataCloudApplication
public class TrunkLineApplication {

Loading…
Cancel
Save