Selaa lähdekoodia

Merge remote-tracking branch 'origin/release_20260123' into release_20260123

panzhilin 3 kuukautta sitten
vanhempi
commit
25853ec804

+ 3 - 0
alien-entity/src/main/java/shop/alien/entity/store/dto/StoreStaffConfigListQueryDto.java

@@ -30,6 +30,9 @@ public class StoreStaffConfigListQueryDto {
 
     @ApiModelProperty(value = "职位")
     private String staffPosition;
+
+    @ApiModelProperty(value = "员工名称")
+    private String staffName;
 }
 
 

+ 3 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/LifeUserVo.java

@@ -62,6 +62,9 @@ public class LifeUserVo extends LifeUser {
     @ApiModelProperty(value = "简介")
     private String blurb;
 
+    @ApiModelProperty(value = "账户名称(商户昵称或用户名称)")
+    private String accountName;
+
     @ApiModelProperty(value = "验证码")
     private String verificationCode;
 }

+ 7 - 4
alien-entity/src/main/java/shop/alien/mapper/LifeUserMapper.java

@@ -35,10 +35,13 @@ public interface LifeUserMapper extends BaseMapper<LifeUser> {
     LifeFansVo getUserInfoByPhoneIdList(@Param("phoneId") String phoneId);
 
     @Select("SELECT * FROM ( " +
-            " SELECT store.id, concat( 'store_', USER.phone ) phoneId, USER.head_img imgUrl, store_blurb blurb, " +
-            " if(store.id is null,USER.name ,store.store_name) storeUserName " +
-            " FROM store_user USER LEFT JOIN store_info store ON USER.store_id = store.id  and USER.delete_flag = 0 and  store.delete_flag = 0  " +
-            " UNION ALL SELECT id, concat( 'user_', user_phone ) phoneId, user_image imgUrl, jianjie blurb, user_name NAME " +
+            " SELECT store.id, concat( 'store_', USER.phone ) phoneId, USER.head_img imgUrl, " +
+            " IF(store.id IS NULL, USER.account_blurb, store.store_blurb) blurb, " +
+            " IF(store.id IS NULL, USER.nick_name, store.store_name) storeUserName, " +
+            " USER.nick_name accountName " +
+            " FROM store_user USER LEFT JOIN store_info store ON USER.store_id = store.id " +
+            " WHERE USER.delete_flag = 0 AND (store.id IS NULL OR store.delete_flag = 0) " +
+            " UNION ALL SELECT id, concat( 'user_', user_phone ) phoneId, user_image imgUrl, jianjie blurb, user_name NAME, user_name accountName " +
             " FROM life_user WHERE delete_flag = 0 ) a " +
             " ${ew.customSqlSegment}")
     IPage<LifeUserVo> getStoreAndUserByName(IPage<LifeUserVo> iPage, @Param(Constants.WRAPPER) QueryWrapper<LifeUserVo> wrapper);

+ 2 - 1
alien-store/src/main/java/shop/alien/store/controller/StoreStaffConfigController.java

@@ -52,7 +52,8 @@ public class StoreStaffConfigController {
             @ApiImplicitParam(name = "size", value = "分页条数", dataType = "Integer", paramType = "query", required = false),
             @ApiImplicitParam(name = "status", value = "员工状态(0-待审核 1-审核通过 2-审核拒绝)", dataType = "String", paramType = "query", required = false),
             @ApiImplicitParam(name = "onlineStatus", value = "上线状态(0-上线 1-下线)", dataType = "Integer", paramType = "query", required = false),
-            @ApiImplicitParam(name = "staffPosition", value = "职位", dataType = "String", paramType = "query", required = false)
+            @ApiImplicitParam(name = "staffPosition", value = "职位", dataType = "String", paramType = "query", required = false),
+            @ApiImplicitParam(name = "staffName", value = "员工姓名", dataType = "String", paramType = "query", required = false),
     })
     @GetMapping("/getStaffConfigList")
     public R<IPage<StoreStaffConfig>> getStaffConfigList(StoreStaffConfigListQueryDto query) {

+ 2 - 0
alien-store/src/main/java/shop/alien/store/service/LifeUserService.java

@@ -145,6 +145,8 @@ public class LifeUserService extends ServiceImpl<LifeUserMapper, LifeUser> {
                 .like("a.storeUserName", vo.getSearchName())
                 .or()
                 .like("a.phoneId", vo.getSearchName())
+                .or()
+                .like("a.accountName", vo.getSearchName())
             );
         }
         IPage<LifeUserVo> voList = lifeUserMapper.getStoreAndUserByName(new Page<>(vo.getPage(), vo.getSize()), queryWrapper);

+ 2 - 0
alien-store/src/main/java/shop/alien/store/service/impl/StoreStaffConfigServiceImpl.java

@@ -125,6 +125,7 @@ public class StoreStaffConfigServiceImpl implements StoreStaffConfigService {
         String status = query == null ? null : query.getStatus();
         Integer onlineStatus = query == null ? null : query.getOnlineStatus();
         String staffPosition = query == null ? null : query.getStaffPosition();
+        String staffName = query == null ? null : query.getStaffName();
 
         IPage<StoreStaffConfig> storePage = new Page<>(page, size);
         if (storeId == null) {
@@ -135,6 +136,7 @@ public class StoreStaffConfigServiceImpl implements StoreStaffConfigService {
         queryWrapper.eq(onlineStatus != null, "online_status", onlineStatus);
         queryWrapper.eq("store_id", storeId);
         queryWrapper.eq(StringUtils.isNotEmpty(staffPosition), "staff_position", staffPosition);
+        queryWrapper.eq(StringUtils.isNotEmpty(staffName), "name", staffName);
         // 只查询未删除的记录
         queryWrapper.eq("delete_flag", 0);
         // 排序规则:先按置顶状态降序(置顶的在前),再按置顶时间降序,最后按创建时间降序