'修复已知问题'

dev-discount
199901012 4 years ago
parent b0d567dec4
commit af19b2fec1
  1. 1
      hai-service/src/main/java/com/hai/service/impl/HighCouponAgentServiceImpl.java
  2. 6
      hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java

@ -48,6 +48,7 @@ public class HighCouponAgentServiceImpl implements HighCouponAgentService {
Map<String,Object> map = new HashMap<>(); Map<String,Object> map = new HashMap<>();
map.put("couponId", highCouponAgentRel.getCouponId()); map.put("couponId", highCouponAgentRel.getCouponId());
map.put("status", 1); map.put("status", 1);
map.put("salesEndTimeS", new Date().getTime());
map.put("isAssignAgent", false); map.put("isAssignAgent", false);
List<HighCouponCode> codeList = highCouponCodeService.getCouponCodeList(map); List<HighCouponCode> codeList = highCouponCodeService.getCouponCodeList(map);

@ -183,7 +183,7 @@ public class HighCouponCodeServiceImpl implements HighCouponCodeService {
@Override @Override
public Integer getStockCountByCoupon(Long couponId) { public Integer getStockCountByCoupon(Long couponId) {
HighCouponCodeExample example = new HighCouponCodeExample(); HighCouponCodeExample example = new HighCouponCodeExample();
example.createCriteria().andCouponIdEqualTo(couponId).andStatusEqualTo(1).andSalesEndTimeGreaterThan(new Date()); example.createCriteria().andCouponIdEqualTo(couponId).andStatusEqualTo(1).andSalesEndTimeGreaterThan(new Date()).andIsAssignAgentEqualTo(false);
return highCouponCodeMapper.selectByExample(example).size(); return highCouponCodeMapper.selectByExample(example).size();
} }
@ -211,6 +211,10 @@ public class HighCouponCodeServiceImpl implements HighCouponCodeService {
criteria.andSalesCodeLike("%" + MapUtils.getString(map, "salesCode") + "%"); criteria.andSalesCodeLike("%" + MapUtils.getString(map, "salesCode") + "%");
} }
if (MapUtils.getLong(map, "salesEndTimeS") != null) {
criteria.andSalesEndTimeGreaterThan(new Date(MapUtils.getLong(map, "salesEndTimeS")));
}
if (MapUtils.getBoolean(map, "isAssignAgent") != null) { if (MapUtils.getBoolean(map, "isAssignAgent") != null) {
criteria.andIsAssignAgentEqualTo(MapUtils.getBoolean(map, "isAssignAgent")); criteria.andIsAssignAgentEqualTo(MapUtils.getBoolean(map, "isAssignAgent"));
} }

Loading…
Cancel
Save