From d8cb49cebb37ee537ea7432986bdc2d21130520f Mon Sep 17 00:00:00 2001
From: lidongdong <1459917685@qq.com>
Date: 星期二, 30 七月 2024 14:28:20 +0800
Subject: [PATCH] 花城 修改小程序微信用户管理报错5
---
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java | 48 ++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 42 insertions(+), 6 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
index 484bdde..e38f693 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -476,13 +476,16 @@
if(count>0){
loginUserInfoVO.setIsCheckUnitAdmin(1);
}
+ else {
+ loginUserInfoVO.setIsCheckUnitAdmin(0);
+ }
Long checkUnitId=userDao.selectCheckUnitId(phone);
+ Long AdminUnitId=userDao.selectOrgAdminId(phone);
if(checkUnitId!=null){
loginUserInfoVO.setCheckUnitId(checkUnitId);
}
-
- else {
- loginUserInfoVO.setIsCheckUnitAdmin(0);
+ if (AdminUnitId!=null){
+ loginUserInfoVO.setBindingCheckUnitId(AdminUnitId);
}
//是否网格员
int easyPhotoMember = userDao.countEasyPhotoMember(phone, userCommunityId);
@@ -900,7 +903,7 @@
SysUserRoleDO sysUserRoleDO=sysUserRoleDAO.selectOne(new QueryWrapper<SysUserRoleDO>()
.lambda().eq(SysUserRoleDO::getUserId,sysUserDO.getUserId()));
- if(sysUserRoleDO!=null )
+ if(sysUserRoleDO!=null && sysUserRoleDO.getRoleId()!=null )
{
loginUserInfoVO.setRoleId(sysUserRoleDO.getRoleId()+"");
}
@@ -3491,12 +3494,45 @@
}
Map<String, String> headerMap = new HashMap<>();
headerMap.put("appid", appId);
- String resultJson = HttpClientUtil.get("https://uu-api.imashuo.com/member/wx/get-access?province=" + uuLoginVO.getProvince() + "&city=" + uuLoginVO.getCity() + "&area=" + uuLoginVO.getArea() + "&appid=" + appId + "×tamp=" + uuLoginVO.getTimestamp() + "&sign=" + uuLoginVO.getSign() + "&mobile=" + uuLoginVO.getMobile() + "&couponId=" + uuLoginVO.getCouponId(), headerMap, null);
+
+ String str="https://uu-api.imashuo.com/member/wx/get-access?"+ "appid=" + appId +
+ "×tamp=" + uuLoginVO.getTimestamp() +
+ "&sign=" + uuLoginVO.getSign() +
+ "&mobile=" + uuLoginVO.getMobile();
+
+ if(!StringUtils.isEmpty(uuLoginVO.getProvince()))
+ {
+ str=str+"&province=" + uuLoginVO.getProvince();
+ }
+
+
+ if(!StringUtils.isEmpty(uuLoginVO.getCity()))
+ {
+ str=str+"&city=" + uuLoginVO.getCity();
+ }
+
+ if(!StringUtils.isEmpty(uuLoginVO.getArea()))
+ {
+ str=str+"&area=" + uuLoginVO.getArea();
+ }
+
+ if(!StringUtils.isEmpty(uuLoginVO.getCouponId()))
+ {
+ str=str+"&couponId=" + uuLoginVO.getCouponId();
+ }
+
+// String resultJson = HttpClientUtil.get("https://uu-api.imashuo.com/member/wx/get-acces.s?province=" + uuLoginVO.getProvince() + "&city=" + uuLoginVO.getCity() + "&area=" + uuLoginVO.getArea() + "&appid=" + appId + "×tamp=" + uuLoginVO.getTimestamp() + "&sign=" + uuLoginVO.getSign() + "&mobile=" + uuLoginVO.getMobile() + "&couponId=" + uuLoginVO.getCouponId(), headerMap, null);
+ String resultJson = null;
+ try {
+ resultJson = HttpClientUtil.getUU(str,headerMap,null);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
JSONObject result = JSON.parseObject(resultJson);
if (result.get("status").equals(1)) {
return R.ok(result.get("data"));
}
- return R.fail("信息错误");
+ return R.fail(resultJson,"信息错误");
}
@Override
--
Gitblit v1.7.1