lidongdong
2024-03-29 3afa93b3ddac38ec55e54c24e90701994612791f
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/LoginApi.java
@@ -2,6 +2,8 @@
import javax.annotation.Resource;
import com.panzhihua.common.constants.Constants;
import com.panzhihua.common.utlis.RSAUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
@@ -282,6 +284,16 @@
        return tokenService.refreshToken(refreshToken);
    }
    @PostMapping("/getNewToken")
    public R getNewToken(@RequestBody LoginUserInfoVO loginUserInfoVO)
    {
        return tokenService.getNewToken(loginUserInfoVO);
    }
    @ApiOperation(value = "查询社区")
    @PostMapping("listcommunity")
    public R listCommunity(@RequestBody ComActVO comActVO) {
@@ -345,6 +357,16 @@
    @ApiOperation("天府通办登录")
    @PostMapping("tfLogin")
    public R tfLogin(@RequestBody UuLoginVO uuLoginVO){
        try {
            log.info("天府通办登录【{}】", JSONObject.toJSONString(uuLoginVO.getMobile()));
            String  str=RSAUtils.decrypt(uuLoginVO.getMobile(), Constants.PRIVATE_KEY);
            log.info("天府通办登录【{}】", JSONObject.toJSONString(str));
            uuLoginVO.setMobile(str);
            //测试是否能正常添加用户
        } catch (Exception e) {
            e.printStackTrace();
            return R.fail();
        }
        userService.tfLogin(uuLoginVO);
        R r=tokenService.tfLogin(uuLoginVO.getMobile(),"Huacheng@123","wx118de8a734d269f0");
        return r;