| @@ -180,7 +180,12 @@ public class WxCouponController extends BaseController { | |||||
| return new ResultData(wxCouponService.findPressData(wxCoupon,pageNum,pageSize)); | return new ResultData(wxCouponService.findPressData(wxCoupon,pageNum,pageSize)); | ||||
| } | } | ||||
| @ApiOperation("商户活动列表信息") | |||||
| @GetMapping("findByMerchant") | |||||
| @SystemControllerLog(description = "商户活动列表信息") | |||||
| public ResultData findByMerchant(@ModelAttribute WxCoupon wxCoupon) { | |||||
| return new ResultData(wxCouponService.findByMerchant(wxCoupon)); | |||||
| } | |||||
| } | } | ||||
| @@ -201,6 +201,9 @@ public class WxCoupon extends BaseEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="修改库存有效期参数, 用来做乐观锁",name="orgInventory") | @io.swagger.annotations.ApiModelProperty(value="修改库存有效期参数, 用来做乐观锁",name="orgInventory") | ||||
| private Integer orgInventory; | private Integer orgInventory; | ||||
| @io.swagger.annotations.ApiModelProperty(value="商户id",name="merchantId") | |||||
| @Transient | |||||
| private Long merchantId; | |||||
| //营销分析 | //营销分析 | ||||
| private WxCouponStatisVo wxCouponStatisVo; | private WxCouponStatisVo wxCouponStatisVo; | ||||
| @@ -213,6 +216,14 @@ public class WxCoupon extends BaseEntity { | |||||
| this.wxCouponStatisVo = wxCouponStatisVo; | this.wxCouponStatisVo = wxCouponStatisVo; | ||||
| } | } | ||||
| public Long getMerchantId() { | |||||
| return merchantId; | |||||
| } | |||||
| public void setMerchantId(Long merchantId) { | |||||
| this.merchantId = merchantId; | |||||
| } | |||||
| public String getTenantId() { | public String getTenantId() { | ||||
| return tenantId; | return tenantId; | ||||
| } | } | ||||
| @@ -75,4 +75,11 @@ public interface WxCouponMapper extends CommonMapper<WxCoupon, Long> { | |||||
| // 库存,有效期修改 | // 库存,有效期修改 | ||||
| int updateStockAndValidDate(WxCoupon wxCoupon); | int updateStockAndValidDate(WxCoupon wxCoupon); | ||||
| /** | |||||
| * 查询商户的卷信息 | |||||
| * @param wxCoupon | |||||
| * @return | |||||
| */ | |||||
| List<WxCoupon> findByMerchant(WxCoupon wxCoupon); | |||||
| } | } | ||||
| @@ -199,4 +199,10 @@ public interface WxCouponService { | |||||
| */ | */ | ||||
| ResultData updateCouponStockAndEndTime(WxCoupon wxCoupon); | ResultData updateCouponStockAndEndTime(WxCoupon wxCoupon); | ||||
| /** | |||||
| * 查询商户的卷信息 | |||||
| * @param wxCoupon | |||||
| * @return | |||||
| */ | |||||
| List<WxCoupon> findByMerchant(WxCoupon wxCoupon); | |||||
| } | } | ||||
| @@ -529,4 +529,9 @@ public class WxCouponServiceImpl implements WxCouponService { | |||||
| } | } | ||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @Override | |||||
| public List<WxCoupon> findByMerchant(WxCoupon wxCoupon) { | |||||
| return wxCouponMapper.findByMerchant(wxCoupon); | |||||
| } | |||||
| } | } | ||||
| @@ -801,4 +801,22 @@ | |||||
| wx_coupon wc on wc.id = ct.coupon_id | wx_coupon wc on wc.id = ct.coupon_id | ||||
| where ct.`sub_target_id` = #{id} | where ct.`sub_target_id` = #{id} | ||||
| </select> | </select> | ||||
| <select id="findByMerchant" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.po.WxCoupon"> | |||||
| select c.* from wx_coupon c left join wx_coupon_merchant wc on wc.product_id = c.id where 1=1 | |||||
| <if test="merchantId != null"> | |||||
| and wc.merchant_id=#{merchantId} | |||||
| </if> | |||||
| <if test="type != null"> | |||||
| and c.type=#{type} | |||||
| </if> | |||||
| <if test="status != null"> | |||||
| and c.status=#{status} | |||||
| </if> | |||||
| <if test="tenantId != null"> | |||||
| and c.tenantId=#{tenantId} | |||||
| </if> | |||||
| order by c.id desc | |||||
| </select> | |||||
| </mapper> | </mapper> | ||||