|
|
@ -99,6 +99,7 @@ public class HighCouponAgentServiceImpl implements HighCouponAgentService { |
|
|
|
highCouponCodeService.updateCouponCode(code); |
|
|
|
highCouponCodeService.updateCouponCode(code); |
|
|
|
|
|
|
|
|
|
|
|
highCouponAgentCode = new HighCouponAgentCode(); |
|
|
|
highCouponAgentCode = new HighCouponAgentCode(); |
|
|
|
|
|
|
|
highCouponAgentCode.setType(highCouponAgentRel.getType()); |
|
|
|
highCouponAgentCode.setCouponAgentId(highCouponAgentRel.getId()); |
|
|
|
highCouponAgentCode.setCouponAgentId(highCouponAgentRel.getId()); |
|
|
|
highCouponAgentCode.setCouponAgentRecordId(record.getId()); |
|
|
|
highCouponAgentCode.setCouponAgentRecordId(record.getId()); |
|
|
|
highCouponAgentCode.setCouponId(code.getCouponId()); |
|
|
|
highCouponAgentCode.setCouponId(code.getCouponId()); |
|
|
@ -118,6 +119,7 @@ public class HighCouponAgentServiceImpl implements HighCouponAgentService { |
|
|
|
HighCouponAgentCode highCouponAgentCode; |
|
|
|
HighCouponAgentCode highCouponAgentCode; |
|
|
|
for (int i = 0; i < stockCount; i++) { |
|
|
|
for (int i = 0; i < stockCount; i++) { |
|
|
|
highCouponAgentCode = new HighCouponAgentCode(); |
|
|
|
highCouponAgentCode = new HighCouponAgentCode(); |
|
|
|
|
|
|
|
highCouponAgentCode.setType(highCouponAgentRel.getType()); |
|
|
|
highCouponAgentCode.setCouponAgentId(highCouponAgentRel.getId()); |
|
|
|
highCouponAgentCode.setCouponAgentId(highCouponAgentRel.getId()); |
|
|
|
highCouponAgentCode.setCouponAgentRecordId(record.getId()); |
|
|
|
highCouponAgentCode.setCouponAgentRecordId(record.getId()); |
|
|
|
highCouponAgentCode.setCouponId(highCoupon.getId()); |
|
|
|
highCouponAgentCode.setCouponId(highCoupon.getId()); |
|
|
@ -179,6 +181,10 @@ public class HighCouponAgentServiceImpl implements HighCouponAgentService { |
|
|
|
criteria.andCouponAgentIdEqualTo(MapUtils.getLong(map, "couponAgentId")); |
|
|
|
criteria.andCouponAgentIdEqualTo(MapUtils.getLong(map, "couponAgentId")); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (MapUtils.getInteger(map, "type") != null) { |
|
|
|
|
|
|
|
criteria.andTypeEqualTo(MapUtils.getInteger(map, "type")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (MapUtils.getLong(map, "couponId") != null) { |
|
|
|
if (MapUtils.getLong(map, "couponId") != null) { |
|
|
|
criteria.andCouponIdEqualTo(MapUtils.getLong(map, "couponId")); |
|
|
|
criteria.andCouponIdEqualTo(MapUtils.getLong(map, "couponId")); |
|
|
|
} |
|
|
|
} |
|
|
@ -373,7 +379,7 @@ public class HighCouponAgentServiceImpl implements HighCouponAgentService { |
|
|
|
if (convertCode == null) { |
|
|
|
if (convertCode == null) { |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "无效的兑换码"); |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "无效的兑换码"); |
|
|
|
} |
|
|
|
} |
|
|
|
if (convertCode.getStatus() != 1) { |
|
|
|
if (convertCode.getStatus() == 3) { |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "兑换码已被使用"); |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "兑换码已被使用"); |
|
|
|
} |
|
|
|
} |
|
|
|
// 查询未销售的卡券
|
|
|
|
// 查询未销售的卡券
|
|
|
|