101captain
2022-08-19 fca18d30a38e6f1559663db4cc69de785451f22c
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/LoginApi.java
@@ -3,7 +3,9 @@
import javax.annotation.Resource;
import com.panzhihua.common.model.vos.user.UuLoginVO;
import me.chanjar.weixin.common.error.WxErrorException;
import org.apache.commons.lang3.StringUtils;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.util.ObjectUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
@@ -87,7 +89,7 @@
        if (ObjectUtils.isEmpty(unionid)) {
            unionid = "无";
        }
        userService.addOrUpdate(openid, sessionKey, unionid);
        userService.addOrUpdate(openid, sessionKey, unionid,this.getAppId());
        return tokenService.loginApplets(openid,this.getAppId());
    }
@@ -163,7 +165,7 @@
        if (ObjectUtils.isEmpty(unionid)) {
            unionid = "无";
        }
        userService.addOrUpdate(openid, sessionKey, unionid);
        userService.addOrUpdate(openid, sessionKey, unionid,this.getAppId());
        return tokenService.loginApplets(openid,this.getAppId());
    }
@@ -305,4 +307,12 @@
    public R uuLogin(@RequestBody UuLoginVO uuLoginVO){
        return userService.uuLogin(uuLoginVO);
    }
    @ApiOperation("天府通办登录")
    @PostMapping("tfLogin")
    public R tfLogin(@RequestBody UuLoginVO uuLoginVO){
        userService.tfLogin(uuLoginVO);
        R r=tokenService.tfLogin(uuLoginVO.getMobile(),"Huacheng@123","wx118de8a734d269f0");
        return r;
    }
}