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