From 179c4d64313c9b7572778da4aaaf6c6584fe457d Mon Sep 17 00:00:00 2001 From: mitao <2763622819@qq.com> Date: 星期二, 20 五月 2025 23:48:08 +0800 Subject: [PATCH] 修改文件上传类型限制 --- springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/LoginApi.java | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/LoginApi.java b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/LoginApi.java index b74f459..085ef2b 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/LoginApi.java +++ b/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,13 @@ return tokenService.refreshToken(refreshToken); } + @ApiOperation(value = "刷新token", response = LoginReturnVO.class) + @PostMapping("getNewToken") + public R getNewToken(@RequestBody LoginUserInfoVO loginUserInfoVO) + { + return tokenService.getNewToken(loginUserInfoVO); + } + @ApiOperation(value = "查询社区") @PostMapping("listcommunity") public R listCommunity(@RequestBody ComActVO comActVO) { @@ -323,13 +332,13 @@ //i小懒 WxMaQrcodeService wsCodeService = wxMaConfiguration.getMaService("wx98d62711dfbd8425").getQrcodeService(); byte[] bytes = wsCodeService.createWxaCodeUnlimitBytes("couponId=" + couponId, - "/pages/user/getCoupon/getCoupon", true, "release", 30, true, null, false); + "pages/user/getCoupon/getCoupon", true, "release", 30, true, null, false); String res = String.format("data:image/png;base64,%s", Base64.encode(bytes)); //花城 WxMaQrcodeService uuCodeService = wxMaConfiguration.getMaService("wx118de8a734d269f0").getQrcodeService(); byte[] hcBytes = uuCodeService.createWxaCodeUnlimitBytes("couponId=" + couponId, - "/packageD/pages/user/getCoupon/getCoupon", true, "release", 30, true, null, false); + "packageD/pages/user/getCoupon/getCoupon", true, "release", 30, true, null, false); String hcRes = String.format("data:image/png;base64,%s", Base64.encode(hcBytes)); Map<String,String> retMap = new HashMap<>(); @@ -345,6 +354,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; -- Gitblit v1.7.1