Kaynağa Gözat

[券库存有效期][修改]:修改投放渠道库存有效期

release_toaliyun_real
Stormeye Wu 7 yıl önce
ebeveyn
işleme
8327b7e1d6
3 değiştirilmiş dosya ile 29 ekleme ve 8 silme
  1. +2
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxCouponChannelMapper.java
  2. +10
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java
  3. +17
    -8
      mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml

+ 2
- 0
mallinkService/src/main/java/com/iformall/mapper/WxCouponChannelMapper.java Dosyayı Görüntüle

@@ -22,6 +22,8 @@ public interface WxCouponChannelMapper extends CommonMapper<WxCouponChannel, Str


void updateStatusByCouponId(WxCouponChannel wxCouponChannel); void updateStatusByCouponId(WxCouponChannel wxCouponChannel);


int updateEndTimeByCouponId(WxCouponChannel wxCouponChannel);

void offExpiriedCouponChannelByEndTime(); void offExpiriedCouponChannelByEndTime();


void offExpiriedCouponChannelByValidDate(); void offExpiriedCouponChannelByValidDate();


+ 10
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java Dosyayı Görüntüle

@@ -524,6 +524,16 @@ public class WxCouponServiceImpl implements WxCouponService {
if(ret != 1) { if(ret != 1) {
throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "数据库更新数量错误"); throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "数据库更新数量错误");
} }

// 5. 更新coupon channel 有效期
if(wxCoupon.getValidType().equals(EnumCouponValidType.BETWEEN_TWO_TIME.getCode())) {
WxCouponChannel couponChannel = new WxCouponChannel();
couponChannel.setTenantId(wxCoupon.getTenantId());
couponChannel.setCouponId(wxCoupon.getId());
couponChannel.setEndTime(wxCoupon.getValidEndDate());
wxCouponChannelMapper.updateEndTimeByCouponId(couponChannel);
}

return new ResultData(); return new ResultData();
} }




+ 17
- 8
mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml Dosyayı Görüntüle

@@ -101,14 +101,23 @@
<include refid="dynamicWhereConditions" /> <include refid="dynamicWhereConditions" />
</select> </select>


<update id="updateStatusByCouponId" parameterType="com.iformall.domain.po.WxCouponChannel">
update wx_coupon_channel
set status=#{status}, update_date=#{updateDate}
where coupon_id=#{couponId}
<if test=" null != tenantId ">
and tenant_id = #{tenantId}
</if>
</update>
<update id="updateStatusByCouponId" parameterType="com.iformall.domain.po.WxCouponChannel">
update wx_coupon_channel
set status=#{status}, update_date=#{updateDate}
where coupon_id=#{couponId}
<if test=" null != tenantId ">
and tenant_id = #{tenantId}
</if>
</update>

<update id="updateEndTimeByCouponId" parameterType="com.iformall.domain.po.WxCouponChannel">
update wx_coupon_channel
set end_time = #{endTime}
where coupon_id=#{couponId}
<if test=" null != tenantId ">
and tenant_id = #{tenantId}
</if>
</update>


<sql id="CouponChannelVoColumns"> <sql id="CouponChannelVoColumns">
<include refid="allColumns" />, <include refid="allColumns" />,


Yükleniyor…
İptal
Kaydet