From ac8801bed3f71e41468e9f95bb1e460161b70f6e Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Fri, 10 Mar 2023 09:05:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=AF=9D=E8=B4=B9=E5=AE=9A?= =?UTF-8?q?=E6=97=B6=E4=BB=BB=E5=8A=A1=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bweb/controller/HighTestController.java | 2 +- .../hai/schedule/HighIntegralSchedule.java | 2 +- .../com/hai/schedule/HighOrderSchedule.java | 2 +- .../schedule/HighRechargeOrderSchedule.java | 2 +- .../java/com/hai/common/utils/HttpsUtils.java | 2 +- .../java/com/hai/config/CommonSysConfig.java | 3 + .../com/hai/config/HuiLianTongConfig.java | 33 ++- .../com/hai}/config/WeChatQrcodeUtils.java | 164 ++++++++++++- .../main/java/com/hai}/config/WxConfig.java | 7 +- .../com/hai/enum_type/WxQrCodeTypeEnum.java | 38 +++ .../impl/HighDiscountAgentRelServiceImpl.java | 23 +- .../impl/OutRechargeOrderServiceImpl.java | 3 + .../resources/dev/commonConfig.properties | 7 +- .../resources/pre/commonConfig.properties | 3 + .../prod-9401/commonConfig.properties | 3 + .../resources/prod/commonConfig.properties | 3 + .../com/v1/controller/WxMsgController.java | 219 ++++++++++++++---- .../business/GzSinopecController.java | 10 - .../business/RefuelOnlineController.java | 4 +- v1/src/main/resources/dev/application.yml | 2 +- v1/src/main/resources/dev/logback.xml | 80 +++++++ v1/src/main/resources/prod/application.yml | 64 +++-- v1/src/main/resources/prod/logback.xml | 106 +++++++++ 23 files changed, 666 insertions(+), 116 deletions(-) rename {v1/src/main/java/com/v1 => hai-service/src/main/java/com/hai}/config/WeChatQrcodeUtils.java (51%) rename {v1/src/main/java/com/v1 => hai-service/src/main/java/com/hai}/config/WxConfig.java (93%) create mode 100644 hai-service/src/main/java/com/hai/enum_type/WxQrCodeTypeEnum.java diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighTestController.java b/hai-bweb/src/main/java/com/bweb/controller/HighTestController.java index 055658e9..24706709 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighTestController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighTestController.java @@ -1 +1 @@ - package com.bweb.controller; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.alipay.api.domain.ForbbidenTime; import com.alipay.api.domain.OfferObject; import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; import com.hai.common.pay.util.sdk.WXPayConstants; import com.hai.common.utils.*; import com.hai.config.*; import com.hai.entity.*; import com.hai.model.OrderRefundModel; import com.hai.model.ResponseData; import com.hai.order.service.OrderRefundService; import com.hai.order.service.OrderService; import com.hai.order.type.OrderPayType; import com.hai.order.type.OrderProductType; import com.hai.order.type.OrderRefundOpUserType; import com.hai.order.utils.OrderUtil; import com.hai.service.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import java.math.BigDecimal; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * @Auther: 胡锐 * @Description: * @Date: 2021/3/26 23:08 */ @Controller @RequestMapping(value = "/test") @Api(value = "订单接口") public class HighTestController { private static Logger log = LoggerFactory.getLogger(HighTestController.class); @Resource private OutRechargeOrderService outRechargeOrderService; @Resource private OrderService orderService; @Resource private OrderRefundService orderRefundService; @Resource private HighOrderService highOrderService; @RequestMapping(value="/resolveResponse",method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "解析") public ResponseData resolveResponse( @RequestParam(name = "data", required = false) String data ) { try { JSONObject cardInfoObject = HuiLianTongUnionCardConfig.resolveResponse(data); return ResponseMsgUtil.success(cardInfoObject); } catch (Exception e) { log.error("getUserByTelephone",e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/getHuiLianTongCardConsume", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询汇联通工会卡消费记录") public ResponseData getHuiLianTongCardConsume(@RequestParam(name = "businessType", required = true) String businessType, @RequestParam(name = "cardNo", required = true) String cardNo, @RequestParam(name = "sdate", required = true) Long sdate, @RequestParam(name = "edate", required = true) Long edate, @RequestParam(name = "pageNum", required = true) Integer pageNum, @RequestParam(name = "pageSize", required = true) Integer pageSize, HttpServletRequest request) { try { JSONObject consumptionRecord = HuiLianTongUnionCardConfig.queryConsumptionRecordByBusiness(businessType, cardNo, sdate, edate, pageNum, pageSize); if (StringUtils.isBlank(consumptionRecord.getString("data"))) { throw ErrorHelp.genException(SysCode.System, ErrorCode.REQUEST_ERROR, ""); } JSONArray array = HuiLianTongUnionCardConfig.resolveResponse(consumptionRecord.getString("data")).getJSONArray("records"); return ResponseMsgUtil.success(array); } catch (Exception e) { log.error("HighUserCardController --> getHuiLianTongCardConsume() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/getStationStores", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "获取油站") public ResponseData getStationStores() { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("http://localhost:9902/v1/refuelOnline/getStationStores" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/createOrder", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "创建订单") public ResponseData createOrder() { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); mapPost.put("timetable" , new Date().getTime()); mapPost.put("orderNo" , "TEST" + OrderUtil.generateOrderNo()); mapPost.put("productType" , OrderProductType.PRODUCT_TYPE6.getNumber()); mapPost.put("notifyUrl" , "test"); JSONObject object = new JSONObject(); object.put("refuelPrice" , new BigDecimal(100)); object.put("gasOilNo" , "92"); object.put("gasGunNo" , "1"); object.put("storeCode" , "54000"); mapPost.put("content" , object.toJSONString()); System.out.println(mapPost); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); map.put("timetable" , mapPost.get("timetable")); map.put("orderNo" , mapPost.get("orderNo")); map.put("productType" , OrderProductType.PRODUCT_TYPE6.getNumber().toString()); map.put("content" , object.toString()); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("http://localhost:9902/v1/order/createOrder" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/payOrder", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "支付订单") public ResponseData payOrder(@RequestParam(name = "mchOrderNo", required = true) String mchOrderNo) { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); mapPost.put("mchOrderNo" , mchOrderNo); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); map.put("mchOrderNo" , mchOrderNo); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("http://localhost:9902/v1/order/orderPay" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/queryOrderDetail", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询订单详情") public ResponseData queryOrderDetail(@RequestParam(name = "mchOrderNo", required = true) String mchOrderNo) { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); mapPost.put("mchOrderNo" , mchOrderNo); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); map.put("mchOrderNo" , mchOrderNo); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("http://localhost:9902/v1/order/queryOrderDetail" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/phoneBillOrderError", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "话费订单错误") public ResponseData phoneBillOrderError() { List highOrders = orderService.phoneErrorOrder(); for (HighOrder order: highOrders) { try { outRechargeOrderService.rechargeOrderHandle(order.getOrderNo()); } catch (Exception e) { log.error("HighCouponSchedule --> expiredCoupon() error!", e); } } return ResponseMsgUtil.success("操作成功"); } @RequestMapping(value = "/checkOrderByOrderNo", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "根据订单号话费查询是否可以退款") public ResponseData checkOrderByOrderNo(@RequestParam(name = "orderNo", required = true) String orderNo) { try { // 定义话费充值业务订单模型 or 充值记录订单模型 OutRechargeOrder outRechargeOrder = outRechargeOrderService.findByOrderNo(orderNo); OutRechargeChildOrder childOrder = outRechargeOrder.getOutRechargeChildOrders().get(0); // -1 取消,0充值中 ,1充值成功,2充值失败,3部分成功 Integer status = outRechargeOrderService.getRechargeOrderLegality(outRechargeOrder , childOrder); return ResponseMsgUtil.success(status); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } // @RequestMapping(value = "/deposit", method = RequestMethod.GET) // @ResponseBody // @ApiOperation(value = "工会卡充值") // public ResponseData deposit(@RequestParam(name = "orderNo", required = true) String orderNo) { // try { // // HighOrder order = highOrderService.getOrderByOrderNo(orderNo); // HighChildOrder highChildOrder = order.getHighChildOrderList().get(0); // // // 汇联通充值 // String goodsDesc = "汇联通充值"+order.getPayPrice()+"元"; // String tranDesc = ""; // String businessType = "ghk_deposit"; // // // // // 汇联通卡充值 // JSONObject deposit = HuiLianTongUnionCardConfig.deposit(order.getOrderNo(), highChildOrder.getGoodsSpecName(), order.getPayPrice(), businessType, order.getPaySerialNo(), goodsDesc); // // return ResponseMsgUtil.success( HuiLianTongUnionCardConfig.resolveResponse(deposit.getString("data"))); // } catch (Exception e) { // log.error("HighOrderController --> getBackendToken() error!", e); // return ResponseMsgUtil.exception(e); // } // } @RequestMapping(value = "/orderRefund", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "订单退款") public ResponseData orderRefund(@RequestParam(name = "orderNo", required = true) String orderNo) { try { Calendar createTimeS = Calendar.getInstance(); createTimeS.set(Calendar.DATE, 17); createTimeS.set(Calendar.HOUR_OF_DAY , 00); createTimeS.set(Calendar.MINUTE , 00); createTimeS.set(Calendar.SECOND , 00); Calendar createTimeE = Calendar.getInstance(); createTimeE.set(Calendar.DATE, 20); createTimeE.set(Calendar.HOUR_OF_DAY , 15); createTimeE.set(Calendar.MINUTE , 25); createTimeE.set(Calendar.SECOND , 00); Map param = new HashMap<>(); // param.put("createTimeS", createTimeS.getTimeInMillis()); // param.put("createTimeE", createTimeE.getTimeInMillis()); param.put("orderNo", orderNo); List orderRefundList = orderRefundService.getRefundOrderList(param); for (HighOrderRefund orderRefund : orderRefundList) { try { orderRefundService.refundPrice( orderRefund.getRefundOrderNo(), orderService.getOrderDetailByNo(orderRefund.getOrderNo()), OrderPayType.getDataByType(orderRefund.getPayType()), orderRefund.getRefundPrice(), orderRefund.getRefundIntegral() ); orderRefund.setExt1("true"); } catch (Exception e) { orderRefund.setExt1("false"); } finally { orderRefundService.update(orderRefund); } } return ResponseMsgUtil.success("退款成功"); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } public String orderTitle(OutRechargeOrder outRechargeOrder) { // 1 待支付 2 已支付 3.已完成 4. 已退款 5.已取消 // 101.待支付 102.已支付 100.已完成 104.已取消 105.已退款 switch (outRechargeOrder.getOperatorType()) { case 1: return outRechargeOrder.getRechargeContent() + "电信话费充值" + outRechargeOrder.getRechargePrice() + "元"; case 2: return outRechargeOrder.getRechargeContent() + "移动话费充值" + outRechargeOrder.getRechargePrice() + "元"; case 3: return outRechargeOrder.getRechargeContent() + "联通话费充值" + outRechargeOrder.getRechargePrice() + "元"; default: return null; } } } \ No newline at end of file + package com.bweb.controller; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.alipay.api.domain.ForbbidenTime; import com.alipay.api.domain.OfferObject; import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; import com.hai.common.pay.util.sdk.WXPayConstants; import com.hai.common.utils.*; import com.hai.config.*; import com.hai.entity.*; import com.hai.model.OrderRefundModel; import com.hai.model.ResponseData; import com.hai.order.service.OrderRefundService; import com.hai.order.service.OrderService; import com.hai.order.type.OrderPayType; import com.hai.order.type.OrderProductType; import com.hai.order.type.OrderRefundOpUserType; import com.hai.order.utils.OrderUtil; import com.hai.service.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import java.math.BigDecimal; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * @Auther: 胡锐 * @Description: * @Date: 2021/3/26 23:08 */ @Controller @RequestMapping(value = "/test") @Api(value = "订单接口") public class HighTestController { private static Logger log = LoggerFactory.getLogger(HighTestController.class); @Resource private OutRechargeOrderService outRechargeOrderService; @Resource private OrderService orderService; @Autowired private WeChatQrcodeUtils weChatQrcodeUtils; @Resource private OrderRefundService orderRefundService; @Resource private HighOrderService highOrderService; @RequestMapping(value="/resolveResponse",method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "解析") public ResponseData resolveResponse( @RequestParam(name = "data", required = false) String data ) { try { JSONObject cardInfoObject = HuiLianTongUnionCardConfig.resolveResponse(data); return ResponseMsgUtil.success(cardInfoObject); } catch (Exception e) { log.error("getUserByTelephone",e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/getHuiLianTongCardConsume", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询汇联通工会卡消费记录") public ResponseData getHuiLianTongCardConsume(@RequestParam(name = "businessType", required = true) String businessType, @RequestParam(name = "cardNo", required = true) String cardNo, @RequestParam(name = "sdate", required = true) Long sdate, @RequestParam(name = "edate", required = true) Long edate, @RequestParam(name = "pageNum", required = true) Integer pageNum, @RequestParam(name = "pageSize", required = true) Integer pageSize, HttpServletRequest request) { try { JSONObject consumptionRecord = HuiLianTongUnionCardConfig.queryConsumptionRecordByBusiness(businessType, cardNo, sdate, edate, pageNum, pageSize); if (StringUtils.isBlank(consumptionRecord.getString("data"))) { throw ErrorHelp.genException(SysCode.System, ErrorCode.REQUEST_ERROR, ""); } JSONArray array = HuiLianTongUnionCardConfig.resolveResponse(consumptionRecord.getString("data")).getJSONArray("records"); return ResponseMsgUtil.success(array); } catch (Exception e) { log.error("HighUserCardController --> getHuiLianTongCardConsume() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/getStationStores", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "获取油站") public ResponseData getStationStores() { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("https://hsgcs.dctpay.com/v1/refuelOnline/getStationStores" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/createOrder", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "创建订单") public ResponseData createOrder() { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); mapPost.put("timetable" , new Date().getTime()); mapPost.put("orderNo" , "TEST" + OrderUtil.generateOrderNo()); mapPost.put("productType" , OrderProductType.PRODUCT_TYPE6.getNumber()); mapPost.put("notifyUrl" , "test"); JSONObject object = new JSONObject(); object.put("refuelPrice" , new BigDecimal(100)); object.put("gasOilNo" , "92"); object.put("gasGunNo" , "1"); object.put("storeCode" , "54000"); mapPost.put("content" , object.toJSONString()); System.out.println(mapPost); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); map.put("timetable" , mapPost.get("timetable")); map.put("orderNo" , mapPost.get("orderNo")); map.put("productType" , OrderProductType.PRODUCT_TYPE6.getNumber().toString()); map.put("content" , object.toString()); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("http://localhost:9902/v1/order/createOrder" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/payOrder", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "支付订单") public ResponseData payOrder(@RequestParam(name = "mchOrderNo", required = true) String mchOrderNo) { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); mapPost.put("mchOrderNo" , mchOrderNo); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); map.put("mchOrderNo" , mchOrderNo); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("http://localhost:9902/v1/order/orderPay" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/queryOrderDetail", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询订单详情") public ResponseData queryOrderDetail(@RequestParam(name = "mchOrderNo", required = true) String mchOrderNo) { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); mapPost.put("mchOrderNo" , mchOrderNo); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); map.put("mchOrderNo" , mchOrderNo); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("http://localhost:9902/v1/order/queryOrderDetail" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/phoneBillOrderError", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "话费订单错误") public ResponseData phoneBillOrderError() { List highOrders = orderService.phoneErrorOrder(); for (HighOrder order: highOrders) { try { outRechargeOrderService.rechargeOrderHandle(order.getOrderNo()); } catch (Exception e) { log.error("HighCouponSchedule --> expiredCoupon() error!", e); } } return ResponseMsgUtil.success("操作成功"); } @RequestMapping(value = "/checkOrderByOrderNo", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "根据订单号话费查询是否可以退款") public ResponseData checkOrderByOrderNo(@RequestParam(name = "orderNo", required = true) String orderNo) { try { outRechargeOrderService.rechargeOrderHandle(orderNo); return ResponseMsgUtil.success("退款成功"); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } // @RequestMapping(value = "/deposit", method = RequestMethod.GET) // @ResponseBody // @ApiOperation(value = "工会卡充值") // public ResponseData deposit(@RequestParam(name = "orderNo", required = true) String orderNo) { // try { // // HighOrder order = highOrderService.getOrderByOrderNo(orderNo); // HighChildOrder highChildOrder = order.getHighChildOrderList().get(0); // // if (order.getOrderStatus() != 2) { // throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "订单状态错误"); // } // // // 汇联通充值 // String goodsDesc = "汇联通充值"+order.getPayPrice()+"元"; // String tranDesc = ""; // String businessType = "ghk_deposit"; // // String orderNoAgain = OrderUtil.generateOrderNo(); // // order.setRemarks("工会卡再次充值订单号" + orderNoAgain); // // highOrderService.updateOrder(order); // // // 汇联通卡充值 // JSONObject deposit = HuiLianTongUnionCardConfig.deposit(orderNoAgain, highChildOrder.getGoodsSpecName(), order.getPayPrice(), businessType, order.getPaySerialNo(), goodsDesc); // // return ResponseMsgUtil.success( HuiLianTongUnionCardConfig.resolveResponse(deposit.getString("data"))); // } catch (Exception e) { // log.error("HighOrderController --> getBackendToken() error!", e); // return ResponseMsgUtil.exception(e); // } // } @RequestMapping(value = "/orderRefund", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "订单退款") public ResponseData orderRefund(@RequestParam(name = "orderNo", required = true) String orderNo) { try { Calendar createTimeS = Calendar.getInstance(); createTimeS.set(Calendar.DATE, 17); createTimeS.set(Calendar.HOUR_OF_DAY , 00); createTimeS.set(Calendar.MINUTE , 00); createTimeS.set(Calendar.SECOND , 00); Calendar createTimeE = Calendar.getInstance(); createTimeE.set(Calendar.DATE, 20); createTimeE.set(Calendar.HOUR_OF_DAY , 15); createTimeE.set(Calendar.MINUTE , 25); createTimeE.set(Calendar.SECOND , 00); Map param = new HashMap<>(); // param.put("createTimeS", createTimeS.getTimeInMillis()); // param.put("createTimeE", createTimeE.getTimeInMillis()); param.put("orderNo", orderNo); List orderRefundList = orderRefundService.getRefundOrderList(param); for (HighOrderRefund orderRefund : orderRefundList) { try { orderRefundService.refundPrice( orderRefund.getRefundOrderNo(), orderService.getOrderDetailByNo(orderRefund.getOrderNo()), OrderPayType.getDataByType(orderRefund.getPayType()), orderRefund.getRefundPrice(), orderRefund.getRefundIntegral() ); orderRefund.setExt1("true"); } catch (Exception e) { orderRefund.setExt1("false"); } finally { orderRefundService.update(orderRefund); } } return ResponseMsgUtil.success("退款成功"); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } public String orderTitle(OutRechargeOrder outRechargeOrder) { // 1 待支付 2 已支付 3.已完成 4. 已退款 5.已取消 // 101.待支付 102.已支付 100.已完成 104.已取消 105.已退款 switch (outRechargeOrder.getOperatorType()) { case 1: return outRechargeOrder.getRechargeContent() + "电信话费充值" + outRechargeOrder.getRechargePrice() + "元"; case 2: return outRechargeOrder.getRechargeContent() + "移动话费充值" + outRechargeOrder.getRechargePrice() + "元"; case 3: return outRechargeOrder.getRechargeContent() + "联通话费充值" + outRechargeOrder.getRechargePrice() + "元"; default: return null; } } } \ No newline at end of file diff --git a/hai-schedule/src/main/java/com/hai/schedule/HighIntegralSchedule.java b/hai-schedule/src/main/java/com/hai/schedule/HighIntegralSchedule.java index 6b3d2434..db9e1c98 100644 --- a/hai-schedule/src/main/java/com/hai/schedule/HighIntegralSchedule.java +++ b/hai-schedule/src/main/java/com/hai/schedule/HighIntegralSchedule.java @@ -30,7 +30,7 @@ public class HighIntegralSchedule { @Resource private HighUserService highUserService; - @Scheduled(cron="0 0/5 * * * ?") //每1分钟执行一次 + @Scheduled(cron="0 0/5 * * * ?") //每5分钟执行一次 public void integralRebateOrder() { List list = highGoldRecService.selectByExpiringSoonByAll(365); diff --git a/hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java b/hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java index c1fe9b39..502b7b67 100644 --- a/hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java +++ b/hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java @@ -74,7 +74,7 @@ public class HighOrderSchedule { * @Param [] * @return void */ - @Scheduled(cron="0 0/10 * * * ?") //每 5分钟执行一次 + @Scheduled(cron="0 0/10 * * * ?") //每 10分钟执行一次 public void integralRebateOrder() { // 查询满足初步返利条件订单 diff --git a/hai-schedule/src/main/java/com/hai/schedule/HighRechargeOrderSchedule.java b/hai-schedule/src/main/java/com/hai/schedule/HighRechargeOrderSchedule.java index b2e6de2f..8ad303eb 100644 --- a/hai-schedule/src/main/java/com/hai/schedule/HighRechargeOrderSchedule.java +++ b/hai-schedule/src/main/java/com/hai/schedule/HighRechargeOrderSchedule.java @@ -53,7 +53,7 @@ public class HighRechargeOrderSchedule { * @Date 14:18 2022/5/31 * @Param [] */ - @Scheduled(cron = "0 0/5 * * * ?") //每5分钟执行一次 + @Scheduled(cron = "0 0/7 * * * ?") //每7分钟执行一次 public void initRechargeOrder() { Map map = new HashMap<>(); map.put("payStatus", String.valueOf(102)); diff --git a/hai-service/src/main/java/com/hai/common/utils/HttpsUtils.java b/hai-service/src/main/java/com/hai/common/utils/HttpsUtils.java index 3af6de15..453151de 100644 --- a/hai-service/src/main/java/com/hai/common/utils/HttpsUtils.java +++ b/hai-service/src/main/java/com/hai/common/utils/HttpsUtils.java @@ -45,7 +45,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -public class HttpsUtils { +public class HttpsUtils { private static final Logger log = LoggerFactory.getLogger(HttpsUtils.class); diff --git a/hai-service/src/main/java/com/hai/config/CommonSysConfig.java b/hai-service/src/main/java/com/hai/config/CommonSysConfig.java index 42c04a32..2ecf6789 100644 --- a/hai-service/src/main/java/com/hai/config/CommonSysConfig.java +++ b/hai-service/src/main/java/com/hai/config/CommonSysConfig.java @@ -121,4 +121,7 @@ public class CommonSysConfig { private String wxAppId; private String wxAppSecret; + private String wxH5AppId; + private String wxH5AppSecret; + } diff --git a/hai-service/src/main/java/com/hai/config/HuiLianTongConfig.java b/hai-service/src/main/java/com/hai/config/HuiLianTongConfig.java index 6c8beea2..905e2b87 100644 --- a/hai-service/src/main/java/com/hai/config/HuiLianTongConfig.java +++ b/hai-service/src/main/java/com/hai/config/HuiLianTongConfig.java @@ -15,6 +15,8 @@ import com.hai.entity.HighGasOrderPush; import com.hai.entity.HighUserCoupon; import com.hai.enum_type.OrderPushType; import org.apache.commons.collections4.MapUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; import org.springframework.stereotype.Component; @@ -39,6 +41,8 @@ import java.util.*; @Component public class HuiLianTongConfig { + private static Logger log = LoggerFactory.getLogger(HuiLianTongUnionCardConfig.class); + @Resource private RedisUtil redisUtil; @@ -73,7 +77,14 @@ public class HuiLianTongConfig { map.put("couTypeCode", couTypeCode); map.put("phone", phone); map.put("distributorId", CommonSysConst.getSysConfig().getHuiliantongDistributorId()); - return HuiLianTongUnionCardConfig.request(CommonSysConst.getSysConfig().getHuiliantongSinopecUrl()+"/recharge", map); + log.info("============请求任务Start============="); + log.info("下单购买加油券-请求参数: " + JSON.toJSONString(map)); + + JSONObject returnObject = HuiLianTongUnionCardConfig.request(CommonSysConst.getSysConfig().getHuiliantongSinopecUrl()+"/recharge", map); + + log.info("下单购买加油券-响应参数: " + returnObject.toJSONString()); + log.info("============请求任务End=============="); + return returnObject; } /** @@ -86,7 +97,14 @@ public class HuiLianTongConfig { Map map = new HashMap<>(); map.put("couNo", couNo); map.put("distributorId", CommonSysConst.getSysConfig().getHuiliantongDistributorId()); - return HuiLianTongUnionCardConfig.request(CommonSysConst.getSysConfig().getHuiliantongSinopecUrl()+"/getPayOrderByCouNo", map); + log.info("============请求任务Start============="); + log.info("购买加油券充值订单-请求参数: " + JSON.toJSONString(map)); + + JSONObject returnObject = HuiLianTongUnionCardConfig.request(CommonSysConst.getSysConfig().getHuiliantongSinopecUrl()+"/getPayOrderByCouNo", map); + + log.info("购买加油券充值订单-响应参数: " + returnObject.toJSONString()); + log.info("============请求任务End=============="); + return returnObject; } /** @@ -99,7 +117,16 @@ public class HuiLianTongConfig { Map map = new HashMap<>(); map.put("rechargeOrderId", rechargeOrderId); map.put("distributorId", CommonSysConst.getSysConfig().getHuiliantongDistributorId()); - return HuiLianTongUnionCardConfig.request(CommonSysConst.getSysConfig().getHuiliantongSinopecUrl()+"/costRechargeOrder", map); + + + log.info("============请求任务Start============="); + log.info("购买加油券充值订单-请求参数: " + JSON.toJSONString(map)); + + JSONObject returnObject = HuiLianTongUnionCardConfig.request(CommonSysConst.getSysConfig().getHuiliantongSinopecUrl()+"/costRechargeOrder", map); + + log.info("购买加油券充值订单-响应参数: " + returnObject.toJSONString()); + log.info("============请求任务End=============="); + return returnObject; } /** diff --git a/v1/src/main/java/com/v1/config/WeChatQrcodeUtils.java b/hai-service/src/main/java/com/hai/config/WeChatQrcodeUtils.java similarity index 51% rename from v1/src/main/java/com/v1/config/WeChatQrcodeUtils.java rename to hai-service/src/main/java/com/hai/config/WeChatQrcodeUtils.java index 4b684a1d..b515d2ca 100644 --- a/v1/src/main/java/com/v1/config/WeChatQrcodeUtils.java +++ b/hai-service/src/main/java/com/hai/config/WeChatQrcodeUtils.java @@ -1,7 +1,16 @@ -package com.v1.config; +package com.hai.config; import com.alibaba.fastjson.JSONObject; +import com.google.zxing.BinaryBitmap; +import com.google.zxing.DecodeHintType; +import com.google.zxing.Result; +import com.google.zxing.client.j2se.BufferedImageLuminanceSource; +import com.google.zxing.common.HybridBinarizer; +import com.google.zxing.qrcode.QRCodeReader; +import com.hai.common.utils.HttpsUtils; +import com.hai.common.utils.RedisUtil; +import com.hai.common.utils.ResponseMsgUtil; import com.hai.model.TextMessage; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.common.error.WxErrorException; @@ -10,9 +19,21 @@ import me.chanjar.weixin.mp.bean.result.WxMpQrCodeTicket; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; +import javax.annotation.Resource; +import javax.imageio.ImageIO; +import java.awt.image.BufferedImage; +import java.io.ByteArrayOutputStream; import java.io.File; +import java.io.FileOutputStream; +import java.io.InputStream; +import java.net.HttpURLConnection; +import java.net.URL; +import java.util.HashMap; +import java.util.Hashtable; import java.util.Map; +import static org.apache.catalina.manager.Constants.CHARSET; + /** * @serviceName WeChatQrcodeUtils.java * @author Sum1Dream @@ -27,6 +48,9 @@ public class WeChatQrcodeUtils { @Autowired private WxMpService wxMpService; + @Resource + private RedisUtil redisUtil; + /** *
      * 创建临时二维码ticket
@@ -79,6 +103,40 @@ public class WeChatQrcodeUtils {
         return wxMpService.getQrcodeService().qrCodeCreateLastTicket(sceneStr);
     }
 
+    // 创建微信二维码
+    public JSONObject createWxQrCode(String sceneStr) {
+        JSONObject object = new JSONObject();
+        JSONObject objectScene = new JSONObject();
+        JSONObject objectActionInfo = new JSONObject();
+        objectScene.put("scene_str" , sceneStr);
+        objectActionInfo.put("scene" , objectScene);
+        object.put("action_name" , "QR_STR_SCENE");
+        object.put("expire_seconds" , 2592000);
+        object.put("action_info" , objectActionInfo);
+
+        if (redisUtil.get("WxToken") == null) {
+            getWxToken();
+        }
+
+        return HttpsUtils.doPost("https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=" + redisUtil.get("WxToken"), object);
+    }
+
+
+    // 获取微信Token存入redis
+    public void getWxToken() {
+        // 获取access_token
+        Map params = new HashMap<>();
+        params.put("appid", CommonSysConst.getSysConfig().getWxH5AppId());
+        params.put("secret", CommonSysConst.getSysConfig().getWxH5AppSecret());
+        params.put("grant_type", "client_credential");
+        JSONObject accessTokenObject = HttpsUtils.doGet("https://api.weixin.qq.com/cgi-bin/token", params);
+
+        if (accessTokenObject != null && accessTokenObject.getString("access_token") != null) {
+            redisUtil.set("WxToken" , accessTokenObject.getString("access_token") , 7000);
+        }
+
+    }
+
     /**
      * 
      * 换取二维码图片文件,jpg格式
@@ -200,5 +258,109 @@ public class WeChatQrcodeUtils {
         return object;
     }
 
+    /**
+     * @Author Sum1Dream
+     * @Name downloadQrCode
+     * @Description // 下载微信二维码到本地
+     * @Date 15:03 2023/3/8
+     * @Param [wxQrUrl]
+     * @Return java.lang.String
+     */
+    public  String downloadQrCode(String wxQrUrl) throws Exception {
+        //定义一个URL对象,就是你想下载的图片的URL地址
+        URL urld = new URL(wxQrUrl);
+        //打开连接
+        HttpURLConnection conn = (HttpURLConnection) urld.openConnection();
+        //设置请求方式为"GET"
+        conn.setRequestMethod("GET");
+        //超时响应时间为10秒
+        conn.setConnectTimeout(10 * 1000);
+        //通过输入流获取图片数据
+        InputStream is = conn.getInputStream();
+        //得到图片的二进制数据,以二进制封装得到数据,具有通用性
+        byte[] data = readInputStream(is);
+        //创建一个文件对象用来保存图片,默认保存当前工程根目录
+        String downloadQrCodeImgUrl = CommonSysConst.getSysConfig().getFileUrl() + "/downloadQrCodeImg.jpg";
+        File imageFile = new File(downloadQrCodeImgUrl);
+        //创建输出流
+        FileOutputStream outStream = new FileOutputStream(imageFile);
+        //写入数据
+        outStream.write(data);
+        //关闭输出流,释放资源
+        outStream.close();
+        return downloadQrCodeImgUrl;
+    }
+
+    /**
+     * @Author Sum1Dream
+     * @Name decoderQRCode
+     * @Description // 解析二维码内容
+     * @Date 15:06 2023/3/8
+     * @Param [downloadQrCodeImgUrl]
+     * @Return java.lang.String
+     */
+    public String decoderQRCode(String downloadQrCodeImgUrl) throws Exception {
+        BufferedImage image;
+        image = ImageIO.read(new File(downloadQrCodeImgUrl));
+        if (image == null) {
+            return null;
+        }
+        BufferedImageLuminanceSource source = new BufferedImageLuminanceSource(image);
+        BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));
+        Result result;
+        Hashtable hints = new Hashtable();
+        hints.put(DecodeHintType.CHARACTER_SET, CHARSET);
+        QRCodeReader reader = new QRCodeReader();
+        result = reader.decode(bitmap, hints);
+
+        return result.getText();
+    }
+
+    /**
+     * @Author Sum1Dream
+     * @Name readInputStream
+     * @Description // 读取插入内容
+     * @Date 15:03 2023/3/8
+     * @Param [inStream]
+     * @Return byte[]
+     */
+    public static byte[] readInputStream(InputStream inStream) throws Exception {
+        ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+        //创建一个Buffer字符串
+        byte[] buffer = new byte[6024];
+        //每次读取的字符串长度,如果为-1,代表全部读取完毕
+        int len;
+        //使用一个输入流从buffer里把数据读取出来
+        while ((len = inStream.read(buffer)) != -1) {
+            //用输出流往buffer里写入数据,中间参数代表从哪个位置开始读,len代表读取的长度
+            outStream.write(buffer, 0, len);
+        }
+        //关闭输入流
+        inStream.close();
+        //把outStream里的数据写入内存
+        return outStream.toByteArray();
+    }
+
+    public String qrCodeImgUrl(String type , String code , String encryptType) throws Exception {
+
+        // 组装 二维码参数
+        String sceneId = "type=" + type + "&code=" + code + "&encryptType=" + encryptType;
+
+        // 获取二维码参数
+        JSONObject wxQr =  createWxQrCode(sceneId);
+
+        return wxQr.getString("url");
+    }
+
+    public String qrCodeImgUrl(String type , String code) throws Exception {
+
+        // 组装 二维码参数
+        String sceneId = "type=" + type + "&code=" + code;
+
+        // 获取二维码参数
+        JSONObject wxQr =  createWxQrCode(sceneId);
+
+        return wxQr.getString("url");
+    }
 
 }
diff --git a/v1/src/main/java/com/v1/config/WxConfig.java b/hai-service/src/main/java/com/hai/config/WxConfig.java
similarity index 93%
rename from v1/src/main/java/com/v1/config/WxConfig.java
rename to hai-service/src/main/java/com/hai/config/WxConfig.java
index d2c5afd1..050e7c49 100644
--- a/v1/src/main/java/com/v1/config/WxConfig.java
+++ b/hai-service/src/main/java/com/hai/config/WxConfig.java
@@ -1,6 +1,5 @@
-package com.v1.config;
+package com.hai.config;
 
-import com.hai.config.CommonSysConst;
 import com.hai.model.TextMessage;
 import me.chanjar.weixin.mp.api.WxMpService;
 import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl;
@@ -31,9 +30,9 @@ public class WxConfig {
     public WxMpConfigStorage wxMpConfigStorage() {
         WxMpDefaultConfigImpl configStorage = new WxMpDefaultConfigImpl();
         // 公众号appId
-        configStorage.setAppId(SysConst.getSysConfig().getWxH5AppId());
+        configStorage.setAppId(CommonSysConst.getSysConfig().getWxH5AppId());
         // 公众号appSecret
-        configStorage.setSecret(SysConst.getSysConfig().getWxH5AppSecret());
+        configStorage.setSecret(CommonSysConst.getSysConfig().getWxH5AppSecret());
         return configStorage;
     }
 
diff --git a/hai-service/src/main/java/com/hai/enum_type/WxQrCodeTypeEnum.java b/hai-service/src/main/java/com/hai/enum_type/WxQrCodeTypeEnum.java
new file mode 100644
index 00000000..dbf082a9
--- /dev/null
+++ b/hai-service/src/main/java/com/hai/enum_type/WxQrCodeTypeEnum.java
@@ -0,0 +1,38 @@
+package com.hai.enum_type;
+
+public enum WxQrCodeTypeEnum {
+    type1("1", "推广扫码"),
+    type2("2", "门店扫码"),
+    type3("3", "查看视频教程"),
+    type4("4", "支付扫码"),
+    type5("5", "扫码贵州中石化二维码"),
+    type6("6", "扫码重庆中石油二维码"),
+    ;
+
+    private String type;
+
+    private String name;
+
+
+    WxQrCodeTypeEnum(String type,String name) {
+        this.type = type;
+        this.name = name;
+    }
+
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+}
diff --git a/hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentRelServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentRelServiceImpl.java
index ed7be3b0..6d9fd416 100644
--- a/hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentRelServiceImpl.java
+++ b/hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentRelServiceImpl.java
@@ -6,13 +6,16 @@ import com.hai.common.QRCodeGenerator;
 import com.hai.common.security.AESEncodeUtil;
 import com.hai.common.utils.DateUtil;
 import com.hai.common.utils.IDGenerator;
+import com.hai.config.WeChatQrcodeUtils;
 import com.hai.dao.HighDiscountAgentRelMapper;
 import com.hai.entity.*;
+import com.hai.enum_type.WxQrCodeTypeEnum;
 import com.hai.service.HighAgentService;
 import com.hai.service.HighDiscountAgentCodeService;
 import com.hai.service.HighDiscountAgentRelService;
 import com.hai.service.HighDiscountService;
 import org.apache.commons.collections4.MapUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Propagation;
 import org.springframework.transaction.annotation.Transactional;
@@ -41,6 +44,9 @@ public class HighDiscountAgentRelServiceImpl implements HighDiscountAgentRelServ
     @Resource
     private HighDiscountAgentCodeService highDiscountAgentCodeService;
 
+    @Autowired
+    private WeChatQrcodeUtils weChatQrcodeUtils;
+
     @Override
     @Transactional(propagation= Propagation.REQUIRED)
     public void insertDiscountAgentRel(HighDiscountAgentRel highDiscountAgentRel,Integer stockCount) throws Exception {
@@ -49,12 +55,8 @@ public class HighDiscountAgentRelServiceImpl implements HighDiscountAgentRelServ
         } else {
             highDiscountAgentRelMapper.insert(highDiscountAgentRel);
         }
-        Map map = new HashMap<>();
-        map.put("type", "DISCOUNT");
 
         HighDiscountAgentCode code;
-        String path = "/home/project/hsg/filesystem/agentQrCode/";
-        String folder = highDiscountAgentRel.getAgentId() + "/" + highDiscountAgentRel.getDiscountId() + "/";
 
         for (int i = 0;i < stockCount;i++) {
             code = new HighDiscountAgentCode();
@@ -62,15 +64,10 @@ public class HighDiscountAgentRelServiceImpl implements HighDiscountAgentRelServ
             code.setStatus(1);
             code.setCreateTime(new Date());
             highDiscountAgentCodeService.insertCode(code);
-            // 二维码参数
-            map.put("id", code.getId());
-            String qrCodeImg = DateUtil.date2String(new Date(),highDiscountAgentRel.getId()+"yyyyMMddHHmmss") + IDGenerator.nextId(10) +".png";
-
-            // 生成二维码
-            String param = "https://hsg.dctpay.com/wx/?action=gogogo&id=" + Base64Util.encode(AESEncodeUtil.aesEncrypt(JSON.toJSONString(map)));
-            QRCodeGenerator.generateQRCodeImage(param, 350, 350, path + folder + qrCodeImg);
-            code.setQrCode(qrCodeImg);
-            code.setExt1(param);
+
+            // 生成二维码地址
+            code.setExt1(weChatQrcodeUtils.qrCodeImgUrl(WxQrCodeTypeEnum.type5.getType(), code.getId().toString() , "DISCOUNT"));
+            code.setExt2("2");
             highDiscountAgentCodeService.updateCode(code);
         }
     }
diff --git a/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java
index dec37c8a..0c72a2db 100644
--- a/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java
+++ b/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java
@@ -903,6 +903,9 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
 
             JSONObject jsonObject = RechargeConfig.checkOrderByHg(object);
             if (jsonObject.getJSONArray("data") == null) {
+                if (jsonObject.getInteger("code") == 20001) {
+                    return 2;
+                }
                 return 99;
             } else {
                 JSONArray objectJSONArray = jsonObject.getJSONArray("data");
diff --git a/hai-service/src/main/resources/dev/commonConfig.properties b/hai-service/src/main/resources/dev/commonConfig.properties
index 93e7444b..0e2682ef 100644
--- a/hai-service/src/main/resources/dev/commonConfig.properties
+++ b/hai-service/src/main/resources/dev/commonConfig.properties
@@ -109,9 +109,12 @@ unionRsaKey=891f6775fba7f12cc23df7c75e02b39b891f6775fba7f12c
 
 
 #url
-fileUrl=/home/project/hsg/filesystem/
-#fileUrl=/Volumes/work/code/filesystem/
+#fileUrl=/home/project/hsg/filesystem/
+fileUrl=/Volumes/work/
 
 #wx
 wxAppId=wx8d49e2f83025229d
 wxAppSecret=d8d6dcaef77d3b659258a01b5ddba5df
+
+wxH5AppId=wxa075e8509802f826
+wxH5AppSecret=0e606fc1378d35e359fcf3f15570b2c5
diff --git a/hai-service/src/main/resources/pre/commonConfig.properties b/hai-service/src/main/resources/pre/commonConfig.properties
index 559b52e7..d7030aad 100644
--- a/hai-service/src/main/resources/pre/commonConfig.properties
+++ b/hai-service/src/main/resources/pre/commonConfig.properties
@@ -87,3 +87,6 @@ CyPostUrl=http://120.24.83.85:8999/
 unionAppId=ced46392acfe42be863fdfdd3e61164a
 unionSecret=a0f380bb22cd4ce2a8d35f3bf437d6fa
 unionRsaKey=f2e6b6b95da445866194498c371a7c8af2e6b6b95da44586
+
+wxH5AppId=wxa075e8509802f826
+wxH5AppSecret=0e606fc1378d35e359fcf3f15570b2c5
diff --git a/hai-service/src/main/resources/prod-9401/commonConfig.properties b/hai-service/src/main/resources/prod-9401/commonConfig.properties
index 87e2a1ca..5ac4e69b 100644
--- a/hai-service/src/main/resources/prod-9401/commonConfig.properties
+++ b/hai-service/src/main/resources/prod-9401/commonConfig.properties
@@ -108,3 +108,6 @@ fileUrl=/home/project/hsg/filesystem/
 
 wxAppId=wx8d49e2f83025229d
 wxAppSecret=d8d6dcaef77d3b659258a01b5ddba5df
+
+wxH5AppId=wxa075e8509802f826
+wxH5AppSecret=0e606fc1378d35e359fcf3f15570b2c5
diff --git a/hai-service/src/main/resources/prod/commonConfig.properties b/hai-service/src/main/resources/prod/commonConfig.properties
index fb1ef8e8..2904c483 100644
--- a/hai-service/src/main/resources/prod/commonConfig.properties
+++ b/hai-service/src/main/resources/prod/commonConfig.properties
@@ -113,3 +113,6 @@ fileUrl=/home/project/hsg/filesystem/
 
 wxAppId=wx8d49e2f83025229d
 wxAppSecret=d8d6dcaef77d3b659258a01b5ddba5df
+
+wxH5AppId=wxa075e8509802f826
+wxH5AppSecret=0e606fc1378d35e359fcf3f15570b2c5
diff --git a/v1/src/main/java/com/v1/controller/WxMsgController.java b/v1/src/main/java/com/v1/controller/WxMsgController.java
index ebc0a3a1..65a9284b 100644
--- a/v1/src/main/java/com/v1/controller/WxMsgController.java
+++ b/v1/src/main/java/com/v1/controller/WxMsgController.java
@@ -1,23 +1,30 @@
 package com.v1.controller;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
+import com.google.zxing.BinaryBitmap;
+import com.google.zxing.DecodeHintType;
+import com.google.zxing.Result;
+import com.google.zxing.client.j2se.BufferedImageLuminanceSource;
+import com.google.zxing.common.HybridBinarizer;
+import com.google.zxing.qrcode.QRCodeReader;
+import com.hai.common.Base64Util;
 import com.hai.common.exception.ErrorCode;
 import com.hai.common.exception.ErrorHelp;
 import com.hai.common.exception.SysCode;
 import com.hai.common.pay.util.IOUtil;
 import com.hai.common.pay.util.XmlUtil;
-import com.hai.common.utils.HttpsUtils;
-import com.hai.common.utils.RedisUtil;
-import com.hai.common.utils.ResponseMsgUtil;
-import com.hai.common.utils.WxUtils;
+import com.hai.common.security.AESEncodeUtil;
+import com.hai.common.utils.*;
 import com.hai.config.CommonSysConst;
+import com.hai.config.WeChatQrcodeUtils;
 import com.hai.entity.HighUser;
+import com.hai.enum_type.WxQrCodeTypeEnum;
 import com.hai.model.HighMerchantStoreModel;
 import com.hai.model.ResponseData;
 import com.hai.service.HighMerchantStoreService;
 import com.hai.service.HighUserService;
 import com.v1.config.SysConst;
-import com.v1.config.WeChatQrcodeUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 
@@ -27,24 +34,28 @@ import org.slf4j.LoggerFactory;
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import javax.imageio.ImageIO;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import java.awt.image.BufferedImage;
+import java.io.*;
+import java.net.HttpURLConnection;
+import java.net.URL;
 import java.util.*;
 
+import static org.apache.catalina.manager.Constants.CHARSET;
+
 /**
  * @author sum1dream
  */
 
 @Controller
 @RequestMapping(value = "/wxMsg")
-@Api(value = "自建站接口")
+@Api(value = "微信")
 public class WxMsgController {
 
     private static Logger log = LoggerFactory.getLogger(ThirdPartyController.class);
@@ -97,10 +108,9 @@ public class WxMsgController {
             // 微信支付系统发送的数据(格式)
             String notifyXml;
             notifyXml = IOUtil.inputStreamToString(request.getInputStream(), "UTF-8");
-
             log.info("微信系统发送的数据:" + notifyXml);
             SortedMap map = XmlUtil.parseXmlToTreeMap(notifyXml, "UTF-8");
-
+            Map mapQrCode = new HashMap<>();
             // openId
             String userOpenId = map.get("FromUserName");
             // 微信账号
@@ -111,40 +121,109 @@ public class WxMsgController {
             String msgType = map.get("MsgType");
             // 二维码参数
             String eventKey = map.get("EventKey");
-
+            log.info("二维码参数:" + eventKey);
             // 判断用户是否是新用户
             HighUser user = highUserService.findByOpenIdH5(userOpenId);
 
-
-            String linkContent = null;
-            String newUserContent = null;
-            String content = null;
+            String linkContent = "";
+            String newUserContent = "";
+            String content = "";
             if (eventKey != null && eventKey.length() != 0) {
                 JSONObject object = weChatQrcodeUtils.paramPars(eventKey);
-                // type = 1 推广扫码 type = 2 商户门店 3:查看视频教程 4:支付扫码
-                if (Objects.equals(object.getString("qrscene_type"), "1") || Objects.equals(object.getString("type"), "1")) {
-                    linkContent = "点击查看更多优惠\n\n";
-                } else if (Objects.equals(object.getString("qrscene_type"), "2") || Objects.equals(object.getString("type"), "2")){
+                // type = 1 推广扫码
+                if (Objects.equals(object.getString("qrscene_type"), WxQrCodeTypeEnum.type1.getType()) || Objects.equals(object.getString("type"), WxQrCodeTypeEnum.type1.getType())) {
+                    // todo 推广扫码
+                }
+                // type = 2 在线加油门店扫码
+                if (Objects.equals(object.getString("qrscene_type"), WxQrCodeTypeEnum.type2.getType()) || Objects.equals(object.getString("type"), WxQrCodeTypeEnum.type2.getType())){
                     // 商户门店
                     HighMerchantStoreModel store = merchantStoreService.getMerchantStoreByKey(object.getString("code"));
-                    linkContent = "欢迎来到" + store.getStoreName()+"" +   "[哇][哇][哇]\n\n点击这里一键加油\n\n";
-                }  else if (Objects.equals(object.getString("qrscene_type"), "3") || Objects.equals(object.getString("type"), "3")){
+                    linkContent =
+                            "欢迎来到" + store.getStoreName()+""
+                                    + "[哇][哇][哇]\n\n点击这里一键加油\n\n";
+                }
+                //  3:查看视频教程
+                if (Objects.equals(object.getString("qrscene_type"), WxQrCodeTypeEnum.type3.getType()) || Objects.equals(object.getString("type"), WxQrCodeTypeEnum.type3.getType())){
+                    // 重庆
+                    if ( Objects.equals(object.getString("code"), "1")) {
+                        linkContent =
+                                "加油优惠选我们,你的出行不再忧愁\uD83D\uDC97\n\n"
+                                + "查看中石油操作流程\n\n"
+                                + "走得更远,看得更美的风景,加油添生活![太阳]\n\n"
+                                + "好车要好油,优惠更加牛![發]\n\n";
+                    }
+                    // 贵州
+                    if (Objects.equals(object.getString("code"), "2")) {
+                        linkContent =
+                                "加满好油,一路畅游!✨✨\n\n"
+                                + "查看中石化操作流程\n\n"
+                                + "用心为您着想,诚意为您服务。\uD83C\uDF39\n\n"
+                                + "油客来自五湖四海,在这里祝您一路顺风。\n\n";
+
+                    }
+
+                }
+                //  4:支付码牌扫码
+                if (Objects.equals(object.getString("qrscene_type"), WxQrCodeTypeEnum.type4.getType()) || Objects.equals(object.getString("type"), WxQrCodeTypeEnum.type4.getType())){
+                    // todo 支付扫码
+                }
+                // 5:扫码贵州中石化优惠券二维码
+                if (Objects.equals(object.getString("qrscene_type"), WxQrCodeTypeEnum.type5.getType()) || Objects.equals(object.getString("type"), WxQrCodeTypeEnum.type5.getType())){
+                    mapQrCode.put("type", object.getString("encryptType"));
+                    // 二维码参数
+                    mapQrCode.put("id", object.getString("code"));
+                    log.info("map参数:" + mapQrCode);
+                    // 商户门店
+                    linkContent =
+                                   "山高水远,相伴致远[爱心][爱心]\n\n"
+                                    + "领取中石化加油券\n\n"
+                                    + "您追求实惠的折扣,我们追求高超的品质\uD83D\uDD16\n\n"
+                                    + "迎南来北往宾朋尊驾,[福]\n\n"
+                                    + "送平安顺遂诚意祝福![福]\n\n";
+                    log.info("地址参数:" + linkContent);
+                }
+                // 6:扫码重庆中石油优惠券二维码
+                if (Objects.equals(object.getString("qrscene_type"), WxQrCodeTypeEnum.type6.getType()) || Objects.equals(object.getString("type"), WxQrCodeTypeEnum.type6.getType())){
+                    mapQrCode.put("type", object.getString("encryptType"));
+                    // 二维码参数
+                    mapQrCode.put("id", object.getString("code"));
+                    log.info("map参数:" + mapQrCode);
                     // 商户门店
-                    linkContent = "点击查看重庆中石油视频教程" +
-                            "[哇][哇][哇]\n\n点击查看贵州中石化视频教程\n\n";
+                    linkContent =
+                            "加好油,添好运,我们更适意[礼物]\n\n"
+                                    + "领取中石油加油券\n\n"
+                                    + "致力于质量与福利,赢得客户心。\n\n"
+                                    + "一路精彩,“油”我相伴!\uD83C\uDF1F\n\n";
+                    log.info("地址参数:" + linkContent);
                 }
             } else {
                 linkContent = "点击查看更多优惠\n\n";
             }
 
+
             // 判断是否是新用户
-            if (user == null) {
-                newUserContent = "特意为您奉上" +
-                        "5张优惠券" +
-                        ",放在您的"+
-                        "优惠券"+
-                        "里面,记得及时使用哦[爱心][爱心][爱心]\n\n";
-            }
+//            if (user == null) {
+//                newUserContent = "特意为您奉上" +
+//                        "5张优惠券" +
+//                        ",放在您的"+
+//                        "优惠券"+
+//                        "里面,记得及时使用哦[爱心][爱心][爱心]\n\n";
+//            }
 
 
             log.info("二维码参数:" + eventKey);
@@ -163,29 +242,16 @@ public class WxMsgController {
                 // 用户关注公众号
                 if ("subscribe".equals(event)) {
                     log.info("进入扫码关注流程:" + event);
-                    // todo 业务处理
                     content =
-                            "终于等到你,还好我没放弃[玫瑰][玫瑰][玫瑰]\n\n" +
                             "您好,感谢关注嗨森逛商城!\n\n" +
                                     linkContent +
-                            "在线等你来撩~[哇][哇][哇]\n\n" + newUserContent +
-                             "【如遇任何问题请致电客服:400-678-0738】"
+                             "服务热线:400-023-6806"
                             ;
-                     // todo 业务处理
+
                 }
                 // 用户扫码进入公众号
                 else if ("SCAN".equals(event)) {
-                    // todo 业务处理
-                    content =
-                            "油价很贵,诗和远方也很贵[可怜]\n\n" +
-                                    "“一键加油”有”油“惠[红包][红包][红包]\n\n" +
-                                    linkContent +
-                                    "多重好礼为您助力\n\n" +
-                                    "加油的时候少点心疼,踩油门的时候多点豪横![得意][得意][得意]\n\n" +
-                                    "【如遇任何问题请致电客服:400-678-0738】"
-                            ;
-
-
+                    content = linkContent + "服务热线:400-023-6806";
 
                 }else if ("unsubscribe".equals(event)) {
                     // todo 取消关注 业务处理
@@ -194,6 +260,7 @@ public class WxMsgController {
                 String mapToXml = weChatQrcodeUtils.handleEventSubscribe(map);
                 response.setCharacterEncoding("UTF-8");
                 response.getWriter().print(mapToXml);
+
             }
         } catch (Exception e) {
 //            return null;
@@ -241,12 +308,38 @@ public class WxMsgController {
                                      @RequestParam(name = "code", required = false) String code) {
         try {
 
-            String sceneId = "type=" + type + "&code=" + code;
+            String jsonData;
+            String sceneId;
+
+            if (Objects.equals(type, "5")) {
+                jsonData = AESEncodeUtil.aesDecrypt(Base64Util.decode(code));
+
+                JSONObject jsonObject = JSON.parseObject(jsonData);
+                Long id = jsonObject.getLong("id");
+
+                sceneId = "type=" + type + "&code=" + id;
+            } else {
+                sceneId = "type=" + type + "&code=" + code;
+            }
 
             String ticket = weChatQrcodeUtils.qrCodeCreateLastTicket(sceneId).getTicket();
 
             return ResponseMsgUtil.success(weChatQrcodeUtils.qrCodePictureUrl(ticket));
-        } catch (WxErrorException e) {
+        } catch (Exception e) {
+            return ResponseMsgUtil.exception(e);
+        }
+    }
+
+
+    @RequestMapping(value = "/qrCodeImgUrl", method = RequestMethod.GET)
+    @ResponseBody
+    @ApiOperation(value = "二维码地址解析")
+    public ResponseData qrCodeImgUrl(@RequestParam(name = "type", required = false) String type,
+                                     @RequestParam(name = "code", required = false) String code) {
+        try {
+
+            return ResponseMsgUtil.success(weChatQrcodeUtils.qrCodeImgUrl(type , code , "DISCOUNT"));
+        } catch (Exception e) {
             return ResponseMsgUtil.exception(e);
         }
     }
@@ -361,4 +454,30 @@ public class WxMsgController {
 //    }
 
 
+    @RequestMapping(value = "/createMenu", method = RequestMethod.POST)
+    @ResponseBody
+    @ApiOperation(value = "创建菜单")
+    public ResponseData createMenu(@RequestBody JSONObject object) {
+        try {
+            Map params = new HashMap<>();
+            params.put("appid", SysConst.getSysConfig().getWxH5AppId());
+            params.put("secret", SysConst.getSysConfig().getWxH5AppSecret());
+            params.put("grant_type", "client_credential");
+
+            JSONObject accessTokenObject = HttpsUtils.doGet("https://api.weixin.qq.com/cgi-bin/token", params);
+            if (accessTokenObject == null) {
+                log.error("getH5UserInfo error!", "获取微信access_token失败"  );
+                throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "获取微信access_token失败");
+            }
+
+            JSONObject jsonObject = HttpsUtils.doPost("https://api.weixin.qq.com/cgi-bin/menu/create?access_token=" + accessTokenObject.getString("access_token"), object);
+
+            return ResponseMsgUtil.success(jsonObject);
+
+        } catch (Exception e) {
+            return ResponseMsgUtil.exception(e);
+        }
+    }
+
+
 }
diff --git a/v1/src/main/java/com/v1/controller/business/GzSinopecController.java b/v1/src/main/java/com/v1/controller/business/GzSinopecController.java
index f4ebcec4..e3bf0d31 100644
--- a/v1/src/main/java/com/v1/controller/business/GzSinopecController.java
+++ b/v1/src/main/java/com/v1/controller/business/GzSinopecController.java
@@ -203,16 +203,6 @@ public class  GzSinopecController {
                 JSONObject jsonObject = HuiLianTongUnionCardConfig.resolveResponse(returnParam.getString("data"));
                 JSONArray dataArray = JSONObject.parseObject(jsonObject.getString("data"), JSONArray.class);
 
-                // 推送记录
-                HighGasOrderPush highGasOrderPush = new HighGasOrderPush();
-                highGasOrderPush.setType(OrderPushType.type6.getType());
-                highGasOrderPush.setOrderNo(object.getString("orderNo"));
-                highGasOrderPush.setCreateTime(new Date());
-                highGasOrderPush.setCode(returnParam.getString("respCode"));
-                highGasOrderPush.setRequestContent(object.toJSONString());
-                highGasOrderPush.setReturnContent(dataArray.toJSONString());
-                highGasOrderPushMapper.insert(highGasOrderPush);
-
                 return ResponseMsgUtil.success(dataArray);
             } else {
                 throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "下单失败");
diff --git a/v1/src/main/java/com/v1/controller/business/RefuelOnlineController.java b/v1/src/main/java/com/v1/controller/business/RefuelOnlineController.java
index 7da9e36e..973df17f 100644
--- a/v1/src/main/java/com/v1/controller/business/RefuelOnlineController.java
+++ b/v1/src/main/java/com/v1/controller/business/RefuelOnlineController.java
@@ -59,10 +59,10 @@ public class RefuelOnlineController {
     @Resource
     private ApiCommonConfig apiCommonConfig;
 
-    @RequestMapping(value = "/getStationStores", method = RequestMethod.POST)
+    @RequestMapping(value = "/getStationStore", method = RequestMethod.POST)
     @ResponseBody
     @ApiOperation(value = "获取油站门店")
-    public ResponseData getStationStores(@RequestBody JSONObject object , HttpServletRequest request ) {
+    public ResponseData getStationStore(@RequestBody JSONObject object , HttpServletRequest request ) {
         try {
 
             String ip = "";
diff --git a/v1/src/main/resources/dev/application.yml b/v1/src/main/resources/dev/application.yml
index 457b5089..2bb187e4 100644
--- a/v1/src/main/resources/dev/application.yml
+++ b/v1/src/main/resources/dev/application.yml
@@ -4,7 +4,7 @@ server:
     context-path: /v1
 
 #配置是否为debug模式,debug模式下,不开启权限校验
-debug: false
+debug: true
 
 #datasource数据源设置
 spring:
diff --git a/v1/src/main/resources/dev/logback.xml b/v1/src/main/resources/dev/logback.xml
index 9cfef73b..915b7c95 100644
--- a/v1/src/main/resources/dev/logback.xml
+++ b/v1/src/main/resources/dev/logback.xml
@@ -58,6 +58,57 @@
             
     
 
+    
+        log/HltCardLog.log
+        
+            log/hlt/hltcard.log.%d.%i
+            
+                
+                64 MB
+            
+        
+        
+            
+                %d %p (%file:%line\)- %m%n
+            
+            UTF-8 
+        
+    
+    
+        log/PayNotify.log
+        
+            log/paynotify/paynotify.log.%d.%i
+            
+                
+                64 MB
+            
+        
+        
+            
+                %d %p (%file:%line\)- %m%n
+            
+            UTF-8 
+        
+    
+    
+        log/QzLog.log
+        
+            log/QzLog/QzLog.log.%d.%i
+            
+                
+                64 MB
+            
+        
+        
+            
+                %d %p (%file:%line\)- %m%n
+            
+            UTF-8 
+        
+    
     
         log/RechargeLog.log
@@ -76,6 +127,23 @@
         
     
 
+    
+        log/wechatPay.log
+        
+            log/wechatPayLog/wechatPayLog.log.%d.%i
+            
+                
+                64 MB
+            
+        
+        
+            
+                %d %p (%file:%line\)- %m%n
+            
+            UTF-8 
+        
+    
+
     
             
         
@@ -92,10 +160,22 @@
            
     
 
+    
+        
+    
+    
+        
+    
+    
+        
+    
     
         
     
     
         
     
+    
+        
+    
 
diff --git a/v1/src/main/resources/prod/application.yml b/v1/src/main/resources/prod/application.yml
index cbc4155a..a7a61c2d 100644
--- a/v1/src/main/resources/prod/application.yml
+++ b/v1/src/main/resources/prod/application.yml
@@ -4,7 +4,7 @@ server:
     context-path: /v1
 
 #配置是否为debug模式,debug模式下,不开启权限校验
-debug: false
+debug: true
 
 #datasource数据源设置
 spring:
@@ -29,7 +29,7 @@ spring:
     maxOpenPreparedStatements: 20
   redis:
     database: 0
-    host: 127.0.0.1
+    host: 139.159.177.244
     port: 36379
     password: HF123456.Redis
     timeout: 1000
@@ -42,44 +42,58 @@ spring:
   #MQTT配置信息
   mqtt:
     #MQTT服务地址
-    url: ws://122.9.135.148:8083/mqtt
+    url: ws://139.159.177.244:8083/mqtt
     #用户名
     username: printer_provider
     #密码
-    password: abcd123!
+    password: 123654
       #客户端id(不能重复)
       # client:
-    # id: provider-id
-    #MQTT默认的消息推送主题,实际可在调用接口是指定
+      # id: provider-id
+      #MQTT默认的消息推送主题,实际可在调用接口是指定
     # default:
     # topic: topic
-  #thymelea模板配置
-  thymeleaf:
-    prefix: classpath:/templates/
-    suffix: .html
-    mode: HTML5
-    encoding: UTF-8
-    #热部署文件,页面不产生缓存,及时更新
-    cache: false
+rocketmq:
+  name-server: 139.159.177.244:9876
+  producer:
+    #必须指定group
+    group: default-group
+
   #配置日期返回至前台为时间戳
   jackson:
     serialization:
       write-dates-as-timestamps: true
-
-
-    thymeleaf:
-      cache: false
-      prefix: classpath:/templates/
-      suffix: .html
-      encoding: UTF-8
-      content-type: text/html
-      mode: HTML5
-
 mybatis:
   mapperLocations:
-  - classpath*:sqlmap*/*.xml
+    - classpath*:sqlmap*/*.xml
   type-aliases-package:
     org.springboot.sample.entity
+  configuration:
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+    #开启MyBatis的二级缓存
+    cache-enabled: true
+
+jetcache:
+  statIntervalMinutes: 15
+  areaInCacheName: false
+  local:
+    default:
+      type: linkedhashmap
+      keyConvertor: fastjson
+  remote:
+    default:
+      type: redis
+      host: 139.159.177.244
+      port: 36379
+      password: HF123456.Redis
+      keyConvertor: fastjson
+      broadcastChannel: projectA
+      valueEncoder: java
+      valueDecoder: java
+      poolConfig:
+        minIdle: 5
+        maxIdle: 20
+        maxTotal: 50
 
 pagehelper:
   helperDialect: mysql
diff --git a/v1/src/main/resources/prod/logback.xml b/v1/src/main/resources/prod/logback.xml
index 516350df..fb933002 100644
--- a/v1/src/main/resources/prod/logback.xml
+++ b/v1/src/main/resources/prod/logback.xml
@@ -57,6 +57,93 @@
             UTF-8 
         
     
+
+    
+        log/HltCardLog.log
+        
+            log/hlt/hltcard.log.%d.%i
+            
+                
+                64 MB
+            
+        
+        
+            
+                %d %p (%file:%line\)- %m%n
+            
+            UTF-8 
+        
+    
+    
+        log/PayNotify.log
+        
+            log/paynotify/paynotify.log.%d.%i
+            
+                
+                64 MB
+            
+        
+        
+            
+                %d %p (%file:%line\)- %m%n
+            
+            UTF-8 
+        
+    
+    
+        log/QzLog.log
+        
+            log/QzLog/QzLog.log.%d.%i
+            
+                
+                64 MB
+            
+        
+        
+            
+                %d %p (%file:%line\)- %m%n
+            
+            UTF-8 
+        
+    
+    
+        log/RechargeLog.log
+        
+            log/RechargeLog/RechargeLog.log.%d.%i
+            
+                
+                64 MB
+            
+        
+        
+            
+                %d %p (%file:%line\)- %m%n
+            
+            UTF-8 
+        
+    
+
+    
+        log/wechatPay.log
+        
+            log/wechatPayLog/wechatPayLog.log.%d.%i
+            
+                
+                64 MB
+            
+        
+        
+            
+                %d %p (%file:%line\)- %m%n
+            
+            UTF-8 
+        
+    
+
     
         
     
@@ -69,4 +156,23 @@
     
         
     
+
+    
+        
+    
+    
+        
+    
+    
+        
+    
+    
+        
+    
+    
+        
+    
+    
+        
+