yanghui
2022-11-28 42521c9b51c1bd9a40036f18fd610cd46601222d
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;
@@ -323,13 +325,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 +347,13 @@
    @ApiOperation("天府通办登录")
    @PostMapping("tfLogin")
    public R tfLogin(@RequestBody UuLoginVO uuLoginVO){
        try {
            uuLoginVO.setMobile(RSAUtils.decrypt(uuLoginVO.getMobile(), Constants.PRIVATE_KEY));
            //测试是否能正常添加用户
        } catch (Exception e) {
            e.printStackTrace();
            return R.fail();
        }
        userService.tfLogin(uuLoginVO);
        R r=tokenService.tfLogin(uuLoginVO.getMobile(),"Huacheng@123","wx118de8a734d269f0");
        return r;