Commit 8c4cdccf authored by jiaorz's avatar jiaorz

Merge remote-tracking branch 'origin/dev' into dev

parents 029c2d84 1f1cf9ae
......@@ -138,11 +138,12 @@ public class AppUserRest {
* @return
*/
@RequestMapping(value = "/user/checkBindWechat")
public @ResponseBody JSONObject checkBindWechat(@RequestParam(value="username",defaultValue="")String username) {
public @ResponseBody JSONObject checkBindWechat(@RequestParam(value="username",defaultValue="")String username,
@RequestParam(value="type",defaultValue="0")Integer type) {
if (StringUtils.isBlank(username)) {
return JsonResultUtil.createFailedResult(ResultCode.NULL_CODE, "参数为空");
}
return appPermissionService.checkBindWechat(username);
return appPermissionService.checkBindWechat(username,type);
}
......
......@@ -114,6 +114,9 @@ public class AppPermissionService {
@Autowired
private AppUserPositionTempBiz positionTempBiz;
@Autowired
private AppUserAlipayBiz alipayBiz;
public AppUserInfo validate(String username, String password) {
AppUserInfo info = new AppUserInfo();
......@@ -617,12 +620,20 @@ public class AppPermissionService {
* @return
*/
public JSONObject checkBindWechat(String username) {
public JSONObject checkBindWechat(String username,Integer type) {
JSONObject data = new JSONObject();
try {
AppUserLogin userLogin = appUserLoginBiz.checkeUserLogin(username);
if (userLogin != null) {
String openid = userLogin.getOpenid();
if (type==null||type==0){
openid=userLogin.getWxOpenid();
}else if (type==2){
List<AppUserAlipay> list=alipayBiz.getListByUserId(userLogin.getId());
if (list.size()>0){
openid=list.get(0).getTxAlipay();
}
}
if (StringUtils.isNotBlank(openid)) {
data.put("type", 0); // 已存在
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment