Просмотр исходного кода

[停车券][新增]:库存接口修改

release_toaliyun_real
Stormeye.Wu 7 лет назад
Родитель
Сommit
04dfa0c9a5
2 измененных файлов: 2 добавлений и 14 удалений
  1. +0
    -12
      mallinkAdmin/src/main/java/com/simple/controller/WxCarController.java
  2. +2
    -2
      mallinkService/src/main/resources/mapper/WxCouponCarMapper.xml

+ 0
- 12
mallinkAdmin/src/main/java/com/simple/controller/WxCarController.java Просмотреть файл

@@ -199,13 +199,7 @@ public class WxCarController extends BaseController
Integer amount = vendorParamsObj.getInteger("amount");
Integer avaliavleNum = vendorParamsObj.getInteger("avaliavleNum");
Integer amtCount = wxCouponCarService.getAmtCountByTemplateId(templateId);
if (amtCount == null) {
amtCount = 0;
}
Integer availCount = wxCouponCarService.getAvaibleCountByTemplateId(templateId);
if (availCount == null) {
availCount = 0;
}
if (amtCount >= amount) {
logger.error("已达到停车厂商优免券数量限制");
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "已达到停车厂商优免券数量限制");
@@ -282,9 +276,6 @@ public class WxCarController extends BaseController
Integer amountCount = 0;
try {
amountCount = wxCouponCarService.getAmtCountByTemplateId(templateId);
if (amountCount == null) {
amountCount = 0;
}
} catch (Exception e) {
logger.error(e.getMessage());
}
@@ -301,9 +292,6 @@ public class WxCarController extends BaseController
Integer availCount = 0;
try {
availCount = wxCouponCarService.getAvaibleCountByTemplateId(templateId);
if (availCount == null) {
availCount = 0;
}
} catch (Exception e) {
logger.error(e.getMessage());
}


+ 2
- 2
mallinkService/src/main/resources/mapper/WxCouponCarMapper.xml Просмотреть файл

@@ -73,7 +73,7 @@
</select>

<select id="findTemplateAmtCount" parameterType="Long" resultType="Integer">
select sum(c.inventory) as count
select IFNULL(sum(c.inventory),0) as count
from wx_coupon_car car, wx_coupon c
where car.id = c.id
and c.status = 0
@@ -81,7 +81,7 @@
</select>

<select id="findTemplateAvailCount" parameterType="Long" resultType="Integer">
select sum(c.remain_inventory) as count
select IFNULL(sum(c.remain_inventory),0) as count
from wx_coupon_car car, wx_coupon c
where car.id = c.id
and c.status = 0


Загрузка…
Отмена
Сохранить