Commit 104b35ed by 王祖波

核销时间

parent 8b788dd2
......@@ -102,12 +102,12 @@ public class ScanController {
ServiceResponse<List<CoupCardDTO>> couponRet = couponHBOuterService.getCardLogByCode(writeOffCardQDTO);
if (couponRet.isSuccess() && CollectionUtils.isNotEmpty(couponRet.getResult())) {
List<CoupCardDTO> couponList = couponRet.getResult();
CoupCardDTO coupCardDTO = couponList.get(0);
ClerkDTO clerkDTO = clerkService.getclerkById(clerkId);
if (couponList.size() > 1) {
scanDetailVO.setCouponError("识别到多张兑换券,为防止核销错误,请协助会员,在会员小程序中进行兑换券核销");
scanDetailVO.setCouponErrorType(1);
}else {
CoupCardDTO coupCardDTO = couponList.get(0);
Integer verificationType = coupCardDTO.getVerificationType();
if (!Objects.equals(verificationType, 0)) {
scanDetailVO.setCouponError("请通过收银台核销此兑换券");
......@@ -117,11 +117,12 @@ public class ScanController {
scanDetailVO.setCouponError("兑换券在本店不可用");
}
}
CoupCardVO cardVO = EntityUtil.changeEntityNew(CoupCardVO.class, couponList.get(0));
CoupCardVO cardVO = EntityUtil.changeEntityNew(CoupCardVO.class, coupCardDTO);
if (clerkDTO != null) {
cardVO.setStoreName(clerkDTO.getStoreName());
cardVO.setClerkName(clerkDTO.getClerkName());
}
cardVO.setWriteOffTime(coupCardDTO.getUseTime());
scanDetailVO.setCardVO(cardVO);
}
return RestResponse.successResult(scanDetailVO);
......
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