Browse Source

平台优惠券、商家优惠券商品查询处理平台上架商品业务功能

multiwx
dy-hu 10 months ago
parent
commit
ee12283d4d
  1. 8
      cereshop-app/src/main/java/com/shop/cereshop/app/param/coupon/ActivityParam.java
  2. 2
      cereshop-app/src/main/java/com/shop/cereshop/app/service/activity/impl/CereBuyerCouponlServiceImpl.java
  3. 14
      cereshop-app/src/main/resources/mybatis/mapper/activity/CereBuyerCouponDAO.xml

8
cereshop-app/src/main/java/com/shop/cereshop/app/param/coupon/ActivityParam.java

@ -30,4 +30,12 @@ public class ActivityParam extends PageParam {
*/
@ApiModelProperty(value = "店铺优惠券id")
private Long shopCouponId;
/**
* 商家id
*/
@ApiModelProperty(value = "商家id")
private String project;
}

2
cereshop-app/src/main/java/com/shop/cereshop/app/service/activity/impl/CereBuyerCouponlServiceImpl.java

@ -21,6 +21,7 @@ import com.shop.cereshop.app.service.buyer.CereBuyerShopCouponService;
import com.shop.cereshop.app.service.buyer.CereBuyerUserService;
import com.shop.cereshop.app.service.coupon.CereShopCouponService;
import com.shop.cereshop.app.service.redis.CereRedisKeyServcice;
import com.shop.cereshop.app.utils.ContextUtil;
import com.shop.cereshop.commons.constant.CoReturnFormat;
import com.shop.cereshop.commons.constant.CreditOptTypeEnum;
import com.shop.cereshop.commons.constant.IntegerEnum;
@ -262,6 +263,7 @@ public class CereBuyerCouponlServiceImpl implements CereBuyerCouponService {
@Override
public Page getCouponProducts(ActivityParam param) throws CoBusinessException {
param.setProject(ContextUtil.getProject());
PageHelper.startPage(param.getPage(), param.getPageSize());
List<Product> list = null;
if (!EmptyUtils.isLongEmpty(param.getActivityId())) {

14
cereshop-app/src/main/resources/mybatis/mapper/activity/CereBuyerCouponDAO.xml

@ -63,7 +63,12 @@
LEFT JOIN cere_shop_order g ON f.order_id=g.order_id and g.state in (2,3,4)
where a.product_id in (SELECT b.product_id from cere_activity_sign a,cere_sign_product b
where a.sign_id=b.sign_id and a.activity_id=#{activityId})
and a.shelve_state=1
<if test="project == 0">
and a.plat_shelve_state=1
</if>
<if test="project!=0 and project != ''">
and a.shelve_state=1
</if>
GROUP BY a.product_id
</select>
@ -79,7 +84,12 @@
LEFT JOIN cere_order_product f ON b.sku_id=f.sku_id
LEFT JOIN cere_shop_order g ON f.order_id=g.order_id and g.state in (2,3,4)
where a.product_id in (SELECT product_id from cere_shop_coupon_detail where shop_coupon_id=#{shopCouponId})
and a.shelve_state=1
<if test="project == 0">
and a.plat_shelve_state=1
</if>
<if test="project!=0 and project != ''">
and a.shelve_state=1
</if>
GROUP BY a.product_id
</select>

Loading…
Cancel
Save