记得上下班打卡 | git大法好,push需谨慎

Commit 6a5d6751 authored by 胡佳晨's avatar 胡佳晨

修改 我得券 增加 是否实名字段

parent 5ff0c57a
...@@ -28,9 +28,9 @@ public interface ICandyCouponService { ...@@ -28,9 +28,9 @@ public interface ICandyCouponService {
List<CandyCouponVo> memberCoupon(String mCouponId); List<CandyCouponVo> memberCoupon(String mCouponId);
CandyMyCouponListVo preUsePerformanceCoupon(BigDecimal priceTotal, String performanceId, String timeId, String ticketId, Integer type,int perType); CandyMyCouponListVo preUsePerformanceCoupon(BigDecimal priceTotal, String performanceId, String timeId, String ticketId, Integer type,int perType,int inTrueName);
Integer preCanUsePerformanceCoupon(BigDecimal priceTotal, String performanceId, String timeId, String ticketId,int perType); Integer preCanUsePerformanceCoupon(BigDecimal priceTotal, String performanceId, String timeId, String ticketId,int perType,int inTrueName);
CandyMyCouponListVo preUseGoodCoupon(BigDecimal priceTotal, String goodId, Integer type,String uid); CandyMyCouponListVo preUseGoodCoupon(BigDecimal priceTotal, String goodId, Integer type,String uid);
......
...@@ -100,6 +100,7 @@ public class CandyCouponController { ...@@ -100,6 +100,7 @@ public class CandyCouponController {
@ApiImplicitParam(type = "form", dataType = "String", name = "ticketId", value = "票id", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "ticketId", value = "票id", required = true),
@ApiImplicitParam(type = "form", dataType = "Integer", name = "type", value = "类型 1可用 2过期/已使用 ", required = true), @ApiImplicitParam(type = "form", dataType = "Integer", name = "type", value = "类型 1可用 2过期/已使用 ", required = true),
@ApiImplicitParam(type = "form", dataType = "Integer", name = "perType", value = "演出类型", required = false), @ApiImplicitParam(type = "form", dataType = "Integer", name = "perType", value = "演出类型", required = false),
@ApiImplicitParam(type = "form", dataType = "Integer", name = "inTrueName", value = "是否实名", required = false),
}) })
public ResponseDto<CandyMyCouponListVo> preUsePerformanceCoupon(@RequestParam("priceTotal") @NotNull BigDecimal priceTotal, public ResponseDto<CandyMyCouponListVo> preUsePerformanceCoupon(@RequestParam("priceTotal") @NotNull BigDecimal priceTotal,
@RequestParam("performanceId") @NotNull @NotBlank String performanceId, @RequestParam("performanceId") @NotNull @NotBlank String performanceId,
...@@ -107,11 +108,15 @@ public class CandyCouponController { ...@@ -107,11 +108,15 @@ public class CandyCouponController {
@RequestParam("ticketId") @NotNull @NotBlank String ticketId, @RequestParam("ticketId") @NotNull @NotBlank String ticketId,
@RequestParam("type") @NotNull Integer type, @RequestParam("type") @NotNull Integer type,
@RequestParam(required = false, name = "page") Integer page, @RequestParam(required = false, name = "page") Integer page,
@RequestParam(required = false, name = "perType") Integer perType) { @RequestParam(required = false, name = "perType") Integer perType,
@RequestParam(required = false, name = "inTrueName") Integer inTrueName) {
if (perType == null) { if (perType == null) {
perType = -1; perType = -1;
} }
CandyMyCouponListVo vo = candyCouponService.preUsePerformanceCoupon(priceTotal, performanceId, timeId, ticketId, type,perType); if (inTrueName == null) {
inTrueName = 1;
}
CandyMyCouponListVo vo = candyCouponService.preUsePerformanceCoupon(priceTotal, performanceId, timeId, ticketId, type,perType,inTrueName);
List<CandyCouponVo> list = vo.getMyCoupon(); List<CandyCouponVo> list = vo.getMyCoupon();
List<CandyCouponVo> listVo = ObjectUtil.getCandyCouponVoArrayList(); List<CandyCouponVo> listVo = ObjectUtil.getCandyCouponVoArrayList();
if (page == null || page == 0) { if (page == null || page == 0) {
...@@ -139,17 +144,22 @@ public class CandyCouponController { ...@@ -139,17 +144,22 @@ public class CandyCouponController {
@ApiImplicitParam(type = "form", dataType = "String", name = "timeId", value = "场次id", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "timeId", value = "场次id", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "ticketId", value = "票id", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "ticketId", value = "票id", required = true),
@ApiImplicitParam(type = "form", dataType = "Integer", name = "perType", value = "演出类型", required = false), @ApiImplicitParam(type = "form", dataType = "Integer", name = "perType", value = "演出类型", required = false),
@ApiImplicitParam(type = "form", dataType = "Integer", name = "inTrueName", value = "是否实名", required = false),
}) })
public ResponseDto<HashMap<String, Integer>> preCanUsePerformanceCoupon(@RequestParam("priceTotal") @NotNull BigDecimal priceTotal, public ResponseDto<HashMap<String, Integer>> preCanUsePerformanceCoupon(@RequestParam("priceTotal") @NotNull BigDecimal priceTotal,
@RequestParam("performanceId") @NotNull @NotBlank String performanceId, @RequestParam("performanceId") @NotNull @NotBlank String performanceId,
@RequestParam("timeId") @NotNull @NotBlank String timeId, @RequestParam("timeId") @NotNull @NotBlank String timeId,
@RequestParam("ticketId") @NotNull @NotBlank String ticketId, @RequestParam("ticketId") @NotNull @NotBlank String ticketId,
@RequestParam(required = false, name = "perType") Integer perType) { @RequestParam(required = false, name = "perType") Integer perType,
@RequestParam(required = false, name = "inTrueName") Integer inTrueName) {
if (perType == null) { if (perType == null) {
perType = -1; perType = -1;
} }
if (inTrueName == null) {
inTrueName = 1;
}
HashMap<String, Integer> hashMap = CollectionUtil.mapStringInteger(); HashMap<String, Integer> hashMap = CollectionUtil.mapStringInteger();
hashMap.put("canUse", candyCouponService.preCanUsePerformanceCoupon(priceTotal, performanceId, timeId, ticketId,perType)); hashMap.put("canUse", candyCouponService.preCanUsePerformanceCoupon(priceTotal, performanceId, timeId, ticketId,perType,inTrueName));
return ResponseDto.success(hashMap); return ResponseDto.success(hashMap);
} }
......
...@@ -139,7 +139,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService { ...@@ -139,7 +139,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
} }
@Override @Override
public CandyMyCouponListVo preUsePerformanceCoupon(BigDecimal priceTotal, String performanceId, String timeId, String ticketId, Integer type,int perType) { public CandyMyCouponListVo preUsePerformanceCoupon(BigDecimal priceTotal, String performanceId, String timeId, String ticketId, Integer type,int perType,int inTrueName) {
String uid = CurrentUtil.getCurrentUid(); String uid = CurrentUtil.getCurrentUid();
LocalDateTime userCreateTime; LocalDateTime userCreateTime;
try { try {
...@@ -153,9 +153,9 @@ public class CandyCouponServiceImpl implements ICandyCouponService { ...@@ -153,9 +153,9 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
List<CandyCouponVo> myCoupon = ObjectUtil.getCandyCouponVoArrayList(); List<CandyCouponVo> myCoupon = ObjectUtil.getCandyCouponVoArrayList();
for (CandyUserCouponBasicDto dtoItem : dtoList) { for (CandyUserCouponBasicDto dtoItem : dtoList) {
CandyCouponVo baseVo = CouponBaseUtil.getPerformanceCouponUserVo(dtoItem, priceTotal, performanceId, timeId, ticketId,perType); CandyCouponVo baseVo = CouponBaseUtil.getPerformanceCouponUserVo(dtoItem, priceTotal, performanceId, timeId, ticketId,perType,inTrueName);
if (type == 1) { if (type == 1) {
if (baseVo.getState().equals(3) || dtoItem.getState().equals(5) || baseVo.getState().equals(21)) { if (baseVo.getState().equals(3) || baseVo.getState().equals(5) || baseVo.getState().equals(21)|| baseVo.getState().equals(31)|| baseVo.getState().equals(2)) {
continue; continue;
} }
} else if (type == 2) { } else if (type == 2) {
...@@ -182,7 +182,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService { ...@@ -182,7 +182,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
} }
@Override @Override
public Integer preCanUsePerformanceCoupon(BigDecimal priceTotal, String performanceId, String timeId, String ticketId,int perType) { public Integer preCanUsePerformanceCoupon(BigDecimal priceTotal, String performanceId, String timeId, String ticketId,int perType,int inTrueName) {
String uid = CurrentUtil.getCurrentUid(); String uid = CurrentUtil.getCurrentUid();
LocalDateTime userCreateTime; LocalDateTime userCreateTime;
try { try {
...@@ -193,7 +193,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService { ...@@ -193,7 +193,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
List<CandyUserCouponBasicDto> dtoList = redisDataUtils.getCouponByUid(uid, userCreateTime); List<CandyUserCouponBasicDto> dtoList = redisDataUtils.getCouponByUid(uid, userCreateTime);
int canUse = 0; int canUse = 0;
for (CandyUserCouponBasicDto dtoItem : dtoList) { for (CandyUserCouponBasicDto dtoItem : dtoList) {
CandyCouponVo baseVo = CouponBaseUtil.getPerformanceCouponUserVo(dtoItem, priceTotal, performanceId, timeId, ticketId,perType); CandyCouponVo baseVo = CouponBaseUtil.getPerformanceCouponUserVo(dtoItem, priceTotal, performanceId, timeId, ticketId,perType,inTrueName);
if (baseVo.getCouType().equals(101) || baseVo.getCouType().equals(3) || baseVo.getBusiType() == 2) { if (baseVo.getCouType().equals(101) || baseVo.getCouType().equals(3) || baseVo.getBusiType() == 2) {
continue; continue;
} }
...@@ -287,7 +287,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService { ...@@ -287,7 +287,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
List<CandyCouponVo> advanceCoupon = ObjectUtil.getCandyCouponVoArrayList(); List<CandyCouponVo> advanceCoupon = ObjectUtil.getCandyCouponVoArrayList();
for (CandyUserCouponBasicDto dtoItem : dtoList) { for (CandyUserCouponBasicDto dtoItem : dtoList) {
if (dtoItem.getBusiType().equals(3)) { if (dtoItem.getBusiType().equals(3)) {
CandyCouponVo baseVo = CouponBaseUtil.getPerformanceCouponUserVo(dtoItem, BigDecimal.ZERO, performanceId, "-1", "-1",-1); CandyCouponVo baseVo = CouponBaseUtil.getPerformanceCouponUserVo(dtoItem, BigDecimal.ZERO, performanceId, "-1", "-1",-1,0);
if (baseVo.getState().equals(1)) { if (baseVo.getState().equals(1)) {
advanceCoupon.add(baseVo); advanceCoupon.add(baseVo);
} else { } else {
......
...@@ -75,7 +75,7 @@ public class CouponBaseUtil { ...@@ -75,7 +75,7 @@ public class CouponBaseUtil {
String performanceId, String performanceId,
String timeId, String timeId,
String ticketId, String ticketId,
int perType) { int perType,int inTrueName) {
boolean isTarget = false; boolean isTarget = false;
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
CandyCouponVo vo = CandyCouponVo.getNew(); CandyCouponVo vo = CandyCouponVo.getNew();
...@@ -131,7 +131,7 @@ public class CouponBaseUtil { ...@@ -131,7 +131,7 @@ public class CouponBaseUtil {
case 101: case 101:
case 102: case 102:
case 103: case 103:
isTarget = ruleItem.getUseScope() == perType; isTarget = ruleItem.getUseScope() == perType && inTrueName ==1;
break; break;
default: default:
isTarget = false; isTarget = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment