微信授权

This commit is contained in:
Qi 2025-05-21 12:31:04 +08:00
parent 6ae733d241
commit 70f24c79ba
8 changed files with 24 additions and 8 deletions

View File

@ -41,7 +41,7 @@ public class CeesLocalTeacher implements Serializable {
/**
* UnionID
*/
private String unionID;
private String unionId;
/**创建人*/
@ApiModelProperty(value = "创建人")
private String createBy;

View File

@ -42,7 +42,7 @@ public class CeesUser implements Serializable {
/**
* UnionID
*/
private String unionID;
private String unionId;
/**创建人*/
@ApiModelProperty(value = "创建人")

View File

@ -41,7 +41,7 @@ public class CeesWaiTeacher implements Serializable {
/**
* UnionID
*/
private String unionID;
private String unionId;
/**创建人*/
@ApiModelProperty(value = "创建人")
private String createBy;

View File

@ -41,7 +41,7 @@ public class Student implements Serializable {
/**
* UnionID
*/
private String unionID;
private String unionId;
/**创建人*/
@ApiModelProperty(value = "创建人")
private String createBy;

View File

@ -51,9 +51,14 @@ public class CeesLocalTeacherServiceImpl extends ServiceImpl<CeesLocalTeacherMap
ceesLocalTeacher.setGroupId(user.getGroupId());
ceesLocalTeacher.setMajorId(user.getMajorId());
ceesLocalTeacher.setUserMajorId(user.getUserMajorId());
//微信
ceesLocalTeacher.setOpenId(ceesLocalTeacher.getOpenId());
ceesLocalTeacher.setUnionId(ceesLocalTeacher.getUnionId());
// 插入或更新数据
this.save(ceesLocalTeacher);
//更新总表
user.setOpenId(ceesLocalTeacher.getOpenId());
user.setUnionId(ceesLocalTeacher.getUnionId());
user.setUserName(ceesLocalTeacher.getUserName());
ceesUserService.updateById(user);
JSONObject jsonObject = new JSONObject();

View File

@ -50,8 +50,12 @@ public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student> impl
student.setGroupId(user.getGroupId());
student.setMajorId(user.getMajorId());
student.setUserMajorId(user.getUserMajorId());
student.setOpenId(student.getOpenId());
student.setUnionId(student.getUnionId());
// 插入或更新数据
this.save(student);
user.setOpenId(student.getOpenId());
user.setUnionId(student.getUnionId());
user.setUserName(student.getUserName());
ceesUserService.updateById(user);
JSONObject jsonObject = new JSONObject();

View File

@ -160,7 +160,7 @@ public class WeChantServiceImpl implements WeChantService {
// 检查四个身份
switch (identity) {
// 管理员2 学生3老师 6 外校老师9
// 管理员1 学生2老师 3 外校老师4
case 1:
LambdaQueryWrapper<CeesAdminInfo> H5AdminInfoWreapper = new LambdaQueryWrapper<>();
H5AdminInfoWreapper.eq(CeesAdminInfo::getUserId, userId);

View File

@ -5,10 +5,17 @@ spring:
active: '@profile.name@'
wx:
# 来源于测试平台
# 来源于正式
appid: wx2b5899dac09216d4
secret: 8bcf767da0755534f64dcf1aecfa44e2
apiUrl: https://api.weixin.qq.com/
openApiUrl: https://open.weixin.qq.com/
# authRedirectUri: http://192.168.76.1:9999/home
authRedirectUri: http://www.ceesh5.hrbnu.club/home
# 测试公众号
# appid: wx604b36a6bc00d376
# secret: f763076bef56be2c620f65a43827550e
# apiUrl: https://api.weixin.qq.com/
# openApiUrl: https://open.weixin.qq.com/
# authRedirectUri: https://6072-112-102-213-17.ngrok-free.app/home