lige
2024-03-06 0d50919da24bda3b51e2c19a75d71bdfee36de98
小程序绑定查看就诊人、查看报告问题
3个文件已修改
28 ■■■■■ 已修改文件
ltkj-admin/src/main/java/com/ltkj/web/controller/app/CustomerController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/app/ReportController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/app/WxloginController.java 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/app/CustomerController.java
@@ -124,8 +124,9 @@
//            if (customerService.updateById(customer)) {
//                return AjaxResult.success(tjCustomer);
//            }
            return AjaxResult.error("该人员已存在");
            customer.setConnect(tjCustomer.getConnect());
            customerService.updateById(customer);
            return AjaxResult.success(customer);
        }
        String substring = cusIdcard.substring(cusIdcard.length() - 6);
        substring = DigestUtils.md5DigestAsHex(substring.getBytes());
ltkj-admin/src/main/java/com/ltkj/web/controller/app/ReportController.java
@@ -86,11 +86,11 @@
    @GetMapping("/getReportList")
    @ApiOperation(value = "小程序-体检报告列表")
    public AjaxResult getReportList(@RequestParam(required = false) @ApiParam(value = "手机号") String cusPhone) {
        Wxuser wxuser = UserHoder.getWxuser();
//        Wxuser wxuser = UserHoder.getWxuser();
        List<Object> result = new ArrayList<>();
        QueryWrapper<TjCustomer> wq1 = new QueryWrapper<>();
        wq1.eq("cus_phone", wxuser.getPhone());
        wq1.eq("cus_phone", cusPhone);
        List<TjCustomer> list1 = customerService.list(wq1);
        if (list1.size() != 0) {
            for (TjCustomer tjCustomer : list1) {
ltkj-admin/src/main/java/com/ltkj/web/controller/app/WxloginController.java
@@ -14,8 +14,10 @@
import com.ltkj.framework.config.JwtUtils;
import com.ltkj.framework.config.UserHoder;
import com.ltkj.hosp.domain.GetPhone;
import com.ltkj.hosp.domain.TjCustomer;
import com.ltkj.hosp.domain.Wxuser;
import com.ltkj.hosp.service.IAbucoderWxuserService;
import com.ltkj.hosp.service.ITjCustomerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@@ -42,10 +44,7 @@
import java.security.Security;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.*;
/**
 * @Author: 西安路泰科技有限公司/赵佳豪
@@ -60,7 +59,8 @@
@Api(tags = "A小程序端登录接口大全")
@Slf4j
public class WxloginController extends BaseController {
    @Resource
    private ITjCustomerService customerService;
    @Resource
    private IAbucoderWxuserService wxuserService;
@@ -366,6 +366,15 @@
            one.setUpdateTime(new DateTime());
            final boolean b = wxuserService.updateById(one);
            if (b){
                LambdaQueryWrapper<TjCustomer> qw = new LambdaQueryWrapper<>();
                qw.eq(TjCustomer::getCusPhone, phone);
                List<TjCustomer> tjCustomer1 = customerService.list(qw);
                if (tjCustomer1 != null && tjCustomer1.size()>0) {
                    for (TjCustomer tjCustomer : tjCustomer1) {
                        tjCustomer.setConnect(openId);
                        customerService.updateById(tjCustomer);
                    }
                }
                return AjaxResult.success("绑定成功!");
            }
        }