yjwang vor 1 Monat
Ursprung
Commit
10740ee086

+ 1 - 1
fs-service/src/main/java/com/fs/company/service/impl/CompanyServiceImpl.java

@@ -350,7 +350,7 @@ public class CompanyServiceImpl implements ICompanyService
             if(company.getStatus() != null && company.getStatus() == 1 && (cacheValue == null || cacheValue == 1)){//启用
                 company.setIpadDeactivate(0);
                 oneClickEnable(companyIds,null);
-            }else if(company.getStatus() != null  && (cacheValue == null || cacheValue == 0)){//停用
+            }else if(company.getStatus() != null && company.getStatus() != 1  && (cacheValue == null || cacheValue == 0)){//停用
                 company.setIpadDeactivate(1);
                 oneClickDisable(companyIds,null);
             }

+ 2 - 0
fs-service/src/main/java/com/fs/hospital580/vo/CacheOpenInformationVo.java

@@ -42,4 +42,6 @@ public class CacheOpenInformationVo implements Serializable {
     private Integer relationship;
 
     private Integer souceFrom;
+
+    private String orderCode;
 }

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

@@ -90,7 +90,7 @@ public class Hospital580Controller extends AppBaseController {
                 vo.getDataKey(), vo.getUserId());
 
         String redisKey = buildCacheKey(vo.getDataKey(),"square", vo.getUserId());
-        CacheOpenInformationVo informationVo = redisCache.getCacheObject(redisKey);
+        CacheOpenInformationVo informationVo = JSON.parseObject(redisCache.getCacheObject(redisKey), CacheOpenInformationVo.class);
         if (informationVo == null) {
             log.warn("缓存未找到: key={}", redisKey);
             return R.error("未找到对应的开放信息");
@@ -98,6 +98,40 @@ public class Hospital580Controller extends AppBaseController {
         return R.ok().put("data",informationVo);
     }
 
+    @Login
+    @ApiOperation(value = "销售制单分享-缓存对应订单客户开方信息")
+    @PostMapping("/cacheOrderPrescription")
+    public R cacheOrderPrescription(@RequestBody CacheOpenInformationVo vo){
+        if(vo.getDataKey() == null){
+            return R.error("未找到对应的数据信息");
+        }else if(vo.getOrderCode() == null){
+            return R.error("订单信息不能为空");
+        }
+        if(!redisCache.hasKey(buildCacheKey(vo.getDataKey(),"square", vo.getCompanyUserId()))){
+            return R.error("未找到对应的开放信息");
+        }
+
+        String redisKey = buildCacheKey("orderId",vo.getOrderCode(), vo.getUserId());
+        redisCache.setCacheObject(redisKey , vo.getDataKey(), 6, TimeUnit.HOURS);
+        return R.ok();
+    }
+
+    @Login
+    @ApiOperation(value = "销售制单分享-获取信息")
+    @PostMapping("/selectOrderPrescription")
+    public R selectOrderPrescription(@RequestBody CacheOpenInformationVo vo){
+      if(vo.getOrderCode() == null){
+            return R.error("订单信息不能为空");
+        }
+        String redisKey = buildCacheKey("orderId",vo.getOrderCode(), vo.getUserId());
+        String dataKey=redisCache.getCacheObject(redisKey);
+        return R.ok().put("dataKey",dataKey);
+    }
+
+
+
+
+
     /**
      * 构建缓存key
      */