Commit b7d4c57d by 王祖波

核销导购门店

parent 32601b3a
......@@ -8,6 +8,7 @@ import com.gic.business.order.service.ordermanage.WebOrderManageApiService;
import com.gic.clerk.api.dto.ClerkDTO;
import com.gic.clerk.api.service.ClerkService;
import com.gic.commons.util.EntityUtil;
import com.gic.commons.util.GlobalInfo;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.haoban.manage.web.controller.order.GicOrderController;
import com.gic.haoban.manage.web.vo.coupon.CoupCardVO;
......@@ -102,7 +103,6 @@ public class ScanController {
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);
......@@ -117,9 +117,15 @@ public class ScanController {
}
}
CoupCardVO cardVO = EntityUtil.changeEntityNew(CoupCardVO.class, coupCardDTO);
if (clerkDTO != null) {
cardVO.setStoreName(clerkDTO.getStoreName());
cardVO.setClerkName(clerkDTO.getClerkName());
if (Objects.equals(GlobalInfo.COUPON_STATUS_USED, coupCardDTO.getStatus())) {
cardVO.setStoreName(coupCardDTO.getOrderStoreName());
cardVO.setClerkName(coupCardDTO.getOrderClerkName());
}else {
ClerkDTO clerkDTO = clerkService.getclerkById(clerkId);
if (clerkDTO != null) {
cardVO.setStoreName(clerkDTO.getStoreName());
cardVO.setClerkName(clerkDTO.getClerkName());
}
}
cardVO.setUseTime(coupCardDTO.getUseTime());
scanDetailVO.setCardVO(cardVO);
......
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