|
|
@ -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")); |
|
|
|
} |
|
|
|
} |
|
|
|