diff --git a/src/main/java/com/msdw/tms/common/utils/ConstantUtils.java b/src/main/java/com/msdw/tms/common/utils/ConstantUtils.java index 0f8cf94..152e2c4 100644 --- a/src/main/java/com/msdw/tms/common/utils/ConstantUtils.java +++ b/src/main/java/com/msdw/tms/common/utils/ConstantUtils.java @@ -13,6 +13,8 @@ public class ConstantUtils { //绑定电子科大的schoolId public static final Integer Keda_schoolId = 2105; + //河海大學id + // public static final Integer Keda_schoolId = 729; //绑定角色ID public static final Integer STUDENT_ROLE = 4; diff --git a/src/main/java/com/msdw/tms/controller/StudentController.java b/src/main/java/com/msdw/tms/controller/StudentController.java index 5f82491..b9ed186 100644 --- a/src/main/java/com/msdw/tms/controller/StudentController.java +++ b/src/main/java/com/msdw/tms/controller/StudentController.java @@ -1,19 +1,14 @@ package com.msdw.tms.controller; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.msdw.tms.api.StudentControllerApi; -import com.msdw.tms.common.utils.Constant; import com.msdw.tms.common.utils.ConstantUtils; import com.msdw.tms.common.utils.PageUtils; import com.msdw.tms.common.utils.R; -import com.msdw.tms.entity.StudentEntity; import com.msdw.tms.entity.UserInfoEntity; import com.msdw.tms.entity.vo.StudentVo; import com.msdw.tms.service.StudentService; import com.msdw.tms.service.UserInfoService; -import com.sun.xml.bind.v2.model.core.ID; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.redis.core.ValueOperations; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; @@ -21,11 +16,8 @@ import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; import java.io.IOException; -import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.UUID; -import java.util.concurrent.TimeUnit; /** * 学生管理 @@ -51,9 +43,8 @@ public class StudentController implements StudentControllerApi{ studentVo.setSchoolId(ConstantUtils.Keda_schoolId); String account = studentVo.getAccount(); String phone = studentVo.getPhone(); - Integer schoolId = studentVo.getSchoolId(); - Integer result = studentService.queryStudentIdNumber(studentVo.getWorkNumber(),schoolId); - Integer res = userInfoService.queryStudentAccount(account,schoolId); + Integer result = studentService.queryStudentIdNumber(studentVo.getWorkNumber(),ConstantUtils.Keda_schoolId); + Integer res = userInfoService.queryStudentAccount(account,ConstantUtils.Keda_schoolId); if (phone!=null&&phone!=""){ Integer outcome = userInfoService.queryStudentPhone(phone); if(outcome==1){ @@ -72,7 +63,7 @@ public class StudentController implements StudentControllerApi{ userInfoList.setAccount(account) .setPhone(phone) .setEmail(studentVo.getEmail()) - .setSchoolId(studentVo.getSchoolAppellationId()) + .setSchoolId(ConstantUtils.Keda_schoolId) .setUserName(studentVo.getUserName()) .setToken(new ConstantUtils().token); userInfoService.saveUserInfo(userInfoList); diff --git a/src/main/java/com/msdw/tms/service/impl/SystemSettingServiceImpl.java b/src/main/java/com/msdw/tms/service/impl/SystemSettingServiceImpl.java index 87e54a5..ef07674 100644 --- a/src/main/java/com/msdw/tms/service/impl/SystemSettingServiceImpl.java +++ b/src/main/java/com/msdw/tms/service/impl/SystemSettingServiceImpl.java @@ -3,7 +3,6 @@ package com.msdw.tms.service.impl; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.msdw.tms.common.exception.ExceptionCast; @@ -12,7 +11,6 @@ import com.msdw.tms.common.utils.poi.ExcelExportUtil; import com.msdw.tms.dao.SystemSetttingDao; import com.msdw.tms.dao.UserInfoDao; import com.msdw.tms.entity.StaffEntity; -import com.msdw.tms.entity.StudentEntity; import com.msdw.tms.entity.UserInfoEntity; import com.msdw.tms.entity.XlsxTemplateEntity; import com.msdw.tms.entity.response.CommonCode; @@ -284,7 +282,6 @@ public class SystemSettingServiceImpl implements SystemSetttingService { String phone = staffVo.getPhone(); String email = staffVo.getEmail(); - //校验员工姓名 if (staffVo.getUserName().equals("")) { StaffExportVo vo = new StaffExportVo(); diff --git a/src/main/resources/application-hehai.properties b/src/main/resources/application-hehai.properties new file mode 100644 index 0000000..a003cf7 --- /dev/null +++ b/src/main/resources/application-hehai.properties @@ -0,0 +1,52 @@ +server.port=9090 +server.servlet.context-path=/evaluation + +#\u6B63\u5F0F\u6570\u636E\u5E93\u8FDE\u63A5 +spring.datasource.url=jdbc:mysql://127.0.0.1:3306/huoran?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai +spring.datasource.username=root +spring.datasource.password=HeHai.3 +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver + +spring.jackson.default-property-inclusion=non_null + +# \u8FD9\u4E2A\u914D\u7F6E\u4F1A\u5C06\u6267\u884C\u7684sql\u6253\u5370\u51FA\u6765\uFF0C\u5728\u5F00\u53D1\u6216\u6D4B\u8BD5\u7684\u65F6\u5019\u53EF\u4EE5\u7528 +mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl +mybatis-plus.mapper-locations=classpath:/mapper/**/*.xml +mybatis-plus.global-config.db-config.id-type=auto +mybatis-plus.global-config.db-config.logic-delete-field=is_del +mybatis-plus.global-config.db-config.logic-delete-value=0 +mybatis-plus.global-config.db-config.logic-not-delete-value=1 + +tms.thread.core-size=20 +tms.thread.max-size=200 +tms.thread.keep-alive-time=10 + +#redis\u914D\u7F6E +spring.redis.database=0 +spring.redis.host=127.0.0.1 +spring.redis.password=HeHai.6 +spring.redis.port=6379 +spring.redis.timeout=3000 +spring.redis.jedis.pool.max-idle=500 +spring.redis.jedis.pool.min-idle=50 +spring.redis.jedis.pool.max-active=2000 +spring.redis.jedis.pool.max-wait=1000 + +#\u65E5\u5FD7\u7EA7\u522B +logging.level.jdbc=OFF +logging.level.jdbc.sqltiming=DEBUG +logging.level.jdbc.resultsettable=DEBUG +logging.level.com.yipin.liuwar.mapper=DEBUG +logging.level.com.yipin.liuwanr.mapper=DEBUG + +spring.elasticsearch.rest.uris=http://es-cn-v641e944a0006xtwy.elasticsearch.aliyuncs.com:9200 +spring.elasticsearch.rest.username=elastic +spring.elasticsearch.rest.password=1qaz@WSX + +# maxFileSize \u5355\u4E2A\u6570\u636E\u5927\u5C0F +spring.servlet.multipart.maxFileSize = 1024MB +# maxRequestSize \u662F\u603B\u6570\u636E\u5927\u5C0F +spring.servlet.multipart.maxRequestSize=10240MB + +pagehelper.reasonable=false + diff --git a/src/main/resources/application-test.properties b/src/main/resources/application-test.properties index 90f87dd..ef175d2 100644 --- a/src/main/resources/application-test.properties +++ b/src/main/resources/application-test.properties @@ -24,9 +24,9 @@ tms.thread.keep-alive-time=10 #redis\u914D\u7F6E spring.redis.database=0 -spring.redis.host=www.liuwanr.cn -spring.redis.password=huoran -spring.redis.port=6379 +spring.redis.host=127.0.0.1 +spring.redis.password=huoran#2021 +spring.redis.port=6710 spring.redis.timeout=3000 spring.redis.jedis.pool.max-idle=500 spring.redis.jedis.pool.min-idle=50 diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml deleted file mode 100644 index 5660afe..0000000 --- a/src/main/resources/application.yml +++ /dev/null @@ -1,42 +0,0 @@ -spring: - jackson: - default-property-inclusion: non_null - datasource: -# url: jdbc:mysql://www.liuwanr.cn:3306/huoran?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai -# username: super -# password: huoran888 - url: jdbc:mysql://rm-wz9y13wf7u8q8610fwo.mysql.rds.aliyuncs.com:3306/huoran?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai - username: super - password: huoran888 -# url: jdbc:mysql://localhost:3306/msdw_tms?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai -# username: root -# password: root - driver-class-name: com.mysql.cj.jdbc.Driver -# redis: -# host: www.liuwanr.cn -# port: 6379 -# password: huoran - redis: - host: 127.0.0.1 - port: 6379 - password: -mybatis-plus: - configuration: - log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用 - mapper-locations: classpath:/mapper/**/*.xml - global-config: - db-config: - id-type: auto - logic-delete-field: is_del - logic-delete-value: 0 - logic-not-delete-value: 1 -server: - port: 9090 - servlet: - context-path: /evaluation - -tms: - thread: - core-size: 20 - max-size: 200 - keep-alive-time: 10 diff --git a/src/main/resources/mapper/tms/ProjectRecordDao.xml b/src/main/resources/mapper/tms/ProjectRecordDao.xml index b143123..c31170d 100644 --- a/src/main/resources/mapper/tms/ProjectRecordDao.xml +++ b/src/main/resources/mapper/tms/ProjectRecordDao.xml @@ -58,8 +58,6 @@ INNER JOIN tms_project_record r ON r.recordId = c.recordId INNER JOIN tms_experimental_report re ON re.eventId = r.recordId WHERE c.userId = #{userId} - -- 教师端逻辑删除,学生端不做判断 - -- and r.isdel = 0 and projectPermissions = #{projectPermissions} and t.systemId = #{systemId} @@ -87,9 +85,7 @@ LEFT JOIN tms_experimental_teaching tet ON tet.project_id = tpr.projectId LEFT JOIN tms_experimental_report ter ON ter.projectId = tet.id WHERE tpr.userId = #{pro.userid} - and systemId = #{systemId} - AND tpr.isdel >= #{pro.isdel} AND tp.projectPermissions !=0 AND @@ -192,7 +188,6 @@ LEFT JOIN hr_project_management tp ON tpr.projectId = tp.projectId LEFT JOIN tms_experimental_report re ON re.eventId = tpr.recordId WHERE tpr.userId = #{userid} --- 注释掉报错,>=表示是否删除都导出 AND tpr.isdel >= #{isdel} AND tp.projectPermissions = 0 diff --git a/src/main/resources/mapper/tms/StudentDao.xml b/src/main/resources/mapper/tms/StudentDao.xml index 13cea29..df36ec1 100644 --- a/src/main/resources/mapper/tms/StudentDao.xml +++ b/src/main/resources/mapper/tms/StudentDao.xml @@ -93,7 +93,7 @@ WHERE INSERT INTO student ( schoolId, userId, workNumber, roleId, isdel,platformId ) VALUES - ( #{schoolId},#{userId},#{workNumber},#{roleId},#{isdel},#{platformId} + ( 729,#{userId},#{workNumber},#{roleId},#{isdel},#{platformId} )