Commit 1f1cf9ae authored by hezhen's avatar hezhen

Merge branch 'master_position' into dev

parents 0c2df16b c40d3d0b
......@@ -139,11 +139,11 @@ public class AppUserRest {
*/
@RequestMapping(value = "/user/checkBindWechat")
public @ResponseBody JSONObject checkBindWechat(@RequestParam(value="username",defaultValue="")String username,
@RequestParam(value="isQQ",defaultValue="0")Integer isQQ) {
@RequestParam(value="type",defaultValue="0")Integer type) {
if (StringUtils.isBlank(username)) {
return JsonResultUtil.createFailedResult(ResultCode.NULL_CODE, "参数为空");
}
return appPermissionService.checkBindWechat(username,isQQ);
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,14 +620,19 @@ public class AppPermissionService {
* @return
*/
public JSONObject checkBindWechat(String username,Integer isQQ) {
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 (isQQ==null||isQQ==0){
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); // 已存在
......
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