修改登录 账号同步级线上配置

master
yz 1 month ago
parent 94fd03a36c
commit 8630ad3be5

@ -110,7 +110,7 @@ public class GradeController {
studentScoreWeight.setSummaryOfKnowledgeScore(BigDecimal.valueOf(20)); studentScoreWeight.setSummaryOfKnowledgeScore(BigDecimal.valueOf(20));
studentScoreWeight.setResourceLearningScore(BigDecimal.valueOf(20)); studentScoreWeight.setResourceLearningScore(BigDecimal.valueOf(20));
studentScoreWeight.setLearningAssessmentScore(BigDecimal.valueOf(10)); studentScoreWeight.setLearningAssessmentScore(BigDecimal.valueOf(10));
studentScoreWeight.setExperimentalTrainingScore(BigDecimal.valueOf(10)); studentScoreWeight.setExperimentalTrainingScore(BigDecimal.valueOf(1));
//权重 //权重
studentScoreWeight.setSummaryOfKnowledgeWeight(BigDecimal.valueOf(0.1)); studentScoreWeight.setSummaryOfKnowledgeWeight(BigDecimal.valueOf(0.1));
@ -377,7 +377,7 @@ public class GradeController {
criteria.andNameEqualTo(name); criteria.andNameEqualTo(name);
} }
if (StringUtils.isNotBlank(studentId)) { if (StringUtils.isNotBlank(studentId)) {
criteria.andSchoolIdEqualTo(studentId); criteria.andStudentIdEqualTo(studentId);
} }
if (StringUtils.isNotBlank(classId)) { if (StringUtils.isNotBlank(classId)) {
criteria.andClassIdEqualTo(classId); criteria.andClassIdEqualTo(classId);
@ -892,7 +892,7 @@ public class GradeController {
List<SynthesisPlanClient> planClientList = synthesisPlanClientMapper.selectByExample(synthesisPlanClientExample); List<SynthesisPlanClient> planClientList = synthesisPlanClientMapper.selectByExample(synthesisPlanClientExample);
for (int i = 0; i < planClientList.size(); i++) { for (int i = 0; i < planClientList.size(); i++) {
SynthesisPlanClient client = planClientList.get(0); SynthesisPlanClient client = planClientList.get(i);
String caseid = client.getCaseid(); String caseid = client.getCaseid();
String userid = client.getUserid(); String userid = client.getUserid();
//根据caseId 查询caseInfo表中的manage_money_matters_type字段 如果等于综合规划 则查询com_case表 获取理财类型TypeList 如果不等于综合规划 则获取caseInfo中的manage_money_matters_type作为理财类型Type //根据caseId 查询caseInfo表中的manage_money_matters_type字段 如果等于综合规划 则查询com_case表 获取理财类型TypeList 如果不等于综合规划 则获取caseInfo中的manage_money_matters_type作为理财类型Type
@ -938,6 +938,9 @@ public class GradeController {
SynthesisPlanScoreExample scoreExample = new SynthesisPlanScoreExample(); SynthesisPlanScoreExample scoreExample = new SynthesisPlanScoreExample();
scoreExample.createCriteria().andCaseidEqualTo(caseid).andUseridEqualTo(userid).andManageMoneyMattersTypeEqualTo("财务分析-财务比例分析").andTestCenterEqualTo("客户财务情况分析"); scoreExample.createCriteria().andCaseidEqualTo(caseid).andUseridEqualTo(userid).andManageMoneyMattersTypeEqualTo("财务分析-财务比例分析").andTestCenterEqualTo("客户财务情况分析");
List<SynthesisPlanScore> scoreList = synthesisPlanScoreMapper.selectByExample(scoreExample); List<SynthesisPlanScore> scoreList = synthesisPlanScoreMapper.selectByExample(scoreExample);
if(scoreList.isEmpty()){
continue;
}
SynthesisPlanScore synthesisPlanScore = scoreList.get(0); SynthesisPlanScore synthesisPlanScore = scoreList.get(0);
synthesisPlanScore.setScore(teacherScore); synthesisPlanScore.setScore(teacherScore);
if(teacherScore.compareTo(BigDecimal.ZERO)>0){ if(teacherScore.compareTo(BigDecimal.ZERO)>0){
@ -949,7 +952,7 @@ public class GradeController {
} else if ("现金规划".equals(type)) { } else if ("现金规划".equals(type)) {
CaseCashPlanExample example = new CaseCashPlanExample(); CaseCashPlanExample example = new CaseCashPlanExample();
example.createCriteria().andCaseidEqualTo(caseid).andUserIdEqualTo(userid); example.createCriteria().andCaseidEqualTo(caseid).andUserIdEqualTo(userid);
List<CaseCashPlan> list = caseCashPlanMapper.selectByExample(example); List<CaseCashPlan> list = caseCashPlanMapper.selectByExampleWithBLOBs(example);
//如果不存在 则跳过 //如果不存在 则跳过
if (list.isEmpty()) { if (list.isEmpty()) {
continue; continue;
@ -986,7 +989,7 @@ public class GradeController {
} else if ("生涯规划-教育规划".equals(type)) { } else if ("生涯规划-教育规划".equals(type)) {
CaseLifeEducationPlanExample example = new CaseLifeEducationPlanExample(); CaseLifeEducationPlanExample example = new CaseLifeEducationPlanExample();
example.createCriteria().andCaseidEqualTo(caseid).andUserIdEqualTo(userid); example.createCriteria().andCaseidEqualTo(caseid).andUserIdEqualTo(userid);
List<CaseLifeEducationPlan> list = caseLifeEducationPlanMapper.selectByExample(example); List<CaseLifeEducationPlan> list = caseLifeEducationPlanMapper.selectByExampleWithBLOBs(example);
//如果不存在 则跳过 //如果不存在 则跳过
if (list.isEmpty()) { if (list.isEmpty()) {
continue; continue;
@ -1064,7 +1067,7 @@ public class GradeController {
} else if ("生涯规划-消费规划".equals(type)) { } else if ("生涯规划-消费规划".equals(type)) {
CaseConsumptionPlanExample example = new CaseConsumptionPlanExample(); CaseConsumptionPlanExample example = new CaseConsumptionPlanExample();
example.createCriteria().andCaseIdEqualTo(caseid).andUserIdEqualTo(userid); example.createCriteria().andCaseIdEqualTo(caseid).andUserIdEqualTo(userid);
List<CaseConsumptionPlan> list = caseConsumptionPlanMapper.selectByExample(example); List<CaseConsumptionPlan> list = caseConsumptionPlanMapper.selectByExampleWithBLOBs(example);
//如果不存在 则跳过 //如果不存在 则跳过
if (list.isEmpty()) { if (list.isEmpty()) {
continue; continue;
@ -1142,7 +1145,7 @@ public class GradeController {
} else if ("生涯规划-创业规划".equals(type)) { } else if ("生涯规划-创业规划".equals(type)) {
CaseStartAnUndertakingPlanExample example = new CaseStartAnUndertakingPlanExample(); CaseStartAnUndertakingPlanExample example = new CaseStartAnUndertakingPlanExample();
example.createCriteria().andCaseidEqualTo(caseid).andUserIdEqualTo(userid); example.createCriteria().andCaseidEqualTo(caseid).andUserIdEqualTo(userid);
List<CaseStartAnUndertakingPlan> list = caseStartAnUndertakingPlanMapper.selectByExample(example); List<CaseStartAnUndertakingPlan> list = caseStartAnUndertakingPlanMapper.selectByExampleWithBLOBs(example);
//如果不存在 则跳过 //如果不存在 则跳过
if (list.isEmpty()) { if (list.isEmpty()) {
continue; continue;
@ -1222,7 +1225,7 @@ public class GradeController {
} else if ("生涯规划-退休规划".equals(type)) { } else if ("生涯规划-退休规划".equals(type)) {
CaseRetirementPlanExample example = new CaseRetirementPlanExample(); CaseRetirementPlanExample example = new CaseRetirementPlanExample();
example.createCriteria().andCaseidEqualTo(caseid).andUserIdEqualTo(userid); example.createCriteria().andCaseidEqualTo(caseid).andUserIdEqualTo(userid);
List<CaseRetirementPlan> list = caseRetirementPlanMapper.selectByExample(example); List<CaseRetirementPlan> list = caseRetirementPlanMapper.selectByExampleWithBLOBs(example);
//如果不存在 则跳过 //如果不存在 则跳过
if (list.isEmpty()) { if (list.isEmpty()) {
continue; continue;
@ -1302,7 +1305,7 @@ public class GradeController {
//根据caseid和userId查询case_Financial_Ratios表 //根据caseid和userId查询case_Financial_Ratios表
CaseInsurancePlanExample example = new CaseInsurancePlanExample(); CaseInsurancePlanExample example = new CaseInsurancePlanExample();
example.createCriteria().andCaseidEqualTo(caseid).andUserIdEqualTo(userid); example.createCriteria().andCaseidEqualTo(caseid).andUserIdEqualTo(userid);
List<CaseInsurancePlan> list = caseInsurancePlanMapper.selectByExample(example); List<CaseInsurancePlan> list = caseInsurancePlanMapper.selectByExampleWithBLOBs(example);
//如果不存在 则跳过 //如果不存在 则跳过
if (list.isEmpty()) { if (list.isEmpty()) {
continue; continue;
@ -1343,7 +1346,7 @@ public class GradeController {
//根据caseid和userId查询case_Financial_Ratios表 //根据caseid和userId查询case_Financial_Ratios表
CaseInvestmentPlanExample example = new CaseInvestmentPlanExample(); CaseInvestmentPlanExample example = new CaseInvestmentPlanExample();
example.createCriteria().andCaseIdEqualTo(caseid).andUserIdEqualTo(userid); example.createCriteria().andCaseIdEqualTo(caseid).andUserIdEqualTo(userid);
List<CaseInvestmentPlan> list = caseInvestmentPlanMapper.selectByExample(example); List<CaseInvestmentPlan> list = caseInvestmentPlanMapper.selectByExampleWithBLOBs(example);
//如果不存在 则跳过 //如果不存在 则跳过
if (list.isEmpty()) { if (list.isEmpty()) {
continue; continue;
@ -1381,7 +1384,7 @@ public class GradeController {
//根据caseid和userId查询case_Financial_Ratios表 //根据caseid和userId查询case_Financial_Ratios表
CaseTaxPlanExample example = new CaseTaxPlanExample(); CaseTaxPlanExample example = new CaseTaxPlanExample();
example.createCriteria().andCaseidEqualTo(caseid).andUserIdEqualTo(userid); example.createCriteria().andCaseidEqualTo(caseid).andUserIdEqualTo(userid);
List<CaseTaxPlan> list = caseTaxPlanMapper.selectByExample(example); List<CaseTaxPlan> list = caseTaxPlanMapper.selectByExampleWithBLOBs(example);
//如果不存在 则跳过 //如果不存在 则跳过
if (list.isEmpty()) { if (list.isEmpty()) {
continue; continue;

@ -11,6 +11,7 @@ import com.sztzjy.money_management.entity.dto.TeaClassScoreDto;
import com.sztzjy.money_management.entity.vo.TeaTrendVo; import com.sztzjy.money_management.entity.vo.TeaTrendVo;
import com.sztzjy.money_management.mapper.*; import com.sztzjy.money_management.mapper.*;
import com.sztzjy.money_management.service.ScoreRankService; import com.sztzjy.money_management.service.ScoreRankService;
import com.sztzjy.money_management.service.UserInfoService;
import com.sztzjy.money_management.util.ResultEntity; import com.sztzjy.money_management.util.ResultEntity;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -44,6 +45,8 @@ public class StatisticsController {
StuTheoryRecordMapper stuTheoryRecordMapper; StuTheoryRecordMapper stuTheoryRecordMapper;
@Autowired @Autowired
UserInfoMapper userInfoMapper; UserInfoMapper userInfoMapper;
@Autowired
UserInfoService userInfoService;
//学生端 -我的成绩、有效时长、各模块用时 //学生端 -我的成绩、有效时长、各模块用时
@AnonymousAccess @AnonymousAccess
@ -140,8 +143,8 @@ public class StatisticsController {
@GetMapping("/getTeaTrainingScoreTrend") @GetMapping("/getTeaTrainingScoreTrend")
@ApiOperation("老师端 -班级平均成绩走势") @ApiOperation("老师端 -班级平均成绩走势")
public List<ClassAVGScoreVo> getClassAVGScore(String schoolId) { public List<ClassAVGScoreVo> getClassAVGScore(String schoolId) {
//先根据schoolId查询所有班级 //先根据schoolId查询所有班级
List<String> classNameList = userInfoMapper.selectClassNameBySchoolId(schoolId); List<String> classNameList = userInfoService.getClassNameList(schoolId);
List<ClassAVGScoreVo> returnList = new ArrayList<>(); List<ClassAVGScoreVo> returnList = new ArrayList<>();
for (int i = 0; i < classNameList.size(); i++) { for (int i = 0; i < classNameList.size(); i++) {
//获取第一个班级的平均分和日期 //获取第一个班级的平均分和日期
@ -152,7 +155,7 @@ public class StatisticsController {
List<TeaTrendVo> voList = scoreRankMapper.selectFiveAvgTotalScoreBySchoolIdAndClassName(scoreRank); List<TeaTrendVo> voList = scoreRankMapper.selectFiveAvgTotalScoreBySchoolIdAndClassName(scoreRank);
List<BigDecimal> classAverageScoreList = new ArrayList<>(); List<BigDecimal> classAverageScoreList = new ArrayList<>();
List<String> startTimeList = new ArrayList<>(); List<String> startTimeList = new ArrayList<>();
for (int j = 0; j < voList.size(); j++) { for (int j = voList.size()-1; j >= 0; j--) {
TeaTrendVo teaTrendVo = voList.get(j); TeaTrendVo teaTrendVo = voList.get(j);
classAverageScoreList.add(teaTrendVo.getAvgScore()); classAverageScoreList.add(teaTrendVo.getAvgScore());
startTimeList.add(teaTrendVo.getUpdateDate()); startTimeList.add(teaTrendVo.getUpdateDate());

@ -10,6 +10,7 @@ import com.sztzjy.money_management.entity.UserInfo;
import com.sztzjy.money_management.entity.UserInfoExample; import com.sztzjy.money_management.entity.UserInfoExample;
import com.sztzjy.money_management.entity.zy.ZYUserInfo; import com.sztzjy.money_management.entity.zy.ZYUserInfo;
import com.sztzjy.money_management.mapper.UserInfoMapper; import com.sztzjy.money_management.mapper.UserInfoMapper;
import com.sztzjy.money_management.service.UserInfoService;
import com.sztzjy.money_management.util.ResultEntity; import com.sztzjy.money_management.util.ResultEntity;
import com.sztzjy.money_management.util.RsaUtil; import com.sztzjy.money_management.util.RsaUtil;
import com.sztzjy.money_management.util.TzApi; import com.sztzjy.money_management.util.TzApi;
@ -36,7 +37,8 @@ public class UserController {
private AuthenticationManagerBuilder authenticationManagerBuilder; private AuthenticationManagerBuilder authenticationManagerBuilder;
@Autowired @Autowired
UserInfoMapper userInfoMapper; UserInfoMapper userInfoMapper;
@Autowired
UserInfoService userInfoService;
@PostMapping("/login") @PostMapping("/login")
@ApiOperation("登录接口") @ApiOperation("登录接口")
@ -72,11 +74,13 @@ public class UserController {
UserInfo user = stuUsers.get(0); UserInfo user = stuUsers.get(0);
map.put("name", user.getName()); map.put("name", user.getName());
map.put("username", user.getUsername()); map.put("username", user.getUsername());
map.put("roleId", user.getRoleId()); map.put("roleId", String.valueOf(user.getRoleId()));
map.put("schoolId", user.getSchoolId()); map.put("schoolId", user.getSchoolId());
map.put("classId", user.getClassId()); map.put("classId", user.getClassId());
map.put("userId", user.getUserid()); map.put("userId", user.getUserid());
map.put("token", token); map.put("token", token);
user.setLoginTime(new Date());
userInfoMapper.updateByPrimaryKey(user);
return new ResultEntity(HttpStatus.OK, map); return new ResultEntity(HttpStatus.OK, map);
}catch (Exception e){ }catch (Exception e){
return new ResultEntity(HttpStatus.BAD_REQUEST, "账号不存在"); return new ResultEntity(HttpStatus.BAD_REQUEST, "账号不存在");
@ -95,13 +99,20 @@ public class UserController {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("name", loginResult.getName()); map.put("name", loginResult.getName());
map.put("username", loginResult.getUsername()); map.put("username", loginResult.getUsername());
map.put("roleId", loginResult.getRoleId()); map.put("roleId", String.valueOf(loginResult.getRoleId()));
map.put("schoolId", loginResult.getSchoolId()); map.put("schoolId", loginResult.getSchoolId());
if (StringUtils.isNotBlank(loginResult.getUserId())) { if (StringUtils.isNotBlank(loginResult.getUserId())) {
map.put("classId", loginResult.getClassId()); map.put("classId", loginResult.getClassId());
} }
map.put("userId", loginResult.getUserId()); // map.put("userId", loginResult.getUserId());
map.put("token", token); map.put("token", token);
UserInfoExample stuUserExample = new UserInfoExample();
stuUserExample.createCriteria().andStudentIdEqualTo(loginResult.getUsername());
List<UserInfo> stuUsers = userInfoMapper.selectByExample(stuUserExample);
UserInfo userInfo = stuUsers.get(0);
map.put("userId", userInfo.getUserid());
userInfo.setLoginTime(new Date());
userInfoMapper.updateByPrimaryKey(userInfo);
return new ResultEntity(HttpStatus.OK, map); //todo 从智云登录后将用户添加到本地用户表 return new ResultEntity(HttpStatus.OK, map); //todo 从智云登录后将用户添加到本地用户表
} }
} }
@ -114,31 +125,31 @@ public class UserController {
List<UserInfo> users = new ArrayList<>(); List<UserInfo> users = new ArrayList<>();
for (int i = 0; i < zyUserInfoList.size(); i++) { for (int i = 0; i < zyUserInfoList.size(); i++) {
ZYUserInfo zyUserInfo = zyUserInfoList.get(i); ZYUserInfo zyUserInfo = zyUserInfoList.get(i);
Integer zyUserId = zyUserInfo.getUserId();
String username = zyUserInfo.getUsername(); // studentid String username = zyUserInfo.getUsername(); // studentid
String name = zyUserInfo.getName(); String name = zyUserInfo.getName();
String password = zyUserInfo.getPassword(); String password = zyUserInfo.getPassword();
Integer roleId = zyUserInfo.getRoleId(); //3教师 4学生 Integer roleId = zyUserInfo.getRoleId(); //3教师 4学生
UserInfo userInfo = userInfoMapper.selectByPrimaryKey(String.valueOf(zyUserId)); UserInfoExample userInfoExample = new UserInfoExample();
if (userInfo!=null) { userInfoExample.createCriteria().andUsernameEqualTo(username);
continue; List<UserInfo> userInfos = userInfoMapper.selectByExample(userInfoExample);
if(userInfos.isEmpty() || userInfos==null){
UserInfo stuUser = new UserInfo();
stuUser.setUserid(IdUtil.randomUUID());
stuUser.setStudentId(zyUserInfo.getUsername());
stuUser.setName(name);
stuUser.setUsername(username);
stuUser.setClassId(zyUserInfo.getClassId().toString());
stuUser.setPassword(password);
stuUser.setPhone(zyUserInfo.getPhone());
stuUser.setMajor(zyUserInfo.getMajorName());
stuUser.setRoleId(roleId);
stuUser.setSchoolId(zyUserInfo.getSchoolId().toString());
stuUser.setSchoolName(zyUserInfo.getSchoolName());
stuUser.setCreateTime(new Date());
stuUser.setClassName(zyUserInfo.getClassName());
users.add(stuUser);
} }
UserInfo stuUser = new UserInfo();
stuUser.setUserid(IdUtil.randomUUID());
stuUser.setStudentId(zyUserInfo.getUsername());
stuUser.setName(name);
stuUser.setUsername(username);
stuUser.setClassId(zyUserInfo.getClassId().toString());
stuUser.setPassword(password);
stuUser.setPhone(zyUserInfo.getPhone());
stuUser.setMajor(zyUserInfo.getMajorName());
stuUser.setRoleId(roleId);
stuUser.setSchoolId(zyUserInfo.getSchoolId().toString());
stuUser.setSchoolName(zyUserInfo.getSchoolName());
stuUser.setCreateTime(new Date());
stuUser.setClassName(zyUserInfo.getClassName());
users.add(stuUser);
} }
if (users.isEmpty()) { if (users.isEmpty()) {
return "账号已全部存在"; return "账号已全部存在";
@ -151,14 +162,6 @@ public class UserController {
@ApiOperation("获取班级列表") @ApiOperation("获取班级列表")
@AnonymousAccess @AnonymousAccess
public Map<String,String> getClassList(@RequestParam String schoolId){ public Map<String,String> getClassList(@RequestParam String schoolId){
Map<String,String> map=new HashMap<>(); return userInfoService.getClassMap(schoolId);
UserInfoExample userInfoExample = new UserInfoExample();
userInfoExample.createCriteria().andSchoolIdEqualTo(schoolId).andRoleIdEqualTo(4);
List<UserInfo> userInfos = userInfoMapper.selectByExample(userInfoExample);
for (int i = 0; i < userInfos.size(); i++) {
UserInfo userInfo = userInfos.get(i);
map.put(userInfo.getClassId(),userInfo.getClassName());
}
return map;
} }
} }

@ -51,6 +51,9 @@ public class UserInfo {
@ApiModelProperty("学校名称") @ApiModelProperty("学校名称")
private String schoolName; private String schoolName;
@ApiModelProperty("登录时间")
private Date loginTime;
public String getUserid() { public String getUserid() {
return userid; return userid;
} }
@ -162,4 +165,12 @@ public class UserInfo {
public void setSchoolName(String schoolName) { public void setSchoolName(String schoolName) {
this.schoolName = schoolName == null ? null : schoolName.trim(); this.schoolName = schoolName == null ? null : schoolName.trim();
} }
public Date getLoginTime() {
return loginTime;
}
public void setLoginTime(Date loginTime) {
this.loginTime = loginTime;
}
} }

@ -1064,6 +1064,66 @@ public class UserInfoExample {
addCriterion("school_name not between", value1, value2, "schoolName"); addCriterion("school_name not between", value1, value2, "schoolName");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andLoginTimeIsNull() {
addCriterion("login_time is null");
return (Criteria) this;
}
public Criteria andLoginTimeIsNotNull() {
addCriterion("login_time is not null");
return (Criteria) this;
}
public Criteria andLoginTimeEqualTo(Date value) {
addCriterion("login_time =", value, "loginTime");
return (Criteria) this;
}
public Criteria andLoginTimeNotEqualTo(Date value) {
addCriterion("login_time <>", value, "loginTime");
return (Criteria) this;
}
public Criteria andLoginTimeGreaterThan(Date value) {
addCriterion("login_time >", value, "loginTime");
return (Criteria) this;
}
public Criteria andLoginTimeGreaterThanOrEqualTo(Date value) {
addCriterion("login_time >=", value, "loginTime");
return (Criteria) this;
}
public Criteria andLoginTimeLessThan(Date value) {
addCriterion("login_time <", value, "loginTime");
return (Criteria) this;
}
public Criteria andLoginTimeLessThanOrEqualTo(Date value) {
addCriterion("login_time <=", value, "loginTime");
return (Criteria) this;
}
public Criteria andLoginTimeIn(List<Date> values) {
addCriterion("login_time in", values, "loginTime");
return (Criteria) this;
}
public Criteria andLoginTimeNotIn(List<Date> values) {
addCriterion("login_time not in", values, "loginTime");
return (Criteria) this;
}
public Criteria andLoginTimeBetween(Date value1, Date value2) {
addCriterion("login_time between", value1, value2, "loginTime");
return (Criteria) this;
}
public Criteria andLoginTimeNotBetween(Date value1, Date value2) {
addCriterion("login_time not between", value1, value2, "loginTime");
return (Criteria) this;
}
} }
public static class Criteria extends GeneratedCriteria { public static class Criteria extends GeneratedCriteria {

@ -42,4 +42,7 @@ public interface UserInfoMapper {
@Select("select DISTINCT class_name from userinfo where school_id=#{schoolId}") @Select("select DISTINCT class_name from userinfo where school_id=#{schoolId}")
List<String> selectClassNameBySchoolId(@Param("schoolId") String schoolId); List<String> selectClassNameBySchoolId(@Param("schoolId") String schoolId);
@Select("select DISTINCT class_name from userinfo where school_id=#{schoolId} and login_time is not null and role_id = 4")
List<String> selectClassNameBySchoolIdAndLoginTimeNotNull(String schoolId);
} }

@ -0,0 +1,9 @@
package com.sztzjy.money_management.service;
import java.util.List;
import java.util.Map;
public interface UserInfoService {
Map<String, String> getClassMap(String schoolId);
List<String> getClassNameList(String schoolId);
}

@ -52,7 +52,10 @@ public class ScoreRankServiceImpl implements ScoreRankService {
String schoolId = schoolIdList.get(i); String schoolId = schoolIdList.get(i);
//根据学校ID 获取所有学生userId //根据学校ID 获取所有学生userId
UserInfoExample userInfoExample = new UserInfoExample(); UserInfoExample userInfoExample = new UserInfoExample();
userInfoExample.createCriteria().andSchoolIdEqualTo(schoolId).andRoleIdEqualTo(4); Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.YEAR, -1);
Date oneYearAgo = calendar.getTime();
userInfoExample.createCriteria().andSchoolIdEqualTo(schoolId).andRoleIdEqualTo(4).andLoginTimeBetween(oneYearAgo, new Date()).andLoginTimeIsNotNull();
List<UserInfo> userList = userInfoMapper.selectByExample(userInfoExample); List<UserInfo> userList = userInfoMapper.selectByExample(userInfoExample);
//查询学习成绩权重表 //查询学习成绩权重表
Map<String, BigDecimal> clientWeight = trainingService.getClientWeight(schoolId); //客户案例权重 Map<String, BigDecimal> clientWeight = trainingService.getClientWeight(schoolId); //客户案例权重
@ -111,32 +114,32 @@ public class ScoreRankServiceImpl implements ScoreRankService {
Integer resourceStatus = stuTraining.getResourceLearningCompleteStatus() == null ? 0 : stuTraining.getResourceLearningCompleteStatus(); Integer resourceStatus = stuTraining.getResourceLearningCompleteStatus() == null ? 0 : stuTraining.getResourceLearningCompleteStatus();
Integer learningEvalCompleteStatus = stuTraining.getLearningEvalCompleteStatus() == null ? 9999 : stuTraining.getLearningEvalCompleteStatus(); Integer learningEvalCompleteStatus = stuTraining.getLearningEvalCompleteStatus() == null ? 9999 : stuTraining.getLearningEvalCompleteStatus();
Integer expStatus = stuTraining.getExpTrainingCompleteStatus() == null ? 9999 : stuTraining.getExpTrainingCompleteStatus(); Integer expStatus = stuTraining.getExpTrainingCompleteStatus() == null ? 9999 : stuTraining.getExpTrainingCompleteStatus();
if(knowledgeStatus>5){ if (knowledgeStatus > 5) {
knowledgeStatus=5; knowledgeStatus = 5;
} }
if(resourceStatus>5){ if (resourceStatus > 5) {
resourceStatus=5; resourceStatus = 5;
} }
StudentScoreWeight studentScoreWeight = studentScoreWeightMap.get(stuTraining.getChapterName()); StudentScoreWeight studentScoreWeight = studentScoreWeightMap.get(stuTraining.getChapterName());
BigDecimal summaryScore = studentScoreWeight.getSummaryOfKnowledgeScore().multiply(BigDecimal.valueOf(knowledgeStatus)).multiply(studentScoreWeight.getSummaryOfKnowledgeWeight()); BigDecimal summaryScore = studentScoreWeight.getSummaryOfKnowledgeScore().multiply(BigDecimal.valueOf(knowledgeStatus)).multiply(studentScoreWeight.getSummaryOfKnowledgeWeight());
BigDecimal resourceScore = studentScoreWeight.getResourceLearningScore().multiply(BigDecimal.valueOf(resourceStatus)).multiply(studentScoreWeight.getResourceLearningWeight()); BigDecimal resourceScore = studentScoreWeight.getResourceLearningScore().multiply(BigDecimal.valueOf(resourceStatus)).multiply(studentScoreWeight.getResourceLearningWeight());
BigDecimal learningScore= BigDecimal.valueOf(0); BigDecimal learningScore = BigDecimal.valueOf(0);
BigDecimal experimentalScore= BigDecimal.valueOf(0); BigDecimal experimentalScore = BigDecimal.valueOf(0);
if(learningEvalCompleteStatus!=9999){ if (learningEvalCompleteStatus != 9999) {
if(learningEvalCompleteStatus<=10){ if (learningEvalCompleteStatus <= 10) {
learningScore = BigDecimal.valueOf(100).subtract(studentScoreWeight.getLearningAssessmentScore().multiply(BigDecimal.valueOf(learningEvalCompleteStatus))).multiply(studentScoreWeight.getLearningAssessmentWeight()); learningScore = BigDecimal.valueOf(100).subtract(studentScoreWeight.getLearningAssessmentScore().multiply(BigDecimal.valueOf(learningEvalCompleteStatus))).multiply(studentScoreWeight.getLearningAssessmentWeight());
} }
} }
if(expStatus!=9999){ if (expStatus != 9999) {
if(expStatus<=5){ if (expStatus <= 5) {
experimentalScore = BigDecimal.valueOf(100).subtract(studentScoreWeight.getExperimentalTrainingScore().multiply(BigDecimal.valueOf(expStatus))).multiply(studentScoreWeight.getExperimentalTrainingWeight()); experimentalScore = BigDecimal.valueOf(100).subtract(studentScoreWeight.getExperimentalTrainingScore().multiply(BigDecimal.valueOf(expStatus))).multiply(studentScoreWeight.getExperimentalTrainingWeight());
} }
//财产分配特殊处理 //财产分配特殊处理
if("11".equals(stuTraining.getChapterId())){ if ("11".equals(stuTraining.getChapterId())) {
if(stuTraining.getExpTrainingCompleteStatus().compareTo(100)>0){ if (stuTraining.getExpTrainingCompleteStatus().compareTo(100) > 0) {
stuTraining.setExpTrainingCompleteStatus(100); stuTraining.setExpTrainingCompleteStatus(100);
} }
experimentalScore= BigDecimal.valueOf(stuTraining.getExpTrainingCompleteStatus()).multiply(studentScoreWeight.getExperimentalTrainingWeight()); experimentalScore = BigDecimal.valueOf(stuTraining.getExpTrainingCompleteStatus()).multiply(studentScoreWeight.getExperimentalTrainingWeight());
} }
} }
//计算报告分数 //计算报告分数
@ -144,9 +147,11 @@ public class ScoreRankServiceImpl implements ScoreRankService {
TrainingReportExample trainingReportExample = new TrainingReportExample(); TrainingReportExample trainingReportExample = new TrainingReportExample();
trainingReportExample.createCriteria().andChapterIdEqualTo(chapterId).andUserIdEqualTo(userId); trainingReportExample.createCriteria().andChapterIdEqualTo(chapterId).andUserIdEqualTo(userId);
List<TrainingReport> trainingReports = trainingReportMapper.selectByExample(trainingReportExample); List<TrainingReport> trainingReports = trainingReportMapper.selectByExample(trainingReportExample);
BigDecimal reportScore=BigDecimal.ZERO; BigDecimal reportScore = BigDecimal.ZERO;
if (!trainingReports.isEmpty()) { if (!trainingReports.isEmpty()) {
reportScore=trainingReports.get(0).getTeacherScore().multiply(studentScoreWeight.getReportWeight()); if (trainingReports.get(0).getTeacherScore() != null) {
reportScore = trainingReports.get(0).getTeacherScore().multiply(studentScoreWeight.getReportWeight());
}
} }
BigDecimal sum = summaryScore.add(resourceScore).add(learningScore).add(experimentalScore).add(reportScore); BigDecimal sum = summaryScore.add(resourceScore).add(learningScore).add(experimentalScore).add(reportScore);
if ("风险测评".equals(stuTraining.getChapterName())) { if ("风险测评".equals(stuTraining.getChapterName())) {
@ -198,10 +203,10 @@ public class ScoreRankServiceImpl implements ScoreRankService {
long countCase = synthesisPlanClientMapper.countByExample(synthesisPlanClientExample); long countCase = synthesisPlanClientMapper.countByExample(synthesisPlanClientExample);
scoreRank.setCountCase((int) countCase); scoreRank.setCountCase((int) countCase);
StuSynthesisPlanScoreAndAvgScoreDto dto = trainingService.selectStuSynthesisPlanScoreList(userId,schoolId); StuSynthesisPlanScoreAndAvgScoreDto dto = trainingService.selectStuSynthesisPlanScoreList(userId, schoolId);
if(dto==null){ if (dto == null) {
scoreRank.setZhghScore(BigDecimal.ZERO); scoreRank.setZhghScore(BigDecimal.ZERO);
}else { } else {
scoreRank.setZhghScore(dto.getAvgScore()); scoreRank.setZhghScore(dto.getAvgScore());
} }
@ -335,7 +340,10 @@ public class ScoreRankServiceImpl implements ScoreRankService {
List<ScoreRank> scoreRankList = new ArrayList<>(); List<ScoreRank> scoreRankList = new ArrayList<>();
//根据学校ID 获取所有学生userId //根据学校ID 获取所有学生userId
UserInfoExample userInfoExample = new UserInfoExample(); UserInfoExample userInfoExample = new UserInfoExample();
userInfoExample.createCriteria().andSchoolIdEqualTo(schoolId).andRoleIdEqualTo(4); Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.YEAR, -1);
Date oneYearAgo = calendar.getTime();
userInfoExample.createCriteria().andSchoolIdEqualTo(schoolId).andRoleIdEqualTo(4).andLoginTimeBetween(oneYearAgo, new Date()).andLoginTimeIsNotNull();
List<UserInfo> userList = userInfoMapper.selectByExample(userInfoExample); List<UserInfo> userList = userInfoMapper.selectByExample(userInfoExample);
//查询学习成绩权重表 //查询学习成绩权重表
Map<String, BigDecimal> clientWeight = trainingService.getClientWeight(schoolId); //客户案例权重 Map<String, BigDecimal> clientWeight = trainingService.getClientWeight(schoolId); //客户案例权重
@ -394,32 +402,32 @@ public class ScoreRankServiceImpl implements ScoreRankService {
Integer resourceStatus = stuTraining.getResourceLearningCompleteStatus() == null ? 0 : stuTraining.getResourceLearningCompleteStatus(); Integer resourceStatus = stuTraining.getResourceLearningCompleteStatus() == null ? 0 : stuTraining.getResourceLearningCompleteStatus();
Integer learningEvalCompleteStatus = stuTraining.getLearningEvalCompleteStatus() == null ? 9999 : stuTraining.getLearningEvalCompleteStatus(); Integer learningEvalCompleteStatus = stuTraining.getLearningEvalCompleteStatus() == null ? 9999 : stuTraining.getLearningEvalCompleteStatus();
Integer expStatus = stuTraining.getExpTrainingCompleteStatus() == null ? 9999 : stuTraining.getExpTrainingCompleteStatus(); Integer expStatus = stuTraining.getExpTrainingCompleteStatus() == null ? 9999 : stuTraining.getExpTrainingCompleteStatus();
if(knowledgeStatus>5){ if (knowledgeStatus > 5) {
knowledgeStatus=5; knowledgeStatus = 5;
} }
if(resourceStatus>5){ if (resourceStatus > 5) {
resourceStatus=5; resourceStatus = 5;
} }
StudentScoreWeight studentScoreWeight = studentScoreWeightMap.get(stuTraining.getChapterName()); StudentScoreWeight studentScoreWeight = studentScoreWeightMap.get(stuTraining.getChapterName());
BigDecimal summaryScore = studentScoreWeight.getSummaryOfKnowledgeScore().multiply(BigDecimal.valueOf(knowledgeStatus)).multiply(studentScoreWeight.getSummaryOfKnowledgeWeight()); BigDecimal summaryScore = studentScoreWeight.getSummaryOfKnowledgeScore().multiply(BigDecimal.valueOf(knowledgeStatus)).multiply(studentScoreWeight.getSummaryOfKnowledgeWeight());
BigDecimal resourceScore = studentScoreWeight.getResourceLearningScore().multiply(BigDecimal.valueOf(resourceStatus)).multiply(studentScoreWeight.getResourceLearningWeight()); BigDecimal resourceScore = studentScoreWeight.getResourceLearningScore().multiply(BigDecimal.valueOf(resourceStatus)).multiply(studentScoreWeight.getResourceLearningWeight());
BigDecimal learningScore= BigDecimal.valueOf(0); BigDecimal learningScore = BigDecimal.valueOf(0);
BigDecimal experimentalScore= BigDecimal.valueOf(0); BigDecimal experimentalScore = BigDecimal.valueOf(0);
if(learningEvalCompleteStatus!=9999){ if (learningEvalCompleteStatus != 9999) {
if(learningEvalCompleteStatus<=10){ if (learningEvalCompleteStatus <= 10) {
learningScore = BigDecimal.valueOf(100).subtract(studentScoreWeight.getLearningAssessmentScore().multiply(BigDecimal.valueOf(learningEvalCompleteStatus))).multiply(studentScoreWeight.getLearningAssessmentWeight()); learningScore = BigDecimal.valueOf(100).subtract(studentScoreWeight.getLearningAssessmentScore().multiply(BigDecimal.valueOf(learningEvalCompleteStatus))).multiply(studentScoreWeight.getLearningAssessmentWeight());
} }
} }
if(expStatus!=9999){ if (expStatus != 9999) {
if(expStatus<=5){ if (expStatus <= 5) {
experimentalScore = BigDecimal.valueOf(100).subtract(studentScoreWeight.getExperimentalTrainingScore().multiply(BigDecimal.valueOf(expStatus))).multiply(studentScoreWeight.getExperimentalTrainingWeight()); experimentalScore = BigDecimal.valueOf(100).subtract(studentScoreWeight.getExperimentalTrainingScore().multiply(BigDecimal.valueOf(expStatus))).multiply(studentScoreWeight.getExperimentalTrainingWeight());
} }
//财产分配特殊处理 //财产分配特殊处理
if("11".equals(stuTraining.getChapterId())){ if ("11".equals(stuTraining.getChapterId())) {
if(stuTraining.getExpTrainingCompleteStatus().compareTo(100)>0){ if (stuTraining.getExpTrainingCompleteStatus().compareTo(100) > 0) {
stuTraining.setExpTrainingCompleteStatus(100); stuTraining.setExpTrainingCompleteStatus(100);
} }
experimentalScore= BigDecimal.valueOf(stuTraining.getExpTrainingCompleteStatus()).multiply(studentScoreWeight.getExperimentalTrainingWeight()); experimentalScore = BigDecimal.valueOf(stuTraining.getExpTrainingCompleteStatus()).multiply(studentScoreWeight.getExperimentalTrainingWeight());
} }
} }
//计算报告分数 //计算报告分数
@ -427,9 +435,11 @@ public class ScoreRankServiceImpl implements ScoreRankService {
TrainingReportExample trainingReportExample = new TrainingReportExample(); TrainingReportExample trainingReportExample = new TrainingReportExample();
trainingReportExample.createCriteria().andChapterIdEqualTo(chapterId).andUserIdEqualTo(userId); trainingReportExample.createCriteria().andChapterIdEqualTo(chapterId).andUserIdEqualTo(userId);
List<TrainingReport> trainingReports = trainingReportMapper.selectByExample(trainingReportExample); List<TrainingReport> trainingReports = trainingReportMapper.selectByExample(trainingReportExample);
BigDecimal reportScore=BigDecimal.ZERO; BigDecimal reportScore = BigDecimal.ZERO;
if (!trainingReports.isEmpty()) { if (!trainingReports.isEmpty()) {
reportScore=trainingReports.get(0).getTeacherScore().multiply(studentScoreWeight.getReportWeight()); if (trainingReports.get(0).getTeacherScore() != null) {
reportScore = trainingReports.get(0).getTeacherScore().multiply(studentScoreWeight.getReportWeight());
}
} }
BigDecimal sum = summaryScore.add(resourceScore).add(learningScore).add(experimentalScore).add(reportScore); BigDecimal sum = summaryScore.add(resourceScore).add(learningScore).add(experimentalScore).add(reportScore);
@ -482,10 +492,10 @@ public class ScoreRankServiceImpl implements ScoreRankService {
long countCase = synthesisPlanClientMapper.countByExample(synthesisPlanClientExample); long countCase = synthesisPlanClientMapper.countByExample(synthesisPlanClientExample);
scoreRank.setCountCase((int) countCase); scoreRank.setCountCase((int) countCase);
StuSynthesisPlanScoreAndAvgScoreDto dto = trainingService.selectStuSynthesisPlanScoreList(userId,schoolId); StuSynthesisPlanScoreAndAvgScoreDto dto = trainingService.selectStuSynthesisPlanScoreList(userId, schoolId);
if(dto==null){ if (dto == null) {
scoreRank.setZhghScore(BigDecimal.ZERO); scoreRank.setZhghScore(BigDecimal.ZERO);
}else { } else {
scoreRank.setZhghScore(dto.getAvgScore()); scoreRank.setZhghScore(dto.getAvgScore());
} }

@ -76,7 +76,7 @@ public class TrainingServiceImpl implements TrainingService {
} }
} }
if (expStatus != 9999) { if (expStatus != 9999) {
if (expStatus <= 5) { if (expStatus <= 100) {
experimentalScore = BigDecimal.valueOf(100).subtract(studentScoreWeight.getExperimentalTrainingScore().multiply(BigDecimal.valueOf(expStatus))).multiply(studentScoreWeight.getExperimentalTrainingWeight()); experimentalScore = BigDecimal.valueOf(100).subtract(studentScoreWeight.getExperimentalTrainingScore().multiply(BigDecimal.valueOf(expStatus))).multiply(studentScoreWeight.getExperimentalTrainingWeight());
} }
//财产分配特殊处理 //财产分配特殊处理
@ -117,7 +117,7 @@ public class TrainingServiceImpl implements TrainingService {
studentScoreWeight.setSummaryOfKnowledgeScore(BigDecimal.valueOf(20)); studentScoreWeight.setSummaryOfKnowledgeScore(BigDecimal.valueOf(20));
studentScoreWeight.setResourceLearningScore(BigDecimal.valueOf(20)); studentScoreWeight.setResourceLearningScore(BigDecimal.valueOf(20));
studentScoreWeight.setLearningAssessmentScore(BigDecimal.valueOf(10)); studentScoreWeight.setLearningAssessmentScore(BigDecimal.valueOf(10));
studentScoreWeight.setExperimentalTrainingScore(BigDecimal.valueOf(10)); studentScoreWeight.setExperimentalTrainingScore(BigDecimal.valueOf(1));
//权重 //权重
studentScoreWeight.setSummaryOfKnowledgeWeight(BigDecimal.valueOf(0.1)); studentScoreWeight.setSummaryOfKnowledgeWeight(BigDecimal.valueOf(0.1));

@ -0,0 +1,47 @@
package com.sztzjy.money_management.service.impl;
import com.sztzjy.money_management.entity.UserInfo;
import com.sztzjy.money_management.entity.UserInfoExample;
import com.sztzjy.money_management.mapper.UserInfoMapper;
import com.sztzjy.money_management.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
public class UserInfoServiceImpl implements UserInfoService {
@Autowired
UserInfoMapper userInfoMapper;
@Override
public Map<String, String> getClassMap(String schoolId) {
Map<String,String> map=new HashMap<>();
UserInfoExample userInfoExample = new UserInfoExample();
userInfoExample.createCriteria().andSchoolIdEqualTo(schoolId).andRoleIdEqualTo(4).andLoginTimeIsNotNull();
List<UserInfo> userInfos = userInfoMapper.selectByExample(userInfoExample);
for (int i = 0; i < userInfos.size(); i++) {
UserInfo userInfo = userInfos.get(i);
map.put(userInfo.getClassId(),userInfo.getClassName());
}
return map;
}
@Override
public List<String> getClassNameList(String schoolId) {
// List list=new ArrayList();
// UserInfoExample userInfoExample = new UserInfoExample();
// userInfoExample.createCriteria().andSchoolIdEqualTo(schoolId).andRoleIdEqualTo(4).andLoginTimeIsNotNull();
// userInfoExample.setDistinct(true);
// List<UserInfo> userInfos = userInfoMapper.selectByExample(userInfoExample);
List<String> list = userInfoMapper.selectClassNameBySchoolIdAndLoginTimeNotNull(schoolId);
// for (int i = 0; i < userInfos.size(); i++) {
// UserInfo userInfo = userInfos.get(i);
// list.add(userInfo.getClassName());
// }
return list;
}
}

@ -19,7 +19,7 @@ timer:
enable: false enable: false
swagger: swagger:
enable: false enable: true
tokenHeader: Authorization tokenHeader: Authorization
title: 天择外汇模拟交易 • 接口文档 title: 天择外汇模拟交易 • 接口文档
description: 天择外汇模拟交易WebAPI接口文档 description: 天择外汇模拟交易WebAPI接口文档

@ -45,13 +45,13 @@
<!-- <table tableName="case_cash_plan" domainObjectName="CaseCashPlan"/>--> <!-- <table tableName="case_cash_plan" domainObjectName="CaseCashPlan"/>-->
<!-- <table tableName="case_distribution_of_property" domainObjectName="CaseDistributionOfProperty"/>--> <!-- <table tableName="case_distribution_of_property" domainObjectName="CaseDistributionOfProperty"/>-->
<!-- <table tableName="case_insurance_plan" domainObjectName="CaseInsurancePlan"/>--> <!-- <table tableName="case_insurance_plan" domainObjectName="CaseInsurancePlan"/>-->
<table tableName="case_life_education_plan" domainObjectName="CaseLifeEducationPlan"/> <!-- <table tableName="case_life_education_plan" domainObjectName="CaseLifeEducationPlan"/>-->
<table tableName="case_retirement_plan" domainObjectName="CaseRetirementPlan"/> <!-- <table tableName="case_retirement_plan" domainObjectName="CaseRetirementPlan"/>-->
<!-- <table tableName="case_financial_ratios" domainObjectName="CaseFinancialRatios"/>--> <!-- <table tableName="case_financial_ratios" domainObjectName="CaseFinancialRatios"/>-->
<!-- <table tableName="case_heritage" domainObjectName="CaseHeritage"/>--> <!-- <table tableName="case_heritage" domainObjectName="CaseHeritage"/>-->
<table tableName="case_start_an_undertaking_plan" domainObjectName="CaseStartAnUndertakingPlan"/> <!-- <table tableName="case_start_an_undertaking_plan" domainObjectName="CaseStartAnUndertakingPlan"/>-->
<!-- <table tableName="case_tax_plan" domainObjectName="CaseTaxPlan"/>--> <!-- <table tableName="case_tax_plan" domainObjectName="CaseTaxPlan"/>-->
<table tableName="case_consumption_plan" domainObjectName="CaseConsumptionPlan"/> <!-- <table tableName="case_consumption_plan" domainObjectName="CaseConsumptionPlan"/>-->
<!-- <table tableName="case_cash_flow" domainObjectName="CaseCashFlow"/>--> <!-- <table tableName="case_cash_flow" domainObjectName="CaseCashFlow"/>-->
<!-- <table tableName="case_distribution_of_property_family_records" domainObjectName="CaseDistributionOfPropertyFamilyRecords"/>--> <!-- <table tableName="case_distribution_of_property_family_records" domainObjectName="CaseDistributionOfPropertyFamilyRecords"/>-->
<!-- <table tableName="case_finance_liability" domainObjectName="CaseFinanceLiability"/>--> <!-- <table tableName="case_finance_liability" domainObjectName="CaseFinanceLiability"/>-->
@ -79,7 +79,7 @@
<!-- <table tableName="total_weight" domainObjectName="TotalWeight"/>--> <!-- <table tableName="total_weight" domainObjectName="TotalWeight"/>-->
<!-- <table tableName="training_report" domainObjectName="TrainingReport"/>--> <!-- <table tableName="training_report" domainObjectName="TrainingReport"/>-->
<!-- <table tableName="user_statistics" domainObjectName="UserStatistics"/>--> <!-- <table tableName="user_statistics" domainObjectName="UserStatistics"/>-->
<!-- <table tableName="userinfo" domainObjectName="UserInfo"/>--> <table tableName="userinfo" domainObjectName="UserInfo"/>
<!-- <table tableName="stu_theory_exam" domainObjectName="StuTheoryExam"/>--> <!-- <table tableName="stu_theory_exam" domainObjectName="StuTheoryExam"/>-->
<!-- <table tableName="case_investment_plan" domainObjectName="CaseInvestmentPlan"/>--> <!-- <table tableName="case_investment_plan" domainObjectName="CaseInvestmentPlan"/>-->
<!-- <table tableName="case_investment_plan_bank_productinfo" domainObjectName="CaseInvestmentPlanBankProductInfo"/>--> <!-- <table tableName="case_investment_plan_bank_productinfo" domainObjectName="CaseInvestmentPlanBankProductInfo"/>-->

@ -606,7 +606,7 @@
from score_rank s from score_rank s
where school_id = #{schoolId,jdbcType=VARCHAR} and class_name=#{className,jdbcType=VARCHAR} where school_id = #{schoolId,jdbcType=VARCHAR} and class_name=#{className,jdbcType=VARCHAR}
group BY update_date group BY update_date
order by update_date asc order by update_date desc
LIMIT 5 LIMIT 5
</select> </select>

@ -16,6 +16,7 @@
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="school_id" jdbcType="VARCHAR" property="schoolId" /> <result column="school_id" jdbcType="VARCHAR" property="schoolId" />
<result column="school_name" jdbcType="VARCHAR" property="schoolName" /> <result column="school_name" jdbcType="VARCHAR" property="schoolName" />
<result column="login_time" jdbcType="TIMESTAMP" property="loginTime" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<where> <where>
@ -77,7 +78,7 @@
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
userid, name, student_id, class_id, class_name, username, password, phone, email, userid, name, student_id, class_id, class_name, username, password, phone, email,
major, role_id, create_time, school_id, school_name major, role_id, create_time, school_id, school_name, login_time
</sql> </sql>
<select id="selectByExample" parameterType="com.sztzjy.money_management.entity.UserInfoExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.sztzjy.money_management.entity.UserInfoExample" resultMap="BaseResultMap">
select select
@ -114,12 +115,14 @@
class_id, class_name, username, class_id, class_name, username,
password, phone, email, password, phone, email,
major, role_id, create_time, major, role_id, create_time,
school_id, school_name) school_id, school_name, login_time
)
values (#{userid,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{studentId,jdbcType=VARCHAR}, values (#{userid,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{studentId,jdbcType=VARCHAR},
#{classId,jdbcType=VARCHAR}, #{className,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, #{classId,jdbcType=VARCHAR}, #{className,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR},
#{password,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR},
#{major,jdbcType=VARCHAR}, #{roleId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{major,jdbcType=VARCHAR}, #{roleId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{schoolId,jdbcType=VARCHAR}, #{schoolName,jdbcType=VARCHAR}) #{schoolId,jdbcType=VARCHAR}, #{schoolName,jdbcType=VARCHAR}, #{loginTime,jdbcType=TIMESTAMP}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.sztzjy.money_management.entity.UserInfo"> <insert id="insertSelective" parameterType="com.sztzjy.money_management.entity.UserInfo">
insert into userinfo insert into userinfo
@ -166,6 +169,9 @@
<if test="schoolName != null"> <if test="schoolName != null">
school_name, school_name,
</if> </if>
<if test="loginTime != null">
login_time,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userid != null"> <if test="userid != null">
@ -210,6 +216,9 @@
<if test="schoolName != null"> <if test="schoolName != null">
#{schoolName,jdbcType=VARCHAR}, #{schoolName,jdbcType=VARCHAR},
</if> </if>
<if test="loginTime != null">
#{loginTime,jdbcType=TIMESTAMP},
</if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.sztzjy.money_management.entity.UserInfoExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.sztzjy.money_management.entity.UserInfoExample" resultType="java.lang.Long">
@ -263,6 +272,9 @@
<if test="record.schoolName != null"> <if test="record.schoolName != null">
school_name = #{record.schoolName,jdbcType=VARCHAR}, school_name = #{record.schoolName,jdbcType=VARCHAR},
</if> </if>
<if test="record.loginTime != null">
login_time = #{record.loginTime,jdbcType=TIMESTAMP},
</if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
@ -283,7 +295,8 @@
role_id = #{record.roleId,jdbcType=INTEGER}, role_id = #{record.roleId,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
school_id = #{record.schoolId,jdbcType=VARCHAR}, school_id = #{record.schoolId,jdbcType=VARCHAR},
school_name = #{record.schoolName,jdbcType=VARCHAR} school_name = #{record.schoolName,jdbcType=VARCHAR},
login_time = #{record.loginTime,jdbcType=TIMESTAMP}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
@ -330,6 +343,9 @@
<if test="schoolName != null"> <if test="schoolName != null">
school_name = #{schoolName,jdbcType=VARCHAR}, school_name = #{schoolName,jdbcType=VARCHAR},
</if> </if>
<if test="loginTime != null">
login_time = #{loginTime,jdbcType=TIMESTAMP},
</if>
</set> </set>
where userid = #{userid,jdbcType=VARCHAR} where userid = #{userid,jdbcType=VARCHAR}
</update> </update>
@ -347,10 +363,12 @@
role_id = #{roleId,jdbcType=INTEGER}, role_id = #{roleId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
school_id = #{schoolId,jdbcType=VARCHAR}, school_id = #{schoolId,jdbcType=VARCHAR},
school_name = #{schoolName,jdbcType=VARCHAR} school_name = #{schoolName,jdbcType=VARCHAR},
login_time = #{loginTime,jdbcType=TIMESTAMP}
where userid = #{userid,jdbcType=VARCHAR} where userid = #{userid,jdbcType=VARCHAR}
</update> </update>
<insert id="batchInsertUserInfo" parameterType="java.util.List"> <insert id="batchInsertUserInfo" parameterType="java.util.List">
INSERT INTO userinfo (userid, name, student_id, class_id,class_name, username, password, phone, INSERT INTO userinfo (userid, name, student_id, class_id,class_name, username, password, phone,
email,major, email,major,

Loading…
Cancel
Save