From 6e81582150b10c3ae1b0d858f650ac0ddaa45e1b Mon Sep 17 00:00:00 2001 From: abu <2742828146@qq.com> Date: Wed, 15 May 2024 18:13:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E7=AB=AF=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 75 ++++- pom.xml | 2 +- .../h5/controller/ExcelController.java | 1 - .../h5/controller/H5InvitationController.java | 189 +++++++++++ .../h5/controller/H5StudentController.java | 2 + .../h5/controller/H5UserController.java | 74 ++++- .../h5/controller/H5WaiTeacherController.java | 11 +- .../niefy/modules/h5/entity/H5Group.java | 18 -- .../niefy/modules/h5/entity/H5User.java | 3 + .../niefy/modules/h5/entity/H5WaiTeacher.java | 21 +- .../excel_entiry/H5UserExcelEntity.java | 47 +++ .../h5/excel/EasyExcelWriterFactory.java | 2 + .../niefy/modules/h5/mapper/H5UserMapper.java | 4 + .../modules/h5/mapper/H5WaiTeacherMapper.java | 5 + .../modules/h5/service/H5UserService.java | 5 + .../h5/service/H5WaiTeacherService.java | 3 + .../h5/service/impl/H5GroupServiceImpl.java | 6 +- .../h5/service/impl/H5UserServiceImpl.java | 305 ++++++++++-------- .../service/impl/H5WaiTeacherServiceImpl.java | 13 +- .../modules/sys/entity/SysMenuEntity.java | 1 + src/main/resources/application.yml | 12 +- src/main/resources/mapper/H5UserMapper.xml | 8 + 22 files changed, 629 insertions(+), 178 deletions(-) create mode 100644 src/main/java/com/github/niefy/modules/h5/controller/H5InvitationController.java create mode 100644 src/main/java/com/github/niefy/modules/h5/entity/excel_entiry/H5UserExcelEntity.java diff --git a/Dockerfile b/Dockerfile index 0784cc20..c1b6a476 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,63 @@ -#设置镜像使用的基础镜像 -FROM openjdk:8u322-jre-buster -# 作者 -MAINTAINER niefy -#设置镜像暴露的端口 这里要与application.properties中的server.port保持一致 +##设置镜像使用的基础镜像 +#FROM openjdk:8u322-jre-buster +## 作者 +## MAINTAINER niefy +##设置镜像暴露的端口 这里要与application.properties中的server.port保持一致 +#EXPOSE 80 +##设置容器的挂载卷 +#VOLUME /tmp +##编译镜像时将springboot生成的jar文件复制到镜像中 +#ADD target/wx-api.jar /wx-api.jar +##编译镜像时运行脚本 +#RUN bash -c 'touch /wx-api.jar' +##容器的入口程序,这里注意如果要指定外部配置文件需要使用-spring.config.location指定配置文件存放目录 +#ENTRYPOINT ["java","-jar","/wx-api.jar"] +# + + + +# 选择构建用基础镜像。如需更换,请到[dockerhub官方仓库](https://hub.docker.com/_/java?tab=tags)自行选择后替换。 +FROM maven:3.6.0-jdk-8-slim as build + +# 指定构建过程中的工作目录 +WORKDIR /app + +# 将src目录下所有文件,拷贝到工作目录中src目录下(.gitignore/.dockerignore中文件除外) +COPY src /app/src + +# 将pom.xml文件,拷贝到工作目录下 +COPY settings.xml pom.xml /app/ + +# 执行代码编译命令 +# 自定义settings.xml, 选用国内镜像源以提高下载速度 +RUN mvn -s /app/settings.xml -f /app/pom.xml clean package + +# 选择运行时基础镜像 +FROM alpine:3.13 + +# 安装依赖包,如需其他依赖包,请到alpine依赖包管理(https://pkgs.alpinelinux.org/packages?name=php8*imagick*&branch=v3.13)查找。 +# 选用国内镜像源以提高下载速度 +RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tencent.com/g' /etc/apk/repositories \ + && apk add --update --no-cache openjdk8-jre-base \ + && rm -f /var/cache/apk/* + +# 容器默认时区为UTC,如需使用上海时间请启用以下时区设置命令 +# RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo Asia/Shanghai > /etc/timezone + +# 使用 HTTPS 协议访问容器云调用证书安装 +RUN apk add ca-certificates + +# 指定运行时的工作目录 +WORKDIR /app + +# 将构建产物jar包拷贝到运行时目录中 +COPY --from=build /app/target/*.jar . + +# 暴露端口 +# 此处端口必须与「服务设置」-「流水线」以及「手动上传代码包」部署时填写的端口一致,否则会部署失败。 EXPOSE 80 -#设置容器的挂载卷 -VOLUME /tmp -#编译镜像时将springboot生成的jar文件复制到镜像中 -ADD target/wx-api.jar /wx-api.jar -#编译镜像时运行脚本 -RUN bash -c 'touch /wx-api.jar' -#容器的入口程序,这里注意如果要指定外部配置文件需要使用-spring.config.location指定配置文件存放目录 -ENTRYPOINT ["java","-jar","/wx-api.jar"] + +# 执行启动命令. +# 写多行独立的CMD命令是错误写法!只有最后一行CMD命令会被执行,之前的都会被忽略,导致业务报错。 +# 请参考[Docker官方文档之CMD命令](https://docs.docker.com/engine/reference/builder/#cmd) +CMD ["java", "-jar", "/app/springboot-wxcloudrun-1.0.jar"] \ No newline at end of file diff --git a/pom.xml b/pom.xml index f599cc11..0760be24 100644 --- a/pom.xml +++ b/pom.xml @@ -52,6 +52,7 @@ org.springframework.boot spring-boot-starter-aop + org.springframework.boot spring-boot-starter-validation @@ -140,7 +141,6 @@ easyexcel 3.3.4 - org.springframework.boot spring-boot-starter-test diff --git a/src/main/java/com/github/niefy/modules/h5/controller/ExcelController.java b/src/main/java/com/github/niefy/modules/h5/controller/ExcelController.java index 2aac8188..a8df553c 100644 --- a/src/main/java/com/github/niefy/modules/h5/controller/ExcelController.java +++ b/src/main/java/com/github/niefy/modules/h5/controller/ExcelController.java @@ -39,7 +39,6 @@ import static com.qiniu.util.Etag.data; @RequestMapping("/excel") public class ExcelController extends AbstractController { - private H5WaiTeacherService h5WaiTeacherService; private H5DormitoryInfoService h5DormitoryInfoService; diff --git a/src/main/java/com/github/niefy/modules/h5/controller/H5InvitationController.java b/src/main/java/com/github/niefy/modules/h5/controller/H5InvitationController.java new file mode 100644 index 00000000..f7018b92 --- /dev/null +++ b/src/main/java/com/github/niefy/modules/h5/controller/H5InvitationController.java @@ -0,0 +1,189 @@ +package com.github.niefy.modules.h5.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.github.niefy.common.utils.PageUtils; +import com.github.niefy.common.utils.R; +import com.github.niefy.modules.h5.entity.H5Invitation; +import com.github.niefy.modules.h5.entity.H5WaiTeacher; +import com.github.niefy.modules.h5.excel.EasyExcelUtil; +import com.github.niefy.modules.h5.excel.EasyExcelWriterFactory; +import com.github.niefy.modules.h5.service.H5InvitationService; +import com.github.niefy.modules.h5.service.H5WaiTeacherService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import org.springframework.core.io.ClassPathResource; +import org.springframework.core.io.Resource; + +import javax.servlet.http.HttpServletResponse; + +@RestController +@RequestMapping("/inv") +@Api(tags = {"评卷管理-邀请函管理"}) +public class H5InvitationController { + + private final H5InvitationService h5InvitationService; + private final H5WaiTeacherService h5WaiTeacherService; + @Autowired + public H5InvitationController(H5InvitationService h5InvitationService, H5WaiTeacherService h5WaiTeacherService) { + this.h5InvitationService = h5InvitationService; + this.h5WaiTeacherService = h5WaiTeacherService; + } + /** + * 获取外校老师的邀请函信息 + * @return + */ + + + /** + * 历史 + * @param params + * @return + */ + @GetMapping("/list") + @RequiresPermissions("inv:user:list") + @ApiOperation(value = "用户列表", notes = "") + public R list(@RequestParam Map params) { + //只有超级管理员,才能查看所有管理员列表 +// if (getUserId() != Constant.SUPER_ADMIN) { +// params.put("createUserId", getUserId()); +// } + PageUtils page = h5InvitationService.queryPage(params); + return R.ok().put("page", page); + } + @GetMapping("/listy") + @RequiresPermissions("inv:user:list") + @ApiOperation(value = "用户列表", notes = "") + public R listy(@RequestParam Map params) { + //只有超级管理员,才能查看所有管理员列表 +// if (getUserId() != Constant.SUPER_ADMIN) { +// params.put("createUserId", getUserId()); +// } + PageUtils page = h5InvitationService.queryPageY(params); + return R.ok().put("page", page); + } + @GetMapping("/listd") + @RequiresPermissions("inv:user:list") + @ApiOperation(value = "用户列表", notes = "") + public R listd(@RequestParam Map params) { + //只有超级管理员,才能查看所有管理员列表 +// if (getUserId() != Constant.SUPER_ADMIN) { +// params.put("createUserId", getUserId()); +// } + PageUtils page = h5InvitationService.queryPageD(params); + return R.ok().put("page", page); + } + @GetMapping("/listl") + @RequiresPermissions("inv:user:list") + @ApiOperation(value = "用户列表", notes = "") + public R listl(@RequestParam Map params) { + //只有超级管理员,才能查看所有管理员列表 +// if (getUserId() != Constant.SUPER_ADMIN) { +// params.put("createUserId", getUserId()); +// } + PageUtils page = h5InvitationService.queryPageL(params); + return R.ok().put("page", page); + } + @GetMapping("/listz") + @RequiresPermissions("inv:user:list") + @ApiOperation(value = "用户列表", notes = "") + public R listz(@RequestParam Map params) { + //只有超级管理员,才能查看所有管理员列表 +// if (getUserId() != Constant.SUPER_ADMIN) { +// params.put("createUserId", getUserId()); +// } + PageUtils page = h5InvitationService.queryPageZ(params); + return R.ok().put("page", page); + } +// @GetMapping("/list") +// public R list(){ +// return R.ok().put("data",h5InvitationService.queryInvitation()); +// } + + @GetMapping("/update") +// @RequiresPermissions("inv:user:update") + @ApiOperation(value = "用户列表", notes = "") + public R update(@RequestParam("id") String id,@RequestParam("workNameQr") String workNameQr) { + H5Invitation byId = h5InvitationService.getById(id); + byId.setWorkNameQr(workNameQr); + h5InvitationService.updateById(byId); + return R.ok().put("page",null); + } + +// 下载Excel +// 下载Excel +// 下载Excel +@GetMapping("/download") +@RequiresPermissions("inv:user:list") +public void download(HttpServletResponse response) throws IOException { + List list = h5WaiTeacherService.list(); + download(response,list, "外校老师所有信息"); +} + + /** + * 语文 + * @param response + * @throws IOException + */ + @GetMapping("/downloady") + @RequiresPermissions("inv:user:list") + public void downloadY(HttpServletResponse response) throws IOException { + List list = h5WaiTeacherService.queryListY(1); + download(response, list, "外校老师语文"); + } + + /** + * 地理 + * @param response + * @throws IOException + */ + @GetMapping("/downloadd") + @RequiresPermissions("inv:user:list") + public void downloadD(HttpServletResponse response) throws IOException { + List list = h5WaiTeacherService.queryListY(4); + download(response, list,"外校老师地理"); + } + + /** + * 历史 + * @param response + * @throws IOException + */ + @GetMapping("/downloadl") + @RequiresPermissions("inv:user:list") + public void downloadL(HttpServletResponse response) throws IOException { + List list = h5WaiTeacherService.queryListY(7); + download(response,list, "外校老师历史"); + } + @GetMapping("/downloadz") + @RequiresPermissions("inv:user:list") + public void downloadZ(HttpServletResponse response) throws IOException { + List list = h5WaiTeacherService.queryListY(8); + download(response,list, "外校老师政治"); + } + + + public void download(HttpServletResponse response, List list, String fileName) throws IOException { +// List list = h5WaiTeacherService.list(); + // 设置响应 + EasyExcelWriterFactory excelWriter = EasyExcelUtil.writeWithSheetsWeb(response, fileName); + // 将列表数据写入Excel + + // 将数据写入Excel,并指定模型类作为表头 + excelWriter.writeModel(H5WaiTeacher.class, list, fileName).finish(); + // 关闭写入器 + excelWriter.finish(); +} +} diff --git a/src/main/java/com/github/niefy/modules/h5/controller/H5StudentController.java b/src/main/java/com/github/niefy/modules/h5/controller/H5StudentController.java index d50486e0..060811c2 100644 --- a/src/main/java/com/github/niefy/modules/h5/controller/H5StudentController.java +++ b/src/main/java/com/github/niefy/modules/h5/controller/H5StudentController.java @@ -12,6 +12,7 @@ import com.github.niefy.modules.h5.entity.H5LocalTeacher; import com.github.niefy.modules.h5.entity.H5Student; import com.github.niefy.modules.h5.entity.H5User; import com.github.niefy.modules.h5.entity.H5WaiTeacher; +import com.github.niefy.modules.h5.service.H5InvitationService; import com.github.niefy.modules.h5.service.H5StudentService; import com.github.niefy.modules.h5.service.H5UserService; import com.github.niefy.modules.sys.controller.AbstractController; @@ -36,6 +37,7 @@ import java.util.Map; public class H5StudentController extends AbstractController{ private final H5StudentService studentService; private final H5UserService h5UserService; + @Autowired public H5StudentController(H5StudentService studentService, H5UserService h5UserService) { this.studentService = studentService; diff --git a/src/main/java/com/github/niefy/modules/h5/controller/H5UserController.java b/src/main/java/com/github/niefy/modules/h5/controller/H5UserController.java index 3c1c6222..aca5f00d 100644 --- a/src/main/java/com/github/niefy/modules/h5/controller/H5UserController.java +++ b/src/main/java/com/github/niefy/modules/h5/controller/H5UserController.java @@ -9,19 +9,24 @@ import com.github.niefy.common.validator.ValidatorUtils; import com.github.niefy.common.validator.group.AddGroup; import com.github.niefy.common.validator.group.UpdateGroup; import com.github.niefy.modules.h5.entity.*; +import com.github.niefy.modules.h5.entity.excel_entiry.H5UserExcelEntity; +import com.github.niefy.modules.h5.excel.DormitoryInfo; +import com.github.niefy.modules.h5.excel.EasyExcelUtil; import com.github.niefy.modules.h5.service.*; import com.github.niefy.modules.sys.controller.AbstractController; import com.github.niefy.modules.sys.entity.SysUserEntity; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import java.io.IOException; +import java.io.InputStream; import java.time.LocalDateTime; -import java.util.Arrays; -import java.util.List; -import java.util.Map; +import java.util.*; /** * H5用户关的api @@ -40,13 +45,15 @@ public class H5UserController extends AbstractController { private final H5StudentService h5StudentService; private final H5WaiTeacherService h5WaiTeacherService; private final H5AdminInfoService h5AdminInfoService; + private final H5InvitationService h5InvitationService; @Autowired - public H5UserController(H5UserService h5UserService, H5LocalTeacherService h5LocalTeacherService, H5StudentService h5StudentService, H5WaiTeacherService h5WaiTeacherService,H5AdminInfoService h5AdminInfoService) { + public H5UserController(H5UserService h5UserService, H5LocalTeacherService h5LocalTeacherService, H5StudentService h5StudentService, H5WaiTeacherService h5WaiTeacherService,H5AdminInfoService h5AdminInfoService,H5InvitationService h5InvitationService) { this.h5UserService = h5UserService; this.h5LocalTeacherService = h5LocalTeacherService; this.h5StudentService = h5StudentService; this.h5WaiTeacherService = h5WaiTeacherService; this.h5AdminInfoService = h5AdminInfoService; + this.h5InvitationService = h5InvitationService; } @@ -230,7 +237,7 @@ public class H5UserController extends AbstractController { /** - * 所有用户列表 + * */ @GetMapping("/autoId") // @RequiresPermissions("h5:user:list") @@ -241,5 +248,62 @@ public class H5UserController extends AbstractController { return R.ok().put("success"); } + /** + * 分组获取用户信息接口 + * @param groupId + * @return + */ + @GetMapping("/qall") + @ApiOperation(value = "查询用户分组列表", notes = "") + public R queryUserAllUser(@RequestParam Integer groupId) { + //只有超级管理员,才能查看所有管理员列表 +// List groupUser = h5UserService.getGroupUser(1); + List all = h5UserService.queryUserAllUser(); + List groupUser = h5UserService.getGroupUser(groupId); + Map map = new HashMap<>(); + map.put("all", all); + map.put("groupUser", groupUser); + return R.ok(map); + } + + + /** + * 数据管理文件上传 + * @param file + * @return + * @throws IOException + */ + @PostMapping("/upload") + @ResponseBody +// @RequiresPermissions("h5:user:list") + public String upload(MultipartFile file) throws IOException { + InputStream inputStream = file.getInputStream(); + List list = EasyExcelUtil.syncReadModel(inputStream, H5UserExcelEntity.class, 0, 1); + List h5List = new ArrayList<>(); + for (H5UserExcelEntity map : list) { + H5User h5User = new H5User(); + h5User.setUpdateTime(LocalDateTime.now()); + BeanUtils.copyProperties(map, h5User); + h5List.add(h5User); +// System.out.println(h5DormitoryInfo); + } + h5UserService.saveBatch(h5List); + List h5Invitations = new ArrayList<>(); + for (H5User h5User : h5List) { + if (h5User.getIdentity()==9){ + H5Invitation h5Invitation = new H5Invitation(); + h5Invitation.setUserId(h5User.getUserId()); + h5Invitation.setGroupId(h5User.getGroupId()); + h5Invitation.setMajorId(h5User.getMajorId()); + h5Invitation.setUserMajorId(h5User.getUserMajorId()); + h5Invitation.setUserMajorId(h5User.getUserMajorId()); + h5Invitations.add(h5Invitation); + } + } + h5InvitationService.saveBatch(h5Invitations); + h5Invitations.clear(); + return "success"; + } + } diff --git a/src/main/java/com/github/niefy/modules/h5/controller/H5WaiTeacherController.java b/src/main/java/com/github/niefy/modules/h5/controller/H5WaiTeacherController.java index 40f0b72c..cfc57108 100644 --- a/src/main/java/com/github/niefy/modules/h5/controller/H5WaiTeacherController.java +++ b/src/main/java/com/github/niefy/modules/h5/controller/H5WaiTeacherController.java @@ -1,6 +1,7 @@ package com.github.niefy.modules.h5.controller; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.github.niefy.common.annotation.SysLog; import com.github.niefy.common.utils.Constant; import com.github.niefy.common.utils.PageUtils; @@ -8,9 +9,11 @@ import com.github.niefy.common.utils.R; import com.github.niefy.common.validator.ValidatorUtils; import com.github.niefy.common.validator.group.AddGroup; import com.github.niefy.common.validator.group.UpdateGroup; +import com.github.niefy.modules.h5.entity.H5Invitation; import com.github.niefy.modules.h5.entity.H5LocalTeacher; import com.github.niefy.modules.h5.entity.H5User; import com.github.niefy.modules.h5.entity.H5WaiTeacher; +import com.github.niefy.modules.h5.service.H5InvitationService; import com.github.niefy.modules.h5.service.H5UserService; import com.github.niefy.modules.h5.service.H5WaiTeacherService; import com.github.niefy.modules.sys.controller.AbstractController; @@ -38,11 +41,13 @@ public class H5WaiTeacherController extends AbstractController{ private final H5WaiTeacherService h5WaiTeacherService; private final H5UserService h5UserService; + private final H5InvitationService h5InvitationService; @Autowired - public H5WaiTeacherController(H5WaiTeacherService h5WaiTeacherService, H5UserService h5UserService) { + public H5WaiTeacherController(H5WaiTeacherService h5WaiTeacherService, H5UserService h5UserService,H5InvitationService h5InvitationService) { this.h5WaiTeacherService = h5WaiTeacherService; this.h5UserService = h5UserService; + this.h5InvitationService = h5InvitationService; } @RequestMapping("/save") @@ -56,6 +61,10 @@ public class H5WaiTeacherController extends AbstractController{ oneUser.setUserName(waiTeacher.getUserName()); h5WaiTeacherService.save(waiTeacher); h5UserService.updateById(oneUser); + LambdaUpdateWrapper qw = new LambdaUpdateWrapper<>(); + qw.eq(H5Invitation::getUserId, oneUser.getUserId()); + qw.set(H5Invitation::getWorkName,waiTeacher.getWorkName()); + h5InvitationService.update(qw); map.put("user", waiTeacher); map.put("router", "/mainPage"); return R.ok(map); diff --git a/src/main/java/com/github/niefy/modules/h5/entity/H5Group.java b/src/main/java/com/github/niefy/modules/h5/entity/H5Group.java index ceb979f6..3458149f 100644 --- a/src/main/java/com/github/niefy/modules/h5/entity/H5Group.java +++ b/src/main/java/com/github/niefy/modules/h5/entity/H5Group.java @@ -25,25 +25,7 @@ public class H5Group implements Serializable { */ private String name; - /** - * - */ - private String userName; - /** - * - */ - private String userId; - - private String userMajorId; - private Integer parentId; - - - - /** - * - */ - private Integer identity; @TableField(exist = false) private static final long serialVersionUID = 1L; diff --git a/src/main/java/com/github/niefy/modules/h5/entity/H5User.java b/src/main/java/com/github/niefy/modules/h5/entity/H5User.java index 94ded92a..0f70766a 100644 --- a/src/main/java/com/github/niefy/modules/h5/entity/H5User.java +++ b/src/main/java/com/github/niefy/modules/h5/entity/H5User.java @@ -7,7 +7,10 @@ import com.baomidou.mybatisplus.annotation.TableName; import java.io.Serializable; import java.time.LocalDateTime; import java.util.Date; + +import lombok.AllArgsConstructor; import lombok.Data; +import lombok.NoArgsConstructor; /** * diff --git a/src/main/java/com/github/niefy/modules/h5/entity/H5WaiTeacher.java b/src/main/java/com/github/niefy/modules/h5/entity/H5WaiTeacher.java index 44bbdbc1..2e201f75 100644 --- a/src/main/java/com/github/niefy/modules/h5/entity/H5WaiTeacher.java +++ b/src/main/java/com/github/niefy/modules/h5/entity/H5WaiTeacher.java @@ -1,5 +1,7 @@ package com.github.niefy.modules.h5.entity; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; @@ -15,61 +17,71 @@ import lombok.Data; */ @TableName(value ="h5_wai_teacher") @Data +@ExcelIgnoreUnannotated public class H5WaiTeacher implements Serializable { /** * 主键 */ @TableId(type = IdType.AUTO) private Integer id; - /** * openid */ +// 不需要导出这个字段 private String openId; /** * 用户id */ + @ExcelProperty(value = "身份码", index = 0) private String userId; /** * 名称 */ + @ExcelProperty(value = "姓名", index = 1) private String userName; /** * 手机号 */ + @ExcelProperty(value = "手机号", index = 2) private String phone; /** * 职称 */ + @ExcelProperty(value = "职称", index = 3) private String jobTitle; /** * 银行卡号 */ + @ExcelProperty(value = "银行卡", index = 4) private String pyCard; /** * 办公位 */ + @ExcelProperty(value = "职位", index = 5) private String office; /** * 工作名称 */ + @ExcelProperty(value = "工作单位", index = 6) private String workName; /** * 固定电话 */ + @ExcelProperty(value = "固定电话", index = 7) private String workPhone; /** * 身份证 */ + @ExcelProperty(value = "身份证", index = 8) private String identityId; /** @@ -80,25 +92,29 @@ public class H5WaiTeacher implements Serializable { /** * 宿舍 */ - + @ExcelProperty(value = "宿舍", index = 9) private String dormitory; /** * 车牌号 */ + @ExcelProperty(value = "车牌号", index = 10) private String carNumber; /** * 是否住宿 */ + private int dormitoryStatus; /** * 开户所在地 */ + @ExcelProperty(value = "开户所在地", index = 11) private String bankAddress; /** * 开户行 */ + @ExcelProperty(value = "开户行", index = 12) private String bankName; /** @@ -119,6 +135,7 @@ public class H5WaiTeacher implements Serializable { /** * 创建时间 */ + @ExcelProperty(value = "时间", index = 13) private LocalDateTime createTime; /** diff --git a/src/main/java/com/github/niefy/modules/h5/entity/excel_entiry/H5UserExcelEntity.java b/src/main/java/com/github/niefy/modules/h5/entity/excel_entiry/H5UserExcelEntity.java new file mode 100644 index 00000000..5e9a5543 --- /dev/null +++ b/src/main/java/com/github/niefy/modules/h5/entity/excel_entiry/H5UserExcelEntity.java @@ -0,0 +1,47 @@ +package com.github.niefy.modules.h5.entity.excel_entiry; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.time.LocalDateTime; + +@AllArgsConstructor +@NoArgsConstructor +@Data +public class H5UserExcelEntity { + /** + * 用户id + */ + private String userId; + /** + * 用户专业id + */ + private String userMajorId; + + /** + * 组id + */ + private Integer groupId; + + /** + * 身份:管理员2 学生3,老师 6 ,外校老师9 + */ + private Integer identity; + + + /** + * 专业id,0表示未选择 + */ + private Integer majorId; + + /** + * 状态:0正常 1禁用 + */ + private Integer status; + + +} diff --git a/src/main/java/com/github/niefy/modules/h5/excel/EasyExcelWriterFactory.java b/src/main/java/com/github/niefy/modules/h5/excel/EasyExcelWriterFactory.java index 966627a9..230ff057 100644 --- a/src/main/java/com/github/niefy/modules/h5/excel/EasyExcelWriterFactory.java +++ b/src/main/java/com/github/niefy/modules/h5/excel/EasyExcelWriterFactory.java @@ -39,6 +39,8 @@ public class EasyExcelWriterFactory { return this; } + + /** * 链式自定义表头写入 * @param head diff --git a/src/main/java/com/github/niefy/modules/h5/mapper/H5UserMapper.java b/src/main/java/com/github/niefy/modules/h5/mapper/H5UserMapper.java index e6dfb02b..4de7e7fa 100644 --- a/src/main/java/com/github/niefy/modules/h5/mapper/H5UserMapper.java +++ b/src/main/java/com/github/niefy/modules/h5/mapper/H5UserMapper.java @@ -4,6 +4,8 @@ import com.github.niefy.modules.h5.entity.H5User; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * @author 27428 * @description 针对表【h5_user】的数据库操作Mapper @@ -13,6 +15,8 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface H5UserMapper extends BaseMapper { + List queryUserAllUser(); + List getGroupUser(Integer groupId); } diff --git a/src/main/java/com/github/niefy/modules/h5/mapper/H5WaiTeacherMapper.java b/src/main/java/com/github/niefy/modules/h5/mapper/H5WaiTeacherMapper.java index 423bb9a0..739e014f 100644 --- a/src/main/java/com/github/niefy/modules/h5/mapper/H5WaiTeacherMapper.java +++ b/src/main/java/com/github/niefy/modules/h5/mapper/H5WaiTeacherMapper.java @@ -3,6 +3,9 @@ package com.github.niefy.modules.h5.mapper; import com.github.niefy.modules.h5.entity.H5WaiTeacher; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Select; + +import java.util.List; /** * @author 27428 @@ -13,6 +16,8 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface H5WaiTeacherMapper extends BaseMapper { + @Select("select * from h5_wai_teacher where user_id in (select user_id from h5_invitation where major_id = ${id})") + public List queryListY(Integer id); } diff --git a/src/main/java/com/github/niefy/modules/h5/service/H5UserService.java b/src/main/java/com/github/niefy/modules/h5/service/H5UserService.java index 4b666e17..94327350 100644 --- a/src/main/java/com/github/niefy/modules/h5/service/H5UserService.java +++ b/src/main/java/com/github/niefy/modules/h5/service/H5UserService.java @@ -6,6 +6,7 @@ import com.github.niefy.modules.h5.entity.H5User; import com.baomidou.mybatisplus.extension.service.IService; import com.github.niefy.modules.sys.entity.SysUserEntity; +import java.util.List; import java.util.Map; /** @@ -22,4 +23,8 @@ public interface H5UserService extends IService { void createAccount(Integer groupType, Integer num,Integer majorId); // public void saveUser(H5User user); + + List queryUserAllUser(); + + List getGroupUser(Integer groupId); } diff --git a/src/main/java/com/github/niefy/modules/h5/service/H5WaiTeacherService.java b/src/main/java/com/github/niefy/modules/h5/service/H5WaiTeacherService.java index 9377ebf9..24b374cc 100644 --- a/src/main/java/com/github/niefy/modules/h5/service/H5WaiTeacherService.java +++ b/src/main/java/com/github/niefy/modules/h5/service/H5WaiTeacherService.java @@ -5,6 +5,7 @@ import com.github.niefy.modules.h5.entity.H5WaiTeacher; import com.baomidou.mybatisplus.extension.service.IService; import org.springframework.web.multipart.MultipartFile; +import java.util.List; import java.util.Map; /** @@ -21,5 +22,7 @@ public interface H5WaiTeacherService extends IService { void startTask(); Map countingPeople(); + List queryListY(Integer id); + // void createTask(MultipartFile file); } diff --git a/src/main/java/com/github/niefy/modules/h5/service/impl/H5GroupServiceImpl.java b/src/main/java/com/github/niefy/modules/h5/service/impl/H5GroupServiceImpl.java index 1ad1d409..18945902 100644 --- a/src/main/java/com/github/niefy/modules/h5/service/impl/H5GroupServiceImpl.java +++ b/src/main/java/com/github/niefy/modules/h5/service/impl/H5GroupServiceImpl.java @@ -26,11 +26,11 @@ public class H5GroupServiceImpl extends ServiceImpl @Override public PageUtils queryPage(Map params) { IPage page = this.page( - new Query().getPage(params), - new QueryWrapper() + new Query().getPage(params) +// new QueryWrapper() // 查询parent_id不等于0的所有记录 // .ne("parent_id", 0) - .eq("parent_id", 0) +// .eq("parent_id", 0) // .like(StringUtils.isNotBlank(userId), "user_id", userId) // 按时间降序排序 diff --git a/src/main/java/com/github/niefy/modules/h5/service/impl/H5UserServiceImpl.java b/src/main/java/com/github/niefy/modules/h5/service/impl/H5UserServiceImpl.java index 1c99d3cb..950729aa 100644 --- a/src/main/java/com/github/niefy/modules/h5/service/impl/H5UserServiceImpl.java +++ b/src/main/java/com/github/niefy/modules/h5/service/impl/H5UserServiceImpl.java @@ -9,6 +9,7 @@ import com.github.niefy.common.utils.Query; import com.github.niefy.common.utils.R; import com.github.niefy.modules.h5.entity.*; import com.github.niefy.modules.h5.mapper.*; +import com.github.niefy.modules.h5.service.H5InvitationService; import com.github.niefy.modules.h5.service.H5UserService; import org.apache.commons.lang3.StringUtils; import org.jetbrains.annotations.NotNull; @@ -33,16 +34,18 @@ public class H5UserServiceImpl extends ServiceImpl private final H5LocalTeacherMapper h5LocalTeacherMapper; private final H5WaiTeacherMapper h5WaiTeacherMapper; private final H5AdminInfoMapper h5AdminInfoMapper; + private final H5InvitationService h5InvitationService; // private final CounterService counterService; // private final RedisTemplate redisTemplate; @Autowired - public H5UserServiceImpl(H5UserMapper h5UserMapper, H5StudentMapper h5StudentMapper, H5LocalTeacherMapper h5LocalTeacherMapper, H5WaiTeacherMapper h5WaiTeacherMapper, H5AdminInfoMapper h5AdminInfoMapper) { + public H5UserServiceImpl(H5UserMapper h5UserMapper, H5StudentMapper h5StudentMapper, H5LocalTeacherMapper h5LocalTeacherMapper, H5WaiTeacherMapper h5WaiTeacherMapper, H5AdminInfoMapper h5AdminInfoMapper,H5InvitationService h5InvitationService) { this.h5UserMapper = h5UserMapper; this.h5StudentMapper = h5StudentMapper; this.h5LocalTeacherMapper = h5LocalTeacherMapper; this.h5WaiTeacherMapper = h5WaiTeacherMapper; this.h5AdminInfoMapper = h5AdminInfoMapper; + this.h5InvitationService = h5InvitationService; // this.counterService = counterService; // this.redisTemplate = redisTemplate; } @@ -79,6 +82,13 @@ public class H5UserServiceImpl extends ServiceImpl LambdaQueryWrapper H5AdminInfoWreapper = new LambdaQueryWrapper<>(); H5AdminInfoWreapper.eq(H5AdminInfo::getUserId, h5User1.getUserId()); H5AdminInfo h5AdminInfo = h5AdminInfoMapper.selectOne(H5AdminInfoWreapper); + if ("".equals(h5User1.getOpenId())) { + h5User1.setOpenId(h5User.getOpenId()); + h5UserMapper.updateById(h5User1); + } else { + return R.error("微信已经和其他账号关联"); + } + if (h5AdminInfo != null) { // 返回整个user HashMap map = new HashMap<>(); @@ -254,7 +264,7 @@ public class H5UserServiceImpl extends ServiceImpl LambdaQueryWrapper h5UserQuery = new LambdaQueryWrapper<>(); h5UserQuery.eq(H5User::getOpenId, openid); H5User user = h5UserMapper.selectOne(h5UserQuery); - if (user==null){ + if (user == null) { // 说明还没注册过-》把他引导去填写身份识别码 return R.ok().put("router", "myIndex"); @@ -278,7 +288,7 @@ public class H5UserServiceImpl extends ServiceImpl map.put("router", "/leaderShip"); return R.ok(map); } else { - return R.error("管理员账号还未申请通过!"); + return R.ok().put("router", "myIndex"); } //学生2 case 3: @@ -288,17 +298,16 @@ public class H5UserServiceImpl extends ServiceImpl stuWrapper.eq(H5Student::getUserId, userId); H5Student h5Student = h5StudentMapper.selectOne(stuWrapper); if (h5Student != null && h5Student.getOpenId().equals(openid)) { -// 说明已经填写过个人信息了直接放行到主页面 -// 返回整个user HashMap map = new HashMap<>(); map.put("user", h5Student); + map.put("major", user.getMajorId()); map.put("status", "2"); //填写过信息 map.put("router", "/mainPage"); return R.ok(map); - }else { + } else { return R.ok().put("router", "myIndex"); } - // 直接跳到信息填写的页面 + //老师3 case 6: @@ -311,9 +320,12 @@ public class H5UserServiceImpl extends ServiceImpl // 返回整个user HashMap map = new HashMap<>(); map.put("user", h5LocalTeacher); + map.put("major", user.getMajorId()); map.put("status", "2"); //填写过信息 map.put("router", "/mainPage"); return R.ok(map); + } else { + return R.ok().put("router", "myIndex"); } @@ -328,139 +340,160 @@ public class H5UserServiceImpl extends ServiceImpl // 返回整个user HashMap map = new HashMap<>(); map.put("user", h5WaiTeacher); +// map.put("baseUser", user); + map.put("major", user.getMajorId()); map.put("status", "2"); //填写过信息 map.put("router", "/mainPage"); return R.ok(map); + } else { + return R.ok().put("router", "myIndex"); } } return R.error("未知错误"); } - public boolean checkAcc (H5User h5User){ - LambdaQueryWrapper openIDListWreaper = new LambdaQueryWrapper<>(); - openIDListWreaper.eq(H5User::getOpenId, h5User.getOpenId()); - List Users = h5UserMapper.selectList(openIDListWreaper); - for (H5User user : Users) { - if (user.getOpenId().equals(h5User.getOpenId())) { + public boolean checkAcc(H5User h5User) { + LambdaQueryWrapper openIDListWreaper = new LambdaQueryWrapper<>(); + openIDListWreaper.eq(H5User::getOpenId, h5User.getOpenId()); + List Users = h5UserMapper.selectList(openIDListWreaper); + for (H5User user : Users) { + if (user.getOpenId().equals(h5User.getOpenId())) { // 账号存在 - return true; - } - } - return false; - } - - // 判空openid - public boolean checker (String openid){ - // userId已经存在所以更新openid即可 - if ("".equals(openid) || null == openid) { return true; } - return false; } + return false; + } + + // 判空openid + public boolean checker(String openid) { + // userId已经存在所以更新openid即可 + if ("".equals(openid) || null == openid) { + return true; + } + return false; + } - @Override - public PageUtils queryPage (Map < String, Object > params){ - String userId = (String) params.get("userId"); - Long createUserId = (Long) params.get("createUserId"); + @Override + public PageUtils queryPage(Map params) { + String userId = (String) params.get("userId"); + Long createUserId = (Long) params.get("createUserId"); - IPage page = this.page( - new Query().getPage(params), - new QueryWrapper() - .like(StringUtils.isNotBlank(userId), "user_id", userId) - // 按时间降序排序 - .orderByDesc("update_time") + IPage page = this.page( + new Query().getPage(params), + new QueryWrapper() + .like(StringUtils.isNotBlank(userId), "user_id", userId) + // 按时间降序排序 + .orderByDesc("update_time") // .eq(createUserId != null, "create_user_id", createUserId) - ); + ); - return new PageUtils(page); - } + return new PageUtils(page); + } - // 删除 - @Override - public void deleteBatch (Long[]userId){ - this.removeByIds(Arrays.asList(userId)); - } + // 删除 + @Override + public void deleteBatch(Long[] userId) { + this.removeByIds(Arrays.asList(userId)); + } - @Override - public void createAccount (Integer groupType, Integer num, Integer majorId){ - Set set = new HashSet<>(); - List userMIDList = new ArrayList<>(); - List h5Users = new ArrayList<>(); - List list = this.list(); - list.forEach((item) -> { - set.add(item.getUserId()); - String userMajorId = item.getUserMajorId(); - if (Objects.equals(item.getMajorId(), majorId)) { + @Override + public void createAccount(Integer groupType, Integer num, Integer majorId) { + Set set = new HashSet<>(); + List userMIDList = new ArrayList<>(); + List h5Users = new ArrayList<>(); + List list = this.list(); + list.forEach((item) -> { + set.add(item.getUserId()); + String userMajorId = item.getUserMajorId(); + if (Objects.equals(item.getMajorId(), majorId)) { // userMIDList.add(Integer.parseInt(userMajorId.substring(1))); - userMIDList.add(userMajorId); - } + userMIDList.add(userMajorId); + } // Integer userMID = Integer.parseInt(userMajorId.substring(1)); // userMIDList.add(userMID); - }); - switch (majorId) { + }); + switch (majorId) { // 中文 - case 1: - String chinese = ""; - if (userMIDList.isEmpty()) { - chinese = "W240000"; - } else { - chinese = userMIDList.get(userMIDList.size() - 1); + case 1: + String chinese = ""; + if (userMIDList.isEmpty()) { + chinese = "W240000"; + } else { + chinese = userMIDList.get(userMIDList.size() - 1); // - } - saveAccount(num, set, groupType, h5Users, majorId, chinese, "W"); - break; + } + saveAccount(num, set, groupType, h5Users, majorId, chinese, "W"); + break; // 地理 - case 4: - String geography = ""; - if (userMIDList.isEmpty()) { - geography = "D241000"; - } else { - geography = userMIDList.get(userMIDList.size() - 1); - } + case 4: + String geography = ""; + if (userMIDList.isEmpty()) { + geography = "D241000"; + } else { + geography = userMIDList.get(userMIDList.size() - 1); + } - saveAccount(num, set, groupType, h5Users, majorId, geography, "D"); - break; + saveAccount(num, set, groupType, h5Users, majorId, geography, "D"); + break; // 历史 - case 7: - String history = ""; - if (userMIDList.isEmpty()) { - history = "L242000"; - } else { - history = userMIDList.get(userMIDList.size() - 1); - } + case 7: + String history = ""; + if (userMIDList.isEmpty()) { + history = "L242000"; + } else { + history = userMIDList.get(userMIDList.size() - 1); + } - saveAccount(num, set, groupType, h5Users, majorId, history, "L"); - break; + saveAccount(num, set, groupType, h5Users, majorId, history, "L"); + break; // 马克思 - case 8: - String marx = ""; - if (userMIDList.isEmpty()) { - marx = "M243000"; - } else { - marx = userMIDList.get(userMIDList.size() - 1); - } + case 8: + String marx = ""; + if (userMIDList.isEmpty()) { + marx = "M243000"; + } else { + marx = userMIDList.get(userMIDList.size() - 1); + } - saveAccount(num, set, groupType, h5Users, majorId, marx, "M"); - break; - } - this.saveBatch(h5Users); - h5Users.clear(); - set.clear(); - userMIDList.clear(); + saveAccount(num, set, groupType, h5Users, majorId, marx, "M"); + break; + } + this.saveBatch(h5Users); +// 如果外小老师则添加到邀请函表中 + if (groupType == 9) { + List h5Invitations = new ArrayList<>(); + h5Users.forEach((item) -> { + H5Invitation h5Invitation = new H5Invitation(); + h5Invitation.setUserId(item.getUserId()); + h5Invitation.setGroupId(item.getGroupId()); + h5Invitation.setUserMajorId(item.getUserMajorId()); + h5Invitation.setUserMajorId(item.getUserMajorId()); + h5Invitation.setMajorId(item.getMajorId()); + h5Invitations.add(h5Invitation); + }); + h5InvitationService.saveBatch(h5Invitations); + h5Invitations.clear(); } - public void saveAccount (Integer num, Set < String > set, Integer groupType, List < H5User > h5Users, Integer - majorId, @NotNull String code, String label){ - int newCode = Integer.parseInt(code.substring(1)); - while (num != 0) { - String randomNum = getRandomNum(8); - String substring = randomNum.substring(0, 3); - String substrin1 = randomNum.substring(5, 8); - String account = substring + groupType + majorId + substrin1; + + h5Users.clear(); + set.clear(); + userMIDList.clear(); + } + + public void saveAccount(Integer num, Set set, Integer groupType, List h5Users, Integer + majorId, @NotNull String code, String label) { + int newCode = Integer.parseInt(code.substring(1)); + while (num != 0) { + String randomNum = getRandomNum(8); + String substring = randomNum.substring(0, 3); + String substrin1 = randomNum.substring(5, 8); + String account = substring + groupType + majorId + substrin1; // TypeEnum typeEnum = TypeEnum.getByMajorId(majorId); // String prefix = typeEnum.getCode(); // Long code = redisTemplate.opsForValue().increment(typeEnum.getName()); @@ -470,37 +503,55 @@ public class H5UserServiceImpl extends ServiceImpl // String code2 = String.format("%s%03d", prefix, code); // System.out.println(code2); - if (!set.contains(account)) { - num--; - H5User h5User = new H5User(); - h5User.setUserId(account); - h5User.setIdentity(groupType); - h5User.setUserName(""); - h5User.setMajorId(majorId); - newCode += 1; - h5User.setUserMajorId(label + newCode); - h5User.setStatus(1); - h5User.setCreateTime(LocalDateTime.now()); - h5User.setUpdateTime(LocalDateTime.now()); - h5Users.add(h5User); + if (!set.contains(account)) { + num--; + H5User h5User = new H5User(); + h5User.setUserId(account); + h5User.setIdentity(groupType); + h5User.setUserName(""); + h5User.setMajorId(majorId); + newCode += 1; + h5User.setUserMajorId(label + newCode); + h5User.setStatus(1); + h5User.setCreateTime(LocalDateTime.now()); + h5User.setUpdateTime(LocalDateTime.now()); + h5Users.add(h5User); // h5UserMapper.insert(h5User); - } } } + } - // 编写一个辅助函数,功能随机自动生成八位数字 - public static String getRandomNum ( int length){ -//功能随机自动生成八位数字 - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < length; i++) { - sb.append((int) (Math.random() * 10)); - } - return sb.toString(); + // 编写一个辅助函数,功能随机自动生成八位数字 +// public static String getRandomNum(int length) { +////功能随机自动生成八位数字 +// StringBuilder sb = new StringBuilder(); +// for (int i = 0; i < length; i++) { +// sb.append((int) (Math.random() * 10)); +// } +// return sb.toString(); +// } + public static String getRandomNum(int length) { + StringBuilder sb = new StringBuilder(); + sb.append((int) (Math.random() * 9) + 1); // 第一位不能为0 + for (int i = 1; i < length; i++) { + sb.append((int) (Math.random() * 10)); } + return sb.toString(); + } + @Override + public List queryUserAllUser() { + return h5UserMapper.queryUserAllUser(); + } + @Override + public List getGroupUser(Integer groupId) { + return h5UserMapper.getGroupUser(groupId); } +} + + diff --git a/src/main/java/com/github/niefy/modules/h5/service/impl/H5WaiTeacherServiceImpl.java b/src/main/java/com/github/niefy/modules/h5/service/impl/H5WaiTeacherServiceImpl.java index 66200fb6..0e9086a2 100644 --- a/src/main/java/com/github/niefy/modules/h5/service/impl/H5WaiTeacherServiceImpl.java +++ b/src/main/java/com/github/niefy/modules/h5/service/impl/H5WaiTeacherServiceImpl.java @@ -41,8 +41,14 @@ public class H5WaiTeacherServiceImpl extends ServiceImpl params) { @@ -155,6 +161,11 @@ public class H5WaiTeacherServiceImpl extends ServiceImpl queryListY(Integer id) { + return h5WaiTeacherMapper.queryListY(id); + } + } diff --git a/src/main/java/com/github/niefy/modules/sys/entity/SysMenuEntity.java b/src/main/java/com/github/niefy/modules/sys/entity/SysMenuEntity.java index 7ff0c67d..99bb4be2 100644 --- a/src/main/java/com/github/niefy/modules/sys/entity/SysMenuEntity.java +++ b/src/main/java/com/github/niefy/modules/sys/entity/SysMenuEntity.java @@ -64,6 +64,7 @@ public class SysMenuEntity implements Serializable { */ private Integer orderNum; + /** * ztree属性 */ diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index ddcd1f1f..f2f56728 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -14,8 +14,8 @@ debug: false spring: profiles: -# active: ${PROFILE_ACTIVE:dev} #此处由maven的环境选择决定,参考:https://www.jianshu.com/p/b7c75b0c364c - active: ${PROFILE_ACTIVE:prod} #此处由maven的环境选择决定,参考:https://www.jianshu.com/p/b7c75b0c364c + active: ${PROFILE_ACTIVE:dev} #此处由maven的环境选择决定,参考:https://www.jianshu.com/p/b7c75b0c364c +# active: ${PROFILE_ACTIVE :prod} #此处由maven的环境选择决定,参考:https://www.jianshu.com/p/b7c75b0c364c # jackson时间格式化 jackson: time-zone: GMT+8 @@ -82,11 +82,11 @@ logging: chanjar: debug #公众号配置 mywx: -# appid: wxb37a727764fc080b - appid: wx2b5899dac09216d4 + appid: wxb37a727764fc080b +# appid: wx2b5899dac09216d4 # h5回调url - h5url: http://wx-api-101281-5-1320792097.sh.run.tcloudbase.com -# h5url: http://154.8.196.128:9999 +# h5url: http://wx-api-101281-5-1320792097.sh.run.tcloudbase.com + h5url: http://154.8.196.128:9999 # h5url: http://154.8.196.128 #exel: diff --git a/src/main/resources/mapper/H5UserMapper.xml b/src/main/resources/mapper/H5UserMapper.xml index aa4c0829..683505e9 100644 --- a/src/main/resources/mapper/H5UserMapper.xml +++ b/src/main/resources/mapper/H5UserMapper.xml @@ -23,4 +23,12 @@ major_id,status,create_time, update_time + + + +