|
@@ -28,12 +28,15 @@ import com.fs.core.utils.OrderCodeUtils;
|
|
|
import com.fs.event.TemplateBean;
|
|
|
import com.fs.event.TemplateEvent;
|
|
|
import com.fs.event.TemplateListenEnum;
|
|
|
+import com.fs.his.config.FsSysConfig;
|
|
|
import com.fs.his.domain.*;
|
|
|
import com.fs.his.dto.*;
|
|
|
import com.fs.his.enums.FsInquiryOrderStatusEnum;
|
|
|
import com.fs.his.mapper.*;
|
|
|
import com.fs.his.param.*;
|
|
|
import com.fs.his.service.*;
|
|
|
+import com.fs.his.utils.ConfigUtil;
|
|
|
+import com.fs.his.utils.HttpUtil;
|
|
|
import com.fs.his.vo.*;
|
|
|
import com.fs.huifuPay.domain.HuiFuRefundResult;
|
|
|
import com.fs.huifuPay.sdk.opps.core.request.V2TradePaymentScanpayRefundRequest;
|
|
@@ -60,6 +63,7 @@ import com.github.binarywang.wxpay.bean.result.WxPayRefundResult;
|
|
|
import com.github.binarywang.wxpay.config.WxPayConfig;
|
|
|
import com.github.binarywang.wxpay.exception.WxPayException;
|
|
|
import com.github.binarywang.wxpay.service.WxPayService;
|
|
|
+import com.google.common.reflect.TypeToken;
|
|
|
import com.google.gson.Gson;
|
|
|
import lombok.Synchronized;
|
|
|
import org.apache.rocketmq.spring.core.RocketMQTemplate;
|
|
@@ -165,7 +169,8 @@ public class FsInquiryOrderServiceImpl implements IFsInquiryOrderService
|
|
|
private IFsUserCouponService userCouponService;
|
|
|
@Autowired
|
|
|
private IFsCouponService couponService;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private ConfigUtil configUtil;
|
|
|
/**
|
|
|
* 查询问诊订单
|
|
|
*
|
|
@@ -810,18 +815,18 @@ public class FsInquiryOrderServiceImpl implements IFsInquiryOrderService
|
|
|
String redisKey = String.valueOf(StrUtil.format("{}{}", FsConstants.REDIS_INQUIRY_ORDER_OUTTIME_UNRECEIVE, order.getOrderId()));
|
|
|
redisCache.setCacheObject(redisKey,order.getOrderId(),configDTO.getUnReceiveCancelTime(), TimeUnit.MINUTES);
|
|
|
}
|
|
|
- try {
|
|
|
- new Thread(() -> {
|
|
|
- try {
|
|
|
- rocketMQTemplate.syncSend("repeat-upload", JSON.toJSONString(RepeatUploadVo.builder().type(2).fsUserId(order.getUserId()).build()));
|
|
|
- }catch (Exception e){
|
|
|
- logger.error("看课重粉提交mq失败", e);
|
|
|
- }
|
|
|
- }).start();
|
|
|
-
|
|
|
- }catch (Exception e){
|
|
|
- logger.error("看课重粉提交mq失败", e);
|
|
|
- }
|
|
|
+// try {
|
|
|
+// new Thread(() -> {
|
|
|
+// try {
|
|
|
+// rocketMQTemplate.syncSend("repeat-upload", JSON.toJSONString(RepeatUploadVo.builder().type(2).fsUserId(order.getUserId()).build()));
|
|
|
+// }catch (Exception e){
|
|
|
+// logger.error("看课重粉提交mq失败", e);
|
|
|
+// }
|
|
|
+// }).start();
|
|
|
+//
|
|
|
+// }catch (Exception e){
|
|
|
+// logger.error("看课重粉提交mq失败", e);
|
|
|
+// }
|
|
|
|
|
|
|
|
|
return R.ok();
|
|
@@ -1766,4 +1771,26 @@ public class FsInquiryOrderServiceImpl implements IFsInquiryOrderService
|
|
|
task.setFileUrl(result.get("msg").toString());
|
|
|
fsExportTaskMapper.updateFsExportTask(task);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public byte[] getWxaCodeInquiryOrderUnLimit(Long orderId) {
|
|
|
+ FsSysConfig sysConfig = configUtil.getSysConfig();
|
|
|
+ String url="https://api.weixin.qq.com/cgi-bin/stable_token";
|
|
|
+ HashMap<String, String> map = new HashMap<>();
|
|
|
+ map.put("grant_type","client_credential");
|
|
|
+ map.put("appid",sysConfig.getAppid());
|
|
|
+ map.put("secret",sysConfig.getSecret());
|
|
|
+
|
|
|
+
|
|
|
+ String accessToken = HttpUtil.endApi(url, null, map);
|
|
|
+ Map<String, String> accessTokenMap = new Gson().fromJson(accessToken, new TypeToken<Map<String, Object>>(){}.getType());
|
|
|
+ String codeUrl="https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token="+accessTokenMap.get("access_token");
|
|
|
+ HashMap<String, String> jsonMap = new HashMap<>();
|
|
|
+ jsonMap.put("page","pages_order/inquiryPay");
|
|
|
+ jsonMap.put("scene","orderId="+ orderId);
|
|
|
+ //正式版为 "release",体验版为 "trial",开发版为 "develop"
|
|
|
+ jsonMap.put("env_version","release");
|
|
|
+ byte[] bytes = HttpUtil.getWechatQrcodeByHttpURL(codeUrl, jsonMap);
|
|
|
+ return bytes;
|
|
|
+ }
|
|
|
}
|