订单培训订单功能修改
This commit is contained in:
parent
fd2df8d9d4
commit
2cb9bebd60
@ -337,3 +337,14 @@ dzsCode:
|
||||
useCityCode: 371400
|
||||
# 业务场景
|
||||
businessStepCode: 302
|
||||
|
||||
# 医护助手微信小程序参数配置信息
|
||||
nurse-applet-chat-config:
|
||||
# 微信小程序id,wxa4f2b43d2ccb9908
|
||||
applet-id: wxa4f2b43d2ccb9908
|
||||
# 微信小程序密钥,
|
||||
secret: faeba9fc043cfdcb088f43be1747e054
|
||||
# 微信小程序返回国家语言
|
||||
lang: zh_CN
|
||||
# 微信小程序授权类型
|
||||
grant-type: authorization_code
|
||||
|
||||
@ -0,0 +1,38 @@
|
||||
package com.xinelu.common.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 护理员小程序配置类
|
||||
*
|
||||
* @author ljh
|
||||
* @version 1.0
|
||||
* Create by 2023/3/29 15:40
|
||||
*/
|
||||
@Data
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "nurse-applet-chat-config")
|
||||
public class NurseAppletChatConfig {
|
||||
|
||||
/**
|
||||
* 小程序id
|
||||
*/
|
||||
private String appletId;
|
||||
|
||||
/**
|
||||
* 小程序secret
|
||||
*/
|
||||
private String secret;
|
||||
|
||||
/**
|
||||
* 返回国家地区语言版本,zh_CN 简体,zh_TW 繁体,en 英语
|
||||
*/
|
||||
private String lang;
|
||||
|
||||
/**
|
||||
* 授权类型
|
||||
*/
|
||||
private String grantType;
|
||||
}
|
||||
@ -9,6 +9,7 @@ import com.xinelu.applet.vo.wechatpaymentinfo.vo.OrderStatusInfoVO;
|
||||
import com.xinelu.applet.vo.wechatpaymentinfo.vo.WeChatAppletSignVO;
|
||||
import com.xinelu.applet.vo.wechatpaymentinfo.vo.WeChatQueryOrderVO;
|
||||
import com.xinelu.common.config.AppletChatConfig;
|
||||
import com.xinelu.common.config.NurseAppletChatConfig;
|
||||
import com.xinelu.common.config.WeChatPaymentUrlConfig;
|
||||
import com.xinelu.common.config.XylWeChatPaymentConfig;
|
||||
import com.xinelu.common.constant.Constants;
|
||||
@ -72,6 +73,8 @@ public class WeChatPaymentServiceImpl implements WeChatPaymentService {
|
||||
private RedisTemplate<String, String> redisTemplate;
|
||||
@Resource
|
||||
private WeChatUtil weChatUtil;
|
||||
@Resource
|
||||
private NurseAppletChatConfig nurseAppletChatConfig;
|
||||
|
||||
/**
|
||||
* 新医路支付商品描述
|
||||
@ -298,7 +301,6 @@ public class WeChatPaymentServiceImpl implements WeChatPaymentService {
|
||||
prepayId = redisTemplate.opsForValue().get(Constants.PREPAY_ID_KEY + paymentDTO.getOrderNo());
|
||||
}
|
||||
//构建小程序调起支付参数信息
|
||||
// return AjaxResult.success(getSignInfo(prepayId, paymentDTO.getBuySource()));
|
||||
return AjaxResult.success(getSignInfo(prepayId));
|
||||
}
|
||||
|
||||
@ -427,13 +429,13 @@ public class WeChatPaymentServiceImpl implements WeChatPaymentService {
|
||||
*/
|
||||
private String buildTrainingOrderJsApiParams(PaymentDTO paymentDTO, TrainingOrder trainingOrder) {
|
||||
Map<String, Object> paramMap = new LinkedHashMap<>();
|
||||
//泉医助手学习培训订单使用医路优品账户进行支付,无需根据进购买来源进行判断
|
||||
/* paramMap.put("mchid", ylypWeChatPaymentConfig.getYlypMchId());
|
||||
//医护助手学习培训订单使用医路优品账户进行支付,无需根据进购买来源进行判断
|
||||
paramMap.put("mchid", xylWeChatPaymentConfig.getXylMchId());
|
||||
paramMap.put("out_trade_no", trainingOrder.getTrainingOrderNo());
|
||||
//应用id,此处为泉医助手小程序id
|
||||
//应用id,此处为医护助手小程序id
|
||||
paramMap.put("appid", nurseAppletChatConfig.getAppletId());
|
||||
paramMap.put("description", YI_LU_YOU_PIN_DESCRIPTION);
|
||||
paramMap.put("notify_url", ylypWeChatPaymentConfig.getYlypWeChatNotifyUrl() + YINLUYOUPIN_WE_CHAT_NOTIFY_URL);*/
|
||||
paramMap.put("description", XIN_YI_LU_DESCRIPTION);
|
||||
paramMap.put("notify_url", xylWeChatPaymentConfig.getXylWeChatNotifyUrl() + XINYILU_WE_CHAT_NOTIFY_URL);
|
||||
Map<String, Object> amountParamMap = new LinkedHashMap<>();
|
||||
//总金额
|
||||
int totalPrice = paymentDTO.getPaymentPrice().multiply(BigDecimal.valueOf(100)).intValue();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user