Procházet zdrojové kódy

Merge remote-tracking branch 'origin/企微聊天' into 企微聊天

yh před 5 dny
rodič
revize
a4613e5adb

+ 4 - 10
fs-admin/src/main/java/com/fs/his/controller/FsStorePaymentController.java

@@ -14,14 +14,7 @@ import com.fs.his.vo.FsStorePaymentVO;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import com.fs.common.annotation.Log;
 import com.fs.common.core.controller.BaseController;
 import com.fs.common.core.domain.AjaxResult;
@@ -128,10 +121,11 @@ public class FsStorePaymentController extends BaseController
 
 
     @GetMapping(value = "getStatus/{paymentId}")
-    public AjaxResult getStatus(@PathVariable("paymentId") Long paymentId)
+    public AjaxResult getStatus(@PathVariable("paymentId") Long paymentId,
+                                @RequestParam(value = "refundDate",required = false ) Date refundDate)
     {
 
-        return AjaxResult.success( fsStorePaymentService.updateFsStorePaymentByDecryptForm(paymentId));
+        return AjaxResult.success( fsStorePaymentService.updateFsStorePaymentByDecryptForm(paymentId,refundDate));
     }
     @PreAuthorize("@ss.hasPermi('his:storePayment:refund')")
     @GetMapping(value = "refund/{paymentId}")

+ 1 - 1
fs-admin/src/main/java/com/fs/his/task/Task.java

@@ -599,7 +599,7 @@ public class Task {
         List<FsStorePayment> fsStorePayments = fsStorePaymentService.selectAllPayment();
         for (FsStorePayment fsStorePayment : fsStorePayments) {
             try{
-                fsStorePaymentService.updateFsStorePaymentByDecryptForm(fsStorePayment.getPaymentId());
+                fsStorePaymentService.updateFsStorePaymentByDecryptForm(fsStorePayment.getPaymentId(),null);
             }catch (Exception e){
                 logger.error("同步支付失败:"+fsStorePayment.getPaymentId());
             }

+ 8 - 0
fs-service/src/main/java/com/fs/his/domain/FsAppVersion.java

@@ -36,6 +36,10 @@ public class FsAppVersion extends BaseEntity
     @Excel(name = "下载地址")
     private String url;
 
+    /** 下载地址 */
+    @Excel(name = "wgt下载地址")
+    private String wgtUrl;
+
     /** APP类型 1android 2ios */
     @Excel(name = "APP类型 1android 2ios")
     private Integer type;
@@ -44,6 +48,10 @@ public class FsAppVersion extends BaseEntity
     @Excel(name = "是否强制更新")
     private Integer isForce;
 
+    /** 是否强制更新 */
+    @Excel(name = "热更新强制更新")
+    private Integer isHotForce;
+
     /** APP 类型 1医生端 2药师端 */
     @Excel(name = "APP 类型 1医生端 2药师端")
     private Integer appType;

+ 2 - 1
fs-service/src/main/java/com/fs/his/service/IFsStorePaymentService.java

@@ -1,5 +1,6 @@
 package com.fs.his.service;
 
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
@@ -89,7 +90,7 @@ public interface IFsStorePaymentService
 
     List<FsStorePaymentExcelVO> selectFsStorePaymentExcelVO(FsStorePaymentParam fsStorePayment);
 
-    String updateFsStorePaymentByDecryptForm(Long paymentId);
+    String updateFsStorePaymentByDecryptForm(Long paymentId, Date refundDate);
 
     R refundFsStorePayment(Long paymentId);
 

+ 6 - 1
fs-service/src/main/java/com/fs/his/service/impl/FsStoreOrderServiceImpl.java

@@ -1014,7 +1014,12 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
                 if (company != null) {
                     String followDoctorIdsJson = company.getFollowDoctorIds();
                     if (followDoctorIdsJson != null && followDoctorIdsJson != "") {
-                        long[] ids = JSON.parseObject(followDoctorIdsJson, long[].class);
+                        String jsonStr = JSON.parseObject(followDoctorIdsJson, String.class);
+                        if (jsonStr.startsWith("\"")) {
+                            jsonStr = jsonStr.replace("\"", "");
+                        }
+                        long[] ids = JSON.parseObject(jsonStr, long[].class);
+
                         if (ids.length > 0) {
                             Random random = new Random();
                             // 从数组中随机选择一个数字

+ 3 - 3
fs-service/src/main/java/com/fs/his/service/impl/FsStorePaymentServiceImpl.java

@@ -358,14 +358,14 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
 
     @Override
     @Transactional
-    public String updateFsStorePaymentByDecryptForm(Long paymentId) {
+    public String updateFsStorePaymentByDecryptForm(Long paymentId,Date refundDate) {
         FsStorePayment fsStorePayment = fsStorePaymentMapper.selectFsStorePaymentByPaymentId(paymentId);
         if (fsStorePayment != null && fsStorePayment.getStatus() == 1) {
             //退款同步
             if (fsStorePayment.getPayMode().equals("hf")) {
                 V2TradePaymentScanpayRefundqueryRequest refundQueryRequest = new V2TradePaymentScanpayRefundqueryRequest();
                 // 退款请求日期
-                refundQueryRequest.setOrgReqDate(new SimpleDateFormat("yyyyMMdd").format(DateUtils.getNowDate()));
+                refundQueryRequest.setOrgReqDate(new SimpleDateFormat("yyyyMMdd").format(refundDate));
 //                refundQueryRequest.setOrgReqDate("20260128");
                 //自己传的
                 refundQueryRequest.setOrgReqSeqId("refund-"+fsStorePayment.getPayCode());
@@ -1774,7 +1774,7 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
             for (FsStorePayment fsStorePayment : list) {
                 CompletableFuture<Void> future = CompletableFuture.runAsync(() -> {
                     try {
-                        updateFsStorePaymentByDecryptForm(fsStorePayment.getPaymentId());
+                        updateFsStorePaymentByDecryptForm(fsStorePayment.getPaymentId(),null);
                         //查询是否改为已支付
                         FsStorePayment finalPayment = fsStorePaymentMapper.selectFsStorePaymentByPaymentId(fsStorePayment.getPaymentId());
                         try {

+ 9 - 1
fs-service/src/main/resources/mapper/his/FsAppVersionMapper.xml

@@ -17,10 +17,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateConfig"    column="update_config"    />
         <result property="baiduUrl"    column="baidu_url"    />
         <result property="h5Url"    column="h5_url"    />
+        <result property="wgtUrl"    column="wgt_url"    />
+        <result property="isHotForce"    column="is_hot_force"    />
     </resultMap>
 
     <sql id="selectFsAppVersionVo">
-        select version_id,baidu_url,update_config, version_name, version_code, note, url, type, is_force, create_time, app_type,h5_url from fs_app_version
+        select version_id,baidu_url,update_config, version_name, version_code, note, url, type, is_force, create_time, app_type,h5_url,wgt_url,is_hot_force from fs_app_version
     </sql>
 
     <select id="selectFsAppVersionList" parameterType="FsAppVersion" resultMap="FsAppVersionResult">
@@ -57,6 +59,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateConfig != null">update_config,</if>
             <if test="baiduUrl != null">baidu_url,</if>
             <if test="h5Url != null and h5Url !=''">h5_url,</if>
+            <if test="wgtUrl != null and wgtUrl !=''">wgt_url,</if>
+            <if test="isHotForce != null">is_hot_force,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="versionName != null">#{versionName},</if>
@@ -70,6 +74,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateConfig != null">#{updateConfig},</if>
             <if test="baiduUrl != null">#{baiduUrl},</if>
             <if test="h5Url != null and h5Url !=''">#{h5Url},</if>
+            <if test="wgtUrl != null and wgtUrl !=''">#{wgtUrl},</if>
+            <if test="isHotForce != null">#{isHotForce},</if>
          </trim>
     </insert>
 
@@ -87,6 +93,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateConfig != null">update_config = #{updateConfig},</if>
             <if test="baiduUrl != null">baidu_url = #{baiduUrl},</if>
             <if test="h5Url != null and h5Url !=''">h5_url = #{h5Url},</if>
+            <if test="wgtUrl != null and wgtUrl !=''">wgt_url = #{wgtUrl},</if>
+            <if test="isHotForce != null">is_hot_force = #{isHotForce},</if>
         </trim>
         where version_id = #{versionId}
     </update>

+ 4 - 29
fs-user-app/src/main/java/com/fs/app/controller/AppLoginController.java

@@ -15,8 +15,6 @@ import com.fs.common.exception.ServiceException;
 import com.fs.common.service.ISmsService;
 import com.fs.common.utils.sign.Md5Utils;
 import com.fs.core.config.WxOpenProperties;
-import com.fs.course.domain.FsCoursePlaySourceConfig;
-import com.fs.course.service.IFsCoursePlaySourceConfigService;
 import com.fs.his.config.FsSysConfig;
 import com.fs.his.domain.FsUser;
 import com.fs.his.domain.FsUserNewTask;
@@ -68,9 +66,6 @@ public class AppLoginController extends AppBaseController{
 
     @Autowired
     private ISmsService smsService;
-    @Autowired
-    private IFsCoursePlaySourceConfigService fsCoursePlaySourceConfigService;
-
     @ApiOperation("注册app用户")
     @PostMapping("/register")
     @RepeatSubmit
@@ -239,28 +234,8 @@ public class AppLoginController extends AppBaseController{
                 return R.error("code不存在");
             }
 
-            String appId = param.getAppId();
-            String appSecret = "";
-            if (StringUtils.isBlank(appId)) {
-                List<FsCoursePlaySourceConfig> list = fsCoursePlaySourceConfigService.list(new QueryWrapper<FsCoursePlaySourceConfig>().eq("name", "app").eq("is_del", 0));
-                if(!list.isEmpty()){
-                    FsCoursePlaySourceConfig fsCoursePlaySourceConfig = list.get(0);
-                    appId = fsCoursePlaySourceConfig.getAppid();
-                    appSecret =  fsCoursePlaySourceConfig.getSecret();
-                }
-            } else {
-                FsCoursePlaySourceConfig fsCoursePlaySourceConfig = fsCoursePlaySourceConfigService.getOne(new QueryWrapper<FsCoursePlaySourceConfig>().eq("appid", appId).eq("is_del", 0));
-                if(fsCoursePlaySourceConfig != null){
-                    appId = fsCoursePlaySourceConfig.getAppid();
-                    appSecret =  fsCoursePlaySourceConfig.getSecret();
-                }
-            }
-            if (StringUtils.isBlank(appId) || StringUtils.isBlank(appSecret)) {
-                appId = openProperties.getAppId();
-                appSecret = openProperties.getSecret();
-            }
-            logger.info("zyp app微信登录,param:{},输出appid,{},secret:{}", param, appId, appSecret);
-            Map result = WxUtil.getAccessToken(param.getCode(),appId,appSecret);
+            logger.info("zyp app微信登录,param:{},输出appid,{},secret:{}", param, openProperties.getAppId(), openProperties.getSecret());
+            Map result = WxUtil.getAccessToken(param.getCode(), openProperties.getAppId(), openProperties.getSecret());
             String accessToken = result.get("access_token").toString();
             String unionid = result.get("unionid").toString();
 
@@ -286,7 +261,7 @@ public class AppLoginController extends AppBaseController{
                 }
                 user.setUnionId(unionid);
                 // 新用户 - 添加 appId
-                user.setAppId(appId);
+                user.setAppId(openProperties.getAppId());
                 user.setCreateTime(new Date());
                 user.setStatus(1);
                 if (StringUtils.isNotEmpty(param.getJpushId())) {
@@ -298,7 +273,7 @@ public class AppLoginController extends AppBaseController{
                 return R.ok(map);
             } else {
                 // 老用户 - 检查并添加appId(不重复添加)
-                String updatedAppId = addAppIdIfNotExists(user.getAppId(), appId);
+                String updatedAppId = addAppIdIfNotExists(user.getAppId(), openProperties.getAppId());
                 if (!updatedAppId.equals(user.getAppId())) {
                     FsUser userMap = new FsUser();
                     userMap.setUserId(user.getUserId());