|
@@ -15,11 +15,13 @@ import com.platform.service.TokenService;
|
|
|
import com.platform.service.custom.MyApiTmBrandAdminService;
|
|
|
import com.platform.service.custom.MySysUserBrandService;
|
|
|
import com.platform.service.impl.SysUserServiceImpl;
|
|
|
+import com.platform.service.impl.ZhiHouseService;
|
|
|
import com.platform.util.ApiBaseAction;
|
|
|
import com.platform.util.ApiUserUtils;
|
|
|
import com.platform.util.CommonUtil;
|
|
|
import com.platform.utils.*;
|
|
|
import com.platform.validator.Assert;
|
|
|
+import com.platform.vos.ReturnDTO;
|
|
|
import com.qiniu.util.StringUtils;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
@@ -69,6 +71,9 @@ public class ApiAuthController extends ApiBaseAction {
|
|
|
@Autowired
|
|
|
private MySysUserBrandService mySysUserBrandService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ZhiHouseService zhiHouseService;
|
|
|
+
|
|
|
/**
|
|
|
* 登录
|
|
|
*/
|
|
@@ -158,12 +163,6 @@ public class ApiAuthController extends ApiBaseAction {
|
|
|
logger.error("登录失败");
|
|
|
return toResponsFail("登录失败");
|
|
|
}
|
|
|
- //验证用户信息完整性
|
|
|
-// String sha1 = CommonUtil.getSha1(fullUserInfo.getRawData());
|
|
|
-// if (!fullUserInfo.getSignature().equals(sha1)) {
|
|
|
-// logger.error("登录失败");
|
|
|
-// return toResponsFail("登录失败");
|
|
|
-// }
|
|
|
Date nowTime = new Date();
|
|
|
UserVo userVo = userService.queryByOpenId(sessionData.getString("openid"));
|
|
|
if (null == userVo) {
|
|
@@ -203,10 +202,11 @@ public class ApiAuthController extends ApiBaseAction {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- Map<String, Object> tokenMap = tokenService.createToken(userVo.getUserId());
|
|
|
- String token = MapUtils.getString(tokenMap, "token");
|
|
|
+ // 调用zfb 登录
|
|
|
+ ReturnDTO returnDTO = zhiHouseService.wcLogin(sessionData.getString("openid"),userVo.getMobile());
|
|
|
+ String token = JSONObject.parseObject(JSONObject.toJSONString(returnDTO.getMessage())).getString("token");
|
|
|
|
|
|
- if (null == userInfo || StringUtils.isNullOrEmpty(token)) {
|
|
|
+ if (StringUtils.isNullOrEmpty(token)) {
|
|
|
logger.error("登录失败");
|
|
|
return toResponsFail("登录失败");
|
|
|
}
|