Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
d38276e6e2
|
|
@ -32,8 +32,8 @@ public class UserShopCouponController {
|
|||
public CzgResult<Page<ShopActivateCouponRecord>> findByUserId(
|
||||
@RequestParam Long userId,
|
||||
@RequestParam(required = false) Integer status,
|
||||
@RequestParam(required = false) Long orderId) {
|
||||
return CzgResult.success(couponService.find(userId, orderId, status));
|
||||
@RequestParam(required = false) Long shopId) {
|
||||
return CzgResult.success(couponService.find(userId, shopId, status));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public interface ShopCouponService extends IService<ShopCoupon> {
|
|||
Page<CouponReceiveVo> queryReceive(QueryReceiveDto param);
|
||||
|
||||
|
||||
Page<ShopActivateCouponRecord> find(Long userId, Long orderId, Integer status);
|
||||
Page<ShopActivateCouponRecord> find(Long userId,Long shopId, Integer status);
|
||||
|
||||
List<UserCouponVo> findCoupon(Long shopId, Long shopUserId);
|
||||
|
||||
|
|
|
|||
|
|
@ -85,8 +85,11 @@ public class ShopCouponServiceImpl extends ServiceImpl<ShopCouponMapper, ShopCou
|
|||
|
||||
|
||||
@Override
|
||||
public Page<ShopActivateCouponRecord> find(Long userId, Long orderId, Integer status) {
|
||||
List<Long> shopUserIds = shopUserService.queryChain().eq(ShopUser::getUserId, userId).select(ShopUser::getId).listAs(Long.class);
|
||||
public Page<ShopActivateCouponRecord> find(Long userId, Long shopId, Integer status) {
|
||||
List<Long> shopUserIds = shopUserService.queryChain()
|
||||
.eq(ShopUser::getUserId, userId)
|
||||
.eq(ShopUser::getShopId, shopId)
|
||||
.select(ShopUser::getId).listAs(Long.class);
|
||||
if (CollectionUtil.isNotEmpty(shopUserIds)) {
|
||||
return couponRecordService.findByUser(PageUtil.buildPage(), shopUserIds, status);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue