فهرست منبع

获取公司收款码

三七 3 هفته پیش
والد
کامیت
c64947ef7e

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

@@ -16,6 +16,7 @@ import com.fs.common.annotation.DataScope;
 import com.fs.common.annotation.Log;
 import com.fs.common.core.domain.AjaxResult;
 import com.fs.common.core.domain.R;
+import com.fs.common.core.redis.RedisCache;
 import com.fs.common.exception.CustomException;
 import com.fs.common.utils.DateUtils;
 import com.fs.common.utils.ServletUtils;
@@ -174,6 +175,10 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
     @Autowired
     private CloudHostProper cloudHostProper;
 
+    @Autowired
+    private RedisCache redisCache;
+
+
     /**
      * 查询支付明细
      *
@@ -1209,6 +1214,9 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
                 logger.error("生成图片失败:{}",e.getMessage(),e);
                 return R.error("生成图片失败");
             }
+
+            redisCache.setCacheObject("company-wxa-code:"+param.getCompanyId()+":"+param.getAppId(),url);
+
             // 返回成功信息
             return R.ok().put("url",url);
 

+ 1 - 1
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStorePaymentScrmServiceImpl.java

@@ -820,7 +820,7 @@ public class FsStorePaymentScrmServiceImpl implements IFsStorePaymentScrmService
                 logger.error("生成图片失败:{}",e.getMessage(),e);
                 return R.error("生成图片失败");
             }
-            redisCache.setCacheObject("company-wxa-code:"+param.getCompanyId(),url);
+            redisCache.setCacheObject("company-wxa-code:"+param.getCompanyId()+":"+param.getAppId(),url);
             // 返回成功信息
             return R.ok().put("url",url);
 

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

@@ -210,9 +210,9 @@ public class CompanyUserController extends  AppBaseController {
 
     @ApiOperation("获取公司收款码")
     @GetMapping("/getCompanyWxaCodeByPayment")
-    public R getCompanyWxaCodeByPayment(@RequestParam("companyId")Long companyId,HttpServletRequest request){
+    public R getCompanyWxaCodeByPayment(@RequestParam("companyId")Long companyId,@RequestParam("appId")String appId,HttpServletRequest request){
         //获取用户码
-        String WxaCode = redisCache.getCacheObject("company-wxa-code:"+companyId);
+        String WxaCode = redisCache.getCacheObject("company-wxa-code:"+companyId+":"+appId);
         return R.ok().put("data",WxaCode);
     }
 

+ 2 - 2
fs-user-app/src/main/java/com/fs/app/controller/store/CompanyUserScrmController.java

@@ -201,9 +201,9 @@ public class CompanyUserScrmController extends AppBaseController {
 
     @ApiOperation("获取公司收款码")
     @GetMapping("/getCompanyWxaCodeByPayment")
-    public R getCompanyWxaCodeByPayment(@RequestParam("companyId")Long companyId,HttpServletRequest request){
+    public R getCompanyWxaCodeByPayment(@RequestParam("companyId")Long companyId,@RequestParam("appId")String appId,HttpServletRequest request){
         //获取用户码
-        String WxaCode = redisCache.getCacheObject("company-wxa-code:"+companyId);
+        String WxaCode = redisCache.getCacheObject("company-wxa-code:"+companyId+":"+appId);
         return R.ok().put("data",WxaCode);
     }