| | |
| | | |
| | | 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; |
| | |
| | | unionid = "无"; |
| | | } |
| | | userService.addOrUpdate(openid, sessionKey, unionid); |
| | | return tokenService.loginApplets(openid); |
| | | return tokenService.loginApplets(openid,this.getAppId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "H5登录", response = LoginReturnVO.class) |
| | |
| | | R r1 = userService.getUserInfoByUnionId(unionId); |
| | | if (R.isOk(r1)) { |
| | | LoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(JSONObject.toJSONString(r1.getData()), LoginUserInfoVO.class); |
| | | return tokenService.loginApplets(loginUserInfoVO.getOpenid()); |
| | | return tokenService.loginApplets(loginUserInfoVO.getOpenid(),this.getAppId()); |
| | | } |
| | | return r1; |
| | | } |
| | |
| | | unionid = "无"; |
| | | } |
| | | userService.addOrUpdate(openid, sessionKey, unionid); |
| | | return tokenService.loginApplets(openid); |
| | | return tokenService.loginApplets(openid,this.getAppId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "维护用户基本信息(昵称、性别、头像)") |
| | |
| | | @GetMapping("useragreement") |
| | | public R userAgreement() { |
| | | int type = 1; |
| | | return userService.userAgreement(type); |
| | | return userService.userAgreement(type,this.getAppId()); |
| | | } |
| | | @ApiOperation("uu洗车登录") |
| | | @PostMapping("uuLogin") |
| | | public R uuLogin(@RequestBody UuLoginVO uuLoginVO){ |
| | | return userService.uuLogin(uuLoginVO); |
| | | } |
| | | } |