Merge remote-tracking branch 'origin/master'

hehai
shijie 4 years ago
commit 6b266b53b1
  1. 6
      src/main/java/com/msdw/tms/api/SystemSetttingApi.java
  2. 7
      src/main/java/com/msdw/tms/controller/AchievementManagementController.java
  3. 1
      src/main/java/com/msdw/tms/controller/SystemSettingController.java
  4. 2
      src/main/java/com/msdw/tms/controller/UserInfoController.java
  5. 3
      src/main/java/com/msdw/tms/dao/UserInfoDao.java
  6. 1
      src/main/java/com/msdw/tms/service/SystemSetttingService.java
  7. 3
      src/main/java/com/msdw/tms/service/UserInfoService.java
  8. 9
      src/main/java/com/msdw/tms/service/impl/SystemSettingServiceImpl.java
  9. 8
      src/main/java/com/msdw/tms/service/impl/UserInfoServiceImpl.java
  10. 52
      src/main/resources/application-prod.properties
  11. 53
      src/main/resources/application-test.properties
  12. 2
      src/main/resources/application.properties
  13. 5
      src/main/resources/mapper/tms/AchievementManagementDao.xml
  14. 4
      src/main/resources/mapper/tms/UserInfoDao.xml

@ -23,10 +23,10 @@ public interface SystemSetttingApi {
public R queryStaff(StaffVo staffVo); public R queryStaff(StaffVo staffVo);
@ApiOperation(value = "查看员工详情",notes = "查看员工详情") @ApiOperation(value = "查看员工详情",notes = "查看员工详情")
public R querystaffDetail( Integer userId); public R querystaffDetail(Integer userId);
@ApiOperation(value = "编辑员工信息",notes = "编辑员工信息") @ApiOperation(value = "编辑员工信息",notes = "编辑员工信息")
public R updateStaff( StaffVo staffVo); public R updateStaff(StaffVo staffVo);
@ApiOperation(value = "删除员工信息",notes = "删除员工信息") @ApiOperation(value = "删除员工信息",notes = "删除员工信息")
public R deleteStaff(StaffVo staffVo); public R deleteStaff(StaffVo staffVo);
@ -48,6 +48,8 @@ public interface SystemSetttingApi {
@ApiOperation(value = "查询账号信息",notes = "查询账号信息") @ApiOperation(value = "查询账号信息",notes = "查询账号信息")
public R queryAccount(String account,Integer schoolId); public R queryAccount(String account,Integer schoolId);
} }

@ -2,14 +2,15 @@ package com.msdw.tms.controller;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.msdw.tms.api.AchievementManagementApi; import com.msdw.tms.api.AchievementManagementApi;
import com.msdw.tms.common.utils.PageUtils;
import com.msdw.tms.common.utils.R; import com.msdw.tms.common.utils.R;
import com.msdw.tms.entity.*; import com.msdw.tms.entity.ExperimentalReportEntity;
import com.msdw.tms.entity.ProjectRecordEntity;
import com.msdw.tms.entity.ReportEntity;
import com.msdw.tms.entity.ResultsEntity;
import com.msdw.tms.entity.vo.AchievementManagementVO; import com.msdw.tms.entity.vo.AchievementManagementVO;
import com.msdw.tms.entity.vo.ResultsVo; import com.msdw.tms.entity.vo.ResultsVo;
import com.msdw.tms.service.AchievementManagementService; import com.msdw.tms.service.AchievementManagementService;
import com.msdw.tms.service.ProjectRecordService; import com.msdw.tms.service.ProjectRecordService;
import com.msdw.tms.util.ListPageUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;

@ -183,6 +183,7 @@ public class SystemSettingController implements SystemSetttingApi {
return result; return result;
} }
/** /**
* 重置密码 * 重置密码
* @param userId * @param userId

@ -184,7 +184,7 @@ public class UserInfoController implements UserInfoControllerApi {
String password = userInfo.getPassword(); String password = userInfo.getPassword();
//验证账号是否存在 //验证账号是否存在
int num = userInfoService.queryAccountExist(userInfo.getAccount()); int num = userInfoService.queryAccountExist(userInfo.getAccount(),userInfo.getUserId());
if (num >= 1){ if (num >= 1){
return R.error(500,"更新失败,账号不能重复"); return R.error(500,"更新失败,账号不能重复");
} }

@ -5,6 +5,7 @@ import com.msdw.tms.entity.StudentEntity;
import com.msdw.tms.entity.UserInfoEntity; import com.msdw.tms.entity.UserInfoEntity;
import com.msdw.tms.entity.vo.*; import com.msdw.tms.entity.vo.*;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@ -67,5 +68,5 @@ public interface UserInfoDao extends BaseMapper<UserInfoEntity> {
Integer getUserId(String token); Integer getUserId(String token);
Integer queryAccountExist(String account); Integer queryAccountExist(@Param("account") String account,@Param("userId") Integer userId);
} }

@ -40,4 +40,5 @@ public interface SystemSetttingService {
List<Integer> queryUserIdsByGradeId(Integer staffGradeId); List<Integer> queryUserIdsByGradeId(Integer staffGradeId);
List<Integer> queryUserIdsByProfessionalId(Integer staffProfessionalArchitectureId); List<Integer> queryUserIdsByProfessionalId(Integer staffProfessionalArchitectureId);
} }

@ -9,7 +9,6 @@ import com.msdw.tms.entity.vo.StudentVo;
import com.msdw.tms.entity.vo.UserProsonalEntityVo; import com.msdw.tms.entity.vo.UserProsonalEntityVo;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
public interface UserInfoService extends IService<UserInfoEntity> { public interface UserInfoService extends IService<UserInfoEntity> {
@ -50,5 +49,5 @@ public interface UserInfoService extends IService<UserInfoEntity> {
R getUserId(String token); R getUserId(String token);
Integer queryAccountExist(String account); Integer queryAccountExist(String account,Integer userId);
} }

@ -184,19 +184,19 @@ public class SystemSettingServiceImpl implements SystemSetttingService {
if (phone != null && phone != "") { if (phone != null && phone != "") {
List<Integer> resultP = userInfoDao.queryPhone(phone); List<Integer> resultP = userInfoDao.queryPhone(phone);
if (resultP.size() > 0) { if (resultP.size() > 0) {
return R.error(400, "手机号不能重复"); throw new RuntimeException("手机号不能重复");
} }
} }
if (email != null && email != "") { if (email != null && email != "") {
List<Integer> resultE = userInfoDao.queryEmail(email); List<Integer> resultE = userInfoDao.queryEmail(email);
if (resultE.size() > 0) { if (resultE.size() > 0) {
return R.error(400, "手机号不能重复"); throw new RuntimeException("邮箱不能重复");
} }
} }
if (resultA.size() > 0) { if (resultA.size() > 0) {
return R.error(400, "账号不能重复"); throw new RuntimeException("账号不能重复");
} else if (resultW.size() > 0) { } else if (resultW.size() > 0) {
return R.error(400, "工号不能重复"); throw new RuntimeException("工号不能重复");
} }
boolean resultUserInfo = userInfoDao.updateUserInfo(staffVo); boolean resultUserInfo = userInfoDao.updateUserInfo(staffVo);
// String[] split = staffVo.getRoleId().split(","); // String[] split = staffVo.getRoleId().split(",");
@ -760,5 +760,4 @@ public class SystemSettingServiceImpl implements SystemSetttingService {
public List<Integer> queryUserIdsByProfessionalId(Integer staffProfessionalArchitectureId) { public List<Integer> queryUserIdsByProfessionalId(Integer staffProfessionalArchitectureId) {
return systemSetttingDao.queryUserIdsByProfessionalId(staffProfessionalArchitectureId); return systemSetttingDao.queryUserIdsByProfessionalId(staffProfessionalArchitectureId);
} }
} }

@ -11,11 +11,7 @@ import com.msdw.tms.dao.UserDao;
import com.msdw.tms.dao.UserInfoDao; import com.msdw.tms.dao.UserInfoDao;
import com.msdw.tms.entity.StudentEntity; import com.msdw.tms.entity.StudentEntity;
import com.msdw.tms.entity.UserInfoEntity; import com.msdw.tms.entity.UserInfoEntity;
import com.msdw.tms.entity.response.CommonCode;
import com.msdw.tms.entity.response.ResponseResult;
import com.msdw.tms.entity.response.ResultCode;
import com.msdw.tms.entity.vo.CheckVo; import com.msdw.tms.entity.vo.CheckVo;
import com.msdw.tms.entity.vo.StaffVo;
import com.msdw.tms.entity.vo.StudentVo; import com.msdw.tms.entity.vo.StudentVo;
import com.msdw.tms.entity.vo.UserProsonalEntityVo; import com.msdw.tms.entity.vo.UserProsonalEntityVo;
import com.msdw.tms.service.UserInfoService; import com.msdw.tms.service.UserInfoService;
@ -229,7 +225,7 @@ public class UserInfoServiceImpl extends ServiceImpl<UserInfoDao, UserInfoEntity
} }
@Override @Override
public Integer queryAccountExist(String account) { public Integer queryAccountExist(String account,Integer userId) {
return userInfoDao.queryAccountExist(account); return userInfoDao.queryAccountExist(account,userId);
} }
} }

@ -0,0 +1,52 @@
server.port=9090
server.servlet.context-path=/evaluation
#\u6B63\u5F0F\u6570\u636E\u5E93\u8FDE\u63A5
spring.datasource.url=jdbc:mysql://rm-wz90d92p0pf083nxzno.mysql.rds.aliyuncs.com:3306/huoran?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
spring.datasource.username=root
spring.datasource.password=HuoRan@2021
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=
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

@ -0,0 +1,53 @@
server.port=9090
server.servlet.context-path=/evaluation
#\u6D4B\u8BD5\u6570\u636E\u5E93\u8FDE\u63A5
spring.datasource.url=jdbc:mysql://rm-wz9y13wf7u8q8610fwo.mysql.rds.aliyuncs.com:3306/huoran?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
spring.datasource.username=super
spring.datasource.password=huoran888
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
#\u591A\u7EBF\u7A0B\u914D\u7F6E
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=www.liuwanr.cn
spring.redis.password=huoran
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

@ -0,0 +1,2 @@
#\u9009\u62E9\u6307\u5B9A\u73AF\u5883,\u76EE\u524D\u53EA\u6709\u6D4B\u8BD5\u548C\u6B63\u5F0F\u73AF\u5883
spring.profiles.active=prod

@ -418,7 +418,7 @@
WHERE hjp.judgmentPointsId = hsi.judgmentPointsId WHERE hjp.judgmentPointsId = hsi.judgmentPointsId
AND hjp.judgmentPointsId = hec.judgmentPointsId AND hjp.judgmentPointsId = hec.judgmentPointsId
AND p.codeId = hec.codeId AND p.codeId = hec.codeId
AND hec.projectId = hsi.projectId
AND hjp.isdel = 0 AND hjp.isdel = 0
AND hec.recordId = #{recordId} AND hec.recordId = #{recordId}
GROUP BY hec.codeId GROUP BY hec.codeId
@ -597,7 +597,8 @@
AND s.isdel = 0 AND s.isdel = 0
AND u.isdel = 0 AND u.isdel = 0
AND sch.isdel = 0 AND sch.isdel = 0
AND re.isdel = 0; AND re.isdel = 0
order by r.submitTime desc
</select> </select>

@ -204,7 +204,7 @@
<update id="setNUM"> <update id="setNUM">
UPDATE hr_user_info u UPDATE hr_user_info u
SET SET
u.account = '00',u.phone = null u.account = '00',u.phone = null,u.email = null
WHERE userId = #{userId} WHERE userId = #{userId}
</update> </update>
<update id="resetPassword"> <update id="resetPassword">
@ -292,7 +292,7 @@
</select> </select>
<select id="queryAccountExist" resultType="java.lang.Integer"> <select id="queryAccountExist" resultType="java.lang.Integer">
SELECT count(*) FROM hr_user_info where account = #{account} and isdel = 0 SELECT count(*) FROM hr_user_info where account = #{account} and isdel = 0 and userId not in (#{userId})
</select> </select>
</mapper> </mapper>
Loading…
Cancel
Save