Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/master'

yang 4 anni fa
parent
commit
244916a55e

+ 4 - 2
lift-ud-service/src/main/java/cn/com/ty/lift/ud/dataBank/controller/query/LiftBrandQuery.java

@@ -39,7 +39,7 @@ public final class LiftBrandQuery extends BasePageQuery {
     /**
      * 状态 0:上架1:下架
      */
-    @ApiModelProperty("状态 0:上架1:下架")
+    @ApiModelProperty("状态 1:上架0:下架")
     private Integer statuz;
 
     /**
@@ -68,7 +68,9 @@ public final class LiftBrandQuery extends BasePageQuery {
         if (null != statuz) {
             query.eq(LiftBrandEntity::getStatuz, statuz);
         }
-        query.orderByDesc(LiftBrandEntity::getSort).orderByDesc(LiftBrandEntity::getCreateTime);
+        query.orderByDesc(LiftBrandEntity::getHotFlag)
+                .orderByDesc(LiftBrandEntity::getSort)
+                .orderByDesc(LiftBrandEntity::getCreateTime);
         // if (null == getSort()) {
         //
         // }

+ 1 - 1
lift-ud-service/src/main/java/cn/com/ty/lift/ud/dataBank/mapper/LiftBrandMapper.java

@@ -14,7 +14,7 @@ import java.util.List;
  */
 public interface LiftBrandMapper extends BaseMapper<LiftBrandEntity> {
 
-	@Select("SELECT * FROM lift_brand WHERE hot_flag=1")
+	@Select("SELECT * FROM lift_brand WHERE hot_flag=1 and statuz=1")
 	List<LiftBrandEntity>getHotList();
 	
 	@Select("SELECT * FROM lift_brand WHERE statuz=1")

+ 1 - 1
lift-ud-service/src/main/java/cn/com/ty/lift/ud/dataBank/mapper/entity/LiftBrandEntity.java

@@ -50,7 +50,7 @@ public class LiftBrandEntity extends BaseEntity {
         /**
          * 状态 0:上架1:下架
          */
-        @ApiModelProperty("状态 0:上架1:下架")
+        @ApiModelProperty("状态 1:上架0:下架")
         private Integer statuz;
 
         /**

+ 12 - 3
lift-ud-service/src/main/java/cn/com/ty/lift/ud/dataBank/service/impl/LiftBrandServiceImpl.java

@@ -39,10 +39,19 @@ public class LiftBrandServiceImpl extends ServiceImpl<LiftBrandMapper, LiftBrand
         List<LiftBrandEntity> selectList = null;
         List<LiftBrandEntity> hotList = null;
         if (StringUtils.isNotBlank(lt.getSercheKey())) {
-            selectList = liftBrandMapper.selectList(new QueryWrapper<LiftBrandEntity>().like("name", lt.getSercheKey()));
-            hotList = liftBrandMapper.selectList(new QueryWrapper<LiftBrandEntity>().like("name", lt.getSercheKey()).eq("hot_flag", 1));
+            selectList = liftBrandMapper.selectList(new QueryWrapper<LiftBrandEntity>()
+                    .like("name", lt.getSercheKey())
+                    .eq("statuz",1)
+            );
+            hotList = liftBrandMapper.selectList(new QueryWrapper<LiftBrandEntity>()
+                    .like("name", lt.getSercheKey())
+                    .eq("hot_flag", 1)
+                    .eq("statuz",1)
+            );
         } else {
-            selectList = liftBrandMapper.selectList(null);
+            selectList = liftBrandMapper.selectList(new QueryWrapper<LiftBrandEntity>()
+                    .eq("statuz",1)
+            );
             hotList = liftBrandMapper.getHotList();
         }
         List<LiftBrandVo> result = new ArrayList<>();

+ 16 - 0
lift-ud-service/src/main/java/cn/com/ty/lift/ud/userInfo/service/impl/UserInfoServiceImpl.java

@@ -1067,6 +1067,22 @@ public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfoEnt
         if( null != userAccount){
             newUserInfoVo.setExpertFlag(userAccount.getExpertFlag());
         }
+
+        if (userAccount.getExpertFlag().equals(1)){
+            //3表示专家用户,把专家的权限追加到用户下面
+            List<Appmenu> exprotRole = appUserMenuService.getAllMenuByLevelId(3L);
+            if (exprotRole != null && exprotRole.size() > 0){
+                if (appMenuList == null){
+                    appMenuList = new ArrayList<>();
+                }
+                appMenuList.addAll(exprotRole);
+            }
+        }
+        //appmenus去重
+        HashSet<Appmenu> appmenusSet = new HashSet<>(appMenuList);
+        appMenuList.clear();
+        appMenuList.addAll(appmenusSet);
+
         newUserInfoVo.setAppMenus(appMenuList);
         return RestResponse.success(newUserInfoVo,"查询成功");
     }