|
|
@@ -84,7 +84,7 @@ public class WxUserServiceImpl implements WxUserService {
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
- public Map<String, Object> bindOpenid(String userPhone, String code, String openid) throws Exception {
|
|
|
+ public Map<String, Object> bindOpenid(String userPhone, String code, String openid,String headimgurl) throws Exception {
|
|
|
UserDO user = userMapper.selectUserByPhone(userPhone);
|
|
|
if (ObjectUtils.isNotEmpty(user)){
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
@@ -96,6 +96,7 @@ public class WxUserServiceImpl implements WxUserService {
|
|
|
if (ObjectUtils.isNotEmpty(teacherDOS)){
|
|
|
for (TeacherDO tc:teacherDOS) {
|
|
|
tc.setOpenid(openid);
|
|
|
+ tc.setTeacherPhoto(headimgurl);
|
|
|
teacherMapper.update(tc);
|
|
|
tc.setSchoolName(schoolMapper.get(tc.getSchoolId()).getSchoolName());
|
|
|
}
|
|
|
@@ -104,6 +105,7 @@ public class WxUserServiceImpl implements WxUserService {
|
|
|
if (ObjectUtils.isNotEmpty(parentsDOS)){
|
|
|
for (ParentsDO pt:parentsDOS) {
|
|
|
pt.setOpenid(openid);
|
|
|
+ pt.setParentsPhoto(headimgurl);
|
|
|
parentsMapper.update(pt);
|
|
|
pt.setSchoolName(schoolMapper.get(pt.getSchoolId()).getSchoolName());
|
|
|
}
|
|
|
@@ -243,19 +245,24 @@ public class WxUserServiceImpl implements WxUserService {
|
|
|
* 是否绑定
|
|
|
* @param openid
|
|
|
*/
|
|
|
- public HashMap<String, Object> isBinding(String openid) throws Exception {
|
|
|
+ public HashMap<String, Object> isBinding(String openid,String headimgurl) throws Exception {
|
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
|
Map<String, Object> hashMap = new HashMap<>();
|
|
|
hashMap.put("openid",openid);
|
|
|
List<TeacherDO> teacherDOS = teacherMapper.list(hashMap);
|
|
|
if (ObjectUtils.isNotEmpty(teacherDOS)){
|
|
|
for (TeacherDO tc:teacherDOS) {
|
|
|
+ tc.setTeacherPhoto(headimgurl);
|
|
|
+ teacherMapper.update(tc);
|
|
|
tc.setSchoolName(schoolMapper.get(tc.getSchoolId()).getSchoolName());
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
List<ParentsDO> parentsDOS = parentsMapper.list(hashMap);
|
|
|
if (ObjectUtils.isNotEmpty(parentsDOS)){
|
|
|
for (ParentsDO pt:parentsDOS) {
|
|
|
+ pt.setParentsPhoto(headimgurl);
|
|
|
+ parentsMapper.update(pt);
|
|
|
pt.setSchoolName(schoolMapper.get(pt.getSchoolId()).getSchoolName());
|
|
|
}
|
|
|
}
|