|
@@ -90,7 +90,7 @@ public class Hospital580Controller extends AppBaseController {
|
|
|
vo.getDataKey(), vo.getUserId());
|
|
vo.getDataKey(), vo.getUserId());
|
|
|
|
|
|
|
|
String redisKey = buildCacheKey(vo.getDataKey(),"square", 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) {
|
|
if (informationVo == null) {
|
|
|
log.warn("缓存未找到: key={}", redisKey);
|
|
log.warn("缓存未找到: key={}", redisKey);
|
|
|
return R.error("未找到对应的开放信息");
|
|
return R.error("未找到对应的开放信息");
|
|
@@ -98,6 +98,40 @@ public class Hospital580Controller extends AppBaseController {
|
|
|
return R.ok().put("data",informationVo);
|
|
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
|
|
* 构建缓存key
|
|
|
*/
|
|
*/
|