用户列表增加余额筛选
This commit is contained in:
parent
4a48e272c5
commit
ae6b5fcbd1
|
|
@ -21,6 +21,7 @@ import org.springframework.validation.annotation.Validated;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 店铺用户管理
|
||||
|
|
@ -99,8 +100,8 @@ public class ShopUserController {
|
|||
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
|
||||
@SaAdminCheckPermission(value = "shopUser:list", name = "店铺用户列表")
|
||||
@GetMapping
|
||||
public CzgResult<Page<ShopUserDTO>> list(String key, Integer isVip) {
|
||||
return CzgResult.success(shopUserService.getPage(key, isVip));
|
||||
public CzgResult<Page<ShopUserDTO>> list(String key, Integer isVip, BigDecimal amount) {
|
||||
return CzgResult.success(shopUserService.getPage(key, isVip, amount));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ import com.czg.resp.CzgResult;
|
|||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 商户储值会员 服务层。
|
||||
*
|
||||
|
|
@ -14,7 +16,7 @@ import com.mybatisflex.core.service.IService;
|
|||
*/
|
||||
public interface ShopUserService extends IService<ShopUser> {
|
||||
|
||||
Page<ShopUserDTO> getPage(String key, Integer isVip);
|
||||
Page<ShopUserDTO> getPage(String key, Integer isVip, BigDecimal amount);
|
||||
|
||||
Boolean updateInfo(Long shopId, ShopUserEditDTO shopUserEditDTO);
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import java.util.List;
|
|||
*/
|
||||
public interface ShopUserMapper extends BaseMapper<ShopUser> {
|
||||
|
||||
List<ShopUserDTO> selectPageByKeyAndIsVip(@Param("shopId") Long shopId, @Param("isVip") Integer isVip, @Param("key") String key);
|
||||
List<ShopUserDTO> selectPageByKeyAndIsVip(@Param("shopId") Long shopId, @Param("isVip") Integer isVip, @Param("key") String key, @Param("amount") BigDecimal amount);
|
||||
|
||||
int incrAccount(@Param("shopId") long shopId, @Param("id") Long id, @Param("time") LocalDateTime time, @Param("money") BigDecimal money);
|
||||
int decrAccount(@Param("shopId") long shopId, @Param("id") Long id, @Param("time") LocalDateTime time, @Param("money") BigDecimal money);
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
|
|||
}
|
||||
|
||||
@Override
|
||||
public Page<ShopUserDTO> getPage(String key, Integer isVip) {
|
||||
public Page<ShopUserDTO> getPage(String key, Integer isVip, BigDecimal amount) {
|
||||
PageHelper.startPage(PageUtil.buildPageHelp());
|
||||
return PageUtil.convert(new PageInfo<>(mapper.selectPageByKeyAndIsVip(StpKit.USER.getShopId(), isVip, key)));
|
||||
return PageUtil.convert(new PageInfo<>(mapper.selectPageByKeyAndIsVip(StpKit.USER.getShopId(), isVip, key, amount)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -73,6 +73,10 @@
|
|||
<if test="key != null and key != ''">
|
||||
and (a.nick_name like concat('%', #{key}, '%') or a.phone like concat('%', #{key}, '%'))
|
||||
</if>
|
||||
|
||||
<if test="amount != null">
|
||||
and a.amount >= #{amount}
|
||||
</if>
|
||||
GROUP BY a.id
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
|
|
|
|||
Loading…
Reference in New Issue