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