zhaowenxuan
2025-02-12 53d149f491dba554ee035599059a1bf65ea92df2
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("绑定成功!");
            }
        }