|
|
@@ -30,6 +30,7 @@ import com.fs.store.domain.*;
|
|
|
import com.fs.store.dto.ExpressDataDTO;
|
|
|
import com.fs.store.dto.ExpressInfoDTO;
|
|
|
import com.fs.store.dto.ExpressNotifyDTO;
|
|
|
+import com.fs.store.mapper.FsWechatTemplateMapper;
|
|
|
import com.fs.store.param.SignParam;
|
|
|
import com.fs.store.service.*;
|
|
|
import com.fs.pay.service.IPayService;
|
|
|
@@ -39,6 +40,7 @@ import com.fs.system.oss.OSSFactory;
|
|
|
import com.fs.system.vo.DictVO;
|
|
|
import com.fs.system.service.ISysConfigService;
|
|
|
import com.fs.system.service.ISysDictDataService;
|
|
|
+import com.google.common.collect.Sets;
|
|
|
import com.hc.openapi.tool.util.Ids;
|
|
|
import com.tencentyun.TLSSigAPIv2;
|
|
|
import io.swagger.annotations.Api;
|
|
|
@@ -67,40 +69,77 @@ import java.util.concurrent.TimeUnit;
|
|
|
public class CommonController extends AppBaseController {
|
|
|
Logger logger = LoggerFactory.getLogger(CommonController.class);
|
|
|
@Autowired
|
|
|
- private JwtUtils jwtUtils;
|
|
|
-
|
|
|
+ private JwtUtils jwtUtils;
|
|
|
+ @Autowired
|
|
|
+ private ServerConfig serverConfig;
|
|
|
@Autowired
|
|
|
private ISysDictDataService dictDataService;
|
|
|
|
|
|
@Autowired
|
|
|
private ISysConfigService configService;
|
|
|
-
|
|
|
@Autowired
|
|
|
- private FSSysConfig fsSysConfig;
|
|
|
+ private IPrescribeService prescribeService;
|
|
|
|
|
|
@Autowired
|
|
|
- private IErpUserService userService;
|
|
|
+ private IFsStoreOrderItemService orderItemService;
|
|
|
+ @Autowired
|
|
|
+ private IFsStoreProductService productService;
|
|
|
+ @Autowired
|
|
|
+ private FSSysConfig fsSysConfig;
|
|
|
+ @Autowired
|
|
|
+ private IErpShopService erpShopService;
|
|
|
@Autowired
|
|
|
- private IPayService payService;
|
|
|
+ private IErpUserService userService;
|
|
|
@Autowired
|
|
|
- private IErpOrderService erpOrderService;
|
|
|
+ private IPayService payService;
|
|
|
@Autowired
|
|
|
- private IErpGoodsService goodsService;
|
|
|
+ private IErpOrderService erpOrderService;
|
|
|
@Autowired
|
|
|
- private PayService ybPayService;
|
|
|
+ private IErpGoodsService goodsService;
|
|
|
+ @Autowired
|
|
|
+ private PayService ybPayService;
|
|
|
@Autowired
|
|
|
private IFsWechatTemplateService wechatTemplateService;
|
|
|
|
|
|
+
|
|
|
@Autowired
|
|
|
- private RedisCache redisCache;
|
|
|
- @Autowired
|
|
|
- private IFsCityService cityService;
|
|
|
+ private RedisTemplate redisTemplate;
|
|
|
+
|
|
|
@Autowired
|
|
|
- private IFsStoreOrderService orderService;
|
|
|
+ private FSSysConfig sysConfig;
|
|
|
+
|
|
|
@Autowired
|
|
|
- private IFsProjectAddressConfigService projectAddressConfigService;
|
|
|
+ private IFsExpressService expressService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ICompanyService companyService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ ICompanyUserService companyUserService;
|
|
|
+ @Autowired
|
|
|
+ ICompanyMoneyLogsService logsService;
|
|
|
+ @Autowired
|
|
|
+ private IFsStoreOrderItemService storeOrderItemService;
|
|
|
+ @Autowired
|
|
|
+ private IFsCityService cityService;
|
|
|
+ @Autowired
|
|
|
+ IFsStoreOrderService orderService;
|
|
|
+ @Autowired
|
|
|
+ IFsStorePaymentService paymentService;
|
|
|
+ @Autowired
|
|
|
+ private IFsProjectAddressConfigService projectAddressConfigService;
|
|
|
+
|
|
|
+ // @ApiOperation("批量推送订单")
|
|
|
+// @GetMapping("pushOms")
|
|
|
+// public R pushOms(String startTime) throws Exception
|
|
|
+// {
|
|
|
+// List<Long> ids=orderService.selectFsStoreOrderToPushByIds(startTime);
|
|
|
+// for(Long id:ids){
|
|
|
+// orderService.createOmsOrder(id);
|
|
|
+// }
|
|
|
+// return R.ok();
|
|
|
+//
|
|
|
+// }
|
|
|
@ApiOperation("支付手动通知")
|
|
|
@GetMapping("payNotify")
|
|
|
public R payNotify(String payCode) throws Exception
|
|
|
@@ -439,7 +478,6 @@ public class CommonController extends AppBaseController {
|
|
|
|
|
|
@ApiOperation("获取微信模板")
|
|
|
@GetMapping("/getWeixinTemps")
|
|
|
- @Cacheable(value= "temps")
|
|
|
public R getWeixinTemps(
|
|
|
){
|
|
|
List<String> temp=wechatTemplateService.selectFsWechatTemplateIds();
|
|
|
@@ -447,23 +485,24 @@ public class CommonController extends AppBaseController {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private FsWechatTemplateMapper fsWechatTemplateMapper;
|
|
|
@ApiOperation("获取微信模板")
|
|
|
@GetMapping("/getWeixinOrderTemps")
|
|
|
- @Cacheable(value= "orderTemps")
|
|
|
public R getWeixinOrderTemps(
|
|
|
){
|
|
|
- List<String> temp=wechatTemplateService.selectFsWechatTemplateIdsByKeys("delivery_success,finish_success,cancel_success");
|
|
|
+ Set<String> keys = Sets.newHashSet("delivery_success","finish_success","cancel_success");
|
|
|
+
|
|
|
+ List<String> temp=fsWechatTemplateMapper.selectFsWechatTemplateIdsByKeySet(keys);
|
|
|
return R.ok().put("temp",temp);
|
|
|
|
|
|
}
|
|
|
@ApiOperation("获取微信模板")
|
|
|
@GetMapping("/getWeixinPrescribeTemps")
|
|
|
- @Cacheable(value= "prescribetemps")
|
|
|
public R getWeixinPrescribeTemps(
|
|
|
){
|
|
|
- List<String> temp=wechatTemplateService.selectFsWechatTemplateIdsByKeys("prescribe");
|
|
|
+ List<String> temp=fsWechatTemplateMapper.selectFsWechatTemplateIdsByKeySet(Sets.newHashSet("prescribe"));
|
|
|
return R.ok().put("temp",temp);
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|