| @@ -30,6 +30,6 @@ public interface WxCouponPasswordMapper extends CommonMapper<WxCouponPassword, L | |||||
| void updateIsStop(@Param("tenantId")String tenantId,@Param("id")Long Id,@Param("isStop")Integer isStop); | void updateIsStop(@Param("tenantId")String tenantId,@Param("id")Long Id,@Param("isStop")Integer isStop); | ||||
| void setPrice(@Param("tenantId")String tenantId,@Param("couponId")Long couponId,@Param("price")Integer price); | |||||
| void setPrice(@Param("tenantId")String tenantId,@Param("id")Long id,@Param("couponId")Long couponId,@Param("price")Integer price); | |||||
| } | } | ||||
| @@ -334,7 +334,7 @@ public class WxCouponPasswordServiceImpl implements WxCouponPasswordService { | |||||
| @Override | @Override | ||||
| public void setPrice(WxCouponPassword wxCouponPassword) { | public void setPrice(WxCouponPassword wxCouponPassword) { | ||||
| wxCouponPasswordMapper.setPrice(wxCouponPassword.getTenantId(), wxCouponPassword.getCouponId(), wxCouponPassword.getPrice()); | |||||
| wxCouponPasswordMapper.setPrice(wxCouponPassword.getTenantId(),wxCouponPassword.getId(),wxCouponPassword.getCouponId(), wxCouponPassword.getPrice()); | |||||
| } | } | ||||
| } | } | ||||
| @@ -1027,7 +1027,7 @@ public class WxCouponServiceImpl implements WxCouponService { | |||||
| return new ResultData(Result.ERROR,"设置失败"); | return new ResultData(Result.ERROR,"设置失败"); | ||||
| } | } | ||||
| //设置卡密price | //设置卡密price | ||||
| couponPasswordMapper.setPrice(record.getTenantId(), record.getId(), record.getPrice()); | |||||
| couponPasswordMapper.setPrice(record.getTenantId(), null,record.getId(), record.getPrice()); | |||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @@ -217,7 +217,13 @@ | |||||
| <update id="setPrice" parameterType="map"> | <update id="setPrice" parameterType="map"> | ||||
| update wx_coupon_password set price = #{price} , update_date = now() | update wx_coupon_password set price = #{price} , update_date = now() | ||||
| where coupon_id = #{couponId} and tenant_id = #{tenantId} and price = 0 | |||||
| where tenant_id = #{tenantId} and price = 0 | |||||
| <if test=" null != couponId"> | |||||
| and coupon_id = #{couponId} | |||||
| </if> | |||||
| <if test=" null != id"> | |||||
| and id = #{id} | |||||
| </if> | |||||
| </update> | </update> | ||||
| </mapper> | </mapper> | ||||