Merge branch 'refs/heads/gyj' into test

This commit is contained in:
GYJ 2024-08-20 17:31:05 +08:00
commit 0d8aa662e4
2 changed files with 5 additions and 7 deletions

View File

@ -51,7 +51,6 @@ public class TbShopUserController {
@GetMapping("queryAllShopUser") @GetMapping("queryAllShopUser")
@ApiOperation("查询商家用户") @ApiOperation("查询商家用户")
@AnonymousGetMapping
public ResponseEntity<Object> queryAllShopUser(TbShopUserQueryCriteria criteria) { public ResponseEntity<Object> queryAllShopUser(TbShopUserQueryCriteria criteria) {
return new ResponseEntity<>(tbShopUserService.queryShopUser(criteria), HttpStatus.OK); return new ResponseEntity<>(tbShopUserService.queryShopUser(criteria), HttpStatus.OK);
} }

View File

@ -13,18 +13,17 @@ import org.apache.ibatis.annotations.Select;
public interface ShopUserMapper extends BaseMapper<TbShopUser> { public interface ShopUserMapper extends BaseMapper<TbShopUser> {
@Select("<script>" + @Select("<script>" +
"SELECT su.id as id, u.head_img as headImg, u.nick_name as nickName, u.sex as sex, " + "SELECT su.id as id, su.head_img as headImg, su.name as nickName, su.sex as sex, " +
"su.amount as amount, u.total_score as totalScore, u.telephone as telephone, " + "su.amount as amount, 0 as totalScore, su.telephone as telephone, " +
"u.birth_day as birthDay, su.is_vip as isVip, su.created_at as createAt, u.last_log_in_at as lastLoginAt " + "su.birth_day as birthDay, su.is_vip as isVip, su.created_at as createAt " +
"FROM tb_shop_user su " + "FROM tb_shop_user su " +
"LEFT JOIN tb_user_info u ON su.user_id = u.id " +
"<where> " + "<where> " +
"<if test='param.shopId != null and param.shopId != &quot;&quot; and param.shopId != 1'>" + "<if test='param.shopId != null and param.shopId != &quot;&quot; and param.shopId != 1'>" +
"AND su.shop_id = #{param.shopId} " + "AND su.shop_id = #{param.shopId} " +
"</if>" + "</if>" +
"<if test='param.name != null and param.name != &quot;&quot;'>" + "<if test='param.name != null and param.name != &quot;&quot;'>" +
"AND (u.nick_name like concat('%', #{param.name}, '%') or su.name LIKE concat( '%', #{param.name}, '%' ) " + "AND (su.name like concat('%', #{param.name}, '%') or su.name LIKE concat( '%', #{param.name}, '%' ) " +
" or u.telephone like concat('%', #{param.name}, '%') or su.telephone like concat('%', #{param.name}, '%'))" + " or su.telephone like concat('%', #{param.name}, '%') or su.telephone like concat('%', #{param.name}, '%'))" +
"</if>" + "</if>" +
"<if test='isVip != null'>" + "<if test='isVip != null'>" +
"AND su.is_vip=#{isVip} " + "AND su.is_vip=#{isVip} " +