提交 979208a8 作者: 余乾开

Merge branch 'develop'

...@@ -22,4 +22,12 @@ public class AppUserSucVO implements Serializable { ...@@ -22,4 +22,12 @@ public class AppUserSucVO implements Serializable {
private Integer userAccountId; private Integer userAccountId;
@ApiModelProperty(value = "token") @ApiModelProperty(value = "token")
private String token; private String token;
@ApiModelProperty(value = "UID")
private String uid;
@ApiModelProperty(value = "手机号")
private String phoneNum;
@ApiModelProperty(value = "昵称")
private String nickName;
@ApiModelProperty(value = "sessionKey")
private String sessionKey;
} }
...@@ -21,7 +21,6 @@ import java.util.Date; ...@@ -21,7 +21,6 @@ import java.util.Date;
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
@Builder @Builder
@ApiModel(value = "com.mmc.iuav.user.model.vo.UserAccountVO", description = "用户信息")
public class UserAccountVO implements Serializable { public class UserAccountVO implements Serializable {
private static final long serialVersionUID = 7067111726018678883L; private static final long serialVersionUID = 7067111726018678883L;
@ApiModelProperty(value = "用户id") @ApiModelProperty(value = "用户id")
......
...@@ -18,7 +18,6 @@ import java.io.Serializable; ...@@ -18,7 +18,6 @@ import java.io.Serializable;
@Data @Data
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
@ApiModel(value = "com.mmc.iuav.user.model.vo.WxLoginVO", description = "登录参数")
public class WxLoginVO implements Serializable { public class WxLoginVO implements Serializable {
private static final long serialVersionUID = 2500957724470423989L; private static final long serialVersionUID = 2500957724470423989L;
@ApiModelProperty(value = "请求code") @ApiModelProperty(value = "请求code")
......
...@@ -33,8 +33,8 @@ public class UserAccountController { ...@@ -33,8 +33,8 @@ public class UserAccountController {
@ApiOperation(value = "获取用户信息") @ApiOperation(value = "获取用户信息")
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = UserAccountVO.class) }) @ApiResponses({ @ApiResponse(code = 200, message = "OK", response = UserAccountVO.class) })
@GetMapping("info") @GetMapping("info")
public UserAccountVO info(@RequestParam Integer userAccountId){ public ResultBody info(@RequestParam Integer userAccountId){
return userAccountService.getUserAccountById(userAccountId); return ResultBody.success(userAccountService.getUserAccountById(userAccountId));
} }
@ApiOperation(value = "修改用户信息") @ApiOperation(value = "修改用户信息")
...@@ -44,14 +44,14 @@ public class UserAccountController { ...@@ -44,14 +44,14 @@ public class UserAccountController {
return userAccountService.update(userAccountVO); return userAccountService.update(userAccountVO);
} }
@ApiOperation(value = "获取用户基本信息") @ApiOperation(value = "获取用户基本信息", hidden = true)
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = UserAccountSimpleDTO.class) }) @ApiResponses({ @ApiResponse(code = 200, message = "OK", response = UserAccountSimpleDTO.class) })
@GetMapping("feignGetUserSimpleInfo") @GetMapping("feignGetUserSimpleInfo")
public UserAccountSimpleDTO feignGetUserSimpleInfo(@RequestParam Integer userAccountId){ public UserAccountSimpleDTO feignGetUserSimpleInfo(@RequestParam Integer userAccountId){
return userAccountService.getUserSimpleInfo(userAccountId); return userAccountService.getUserSimpleInfo(userAccountId);
} }
@ApiOperation(value = "根据用户地区查询后台用户id") @ApiOperation(value = "根据用户地区查询后台用户id", hidden = true)
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = UserAccountSimpleDTO.class) }) @ApiResponses({ @ApiResponse(code = 200, message = "OK", response = UserAccountSimpleDTO.class) })
@GetMapping("feignListUserAccountIds") @GetMapping("feignListUserAccountIds")
public List<Integer>feignListUserAccountIds(@RequestParam Integer provinceCode, @RequestParam(required = false) Integer cityCode, @RequestParam(required = false) Integer districtCode){ public List<Integer>feignListUserAccountIds(@RequestParam Integer provinceCode, @RequestParam(required = false) Integer cityCode, @RequestParam(required = false) Integer districtCode){
......
...@@ -20,4 +20,10 @@ public interface WxService { ...@@ -20,4 +20,10 @@ public interface WxService {
* @return * @return
*/ */
String pcLogin(WxLoginVO wxLoginVO); String pcLogin(WxLoginVO wxLoginVO);
/**
* 获取AccessToken
* @return
*/
String getAccessToken();
} }
...@@ -40,6 +40,7 @@ public class AuthServiceImpl implements AuthService { ...@@ -40,6 +40,7 @@ public class AuthServiceImpl implements AuthService {
public ResultBody appletLogin(WxLoginVO wxLoginVO) { public ResultBody appletLogin(WxLoginVO wxLoginVO) {
String unionId; String unionId;
String openId; String openId;
String sessionKey;
if (wxLoginVO.getFromPort().toString().equals(WxConstant.APP.toString())) { if (wxLoginVO.getFromPort().toString().equals(WxConstant.APP.toString())) {
//调用小程序登录接口,里面包含unionId //调用小程序登录接口,里面包含unionId
String appWxJson = wxService.appLogin(wxLoginVO); String appWxJson = wxService.appLogin(wxLoginVO);
...@@ -54,6 +55,7 @@ public class AuthServiceImpl implements AuthService { ...@@ -54,6 +55,7 @@ public class AuthServiceImpl implements AuthService {
} }
unionId = json.getString(WxConstant.UNION_ID); unionId = json.getString(WxConstant.UNION_ID);
openId = json.getString(WxConstant.OPEN_ID); openId = json.getString(WxConstant.OPEN_ID);
sessionKey = json.getString(WxConstant.SESSION_KEY);
}else if (wxLoginVO.getFromPort().equals(WxConstant.WEB)){ }else if (wxLoginVO.getFromPort().equals(WxConstant.WEB)){
//获取access_token接口,里面包含unionId //获取access_token接口,里面包含unionId
String pcWxJson = wxService.pcLogin(wxLoginVO); String pcWxJson = wxService.pcLogin(wxLoginVO);
...@@ -68,6 +70,7 @@ public class AuthServiceImpl implements AuthService { ...@@ -68,6 +70,7 @@ public class AuthServiceImpl implements AuthService {
} }
unionId = json.getString(WxConstant.UNION_ID); unionId = json.getString(WxConstant.UNION_ID);
openId = json.getString(WxConstant.OPEN_ID); openId = json.getString(WxConstant.OPEN_ID);
sessionKey = json.getString(WxConstant.SESSION_KEY);
}else { }else {
return ResultBody.error(ResultEnum.PARAM_ERROR); return ResultBody.error(ResultEnum.PARAM_ERROR);
} }
...@@ -90,6 +93,7 @@ public class AuthServiceImpl implements AuthService { ...@@ -90,6 +93,7 @@ public class AuthServiceImpl implements AuthService {
map.put(JwtConstant.TOKEN_TYPE, JwtConstant.IUAV_TOKEN); map.put(JwtConstant.TOKEN_TYPE, JwtConstant.IUAV_TOKEN);
String token = JwtUtil.createJwt(map); String token = JwtUtil.createJwt(map);
return ResultBody.success(AppUserSucVO.builder().token(token).userAccountId(userAccountVO.getId()).build()); return ResultBody.success(AppUserSucVO.builder().token(token).uid(userAccountVO.getUid()).phoneNum(userAccountVO.getPhoneNum())
.nickName(userAccountVO.getNickName()).userAccountId(userAccountVO.getId()).sessionKey(sessionKey).build());
} }
} }
...@@ -32,4 +32,10 @@ public class WxServiceImpl implements WxService { ...@@ -32,4 +32,10 @@ public class WxServiceImpl implements WxService {
String data = HttpsRequestUtil.httpsGet(url, null); String data = HttpsRequestUtil.httpsGet(url, null);
return data; return data;
} }
@Override
public String getAccessToken() {
//token有效期为7200s,需要保存起来
return null;
}
} }
...@@ -17,4 +17,4 @@ patches: ...@@ -17,4 +17,4 @@ patches:
images: images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG - name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/cms newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/cms
newTag: 85d0adbe8cda52581b8cbb2fb430a91820dff33a newTag: cf8d6b7a592365bc3d490a400515248b17aead02
...@@ -3,4 +3,4 @@ kind: ConfigMap ...@@ -3,4 +3,4 @@ kind: ConfigMap
metadata: metadata:
name: cms-map name: cms-map
data: data:
SPRING_PROFILES_ACTIVE: dev SPRING_PROFILES_ACTIVE: prod
\ No newline at end of file \ No newline at end of file
apiVersion: apps/v1
kind: Deployment
metadata:
name: cms-deployment
spec:
replicas: 2
\ No newline at end of file
...@@ -9,6 +9,7 @@ commonLabels: ...@@ -9,6 +9,7 @@ commonLabels:
commonAnnotations: commonAnnotations:
note: This is prod! note: This is prod!
patches: patches:
- path: increase_replicas.yaml
- path: configMap.yaml - path: configMap.yaml
- path: service-patch.yaml - path: service-patch.yaml
target: target:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论