|
|
@ -1,8 +1,10 @@ |
|
|
|
package com.hai.service.impl; |
|
|
|
package com.hai.service.impl; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.hai.common.QRCodeGenerator; |
|
|
|
import com.hai.common.exception.ErrorCode; |
|
|
|
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.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; |
|
|
@ -47,7 +49,14 @@ public class HighCouponCodeServiceImpl implements HighCouponCodeService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void insertList(List<HighCouponCode> list) { |
|
|
|
public void insertList(List<HighCouponCode> list) throws Exception { |
|
|
|
|
|
|
|
for (HighCouponCode highCouponCode: list) { |
|
|
|
|
|
|
|
// 生成二维码
|
|
|
|
|
|
|
|
String qrCodeImg = DateUtil.date2String(new Date(),"yyyyMMddHHmmss")+".png"; |
|
|
|
|
|
|
|
String qrCodeUrl = "/home/project/hsg/filesystem/couponCode/" + qrCodeImg; |
|
|
|
|
|
|
|
QRCodeGenerator.generateQRCodeImage(list.get(0).getSalesCode(), 350, 350, qrCodeUrl); |
|
|
|
|
|
|
|
highCouponCode.setExt1(qrCodeImg); |
|
|
|
|
|
|
|
} |
|
|
|
highCouponCodeMapperExt.insertList(list); |
|
|
|
highCouponCodeMapperExt.insertList(list); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|