优惠券问题
This commit is contained in:
@@ -49,15 +49,18 @@ public class ShopCouponServiceImpl extends ServiceImpl<ShopCouponMapper, ShopCou
|
|||||||
private ShopUserService shopUserService;
|
private ShopUserService shopUserService;
|
||||||
@Resource
|
@Resource
|
||||||
private ShopInfoService shopInfoService;
|
private ShopInfoService shopInfoService;
|
||||||
@Resource
|
@DubboReference
|
||||||
private ProductService productService;
|
private ProductService productService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ShopCouponDTO> getList(Long shopId, Integer type, Integer status) {
|
public List<ShopCouponDTO> getList(Long shopId, Integer type, Integer status) {
|
||||||
List<ShopCouponDTO> coupons = queryChain().select().eq(ShopCoupon::getShopId, shopId)
|
List<ShopCouponDTO> coupons = queryChain().select()
|
||||||
|
.eq(ShopCoupon::getShopId, shopId)
|
||||||
.eq(ShopCoupon::getType, type)
|
.eq(ShopCoupon::getType, type)
|
||||||
.eq(ShopCoupon::getStatus, status)
|
.eq(ShopCoupon::getStatus, status)
|
||||||
.orderBy(ShopCoupon::getCreateTime).desc().listAs(ShopCouponDTO.class);
|
.orderBy(ShopCoupon::getCreateTime).desc()
|
||||||
|
.listAs(ShopCouponDTO.class);
|
||||||
|
System.out.println(coupons);
|
||||||
coupons.forEach(coupon -> {
|
coupons.forEach(coupon -> {
|
||||||
if (coupon.getProId() != null) {
|
if (coupon.getProId() != null) {
|
||||||
Product product = productService.getById(coupon.getProId());
|
Product product = productService.getById(coupon.getProId());
|
||||||
|
|||||||
Reference in New Issue
Block a user