'修复已知问题'

dev-discount
199901012 4 years ago
parent 8c17cafbc3
commit ae21412425
  1. 3
      hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java
  2. 2
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java

@ -5,6 +5,7 @@ import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode; import com.hai.common.exception.SysCode;
import com.hai.common.utils.DateUtil; import com.hai.common.utils.DateUtil;
import com.hai.common.utils.IDGenerator;
import com.hai.dao.HighCouponCodeMapper; import com.hai.dao.HighCouponCodeMapper;
import com.hai.dao.HighCouponCodeMapperExt; import com.hai.dao.HighCouponCodeMapperExt;
import com.hai.entity.HighChildOrder; import com.hai.entity.HighChildOrder;
@ -52,7 +53,7 @@ public class HighCouponCodeServiceImpl implements HighCouponCodeService {
public void insertList(List<HighCouponCode> list) throws Exception { public void insertList(List<HighCouponCode> list) throws Exception {
for (HighCouponCode highCouponCode: list) { for (HighCouponCode highCouponCode: list) {
// 生成二维码 // 生成二维码
String qrCodeImg = DateUtil.date2String(new Date(),"yyyyMMddHHmmss")+".png"; String qrCodeImg = DateUtil.date2String(new Date(),"yyyyMMddHHmmss") + IDGenerator.nextId(10) +".png";
String qrCodeUrl = "/home/project/hsg/filesystem/couponCode/" + qrCodeImg; String qrCodeUrl = "/home/project/hsg/filesystem/couponCode/" + qrCodeImg;
QRCodeGenerator.generateQRCodeImage(list.get(0).getSalesCode(), 350, 350, qrCodeUrl); QRCodeGenerator.generateQRCodeImage(list.get(0).getSalesCode(), 350, 350, qrCodeUrl);
highCouponCode.setExt1(qrCodeImg); highCouponCode.setExt1(qrCodeImg);

@ -265,10 +265,12 @@ public class HighOrderServiceImpl implements HighOrderService {
if (highChildOrder.getGoodsType() == 1) { if (highChildOrder.getGoodsType() == 1) {
// 查询卡卷详情 // 查询卡卷详情
HighCouponCode couponCode = highCouponCodeService.getCouponCodeByOrderId(highChildOrder.getId()); HighCouponCode couponCode = highCouponCodeService.getCouponCodeByOrderId(highChildOrder.getId());
if (couponCode != null) {
couponCode.setChildOrderId(null); couponCode.setChildOrderId(null);
couponCode.setStatus(1); // 状态:1.待销售 2.未使用 3.已使用 99.预支付 couponCode.setStatus(1); // 状态:1.待销售 2.未使用 3.已使用 99.预支付
highCouponCodeService.updateCouponCode(couponCode); highCouponCodeService.updateCouponCode(couponCode);
} }
}
highChildOrder.setChildOrdeStatus(5); // 子订单状态:1 待支付 2 已支付 3.已完成 4. 已退款 5.已取消 highChildOrder.setChildOrdeStatus(5); // 子订单状态:1 待支付 2 已支付 3.已完成 4. 已退款 5.已取消
} }
updateOrder(order); updateOrder(order);

Loading…
Cancel
Save