zyp 1 settimana fa
parent
commit
bb4997d806

+ 3 - 1
fs-service-system/src/main/java/com/fs/his/param/WxSendRedPacketParam.java

@@ -16,7 +16,9 @@ public class WxSendRedPacketParam implements Serializable {
 
     private Integer source=1;//来源 1:h5  2:看课小程序
 
-    private Integer redPacketMode; //红包模式
+    private Integer redPacketMode;//红包模式
+
+    private String appId;
 
 
 }

+ 1 - 1
fs-user-app/src/main/java/com/fs/app/controller/WxCompanyUserController.java

@@ -76,7 +76,7 @@ public class WxCompanyUserController extends AppBaseController {
 //            return R.error("昵称不符合标准!");
 //        }
         //获取第二个小程序配置,序号从0开始
-        final WxMaService wxService = WxMaConfiguration.getMaService(maProperties.getConfigs().get(1).getAppid());
+        final WxMaService wxService = WxMaConfiguration.getMaService(param.getAppId());
         try {
             WxMaJscode2SessionResult session = wxService.getUserService().getSessionInfo(param.getCode());
             this.logger.info(session.getSessionKey());

+ 1 - 2
fs-user-app/src/main/java/com/fs/app/controller/WxPayController.java

@@ -112,8 +112,7 @@ public class WxPayController {
     }
 
     @PostMapping( "/test")
-    public R test() throws Exception {
-        WxSendRedPacketParam param  = new WxSendRedPacketParam();
+    public R test(@RequestBody WxSendRedPacketParam param) throws Exception {
         storePaymentService.sendRedPacketTest(param);
         return R.ok();
     }

+ 2 - 0
fs-user-app/src/main/java/com/fs/app/param/LoginMaWxParam.java

@@ -55,4 +55,6 @@ public class LoginMaWxParam implements Serializable {
     @ApiModelProperty(value = "小程序授权类型")
     private Integer authType;
 
+    private String appId;
+
 }