Przeglądaj źródła

fix card

release_toaliyun_real
lin 3 lat temu
rodzic
commit
7baaca7639
6 zmienionych plików z 12 dodań i 8 usunięć
  1. +1
    -1
      mallinkService/src/main/java/com/iformall/mapper/WxCouponMapper.java
  2. +1
    -1
      mallinkService/src/main/java/com/iformall/mapper/WxCouponPasswordMapper.java
  3. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponPasswordServiceImpl.java
  4. +6
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java
  5. +2
    -2
      mallinkService/src/main/resources/mapper/WxCouponMapper.xml
  6. +1
    -1
      mallinkService/src/main/resources/mapper/WxCouponPasswordMapper.xml

+ 1
- 1
mallinkService/src/main/java/com/iformall/mapper/WxCouponMapper.java Wyświetl plik

@@ -42,7 +42,7 @@ public interface WxCouponMapper extends CommonMapper<WxCoupon, Long> {
void deleteById(@Param("id")Long id,@Param("tenantId")String tenantId);
Integer setPrice(@Param("id")Long id,@Param("tenantId")String tenantId,@Param("price")Integer price,@Param("subsidyNum")Integer subsidyNum);
Integer setPrice(WxCoupon wxCoupon);

Integer reduceInventory(@Param("id")Long id,@Param("tenantId")String tenantId,@Param("number")Integer number);


+ 1
- 1
mallinkService/src/main/java/com/iformall/mapper/WxCouponPasswordMapper.java Wyświetl plik

@@ -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 setPrice(@Param("tenantId")String tenantId,@Param("id")Long id,@Param("couponId")Long couponId,@Param("price")Integer price);
void setPrice(WxCouponPassword wxCouponPassword);

}

+ 1
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxCouponPasswordServiceImpl.java Wyświetl plik

@@ -334,7 +334,7 @@ public class WxCouponPasswordServiceImpl implements WxCouponPasswordService {

@Override
public void setPrice(WxCouponPassword wxCouponPassword) {
wxCouponPasswordMapper.setPrice(wxCouponPassword.getTenantId(),wxCouponPassword.getId(),wxCouponPassword.getCouponId(), wxCouponPassword.getPrice());
wxCouponPasswordMapper.setPrice(wxCouponPassword);
}
}

+ 6
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java Wyświetl plik

@@ -1022,12 +1022,16 @@ public class WxCouponServiceImpl implements WxCouponService {
@Override
@Transactional(isolation=Isolation.SERIALIZABLE, propagation = Propagation.REQUIRED, rollbackFor = {Exception.class})
public ResultData setPrice(WxCoupon record) {
Integer count = wxCouponMapper.setPrice(record.getId(), record.getTenantId(), record.getPrice(),record.getSubsidyNum());
Integer count = wxCouponMapper.setPrice(record);
if (null == count || count <= 0 ) {
return new ResultData(Result.ERROR,"设置失败");
}
//设置卡密price
couponPasswordMapper.setPrice(record.getTenantId(), null,record.getId(), record.getPrice());
WxCouponPassword couponPassword = new WxCouponPassword();
couponPassword.updateTenantInfo(record);
couponPassword.setCouponId(record.getId());
couponPassword.setPrice(record.getPrice());
couponPasswordMapper.setPrice(couponPassword);
return new ResultData();
}


+ 2
- 2
mallinkService/src/main/resources/mapper/WxCouponMapper.xml Wyświetl plik

@@ -1524,8 +1524,8 @@
update wx_coupon set make_merchant_id = #{makeMerchantId} where id = #{id} and tenant_id = #{tenantId}
</update>
<update id="setPrice" parameterType="HashMap">
update wx_coupon set price = #{price},subsidy_num={subsidyNum} where id = #{id} and tenant_id = #{tenantId} and price = 0
<update id="setPrice" parameterType="com.iformall.domain.po.WxCoupon">
update wx_coupon set price = #{price},subsidy_num=#{subsidyNum} where id = #{id} and tenant_id = #{tenantId} and price = 0
</update>

</mapper>

+ 1
- 1
mallinkService/src/main/resources/mapper/WxCouponPasswordMapper.xml Wyświetl plik

@@ -215,7 +215,7 @@
update wx_coupon_password set is_stop = #{isStop} , update_date = now() where id = #{id} and tenant_id = #{tenantId}
</update>
<update id="setPrice" parameterType="map">
<update id="setPrice" parameterType="com.iformall.domain.po.WxCouponPassword">
update wx_coupon_password set price = #{price} , update_date = now()
where tenant_id = #{tenantId} and price = 0
<if test=" null != couponId">


Ładowanie…
Anuluj
Zapisz