|
@@ -1,5 +1,7 @@
|
|
|
package com.fs.company.controller.qw;
|
|
package com.fs.company.controller.qw;
|
|
|
|
|
|
|
|
|
|
+import cn.hutool.json.JSONObject;
|
|
|
|
|
+import cn.hutool.json.JSONUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.fs.common.core.controller.BaseController;
|
|
import com.fs.common.core.controller.BaseController;
|
|
|
import com.fs.common.core.domain.AjaxResult;
|
|
import com.fs.common.core.domain.AjaxResult;
|
|
@@ -28,9 +30,11 @@ import com.fs.hisStore.vo.FsUserInformationCollectionOverviewVo;
|
|
|
import com.fs.qw.domain.FsCompanyCustomer;
|
|
import com.fs.qw.domain.FsCompanyCustomer;
|
|
|
import com.fs.qw.service.IFsCompanyCustomerService;
|
|
import com.fs.qw.service.IFsCompanyCustomerService;
|
|
|
import com.fs.qw.vo.CompanyUserAndDoctorVO;
|
|
import com.fs.qw.vo.CompanyUserAndDoctorVO;
|
|
|
|
|
+import com.fs.system.service.ISysConfigService;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.dao.DuplicateKeyException;
|
|
import org.springframework.dao.DuplicateKeyException;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -74,6 +78,9 @@ public class FsCompanyCustomerController extends BaseController {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private IFsUserInformationCollectionService informationCollectionService;
|
|
private IFsUserInformationCollectionService informationCollectionService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private ISysConfigService sysConfigService;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 查询客户列表
|
|
* 查询客户列表
|
|
|
*/
|
|
*/
|
|
@@ -381,9 +388,18 @@ public class FsCompanyCustomerController extends BaseController {
|
|
|
* */
|
|
* */
|
|
|
@GetMapping("/getQRCode/{orderId}")
|
|
@GetMapping("/getQRCode/{orderId}")
|
|
|
public R getQRCode(@PathVariable("orderId") Long orderId){
|
|
public R getQRCode(@PathVariable("orderId") Long orderId){
|
|
|
- //TODO appId后续从配置获取
|
|
|
|
|
-// String appId="wx50bcb040b4963a7e";//营口
|
|
|
|
|
- String appId="wx77eb4fff8ea1384b";//久运天天
|
|
|
|
|
|
|
+ String configValue = sysConfigService.selectConfigByKey("appStore.appId.config");
|
|
|
|
|
+ String appId = null;
|
|
|
|
|
+ if (StringUtils.isNotEmpty(configValue)) {
|
|
|
|
|
+ // 解析JSON
|
|
|
|
|
+ JSONObject json = JSONUtil.parseObj(configValue);
|
|
|
|
|
+ appId = json.getStr("appId");
|
|
|
|
|
+ }
|
|
|
|
|
+ // 如果配置不存在或解析失败,使用默认值
|
|
|
|
|
+ if (StringUtils.isEmpty(appId)) {
|
|
|
|
|
+ log.error("未配置制单小程序appId");
|
|
|
|
|
+ appId = "wx50bcb040b4963a7e";//默认为营口市小程序;
|
|
|
|
|
+ }
|
|
|
return informationCollectionService.getCustomerGenerateQRCode(orderId,appId);
|
|
return informationCollectionService.getCustomerGenerateQRCode(orderId,appId);
|
|
|
}
|
|
}
|
|
|
|
|
|