|
|
|
@@ -155,9 +155,22 @@ public class WxCouponOrderController extends BaseController { |
|
|
|
@ApiImplicitParam(name = "couponOrderId", value = "券ID", dataType = "string", paramType = "query", required = true) |
|
|
|
}) |
|
|
|
public ResultData detail(String couponOrderId) { |
|
|
|
if (couponOrderId == null) { |
|
|
|
if (StringUtils.isBlank(couponOrderId)) { |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); |
|
|
|
} |
|
|
|
|
|
|
|
String _decodeCouponOrderId = WxCouponOrderCVo.getDecodeExpiredCouponOrderId(couponOrderId); |
|
|
|
if (_decodeCouponOrderId.contains(":")) { |
|
|
|
String[] decodeids = _decodeCouponOrderId.split(":"); |
|
|
|
couponOrderId = decodeids[0]; |
|
|
|
String expiredtimeStr = decodeids[1]; |
|
|
|
Date expiredtime = DateUtils.string2Date(expiredtimeStr).getTime(); |
|
|
|
if (expiredtime.before(new Date())) { |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"码已失效,请重新刷新"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Long bUserId = getLoginBUser().getId(); |
|
|
|
WxMerchantBUser wxMerchantBUser = wxMerchantBUserService.getById(getLoginBUser().getId()); |
|
|
|
if (wxMerchantBUser == null) { |
|
|
|
|