'修复已知问题'

dev-discount
199901012 4 years ago
parent 5a44632f8f
commit 2c4c678e64
  1. 1
      hai-bweb/src/main/java/com/bweb/controller/HighOrderController.java
  2. 6
      hai-bweb/src/main/java/com/bweb/excelListener/ImportCouponListener.java
  3. 2
      hai-cweb/src/main/resources/dev/config.properties
  4. 2
      hai-service/src/main/java/com/hai/service/HighCouponCodeService.java
  5. 11
      hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java
  6. 6
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java

@ -51,7 +51,6 @@ public class HighOrderController {
private HighCouponCodeService highCouponCodeService; private HighCouponCodeService highCouponCodeService;
@RequestMapping(value = "/getOrderById", method = RequestMethod.GET) @RequestMapping(value = "/getOrderById", method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "根据id查询订单详情") @ApiOperation(value = "根据id查询订单详情")

@ -92,7 +92,11 @@ public class ImportCouponListener extends AnalysisEventListener<ImportCouponMode
@Override @Override
public void doAfterAllAnalysed(AnalysisContext analysisContext) { public void doAfterAllAnalysed(AnalysisContext analysisContext) {
if (successData.size() > 0) { if (successData.size() > 0) {
highCouponCodeService.insertList(successData); try {
highCouponCodeService.insertList(successData);
} catch (Exception e) {
e.printStackTrace();
}
} }
this.successData.clear(); this.successData.clear();
this.allCouponCode.clear(); this.allCouponCode.clear();

@ -10,7 +10,7 @@ wxSubAppId=wx8d49e2f83025229d
wxSubMchId=1603942866 wxSubMchId=1603942866
wxUnifiedOrderUrl=https://api.mch.weixin.qq.com/pay/unifiedorder wxUnifiedOrderUrl=https://api.mch.weixin.qq.com/pay/unifiedorder
notifyUrl=https://hsgcs.dctpay.com//crest/wechatpay/notify notifyUrl=https://hsgcs.dctpay.com/crest/wechatpay/notify
fileUrl=/home/project/hsg/filesystem fileUrl=/home/project/hsg/filesystem
cmsPath=/home/project/hsg/filesystem/cmsPath cmsPath=/home/project/hsg/filesystem/cmsPath

@ -27,7 +27,7 @@ public interface HighCouponCodeService {
* @Description 批量增加 * @Description 批量增加
* @Date 2021/3/18 21:30 * @Date 2021/3/18 21:30
**/ **/
void insertList(List<HighCouponCode> list); void insertList(List<HighCouponCode> list) throws Exception;
/** /**
* @Author 胡锐 * @Author 胡锐

@ -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);
} }

@ -77,11 +77,7 @@ public class HighOrderServiceImpl implements HighOrderService {
list.get(0).setStatus(99); // 状态:1.待销售 2.未使用 3.已使用 99.预支付 list.get(0).setStatus(99); // 状态:1.待销售 2.未使用 3.已使用 99.预支付
highCouponCodeService.updateCouponCode(list.get(0)); highCouponCodeService.updateCouponCode(list.get(0));
// 生成二维码 childOrder.setExt1(list.get(0).getExt1());
//String qrCodeUrl = "/home/project/hsg/filesystem/couponCode/"+DateUtil.date2String(new Date(),"yyyyMMddHHmmss")+".png";
String qrCodeUrl = "F:\\"+DateUtil.date2String(new Date(),"yyyyMMddHHmmss")+".png";
QRCodeGenerator.generateQRCodeImage(list.get(0).getSalesCode(), 350, 350, qrCodeUrl);
childOrder.setExt1(qrCodeUrl);
highChildOrderMapper.updateByPrimaryKey(childOrder); highChildOrderMapper.updateByPrimaryKey(childOrder);
if(childOrder.getGiveawayType() == false) { if(childOrder.getGiveawayType() == false) {

Loading…
Cancel
Save