提交 8c85b76e 编写于 作者: wuminghao's avatar wuminghao

feature: chc解析题目、题目列表、点赞、取消点赞

上级
/target/
!.mvn/wrapper/maven-wrapper.jar
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
.idea
*.iws
*.iml
*.ipr
/nbproject/private/
/build/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
*.iml
out
gen
dao/src/main/resources/mybatis_generator.properties
target/
target/*
/client/target/
client/target/
client/target/*
/common/target/
common/target/
common/target/*
server/target/
server/target/*
dao/target/
dao/target/*
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.DS_Store
/.idea/
*.iws
*.iml
*.ipr
*.bak
# IntelliJ
/out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
LOG_PATH_IS_UNDEFINED/
/LOG_PATH_IS_UNDEFINED/
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.pica.cloud.online.exam</groupId>
<artifactId>pica-cloud-analysis</artifactId>
<version>1.0.0</version>
</parent>
<groupId>com.pica.cloud.online.exam</groupId>
<artifactId>pica-cloud-analysis-client</artifactId>
<name>pica-cloud-analysis-client</name>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<java.version>1.8</java.version>
</properties>
<distributionManagement>
<repository>
<id>nexus</id>
<name>Pica 3rdParty Repository</name>
<url>http://192.168.110.42:8082/repository/pica-3rdParty/</url>
</repository>
</distributionManagement>
<build>
<finalName>pica-cloud-analysis-client</finalName>
</build>
</project>
package com.pica.cloud.online.exam.server.client;
public class App
{
public static void main( String[] args )
{
}
}
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.pica.cloud.online.exam</groupId>
<artifactId>pica-cloud-analysis</artifactId>
<version>1.0.0</version>
</parent>
<groupId>com.pica.cloud.online.exam</groupId>
<artifactId>pica-cloud-analysis-common</artifactId>
<name>pica-cloud-analysis-common</name>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<java.version>1.8</java.version>
</properties>
<distributionManagement>
<repository>
<id>nexus</id>
<name>Pica 3rdParty Repository</name>
<url>http://192.168.110.42:8082/repository/pica-3rdParty/</url>
</repository>
</distributionManagement>
<build>
<finalName>pica-cloud-analysis-common</finalName>
</build>
</project>
package com.pica.cloud.online.exam.analysis.common;
import com.alibaba.fastjson.JSON;
import com.pica.cloud.foundation.redis.RedisClient;
import com.pica.cloud.foundation.utils.entity.PICAUser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Map;
/**
* @Auther wangyongbo
* @Date 2018/6/8 下午7:10
*/
public class CommonUtils {
private static Logger logger = LoggerFactory.getLogger(CommonUtils.class);
/**
* @param map
* @return
*/
public static PICAUser getUser(Map<String, String> map) {
if (map.isEmpty()) {
return null;
}
return JSON.parseObject(JSON.toJSONString(map), PICAUser.class);
}
public static PICAUser getUserByToken(RedisClient client, String token) {
PICAUser picaUser = null;
try {
picaUser = CommonUtils.getUser(client.getToken(token));
} catch (Exception e) {
logger.error("根据token获取user失败:" + token);
}
return picaUser;
}
}
package com.pica.cloud.online.exam.analysis.common;
import java.util.List;
/**
* 分页包装类
* @author andong
* @create 2018/7/5
*/
public class Page<T> {
private int pageNo;
private int pageSize;
private int totalCount;
private int totalPage;
private List<T> dataList;
public Page() {
}
public Page(int pageNo, int pageSize, int totalCount, int totalPage, List<T> dataList) {
this.pageNo = pageNo;
this.pageSize = pageSize;
this.totalCount = totalCount;
this.totalPage = totalPage;
this.dataList = dataList;
}
public int getPageNo() {
return pageNo;
}
public void setPageNo(int pageNo) {
this.pageNo = pageNo;
}
public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getTotalCount() {
return totalCount;
}
public void setTotalCount(int totalCount) {
this.totalCount = totalCount;
}
public int getTotalPage() {
return totalPage;
}
public void setTotalPage(int totalPage) {
this.totalPage = totalPage;
}
public List<T> getDataList() {
return dataList;
}
public void setDataList(List<T> dataList) {
this.dataList = dataList;
}
}
package com.pica.cloud.online.exam.analysis.common.constants;
import org.omg.CORBA.INTERNAL;
/**
* @author wuminghao
* @date 2018/8/17 16:28
*/
public class CommonConstants {
/**
* 题型配置 1-单选 2-多选
*/
public static final Integer QUESTION_TYPE_1 = 1;
public static final Integer QUESTION_TYPE_2 = 2;
/**
* 1未认证,2认证中,3认证通过,4认证不通过,5验证码认证,6 重新认证中,7 重新认证失败
*/
public static final Integer DOCTOR_STATUS_1 = 1;
public static final Integer DOCTOR_STATUS_2 = 2;
public static final Integer DOCTOR_STATUS_3 = 3;
public static final Integer DOCTOR_STATUS_4 = 4;
public static final Integer DOCTOR_STATUS_5 = 5;
public static final Integer DOCTOR_STATUS_6 = 6;
public static final Integer DOCTOR_STATUS_7 = 7;
}
package com.pica.cloud.online.exam.analysis.common.dto;
/**
* 活动的轮dto
* @author wuminghao
* @date 2018/8/16 8:55
*/
public class AnalysisRoundDto {
private Integer roundId;
private Integer analysisId;
private String name;
private String intro;
private String startTime;
private String endTime;
private Byte seqNo;
private Integer published;
public Integer getRoundId() {
return roundId;
}
public void setRoundId(Integer roundId) {
this.roundId = roundId;
}
public Integer getAnalysisId() {
return analysisId;
}
public void setAnalysisId(Integer analysisId) {
this.analysisId = analysisId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getIntro() {
return intro;
}
public void setIntro(String intro) {
this.intro = intro;
}
public String getStartTime() {
return startTime;
}
public void setStartTime(String startTime) {
this.startTime = startTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
public Byte getSeqNo() {
return seqNo;
}
public void setSeqNo(Byte seqNo) {
this.seqNo = seqNo;
}
public Integer getPublished() {
return published;
}
public void setPublished(Integer published) {
this.published = published;
}
}
package com.pica.cloud.online.exam.analysis.common.dto;
import java.util.List;
/**
* 活动首页
* @author wuminghao
* @date 2018/8/15 18:15
*/
public class CHCAnalysisDto {
private Integer id;
private String name;
private String mainTitle;
private String subTitle;
private String intro;
private String startTime;
private String endTime;
/**
* 活动logo图片
*/
private String logoUrl;
/**
* 奖品图片
*/
private String prizeUrl;
/**
* 参加人员范围
*/
private String authUser;
/**
* 评选规则
*/
private String rule;
private List<AnalysisRoundDto> roundList;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getMainTitle() {
return mainTitle;
}
public void setMainTitle(String mainTitle) {
this.mainTitle = mainTitle;
}
public String getSubTitle() {
return subTitle;
}
public void setSubTitle(String subTitle) {
this.subTitle = subTitle;
}
public String getIntro() {
return intro;
}
public void setIntro(String intro) {
this.intro = intro;
}
public String getStartTime() {
return startTime;
}
public void setStartTime(String startTime) {
this.startTime = startTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
public List<AnalysisRoundDto> getRoundList() {
return roundList;
}
public void setRoundList(List<AnalysisRoundDto> roundList) {
this.roundList = roundList;
}
public String getLogoUrl() {
return logoUrl;
}
public void setLogoUrl(String logoUrl) {
this.logoUrl = logoUrl;
}
public String getPrizeUrl() {
return prizeUrl;
}
public void setPrizeUrl(String prizeUrl) {
this.prizeUrl = prizeUrl;
}
public String getAuthUser() {
return authUser;
}
public void setAuthUser(String authUser) {
this.authUser = authUser;
}
public String getRule() {
return rule;
}
public void setRule(String rule) {
this.rule = rule;
}
}
package com.pica.cloud.online.exam.analysis.common.dto;
import java.util.List;
/**
* 题目dto
* @author wuminghao
* @date 2018/8/15 18:15
*/
public class ExamTitleDto {
private Integer examTitleId;
/**
* 题目序号
*/
private Integer seqNo;
/**
* 题型 1: 单选 2: 多选
*/
private Integer type;
/**
* 题目
*/
private String question;
/**
* 选项
*/
private List<String> config;
/**
* 答案
*/
private String answer;
/**
* 答案序号
*/
private String answerIdx;
/**
* 错误率,例如"56%"
*/
private String errorRate;
/**
* 点赞人数
*/
private Integer starCount;
/**
* 回复数
*/
private Integer replyCount;
public Integer getExamTitleId() {
return examTitleId;
}
public void setExamTitleId(Integer examTitleId) {
this.examTitleId = examTitleId;
}
public Integer getSeqNo() {
return seqNo;
}
public void setSeqNo(Integer seqNo) {
this.seqNo = seqNo;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public String getQuestion() {
return question;
}
public void setQuestion(String question) {
this.question = question;
}
public List<String> getConfig() {
return config;
}
public void setConfig(List<String> config) {
this.config = config;
}
public String getAnswer() {
return answer;
}
public void setAnswer(String answer) {
this.answer = answer;
}
public String getAnswerIdx() {
return answerIdx;
}
public void setAnswerIdx(String answerIdx) {
this.answerIdx = answerIdx;
}
public String getErrorRate() {
return errorRate;
}
public void setErrorRate(String errorRate) {
this.errorRate = errorRate;
}
public Integer getStarCount() {
return starCount;
}
public void setStarCount(Integer starCount) {
this.starCount = starCount;
}
public Integer getReplyCount() {
return replyCount;
}
public void setReplyCount(Integer replyCount) {
this.replyCount = replyCount;
}
}
package com.pica.cloud.online.exam.analysis.common.dto;
/**
* 查看回复详情
* @author wuminghao
* @date 2018/8/17 17:05
*/
public class ExamTitleReplyDetailDto {
private Integer analysisId;
private Integer roundId;
private ExamTitleDto examTitle;
private ReplyDto reply;
public Integer getAnalysisId() {
return analysisId;
}
public void setAnalysisId(Integer analysisId) {
this.analysisId = analysisId;
}
public Integer getRoundId() {
return roundId;
}
public void setRoundId(Integer roundId) {
this.roundId = roundId;
}
public ExamTitleDto getExamTitle() {
return examTitle;
}
public void setExamTitle(ExamTitleDto examTitle) {
this.examTitle = examTitle;
}
public ReplyDto getReply() {
return reply;
}
public void setReply(ReplyDto reply) {
this.reply = reply;
}
}
package com.pica.cloud.online.exam.analysis.common.dto;
import java.util.List;
/**
* 题目- 回复dto
* @author wuminghao
* @date 2018/8/16 9:50
*/
public class ExamTitleReplyDto {
private Integer analysisId;
private Integer roundId;
private ExamTitleDto examTitle;
private List<ReplyDto> replyList;
public Integer getAnalysisId() {
return analysisId;
}
public void setAnalysisId(Integer analysisId) {
this.analysisId = analysisId;
}
public Integer getRoundId() {
return roundId;
}
public void setRoundId(Integer roundId) {
this.roundId = roundId;
}
public ExamTitleDto getExamTitle() {
return examTitle;
}
public void setExamTitle(ExamTitleDto examTitle) {
this.examTitle = examTitle;
}
public List<ReplyDto> getReplyList() {
return replyList;
}
public void setReplyList(List<ReplyDto> replyList) {
this.replyList = replyList;
}
}
package com.pica.cloud.online.exam.analysis.common.dto;
/**
* 回复dto
* @author wuminghao
* @date 2018/8/15 18:15
*/
public class ReplyDto {
private Integer replyId;
private Integer seqNo;
private Integer userId;
private String userAvatarImageUrl;
private String userName;
private String postTitle;
private String hospital;
private String content;
private String replayTime;
/**
* atd的用户id
*/
private Integer replayAtUserId;
/**
* at的用户名
*/
private String replayAtUserName;
/**
* at的用户回复内容
*/
private String replyAtContent;
/**
* 点赞数
*/
private Integer starCount;
/**
* 我是否已点赞,0: 否 1: 是
*/
private Integer status;
public Integer getReplyId() {
return replyId;
}
public void setReplyId(Integer replyId) {
this.replyId = replyId;
}
public Integer getSeqNo() {
return seqNo;
}
public void setSeqNo(Integer seqNo) {
this.seqNo = seqNo;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getUserAvatarImageUrl() {
return userAvatarImageUrl;
}
public void setUserAvatarImageUrl(String userAvatarImageUrl) {
this.userAvatarImageUrl = userAvatarImageUrl;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPostTitle() {
return postTitle;
}
public void setPostTitle(String postTitle) {
this.postTitle = postTitle;
}
public String getHospital() {
return hospital;
}
public void setHospital(String hospital) {
this.hospital = hospital;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getReplayTime() {
return replayTime;
}
public void setReplayTime(String replayTime) {
this.replayTime = replayTime;
}
public Integer getReplayAtUserId() {
return replayAtUserId;
}
public void setReplayAtUserId(Integer replayAtUserId) {
this.replayAtUserId = replayAtUserId;
}
public String getReplayAtUserName() {
return replayAtUserName;
}
public void setReplayAtUserName(String replayAtUserName) {
this.replayAtUserName = replayAtUserName;
}
public String getReplyAtContent() {
return replyAtContent;
}
public void setReplyAtContent(String replyAtContent) {
this.replyAtContent = replyAtContent;
}
public Integer getStarCount() {
return starCount;
}
public void setStarCount(Integer starCount) {
this.starCount = starCount;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
}
package com.pica.cloud.online.exam.analysis.common.dto;
import java.util.List;
/**
* 轮下的题目dto
* @author wuminghao
* @date 2018/8/16 9:22
*/
public class RoundExamTitleDto {
private Integer analysisId;
private Integer roundId;
private String startTime;
private String endTime;
private Integer totalCount;
private Integer published;
List<ExamTitleDto> examTitleList;
public Integer getAnalysisId() {
return analysisId;
}
public void setAnalysisId(Integer analysisId) {
this.analysisId = analysisId;
}
public Integer getRoundId() {
return roundId;
}
public void setRoundId(Integer roundId) {
this.roundId = roundId;
}
public String getStartTime() {
return startTime;
}
public void setStartTime(String startTime) {
this.startTime = startTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
public Integer getTotalCount() {
return totalCount;
}
public void setTotalCount(Integer totalCount) {
this.totalCount = totalCount;
}
public Integer getPublished() {
return published;
}
public void setPublished(Integer published) {
this.published = published;
}
public List<ExamTitleDto> getExamTitleList() {
return examTitleList;
}
public void setExamTitleList(List<ExamTitleDto> examTitleList) {
this.examTitleList = examTitleList;
}
}
package com.pica.cloud.online.exam.analysis.common.req;
/**
* @author wuminghao
* @date 2018/8/16 17:23
*/
public class StarReplyReq {
private Integer analysisId;
private Integer roundId;
private Integer replyId;
public Integer getAnalysisId() {
return analysisId;
}
public void setAnalysisId(Integer analysisId) {
this.analysisId = analysisId;
}
public Integer getRoundId() {
return roundId;
}
public void setRoundId(Integer roundId) {
this.roundId = roundId;
}
public Integer getReplyId() {
return replyId;
}
public void setReplyId(Integer replyId) {
this.replyId = replyId;
}
}
\ No newline at end of file
package com.pica.cloud.online.exam.analysis.common.util;
import com.pica.cloud.foundation.entity.PicaResultCode;
import com.pica.cloud.foundation.entity.PicaResponse;
/**
* 封装返回参数工具类
* @author andong
* @create 2018/7/4
*/
public class ReturnUtil {
//生成返回信息
public static <T> PicaResponse<T> getPicaResponse(PicaResultCode picaResultCode) {
PicaResponse.Builder<T> builder = new PicaResponse.Builder<>();
return builder.setCode(picaResultCode.code()).setMessage(picaResultCode.message()).build();
}
//生成返回信息
public static <T> PicaResponse<T> getPicaResponse(String code, String message) {
PicaResponse.Builder<T> builder = new PicaResponse.Builder<>();
return builder.setCode(code).setMessage(message).build();
}
//生成返回信息
public static <T> PicaResponse<T> getPicaResponse(PicaResultCode picaResultCode, T data) {
PicaResponse.Builder<T> builder = new PicaResponse.Builder<>();
return builder.setCode(picaResultCode.code()).setMessage(picaResultCode.message()).setData(data).build();
}
//生成返回信息
public static <T> PicaResponse<T> getPicaResponse(String code, String message, T data) {
PicaResponse.Builder<T> builder = new PicaResponse.Builder<>();
return builder.setCode(code).setMessage(message).setData(data).build();
}
}
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.pica.cloud.online.exam</groupId>
<artifactId>pica-cloud-analysis</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
<name>pica-cloud-analysis</name>
<dependencies>
<dependency>
<groupId>com.pica.cloud.foundation</groupId>
<artifactId>pica-cloud-utils</artifactId>
<version>1.0.5-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<modules>
<module>server</module>
<module>common</module>
<module>client</module>
</modules>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.pica.cloud.online.exam</groupId>
<artifactId>pica-cloud-analysis</artifactId>
<version>1.0.0</version>
</parent>
<groupId>com.pica.cloud.online.exam</groupId>
<artifactId>pica-cloud-analysis-server</artifactId>
<name>pica-cloud-analysis-server</name>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<java.version>1.8</java.version>
<spring-cloud.version>Edgware.SR4</spring-cloud.version>
<spring-boot.version>1.5.14.RELEASE</spring-boot.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-feign</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.pica.cloud.foundation</groupId>
<artifactId>pica-cloud-service-starter</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>com.pica.cloud.foundation</groupId>
<artifactId>pica-cloud-entity</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>com.pica.cloud.foundation</groupId>
<artifactId>pica-cloud-redis</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>com.pica.cloud.foundation</groupId>
<artifactId>pica-cloud-utils</artifactId>
<version>1.0.7-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.39</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-zipkin-stream</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
</dependency>
<dependency>
<groupId>com.pica.cloud.online.exam</groupId>
<artifactId>pica-cloud-analysis-common</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.pica.cloud.foundation</groupId>
<artifactId>pica-cloud-utils</artifactId>
<version>1.0.6-SNAPSHOT</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<repositories>
<repository>
<id>nexus</id>
<url>http://192.168.110.42:8082/repository/maven-public/</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>nexus</id>
<url>http://192.168.110.42:8082/repository/maven-public/</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
<build>
<finalName>pica-cloud-analysis-server</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.5</version>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.39</version>
</dependency>
<dependency>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-core</artifactId>
<version>1.3.2</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>Generate MyBatis Artifacts</id>
<phase>package</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<verbose>true</verbose>
<overwrite>true</overwrite>
<configurationFile>src/main/resources/mybatis-generator.xml</configurationFile>
</configuration>
</plugin>
</plugins>
</build>
</project>
package com.pica.cloud.online.exam.analysis.server;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableCircuitBreaker
@SpringBootApplication
@EnableDiscoveryClient
@EnableSwagger2
@EnableFeignClients
@MapperScan("com.pica.cloud.online.exam.analysis.server.mapper")
public class App {
public static void main( String[] args )
{
SpringApplication.run(App.class, args);
}
}
package com.pica.cloud.online.exam.analysis.server.client;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
/**
* CONFIG-SERVER: 服务名称
* 服务名称可以从eureka(http://192.168.110.120:7891/)上获得
*/
@FeignClient(value="CONFIG-SERVER")
public interface IConfigServiceClient {
/**
* 被调用服务的签名
*
* 注意,定义此接口时,@RequestParam("xxx")和@ReqeustHead("xxx")必须写value,
* 不同于springmvc自动根据参数名作为默认值,feign必须指定这个参数对应哪个服务提供端的参数
*/
@RequestMapping(value = "/beans", method = RequestMethod.GET)
String beans();
}
package com.pica.cloud.online.exam.analysis.server.client.impl;
import org.springframework.stereotype.Component;
import com.pica.cloud.online.exam.analysis.server.client.IConfigServiceClient;
@Component
public class ConfigServerClient implements IConfigServiceClient {
@Override
public String beans() {
return "Get bean failed!";
}
}
package com.pica.cloud.online.exam.analysis.server.configuration;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.pica.cloud.foundation.redis.RedisClient;
@Configuration
@RefreshScope
public class BeanConfiguration {
@Value("${spring.redis.config}")
private String configStr;
@Bean
public RedisClient redisClient() {
System.out.println(configStr);
return new RedisClient(configStr);
}
}
package com.pica.cloud.online.exam.analysis.server.configuration;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;
@Configuration
@RefreshScope
public class PropertiesConfiguration {
@Value("${app.foundation.token.user.expire}")
private String userExpire;
@Value("${app.foundation.token.guest.expire}")
private String guestExpire;
public String getUserExpire() {
return userExpire;
}
public void setUserExpire(String userExpire) {
this.userExpire = userExpire;
}
public String getGuestExpire() {
return guestExpire;
}
public void setGuestExpire(String guestExpire) {
this.guestExpire = guestExpire;
}
@Override
public String toString() {
return "PropertiesConfiguration{" +
"userExpire='" + userExpire + '\'' +
", guestExpire='" + guestExpire + '\'' +
'}';
}
}
package com.pica.cloud.online.exam.analysis.server.controller;
import com.pica.cloud.foundation.entity.PicaResponse;
import com.pica.cloud.foundation.entity.PicaResultCode;
import com.pica.cloud.foundation.redis.RedisClient;
import com.pica.cloud.foundation.utils.entity.PICAUser;
import com.pica.cloud.online.exam.analysis.common.CommonUtils;
import com.pica.cloud.online.exam.analysis.common.constants.CommonConstants;
import com.pica.cloud.online.exam.analysis.common.dto.*;
import com.pica.cloud.online.exam.analysis.common.util.ReturnUtil;
import com.pica.cloud.online.exam.analysis.server.client.IConfigServiceClient;
import com.pica.cloud.online.exam.analysis.server.configuration.PropertiesConfiguration;
import com.pica.cloud.online.exam.analysis.server.entity.*;
import com.pica.cloud.online.exam.analysis.server.service.CHCAnalysisService;
import com.pica.cloud.online.exam.analysis.server.service.DoctorService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* @author wuminghao
* @date 2018/8/16 18:10
*/
@RestController
@RequestMapping("/analysis")
@Api(value = "题目分析接口", description = "查看活动及详情,用户点赞、医生回复")
public class AnalysisController {
@Autowired
private RedisClient redisClient;
@Autowired
private PropertiesConfiguration properties;
@Autowired
private LoadBalancerClient slb;
@Autowired
private IConfigServiceClient client;
@Autowired
private CHCAnalysisService analysisService;
@Autowired
private DoctorService doctorService;
@ApiOperation(value = "获取活动详情", response = PicaResponse.class)
@RequestMapping(value = "/activityDetail", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
public PicaResponse<CHCAnalysisDto> getActivityDetail(@RequestParam(required = false) Integer id) {
PicaResponse.Builder<CHCAnalysisDto> builder = new PicaResponse.Builder<>();
/**
* 如果不传活动id进来,活动id就用1
*/
id = (id == null ? 1 : id);
try {
CHCAnalysisDto analysisDto = analysisService.getCHCAnalysisById(id);
List<AnalysisRoundDto> roundList = analysisService.getRoundListByAnalysisId(id);
analysisDto.setRoundList(roundList);
builder.setData(analysisDto);
} catch (Exception e) {
e.printStackTrace();
return ReturnUtil.getPicaResponse(PicaResultCode.SYSTEM_INNER_ERROR);
}
return builder.build();
}
@ApiOperation(value = "获取某一轮的题目", response = PicaResponse.class)
@RequestMapping(value = "/roundDetail/{roundId}", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
public PicaResponse<RoundExamTitleDto> getRoundDetail(@PathVariable("roundId") Integer roundId) {
PicaResponse.Builder<RoundExamTitleDto> builder = new PicaResponse.Builder<>();
try {
RoundExamTitleDto roundExamTitleDto = analysisService.getRoundById(roundId);
List<ExamTitleDto> examTitleDtoList = analysisService.getExamTitleListByRoundId(roundId);
roundExamTitleDto.setExamTitleList(examTitleDtoList);
builder.setData(roundExamTitleDto);
} catch (Exception e) {
e.printStackTrace();
return ReturnUtil.getPicaResponse(PicaResultCode.SYSTEM_INNER_ERROR);
}
return builder.build();
}
@ApiOperation(value = "获取某一道题目的回复列表", response = PicaResponse.class)
@RequestMapping(value = "/replyList/{examTitleId}", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
public PicaResponse<ExamTitleReplyDto> getReplyList(@PathVariable("examTitleId") Integer examTitleId,
@RequestParam String token) {
if (token == null) {
return ReturnUtil.getPicaResponse(PicaResultCode.SYSTEM_NO_TOKEN);
}
PICAUser user = CommonUtils.getUserByToken(redisClient, token);
if (user == null) {
return ReturnUtil.getPicaResponse(PicaResultCode.SYSTEM_INVALID_TOKEN);
}
PicaResponse.Builder<ExamTitleReplyDto> builder = new PicaResponse.Builder<>();
try {
AnalysisRoundExamTitle analysisRoundExamTitle = analysisService.getAnanlysisRoundExamTitleById(examTitleId);
ExamTitleReplyDto examTitleReplyDto = new ExamTitleReplyDto();
ExamTitleDto examTitleDto = analysisService.getExamTitleDtoById(examTitleId);
List<ReplyDto> replyDtoList = analysisService.getReplyListDtoByExamTitleId(examTitleId, user.getId());
examTitleReplyDto.setAnalysisId(analysisRoundExamTitle.getAnalysisId());
examTitleReplyDto.setRoundId(analysisRoundExamTitle.getRoundId());
examTitleReplyDto.setExamTitle(examTitleDto);
examTitleReplyDto.setReplyList(replyDtoList);
builder.setData(examTitleReplyDto);
} catch (Exception e) {
e.printStackTrace();
return ReturnUtil.getPicaResponse(PicaResultCode.SYSTEM_INNER_ERROR);
}
return builder.build();
}
@ApiOperation(value = "查看回复详情", response = PicaResponse.class)
@RequestMapping(value = "/replyDetail/{replyId}", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
public PicaResponse<ExamTitleReplyDetailDto> getReplyDetail(@PathVariable("replyId") Integer replyId,
@RequestParam String token) {
if (token == null) {
return ReturnUtil.getPicaResponse(PicaResultCode.SYSTEM_NO_TOKEN);
}
PICAUser user = CommonUtils.getUserByToken(redisClient, token);
if (user == null) {
return ReturnUtil.getPicaResponse(PicaResultCode.SYSTEM_INVALID_TOKEN);
}
PicaResponse.Builder<ExamTitleReplyDetailDto> builder = new PicaResponse.Builder<>();
try {
ExamTitleReplyDetailDto examTitleReplyDetailDto = new ExamTitleReplyDetailDto();
Reply reply = analysisService.getReplyById(replyId);
AnalysisRoundExamTitle analysisRoundExamTitle = analysisService.getAnanlysisRoundExamTitleById(reply.getAnalysisRoundExamTitleId());
ExamTitleDto examTitleDto = analysisService.getExamTitleDtoById(reply.getAnalysisRoundExamTitleId());
ReplyDto replyDto = analysisService.getReplyDtoByReply(reply, user.getId());
examTitleReplyDetailDto.setAnalysisId(analysisRoundExamTitle.getAnalysisId());
examTitleReplyDetailDto.setRoundId(analysisRoundExamTitle.getRoundId());
examTitleReplyDetailDto.setExamTitle(examTitleDto);
examTitleReplyDetailDto.setReply(replyDto);
builder.setData(examTitleReplyDetailDto);
} catch (Exception e) {
e.printStackTrace();
return ReturnUtil.getPicaResponse(PicaResultCode.SYSTEM_INNER_ERROR);
}
return builder.build();
}
@ApiOperation(value = "点赞", response = PicaResponse.class)
@RequestMapping(value = "/starReply/{replyId}/analysis/{analysisId}/round/{roundId}/examTitle/{examTitleId}", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
public PicaResponse starReply(@PathVariable("analysisId") Integer analysisId, @PathVariable("roundId") Integer roundId,
@PathVariable("examTitleId") Integer examTitleId, @PathVariable("replyId") Integer replyId,
@RequestParam String token) {
if (token == null) {
return ReturnUtil.getPicaResponse(PicaResultCode.SYSTEM_NO_TOKEN);
}
PICAUser user = CommonUtils.getUserByToken(redisClient, token);
if (user == null) {
return ReturnUtil.getPicaResponse(PicaResultCode.SYSTEM_INVALID_TOKEN);
}
/*Doctor doctor = doctorService.getDoctorById(user.getId());
*//**
* 未认证用户直接返回
*//*
if (!doctor.getStatus().equals(CommonConstants.DOCTOR_STATUS_3)) {
return ReturnUtil.getPicaResponse(PicaResultCode.INTERFACE_FORBID_VISIT);
}*/
if (0 != analysisService.insertStarRecord(analysisId, roundId, examTitleId, replyId, user.getId())) {
/**
* 已经点过赞
*/
return ReturnUtil.getPicaResponse(PicaResultCode.DATA_ALREADY_EXISTED);
}
return ReturnUtil.getPicaResponse(PicaResultCode.SUCCESS);
}
@ApiOperation(value = "取消点赞", response = PicaResponse.class)
@RequestMapping(value = "/cancelStar/{replyId}", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
public PicaResponse cancelStar( @PathVariable("replyId") Integer replyId, @RequestParam String token) {
if (token == null) {
return ReturnUtil.getPicaResponse(PicaResultCode.SYSTEM_NO_TOKEN);
}
PICAUser user = CommonUtils.getUserByToken(redisClient, token);
if (user == null) {
return ReturnUtil.getPicaResponse(PicaResultCode.SYSTEM_INVALID_TOKEN);
}
if (0 != analysisService.removeStarRecord(replyId, user.getId())) {
return ReturnUtil.getPicaResponse(PicaResultCode.RESULE_DATA_NONE);
}
return ReturnUtil.getPicaResponse(PicaResultCode.SUCCESS);
}
}
package com.pica.cloud.online.exam.analysis.server.controller;
import com.pica.cloud.online.exam.analysis.server.entity.Doctor;
import com.pica.cloud.online.exam.analysis.server.mapper.DoctorMapper;
import com.pica.cloud.online.exam.analysis.server.entity.Reply;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.pica.cloud.online.exam.analysis.server.client.IConfigServiceClient;
import com.pica.cloud.online.exam.analysis.server.configuration.PropertiesConfiguration;
import com.pica.cloud.foundation.entity.PicaResponse;
import com.pica.cloud.foundation.redis.RedisClient;
@RestController
@RequestMapping("/demo")
@Api(value = "冒烟测试", description = "测试 db,redis,读取自定义配置 以及使用 feign 调用微服务")
public class DemoController {
@Autowired
private DoctorMapper doctorMapper;
@Autowired
private RedisClient redisClient;
@Autowired
private PropertiesConfiguration properties;
@Autowired
private LoadBalancerClient slb;
@Autowired
private IConfigServiceClient client;
@ApiOperation(value = "DB连接测试:更新Person对象", response = PicaResponse.class)
@RequestMapping(value = "/db", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
public PicaResponse<Reply> saveToDB() {
// 创建一个ResponseBuilder
PicaResponse.Builder<Doctor> builder = new PicaResponse.Builder<>();
//PICAUser picaUser = CommonUtils.getUserByToken(redisClient, "FDE7216893B249E0BDE7F7260D36E167");
builder.setData(doctorMapper.selectByPrimaryKey(100548471));
// 返回Response
return builder.build();
}
/*@ApiOperation(value = "Redis连接测试:插入一个Person对象到Redis", response = PicaResponse.class)
@RequestMapping(value = "/redis", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
public PicaResponse<String> saveToCache() {
PicaResponse.Builder<String> builder = new PicaResponse.Builder<>();
redisClient.set("keyname", personMapper.selectByPrimaryKey(1008));
return builder.setData(redisClient.get("keyname")).build();
}
*/
@ApiOperation(value = "读取配置测试", response = PicaResponse.class)
@RequestMapping(value = "/config", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
public PicaResponse<String> readFromConfiguration() {
PicaResponse.Builder<String> builder = new PicaResponse.Builder<>();
builder.setData(properties.toString());
return builder.build();
}
@ApiOperation(value = "Feign调用微服务", response = PicaResponse.class)
@RequestMapping(value = "/beans", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
public String beans() {
return client.beans();
}
}
package com.pica.cloud.online.exam.analysis.server.entity;
import java.util.Date;
public class AnalysisRound {
private Integer id;
private Integer analysisId;
private String roundName;
private String intro;
private Byte seqNo;
private Date startTime;
private Date endTime;
private Boolean isPublished;
private Integer createdId;
private Date createdTime;
private Integer modifiedId;
private Date modifiedTime;
private Boolean isDeleted;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getAnalysisId() {
return analysisId;
}
public void setAnalysisId(Integer analysisId) {
this.analysisId = analysisId;
}
public String getRoundName() {
return roundName;
}
public void setRoundName(String roundName) {
this.roundName = roundName == null ? null : roundName.trim();
}
public String getIntro() {
return intro;
}
public void setIntro(String intro) {
this.intro = intro == null ? null : intro.trim();
}
public Byte getSeqNo() {
return seqNo;
}
public void setSeqNo(Byte seqNo) {
this.seqNo = seqNo;
}
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public Boolean getIsPublished() {
return isPublished;
}
public void setIsPublished(Boolean isPublished) {
this.isPublished = isPublished;
}
public Integer getCreatedId() {
return createdId;
}
public void setCreatedId(Integer createdId) {
this.createdId = createdId;
}
public Date getCreatedTime() {
return createdTime;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
}
public Integer getModifiedId() {
return modifiedId;
}
public void setModifiedId(Integer modifiedId) {
this.modifiedId = modifiedId;
}
public Date getModifiedTime() {
return modifiedTime;
}
public void setModifiedTime(Date modifiedTime) {
this.modifiedTime = modifiedTime;
}
public Boolean getIsDeleted() {
return isDeleted;
}
public void setIsDeleted(Boolean isDeleted) {
this.isDeleted = isDeleted;
}
}
\ No newline at end of file
package com.pica.cloud.online.exam.analysis.server.entity;
import java.util.Date;
public class AnalysisRoundExamTitle {
private Integer id;
private Integer analysisId;
private Integer roundId;
private Integer examTitleType;
private Integer seqNo;
private String question;
private String config;
private String answer;
private String errorRate;
private Integer createdId;
private Date createdTime;
private Integer modifiedId;
private Date modifiedTime;
private Boolean isDeleted;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getAnalysisId() {
return analysisId;
}
public void setAnalysisId(Integer analysisId) {
this.analysisId = analysisId;
}
public Integer getRoundId() {
return roundId;
}
public void setRoundId(Integer roundId) {
this.roundId = roundId;
}
public Integer getExamTitleType() {
return examTitleType;
}
public void setExamTitleType(Integer examTitleType) {
this.examTitleType = examTitleType;
}
public Integer getSeqNo() {
return seqNo;
}
public void setSeqNo(Integer seqNo) {
this.seqNo = seqNo;
}
public String getQuestion() {
return question;
}
public void setQuestion(String question) {
this.question = question == null ? null : question.trim();
}
public String getConfig() {
return config;
}
public void setConfig(String config) {
this.config = config == null ? null : config.trim();
}
public String getAnswer() {
return answer;
}
public void setAnswer(String answer) {
this.answer = answer == null ? null : answer.trim();
}
public String getErrorRate() {
return errorRate;
}
public void setErrorRate(String errorRate) {
this.errorRate = errorRate == null ? null : errorRate.trim();
}
public Integer getCreatedId() {
return createdId;
}
public void setCreatedId(Integer createdId) {
this.createdId = createdId;
}
public Date getCreatedTime() {
return createdTime;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
}
public Integer getModifiedId() {
return modifiedId;
}
public void setModifiedId(Integer modifiedId) {
this.modifiedId = modifiedId;
}
public Date getModifiedTime() {
return modifiedTime;
}
public void setModifiedTime(Date modifiedTime) {
this.modifiedTime = modifiedTime;
}
public Boolean getIsDeleted() {
return isDeleted;
}
public void setIsDeleted(Boolean isDeleted) {
this.isDeleted = isDeleted;
}
}
\ No newline at end of file
package com.pica.cloud.online.exam.analysis.server.entity;
import java.util.Date;
public class CHCAnalysis {
private Integer id;
private String analysisName;
private String mainTitle;
private String subTitle;
private String intro;
private String authUser;
private String rule;
private Date startTime;
private Date endTime;
private String logoUrl;
private String prizeUrl;
private Byte type;
private Boolean isPublished;
private Integer createdId;
private Date createdTime;
private Integer modifiedId;
private Date modifiedTime;
private Boolean isDeleted;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getAnalysisName() {
return analysisName;
}
public void setAnalysisName(String analysisName) {
this.analysisName = analysisName == null ? null : analysisName.trim();
}
public String getMainTitle() {
return mainTitle;
}
public void setMainTitle(String mainTitle) {
this.mainTitle = mainTitle == null ? null : mainTitle.trim();
}
public String getSubTitle() {
return subTitle;
}
public void setSubTitle(String subTitle) {
this.subTitle = subTitle == null ? null : subTitle.trim();
}
public String getIntro() {
return intro;
}
public void setIntro(String intro) {
this.intro = intro == null ? null : intro.trim();
}
public String getAuthUser() {
return authUser;
}
public void setAuthUser(String authUser) {
this.authUser = authUser == null ? null : authUser.trim();
}
public String getRule() {
return rule;
}
public void setRule(String rule) {
this.rule = rule == null ? null : rule.trim();
}
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public String getLogoUrl() {
return logoUrl;
}
public void setLogoUrl(String logoUrl) {
this.logoUrl = logoUrl == null ? null : logoUrl.trim();
}
public String getPrizeUrl() {
return prizeUrl;
}
public void setPrizeUrl(String prizeUrl) {
this.prizeUrl = prizeUrl == null ? null : prizeUrl.trim();
}
public Byte getType() {
return type;
}
public void setType(Byte type) {
this.type = type;
}
public Boolean getIsPublished() {
return isPublished;
}
public void setIsPublished(Boolean isPublished) {
this.isPublished = isPublished;
}
public Integer getCreatedId() {
return createdId;
}
public void setCreatedId(Integer createdId) {
this.createdId = createdId;
}
public Date getCreatedTime() {
return createdTime;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
}
public Integer getModifiedId() {
return modifiedId;
}
public void setModifiedId(Integer modifiedId) {
this.modifiedId = modifiedId;
}
public Date getModifiedTime() {
return modifiedTime;
}
public void setModifiedTime(Date modifiedTime) {
this.modifiedTime = modifiedTime;
}
public Boolean getIsDeleted() {
return isDeleted;
}
public void setIsDeleted(Boolean isDeleted) {
this.isDeleted = isDeleted;
}
}
\ No newline at end of file
package com.pica.cloud.online.exam.analysis.server.entity;
/**
* 医生信息
* @author wuminghao
* @date 2018/8/16 17:37
*/
public class Doctor {
private Integer id;
private String name;
private Integer status;
private String hospital;
private String title;
private String avatarImageUrl;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getHospital() {
return hospital;
}
public void setHospital(String hospital) {
this.hospital = hospital;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getAvatarImageUrl() {
return avatarImageUrl;
}
public void setAvatarImageUrl(String avatarImageUrl) {
this.avatarImageUrl = avatarImageUrl;
}
}
package com.pica.cloud.online.exam.analysis.server.entity;
import java.util.Date;
public class Reply {
private Integer id;
private Integer analysisRoundExamTitleId;
private Integer userId;
private String content;
private Byte replyLevel;
private Integer seqNo;
private Integer starCount;
private Integer atUserId;
private String atContent;
private Integer createdId;
private Date createdTime;
private Integer modifiedId;
private Date modifiedTime;
private Boolean isDeleted;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getAnalysisRoundExamTitleId() {
return analysisRoundExamTitleId;
}
public void setAnalysisRoundExamTitleId(Integer analysisRoundExamTitleId) {
this.analysisRoundExamTitleId = analysisRoundExamTitleId;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content == null ? null : content.trim();
}
public Byte getReplyLevel() {
return replyLevel;
}
public void setReplyLevel(Byte replyLevel) {
this.replyLevel = replyLevel;
}
public Integer getSeqNo() {
return seqNo;
}
public void setSeqNo(Integer seqNo) {
this.seqNo = seqNo;
}
public Integer getStarCount() {
return starCount;
}
public void setStarCount(Integer starCount) {
this.starCount = starCount;
}
public Integer getAtUserId() {
return atUserId;
}
public void setAtUserId(Integer atUserId) {
this.atUserId = atUserId;
}
public String getAtContent() {
return atContent;
}
public void setAtContent(String atContent) {
this.atContent = atContent == null ? null : atContent.trim();
}
public Integer getCreatedId() {
return createdId;
}
public void setCreatedId(Integer createdId) {
this.createdId = createdId;
}
public Date getCreatedTime() {
return createdTime;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
}
public Integer getModifiedId() {
return modifiedId;
}
public void setModifiedId(Integer modifiedId) {
this.modifiedId = modifiedId;
}
public Date getModifiedTime() {
return modifiedTime;
}
public void setModifiedTime(Date modifiedTime) {
this.modifiedTime = modifiedTime;
}
public Boolean getIsDeleted() {
return isDeleted;
}
public void setIsDeleted(Boolean isDeleted) {
this.isDeleted = isDeleted;
}
}
\ No newline at end of file
package com.pica.cloud.online.exam.analysis.server.entity;
import java.util.Date;
public class ReplyImage {
private Integer id;
private Integer replyId;
private String originalName;
private String url;
private Integer createdId;
private Date createdTime;
private Integer modifiedId;
private Date modifiedTime;
private Boolean isDeleted;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getReplyId() {
return replyId;
}
public void setReplyId(Integer replyId) {
this.replyId = replyId;
}
public String getOriginalName() {
return originalName;
}
public void setOriginalName(String originalName) {
this.originalName = originalName == null ? null : originalName.trim();
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url == null ? null : url.trim();
}
public Integer getCreatedId() {
return createdId;
}
public void setCreatedId(Integer createdId) {
this.createdId = createdId;
}
public Date getCreatedTime() {
return createdTime;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
}
public Integer getModifiedId() {
return modifiedId;
}
public void setModifiedId(Integer modifiedId) {
this.modifiedId = modifiedId;
}
public Date getModifiedTime() {
return modifiedTime;
}
public void setModifiedTime(Date modifiedTime) {
this.modifiedTime = modifiedTime;
}
public Boolean getIsDeleted() {
return isDeleted;
}
public void setIsDeleted(Boolean isDeleted) {
this.isDeleted = isDeleted;
}
}
\ No newline at end of file
package com.pica.cloud.online.exam.analysis.server.entity;
import java.util.Date;
public class StarRecord {
private Integer id;
private Integer analysisId;
private Integer roundId;
private Integer analysisRoundExamTitleId;
private Integer replyId;
private Integer createdId;
private Date createdTime;
private Integer modifiedId;
private Date modifiedTime;
private Boolean isDeleted;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getAnalysisId() {
return analysisId;
}
public void setAnalysisId(Integer analysisId) {
this.analysisId = analysisId;
}
public Integer getRoundId() {
return roundId;
}
public void setRoundId(Integer roundId) {
this.roundId = roundId;
}
public Integer getAnalysisRoundExamTitleId() {
return analysisRoundExamTitleId;
}
public void setAnalysisRoundExamTitleId(Integer analysisRoundExamTitleId) {
this.analysisRoundExamTitleId = analysisRoundExamTitleId;
}
public Integer getReplyId() {
return replyId;
}
public void setReplyId(Integer replyId) {
this.replyId = replyId;
}
public Integer getCreatedId() {
return createdId;
}
public void setCreatedId(Integer createdId) {
this.createdId = createdId;
}
public Date getCreatedTime() {
return createdTime;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
}
public Integer getModifiedId() {
return modifiedId;
}
public void setModifiedId(Integer modifiedId) {
this.modifiedId = modifiedId;
}
public Date getModifiedTime() {
return modifiedTime;
}
public void setModifiedTime(Date modifiedTime) {
this.modifiedTime = modifiedTime;
}
public Boolean getIsDeleted() {
return isDeleted;
}
public void setIsDeleted(Boolean isDeleted) {
this.isDeleted = isDeleted;
}
}
\ No newline at end of file
package com.pica.cloud.online.exam.analysis.server.mapper;
import com.pica.cloud.online.exam.analysis.server.entity.AnalysisRoundExamTitle;
import java.util.List;
public interface AnalysisRoundExamTitleMapper {
int deleteByPrimaryKey(Integer id);
int insert(AnalysisRoundExamTitle record);
int insertSelective(AnalysisRoundExamTitle record);
AnalysisRoundExamTitle selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(AnalysisRoundExamTitle record);
int updateByPrimaryKey(AnalysisRoundExamTitle record);
int selectExamTitleCountByRoundId(Integer roundId);
List<AnalysisRoundExamTitle> selectExamTitleListByRoundId(Integer roundId);
}
\ No newline at end of file
package com.pica.cloud.online.exam.analysis.server.mapper;
import com.pica.cloud.online.exam.analysis.server.entity.AnalysisRound;
import java.util.List;
public interface AnalysisRoundMapper {
int deleteByPrimaryKey(Integer id);
int insert(AnalysisRound record);
int insertSelective(AnalysisRound record);
AnalysisRound selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(AnalysisRound record);
int updateByPrimaryKey(AnalysisRound record);
List<AnalysisRound> selectRoundListById(Integer id);
}
\ No newline at end of file
package com.pica.cloud.online.exam.analysis.server.mapper;
import com.pica.cloud.online.exam.analysis.server.entity.CHCAnalysis;
public interface CHCAnalysisMapper {
int deleteByPrimaryKey(Integer id);
int insert(CHCAnalysis record);
int insertSelective(CHCAnalysis record);
CHCAnalysis selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(CHCAnalysis record);
int updateByPrimaryKey(CHCAnalysis record);
}
\ No newline at end of file
package com.pica.cloud.online.exam.analysis.server.mapper;
import com.pica.cloud.online.exam.analysis.server.entity.Doctor;
/**
* @author wuminghao
* @date 2018/8/16 17:40
*/
public interface DoctorMapper {
/**
* 根据医生id获取医生的基本信息
* @param id
* @return
*/
Doctor selectByPrimaryKey(int id);
}
package com.pica.cloud.online.exam.analysis.server.mapper;
import com.pica.cloud.online.exam.analysis.server.entity.ReplyImage;
public interface ReplyImageMapper {
int deleteByPrimaryKey(Integer id);
int insert(ReplyImage record);
int insertSelective(ReplyImage record);
ReplyImage selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(ReplyImage record);
int updateByPrimaryKey(ReplyImage record);
}
\ No newline at end of file
package com.pica.cloud.online.exam.analysis.server.mapper;
import com.pica.cloud.online.exam.analysis.server.entity.Reply;
import java.util.List;
public interface ReplyMapper {
int deleteByPrimaryKey(Integer id);
int insert(Reply record);
int insertSelective(Reply record);
Reply selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(Reply record);
int updateByPrimaryKey(Reply record);
int selectReplyCountByAnalysisRoundExamTitleId(Integer analysisRoundExamTitleId);
List<Reply> selectReplyListByAnalysisRoundExamTitleId(Integer analysisRoundExamTitleId);
}
\ No newline at end of file
package com.pica.cloud.online.exam.analysis.server.mapper;
import com.pica.cloud.online.exam.analysis.server.entity.StarRecord;
public interface StarRecordMapper {
int deleteByPrimaryKey(Integer id);
int insert(StarRecord record);
int insertSelective(StarRecord record);
StarRecord selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(StarRecord record);
int updateByPrimaryKey(StarRecord record);
int selectStarCountByRoundExamTitleId(Integer roundExamTitleId);
int selectStarCountByReplyId(Integer replyId);
int selectStarCountByRecord(StarRecord record);
StarRecord selectBySelective(StarRecord record);
}
\ No newline at end of file
package com.pica.cloud.online.exam.analysis.server.service;
import com.pica.cloud.online.exam.analysis.common.dto.*;
import com.pica.cloud.online.exam.analysis.server.entity.AnalysisRoundExamTitle;
import com.pica.cloud.online.exam.analysis.server.entity.Reply;
import java.util.List;
/**
* @author wuminghao
* @date 2018/8/17 9:40
*/
public interface CHCAnalysisService {
/**
* 根据活动id获取活动详情
* @param analysisId
* @return
*/
CHCAnalysisDto getCHCAnalysisById(Integer analysisId);
/**
* 根据活动id获取活动的轮数
* @param analysisId
* @return
*/
List<AnalysisRoundDto> getRoundListByAnalysisId(Integer analysisId);
/**
* 根据轮的id获取信息
* @param roundId
* @return
*/
RoundExamTitleDto getRoundById(Integer roundId);
/**
* 根据轮的id获取题目信息
* @param roundId
* @return
*/
List<ExamTitleDto> getExamTitleListByRoundId(Integer roundId);
/**
* 获取当前的活动-轮-题目关联表
* @param analysisRoundExamTitleId
* @return
*/
AnalysisRoundExamTitle getAnanlysisRoundExamTitleById(Integer analysisRoundExamTitleId);
/**
* 获取考题信息
* @param analysisRoundExamTitleId
* @return
*/
ExamTitleDto getExamTitleDtoById(Integer analysisRoundExamTitleId);
/**
* 根据题目id获取回复信息
* @param analysisRoundExamTitleId
* @param userId
* @return
*/
List<ReplyDto> getReplyListDtoByExamTitleId(Integer analysisRoundExamTitleId, Integer userId);
/**
* 根据id获取reply
* @param replyId
* @return
*/
Reply getReplyById(Integer replyId);
/**
* 根据reply获取replydto
* @param reply
* @param userId
* @return
*/
ReplyDto getReplyDtoByReply(Reply reply, Integer userId);
/**
* 插入点赞记录
* @param analysisId
* @param roundId
* @param examTitleId
* @param replyId
* @return
*/
Integer insertStarRecord(Integer analysisId, Integer roundId, Integer examTitleId, Integer replyId, Integer userId);
/**
* 取消点赞记录
* @param replyId
* @param userId
* @return
*/
Integer removeStarRecord(Integer replyId, Integer userId);
}
package com.pica.cloud.online.exam.analysis.server.service;
import com.pica.cloud.online.exam.analysis.server.entity.Doctor;
/**
* @author wuminghao
* @date 2018/8/18 11:02
*/
public interface DoctorService {
/**
* 根据医生的id获取医生的信息
* @param doctorId
* @return
*/
Doctor getDoctorById(Integer doctorId);
}
package com.pica.cloud.online.exam.analysis.server.service.impl;
import com.pica.cloud.online.exam.analysis.server.entity.Doctor;
import com.pica.cloud.online.exam.analysis.server.mapper.DoctorMapper;
import com.pica.cloud.online.exam.analysis.server.service.DoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @author wuminghao
* @date 2018/8/18 11:02
*/
@Service
public class DoctorServiceImpl implements DoctorService {
@Autowired
DoctorMapper doctorMapper;
@Override
public Doctor getDoctorById(Integer doctorId) {
return doctorMapper.selectByPrimaryKey(doctorId);
}
}
Manifest-Version: 1.0
Class-Path: rxnetty-0.4.9.jar spring-beans-4.3.18.RELEASE.jar ribbon-l
oadbalancer-2.2.5.jar netflix-eventbus-0.3.0.jar http-client-1.1.1.RE
LEASE.jar spring-retry-1.2.2.RELEASE.jar javax.inject-1.jar spring-tx
-4.3.18.RELEASE.jar jackson-annotations-2.8.0.jar hibernate-validator
-5.3.6.Final.jar xnio-api-3.3.8.Final.jar mariadb-java-client-1.5.9.j
ar minlog-1.3.0.jar spring-web-4.3.18.RELEASE.jar spring-cloud-netfli
x-eureka-client-1.4.5.RELEASE.jar spring-cloud-cloudfoundry-connector
-1.2.6.RELEASE.jar pica-cloud-utils-1.0.6-20180703.060316-2.jar archa
ius-core-0.7.4.jar httpclient-4.5.5.jar spring-cloud-starter-netflix-
ribbon-1.4.5.RELEASE.jar spring-integration-tuple-1.0.0.RELEASE.jar s
pring-cloud-starter-openfeign-1.4.5.RELEASE.jar spring-integration-co
re-4.3.17.RELEASE.jar netflix-commons-util-0.1.1.jar pinyin4j-2.5.0.j
ar servo-internal-0.10.1.jar hystrix-javanica-1.5.12.jar rxjava-1.2.0
.jar undertow-core-1.4.25.Final.jar jersey-core-1.19.1.jar spring-clo
ud-stream-binder-rabbit-core-1.3.4.RELEASE.jar commons-pool2-2.4.3.ja
r guava-18.0.jar commons-io-2.4.jar javax.servlet-api-3.1.0.jar zipki
n-server-2.7.1.jar spring-boot-starter-1.5.14.RELEASE.jar spring-inte
gration-jmx-4.3.17.RELEASE.jar netty-buffer-4.0.27.Final.jar spring-c
loud-starter-netflix-eureka-client-1.4.5.RELEASE.jar jdom-1.1.jar jac
kson-module-afterburner-2.8.11.jar spring-security-rsa-1.0.3.RELEASE.
jar mysql-connector-java-5.1.39.jar spring-plugin-core-1.2.0.RELEASE.
jar mybatis-spring-boot-autoconfigure-1.3.2.jar netty-handler-4.0.27.
Final.jar netflix-statistics-0.1.1.jar tomcat-jdbc-8.5.31.jar spring-
cloud-sleuth-core-1.3.4.RELEASE.jar httpcore-4.4.9.jar gson-2.8.5.jar
ribbon-transport-2.2.5.jar validation-api-1.1.0.Final.jar xmlbeans-2
.6.0.jar commons-fileupload-1.3.1.jar springfox-swagger-common-2.8.0.
jar spring-amqp-1.7.8.RELEASE.jar spring-cloud-starter-netflix-archai
us-1.4.5.RELEASE.jar aliyun-sdk-oss-2.8.1.jar reflections-0.9.11.jar
spring-cloud-starter-netflix-hystrix-1.4.5.RELEASE.jar jedis-2.9.0.ja
r mybatis-3.4.6.jar joda-time-2.9.9.jar zipkin-storage-mysql-2.7.1.ja
r swagger-annotations-1.5.14.jar jackson-databind-2.8.11.2.jar aspect
jweaver-1.8.13.jar stringtemplate-3.2.1.jar spring-jdbc-4.3.18.RELEAS
E.jar json-lib-2.4-jdk15.jar jooq-3.9.6.jar tomcat-embed-el-8.5.31.ja
r poi-ooxml-schemas-3.12.jar springfox-swagger2-2.8.0.jar poi-ooxml-3
.12.jar commons-codec-1.10.jar commons-lang3-3.4.jar commons-lang-2.5
.jar jettison-1.3.7.jar spring-cloud-starter-stream-rabbit-1.3.4.RELE
ASE.jar aspectjrt-1.8.13.jar netty-common-4.0.27.Final.jar logback-co
re-1.1.11.jar slf4j-api-1.7.25.jar mybatis-spring-1.3.2.jar ribbon-co
re-2.2.5.jar springfox-swagger-ui-2.8.0.jar spring-boot-starter-under
tow-1.5.14.RELEASE.jar bcpkix-jdk15on-1.55.jar feign-slf4j-9.5.0.jar
spring-boot-starter-tomcat-1.5.14.RELEASE.jar jsr311-api-1.1.1.jar ne
tty-codec-http-4.0.27.Final.jar commons-collections-3.2.2.jar tomcat-
annotations-api-8.5.31.jar ezmorph-1.0.6.jar amqp-client-4.0.3.jar my
batis-spring-boot-starter-1.3.2.jar spring-rabbit-1.7.8.RELEASE.jar s
pring-boot-starter-validation-1.5.14.RELEASE.jar kryo-shaded-3.0.3.ja
r spring-cloud-context-1.3.4.RELEASE.jar netflix-infix-0.3.0.jar tomc
at-embed-core-8.5.31.jar jersey-client-1.19.1.jar servo-core-0.10.1.j
ar commons-jxpath-1.3.jar hystrix-metrics-event-stream-1.5.12.jar jbo
ss-websocket-api_1.1_spec-1.1.3.Final.jar jul-to-slf4j-1.7.25.jar zip
kin-2.7.1.jar spring-integration-amqp-4.3.17.RELEASE.jar snakeyaml-1.
17.jar spring-expression-4.3.18.RELEASE.jar jcl-over-slf4j-1.7.25.jar
HdrHistogram-2.1.9.jar logback-classic-1.1.11.jar xstream-1.4.10.jar
swagger-models-1.5.14.jar jboss-annotations-api_1.2_spec-1.0.2.Final
.jar springfox-spring-web-2.8.0.jar asm-5.0.4.jar rxnetty-servo-0.4.9
.jar antlr-runtime-3.4.jar spring-webmvc-4.3.18.RELEASE.jar xmlpull-1
.1.3.1.jar hystrix-core-1.5.12.jar spring-boot-1.5.14.RELEASE.jar spr
ing-cloud-stream-codec-1.3.3.RELEASE.jar spring-boot-starter-web-1.5.
14.RELEASE.jar spring-cloud-core-1.2.6.RELEASE.jar rxnetty-contexts-0
.4.9.jar HikariCP-3.1.0.jar javassist-3.21.0-GA.jar fastjson-1.2.6.ja
r zipkin-2.7.0.jar spring-cloud-spring-service-connector-1.2.6.RELEAS
E.jar spring-messaging-4.3.18.RELEASE.jar poi-3.12.jar guice-4.1.0.ja
r mapstruct-1.2.0.Final.jar spring-cloud-starter-eureka-1.4.5.RELEASE
.jar pica-cloud-entity-1.0.0.jar woodstox-core-asl-4.4.1.jar spring-c
ore-4.3.18.RELEASE.jar javax.el-3.0.0.jar spring-context-4.3.18.RELEA
SE.jar pica-cloud-service-starter-1.0.2.jar undertow-websockets-jsr-1
.4.25.Final.jar tomcat-juli-8.5.31.jar antlr-2.7.7.jar eureka-client-
1.7.2.jar springfox-core-2.8.0.jar commons-beanutils-1.9.3.jar animal
-sniffer-annotation-1.0.jar xpp3_min-1.1.4c.jar spring-boot-starter-a
op-1.5.14.RELEASE.jar spring-tuple-1.0.0.RELEASE.jar ribbon-httpclien
t-2.2.5.jar commons-configuration-1.8.jar stax-api-1.0-2.jar spring-c
loud-stream-1.3.3.RELEASE.jar log4j-over-slf4j-1.7.25.jar spring-boot
-starter-logging-1.5.14.RELEASE.jar commons-logging-1.2.jar hystrix-s
erialization-1.5.12.jar spring-boot-starter-actuator-1.5.14.RELEASE.j
ar eureka-core-1.7.2.jar commons-math-2.2.jar spring-boot-starter-clo
ud-connectors-1.5.14.RELEASE.jar undertow-servlet-1.4.25.Final.jar jb
oss-logging-3.3.2.Final.jar spring-cloud-netflix-core-1.4.5.RELEASE.j
ar spring-cloud-sleuth-stream-1.3.4.RELEASE.jar spring-cloud-localcon
fig-connector-1.2.6.RELEASE.jar aopalliance-1.0.jar jersey-apache-cli
ent4-1.19.1.jar ribbon-eureka-2.2.5.jar bcprov-jdk15on-1.55.jar tomca
t-embed-websocket-8.5.31.jar byte-buddy-1.7.9.jar pica-cloud-redis-1.
1.2.jar spring-cloud-commons-1.3.4.RELEASE.jar spring-boot-starter-am
qp-1.5.14.RELEASE.jar netty-transport-4.0.27.Final.jar spring-boot-de
vtools-1.5.14.RELEASE.jar springfox-spi-2.8.0.jar netty-transport-nat
ive-epoll-4.0.27.Final.jar stax2-api-3.1.4.jar ribbon-2.2.5.jar sprin
g-cloud-starter-hystrix-1.4.5.RELEASE.jar spring-cloud-starter-1.3.4.
RELEASE.jar netty-codec-4.0.27.Final.jar spring-cloud-heroku-connecto
r-1.2.6.RELEASE.jar spring-cloud-starter-config-1.4.4.RELEASE.jar spr
ing-aop-4.3.18.RELEASE.jar feign-hystrix-9.5.0.jar feign-core-9.5.0.j
ar javax.ws.rs-api-2.1.jar stax-api-1.0.1.jar spring-boot-starter-jdb
c-1.5.14.RELEASE.jar spring-security-crypto-4.2.7.RELEASE.jar jackson
-core-2.8.11.jar spring-boot-autoconfigure-1.5.14.RELEASE.jar spring-
cloud-config-client-1.4.4.RELEASE.jar spring-cloud-starter-feign-1.4.
5.RELEASE.jar classmate-1.3.4.jar objenesis-2.1.jar spring-cloud-stre
am-binder-rabbit-1.3.4.RELEASE.jar spring-plugin-metadata-1.2.0.RELEA
SE.jar xnio-nio-3.3.8.Final.jar rt-1.0.jar ews-java-api-2.0.jar sprin
g-boot-actuator-1.5.14.RELEASE.jar spring-cloud-sleuth-zipkin-stream-
1.3.4.RELEASE.jar zipkin-autoconfigure-storage-mysql-2.7.1.jar spring
fox-schema-2.8.0.jar
Main-Class: com.pica.cloud.online.exam.analysis.server.App
server.port=8080
spring.application.name=${server.port}-pica-cloud-analysis
#config server settings
spring.cloud.config.name=com.pica.cloud.online.exam
spring.cloud.config.profile=dev
spring.cloud.config.label=publish
spring.cloud.config.discovery.enabled=true
spring.cloud.config.discovery.service-id=config-server
#eureka settings
eureka.instance.instance-id=${spring.cloud.client.ipAddress}:${server.port}
eureka.client.service-url.defaultZone=http://192.168.110.120:7891/eureka/,http://192.168.110.121:7891/eureka/
eureka.instance.status-page-url=http://${spring.cloud.client.ipAddress}:${server.port}/swagger-ui.html
eureka.instance.lease-renewal-interval-in-seconds=10
eureka.instance.lease-expiration-duration-in-seconds=10
eureka.instance.hostname=${spring.cloud.client.ipAddress}
eureka.instance.prefer-ip-address=true
#rabbitmq settings
spring.rabbitmq.host=192.168.110.206
spring.rabbitmq.port=5672
spring.rabbitmq.username=appuser
spring.rabbitmq.password=AqLfvyWOvLQEUzdI
#local settings
feign.hystrix.enabled=true
management.security.enabled=false
#spring.zipkin.base-url=http://192.168.110.124:7895
#spring.sleuth.sampler.percentage=1.0
#logging.config=classpath:log4j2-dev.xml
server.port=8080
spring.application.name=${server.port}-pica-cloud-analysis
#config server settings
spring.cloud.config.name=com.pica.cloud.online.exam
spring.cloud.config.profile=prod
spring.cloud.config.label=publish
spring.cloud.config.discovery.enabled=true
spring.cloud.config.discovery.service-id=prd-config-server
#eureka settings
eureka.instance.instance-id=${spring.cloud.client.ipAddress}:${server.port}
eureka.client.service-url.defaultZone=http://pica-ms-prd:~!QAZ2wsx3331805prd@172.19.137.14:7891/eureka,http://pica-ms-prd:~!QAZ2wsx3331805prd@172.19.137.15:7891/eureka,http://pica-ms-prd:~!QAZ2wsx3331805prd@172.19.137.16:7891/eureka
eureka.instance.status-page-url=http://${spring.cloud.client.ipAddress}:${server.port}/swagger-ui.html
eureka.instance.lease-renewal-interval-in-seconds=10
eureka.instance.lease-expiration-duration-in-seconds=10
eureka.instance.hostname=${spring.cloud.client.ipAddress}
eureka.instance.prefer-ip-address=true
#rabbitmq settings
spring.rabbitmq.host=172.19.137.0
spring.rabbitmq.port=5672
spring.rabbitmq.username=appuser
spring.rabbitmq.password=AqLfvyWOvLQEUzdI
#local setting
feign.hystrix.enabled=true
management.security.enabled=true
spring.zipkin.base-url=http://172.19.137.19:7895
spring.sleuth.sampler.percentage=1.0
logging.config=classpath:log4j2-prod.xml
\ No newline at end of file
server.port=8080
spring.application.name=${server.port}-pica-cloud-analysis
#config server settings
spring.cloud.config.name=com.pica.cloud.online.exam
spring.cloud.config.profile=test1
spring.cloud.config.label=publish
spring.cloud.config.discovery.enabled=true
spring.cloud.config.discovery.service-id=config-server
#eureka settings
eureka.instance.instance-id=${spring.cloud.client.ipAddress}:${server.port}
eureka.client.service-url.defaultZone=http://192.168.110.128:7891/eureka,http://192.168.110.129:7891/eureka
eureka.instance.status-page-url=http://${spring.cloud.client.ipAddress}:${server.port}/swagger-ui.html
eureka.instance.lease-renewal-interval-in-seconds=10
eureka.instance.lease-expiration-duration-in-seconds=10
eureka.instance.hostname=${spring.cloud.client.ipAddress}
eureka.instance.prefer-ip-address=true
#rabbigmq settings
spring.rabbitmq.host=192.168.110.206
spring.rabbitmq.port=5672
spring.rabbitmq.username=appuser
spring.rabbitmq.password=AqLfvyWOvLQEUzdI
#local settings
feign.hystrix.enabled=true
management.security.enabled=false
spring.zipkin.base-url=http://192.168.110.133:7895
spring.sleuth.sampler.percentage=1.0
logging.config=classpath:log4j2-test1.xml
\ No newline at end of file
server.port=8080
spring.application.name=${server.port}-pica-cloud-analysis
#config server settings
spring.cloud.config.name=com.pica.cloud.online.exam
spring.cloud.config.profile=test2
spring.cloud.config.label=publish
spring.cloud.config.discovery.enabled=true
spring.cloud.config.discovery.service-id=config-server
#eureka settings
eureka.instance.instance-id=${spring.cloud.client.ipAddress}:${server.port}
eureka.client.service-url.defaultZone=http://192.168.110.128:7891/eureka,http://192.168.110.129:7891/eureka
eureka.instance.status-page-url=http://${spring.cloud.client.ipAddress}:${server.port}/swagger-ui.html
eureka.instance.lease-renewal-interval-in-seconds=10
eureka.instance.lease-expiration-duration-in-seconds=10
eureka.instance.hostname=${spring.cloud.client.ipAddress}
eureka.instance.prefer-ip-address=true
#rabbigmq settings
spring.rabbitmq.host=192.168.110.206
spring.rabbitmq.port=5672
spring.rabbitmq.username=appuser
spring.rabbitmq.password=AqLfvyWOvLQEUzdI
#local settings
feign.hystrix.enabled=true
management.security.enabled=false
spring.zipkin.base-url=http://192.168.110.133:7895
spring.sleuth.sampler.percentage=1.0
logging.config=classpath:log4j2-test1.xml
\ No newline at end of file
server.port=8080
spring.application.name=${server.port}-pica-cloud-analysis
#config server settings
spring.cloud.config.name=com.pica.cloud.online.exam
spring.cloud.config.profile=uat
spring.cloud.config.label=publish
spring.cloud.config.discovery.enabled=true
spring.cloud.config.discovery.service-id=config-server
#eureka settings
eureka.instance.instance-id=${spring.cloud.client.ipAddress}:${server.port}
eureka.client.service-url.defaultZone=http://pica-ms:~!QAZ2wsx3331805@192.168.110.137:7891/eureka,http://pica-ms:~!QAZ2wsx3331805@192.168.110.138:7891/eureka
eureka.instance.status-page-url=http://${spring.cloud.client.ipAddress}:${server.port}/swagger-ui.html
eureka.instance.lease-renewal-interval-in-seconds=10
eureka.instance.lease-expiration-duration-in-seconds=10
eureka.instance.hostname=${spring.cloud.client.ipAddress}
eureka.instance.prefer-ip-address=true
#rabbigmq settings
spring.rabbitmq.host=192.168.110.174
spring.rabbitmq.port=5672
spring.rabbitmq.username=picacloud
spring.rabbitmq.password=123456
#local settings
feign.hystrix.enabled=true
management.security.enabled=false
spring.zipkin.base-url=http://192.168.110.141:7895
spring.sleuth.sampler.percentage=1.0
logging.config=classpath:log4j2-uat.xml
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="true" scan="true" scanPeriod="30 seconds">
<property name="encoder.pattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %X{req.xForwardedFor} %X{req.method} %X{req.requestURL} %X{req.queryString} %X{req.userAgent} %-5level %logger{36} - %msg%n"/>
<property name="rollingPolicy.maxFileSize" value="5MB"/>
<property name="rollingPolicy.maxHistory" value="30"/>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<Target>System.out</Target>
<encoder>
<pattern>${encoder.pattern}</pattern>
</encoder>
</appender>
<appender name="TRACE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<encoder>
<pattern>${encoder.pattern}</pattern>
<charset>UTF-8</charset>
</encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>TRACE</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${LOG_PATH}/%d{yyyy-MM-dd}/trace.%i.log</fileNamePattern>
<maxHistory>${rollingPolicy.maxHistory}</maxHistory>
<maxFileSize>${rollingPolicy.maxFileSize}</maxFileSize>
</rollingPolicy>
</appender>
<appender name="INFO" class="ch.qos.logback.core.rolling.RollingFileAppender">
<encoder>
<pattern>${encoder.pattern}</pattern>
<charset>UTF-8</charset>
</encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>INFO</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${LOG_PATH}/%d{yyyy-MM-dd}/info.%i.log</fileNamePattern>
<maxHistory>${rollingPolicy.maxHistory}</maxHistory>
<maxFileSize>${rollingPolicy.maxFileSize}</maxFileSize>
</rollingPolicy>
</appender>
<appender name="DEBUG" class="ch.qos.logback.core.rolling.RollingFileAppender">
<encoder>
<pattern>${encoder.pattern}</pattern>
<charset>UTF-8</charset>
</encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>DEBUG</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${LOG_PATH}/%d{yyyy-MM-dd}/debug.%i.log</fileNamePattern>
<maxHistory>${rollingPolicy.maxHistory}</maxHistory>
<maxFileSize>${rollingPolicy.maxFileSize}</maxFileSize>
</rollingPolicy>
</appender>
<appender name="WARN" class="ch.qos.logback.core.rolling.RollingFileAppender">
<encoder>
<pattern>${encoder.pattern}</pattern>
<charset>UTF-8</charset>
</encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>WARN</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${LOG_PATH}/%d{yyyy-MM-dd}/warn.%i.log</fileNamePattern>
<maxHistory>${rollingPolicy.maxHistory}</maxHistory>
<maxFileSize>${rollingPolicy.maxFileSize}</maxFileSize>
</rollingPolicy>
</appender>
<appender name="ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender">
<encoder>
<pattern>${encoder.pattern}</pattern>
<charset>UTF-8</charset>
</encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${LOG_PATH}/%d{yyyy-MM-dd}/error.%i.log</fileNamePattern>
<maxHistory>${rollingPolicy.maxHistory}</maxHistory>
<maxFileSize>${rollingPolicy.maxFileSize}</maxFileSize>
</rollingPolicy>
</appender>
<!--logger-->
<logger name="com.ibatis" level="DEBUG" />
<logger name="com.ibatis.common.jdbc.SimpleDataSource" level="DEBUG" />
<logger name="com.ibatis.common.jdbc.ScriptRunner" level="DEBUG" />
<logger name="com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate" level="DEBUG" />
<logger name="java.sql.Connection" level="DEBUG" />
<logger name="java.sql.Statement" level="DEBUG" />
<logger name="java.sql.PreparedStatement" level="DEBUG" />
<!--root-->
<root level="INFO">
<appender-ref ref="CONSOLE" />
<appender-ref ref="INFO" />
<appender-ref ref="ERROR" />
</root>
</configuration>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
<!-- 数据库驱动:选择你的本地硬盘上面的数据库驱动包-->
<classPathEntry location="D:/git/mybatis/mysql-connector-java-5.1.34.jar"/>
<context id="tableEntity" targetRuntime="MyBatis3">
<commentGenerator>
<property name="suppressDate" value="true"/>
<!-- 是否去除自动生成的注释 true:是 : false:否 -->
<property name="suppressAllComments" value="true"/>
<property name="addRemarkComments" value="true"/>
<property name="dateFormat" value="false"/>
<property name="suppressDate" value="false"/>
</commentGenerator>
<!--数据库链接URL,用户名、密码 -->
<jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://192.168.130.200:3306/pica_online_exam"
userId="pica" password="Joa5@73&amp;8yAYJ2fe">
</jdbcConnection>
<javaTypeResolver>
<property name="forceBigDecimals" value="false"/>
</javaTypeResolver>
<!-- 生成模型的包名和位置-->
<javaModelGenerator targetPackage="com.pica.cloud.online.exam.analysis.server.entity" targetProject="src/main/java">
<property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/>
</javaModelGenerator>
<!-- 生成映射文件的包名和位置-->
<sqlMapGenerator targetPackage="mybatis" targetProject="src/main/resources">
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator>
<!-- 生成DAO的包名和位置-->
<javaClientGenerator type="XMLMAPPER" targetPackage="com.pica.cloud.online.exam.analysis.server.mapper" targetProject="src/main/java">
<property name="enableSubPackages" value="true"/>
</javaClientGenerator>
<!--
<table tableName="pica_online_exam.p_chc_analysis" domainObjectName="CHCAnalysis" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
<table tableName="pica_online_exam.p_analysis_round" domainObjectName="AnalysisRound" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
<table tableName="pica_online_exam.p_analysis_round_exam_title" domainObjectName="AnalysisRoundExamTitle" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
<table tableName="pica_online_exam.p_reply" domainObjectName="Reply" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
<table tableName="pica_online_exam.p_reply_image" domainObjectName="ReplyImage" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
-->
<table tableName="pica_online_exam.p_star_record" domainObjectName="StarRecord" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
</context>
</generatorConfiguration>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.pica.cloud.online.exam.analysis.server.mapper.AnalysisRoundExamTitleMapper" >
<resultMap id="BaseResultMap" type="com.pica.cloud.online.exam.analysis.server.entity.AnalysisRoundExamTitle" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="analysis_id" property="analysisId" jdbcType="INTEGER" />
<result column="round_id" property="roundId" jdbcType="INTEGER" />
<result column="exam_title_type" property="examTitleType" jdbcType="INTEGER" />
<result column="seq_no" property="seqNo" jdbcType="INTEGER" />
<result column="question" property="question" jdbcType="VARCHAR" />
<result column="config" property="config" jdbcType="VARCHAR" />
<result column="answer" property="answer" jdbcType="VARCHAR" />
<result column="error_rate" property="errorRate" jdbcType="VARCHAR" />
<result column="created_id" property="createdId" jdbcType="INTEGER" />
<result column="created_time" property="createdTime" jdbcType="TIMESTAMP" />
<result column="modified_id" property="modifiedId" jdbcType="INTEGER" />
<result column="modified_time" property="modifiedTime" jdbcType="TIMESTAMP" />
<result column="is_deleted" property="isDeleted" jdbcType="BIT" />
</resultMap>
<sql id="Base_Column_List" >
id, analysis_id, round_id, exam_title_type, seq_no, question, config, answer, error_rate,
created_id, created_time, modified_id, modified_time, is_deleted
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from p_analysis_round_exam_title
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectExamTitleCountByRoundId" resultType="java.lang.Integer" parameterType="java.lang.Integer" >
select
count(1)
from p_analysis_round_exam_title
where round_id = #{roundId,jdbcType=INTEGER}
and is_deleted = 0
</select>
<select id="selectExamTitleListByRoundId" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from p_analysis_round_exam_title
where round_id = #{roundId,jdbcType=INTEGER}
and is_deleted = 0
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from p_analysis_round_exam_title
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.pica.cloud.online.exam.analysis.server.entity.AnalysisRoundExamTitle" >
insert into p_analysis_round_exam_title (id, analysis_id, round_id,
exam_title_type, seq_no, question,
config, answer, error_rate,
created_id, created_time, modified_id,
modified_time, is_deleted)
values (#{id,jdbcType=INTEGER}, #{analysisId,jdbcType=INTEGER}, #{roundId,jdbcType=INTEGER},
#{examTitleType,jdbcType=INTEGER}, #{seqNo,jdbcType=INTEGER}, #{question,jdbcType=VARCHAR},
#{config,jdbcType=VARCHAR}, #{answer,jdbcType=VARCHAR}, #{errorRate,jdbcType=VARCHAR},
#{createdId,jdbcType=INTEGER}, #{createdTime,jdbcType=TIMESTAMP}, #{modifiedId,jdbcType=INTEGER},
#{modifiedTime,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT})
</insert>
<insert id="insertSelective" parameterType="com.pica.cloud.online.exam.analysis.server.entity.AnalysisRoundExamTitle" >
insert into p_analysis_round_exam_title
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="analysisId != null" >
analysis_id,
</if>
<if test="roundId != null" >
round_id,
</if>
<if test="examTitleType != null" >
exam_title_type,
</if>
<if test="seqNo != null" >
seq_no,
</if>
<if test="question != null" >
question,
</if>
<if test="config != null" >
config,
</if>
<if test="answer != null" >
answer,
</if>
<if test="errorRate != null" >
error_rate,
</if>
<if test="createdId != null" >
created_id,
</if>
<if test="createdTime != null" >
created_time,
</if>
<if test="modifiedId != null" >
modified_id,
</if>
<if test="modifiedTime != null" >
modified_time,
</if>
<if test="isDeleted != null" >
is_deleted,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="analysisId != null" >
#{analysisId,jdbcType=INTEGER},
</if>
<if test="roundId != null" >
#{roundId,jdbcType=INTEGER},
</if>
<if test="examTitleType != null" >
#{examTitleType,jdbcType=INTEGER},
</if>
<if test="seqNo != null" >
#{seqNo,jdbcType=INTEGER},
</if>
<if test="question != null" >
#{question,jdbcType=VARCHAR},
</if>
<if test="config != null" >
#{config,jdbcType=VARCHAR},
</if>
<if test="answer != null" >
#{answer,jdbcType=VARCHAR},
</if>
<if test="errorRate != null" >
#{errorRate,jdbcType=VARCHAR},
</if>
<if test="createdId != null" >
#{createdId,jdbcType=INTEGER},
</if>
<if test="createdTime != null" >
#{createdTime,jdbcType=TIMESTAMP},
</if>
<if test="modifiedId != null" >
#{modifiedId,jdbcType=INTEGER},
</if>
<if test="modifiedTime != null" >
#{modifiedTime,jdbcType=TIMESTAMP},
</if>
<if test="isDeleted != null" >
#{isDeleted,jdbcType=BIT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.pica.cloud.online.exam.analysis.server.entity.AnalysisRoundExamTitle" >
update p_analysis_round_exam_title
<set >
<if test="analysisId != null" >
analysis_id = #{analysisId,jdbcType=INTEGER},
</if>
<if test="roundId != null" >
round_id = #{roundId,jdbcType=INTEGER},
</if>
<if test="examTitleType != null" >
exam_title_type = #{examTitleType,jdbcType=INTEGER},
</if>
<if test="seqNo != null" >
seq_no = #{seqNo,jdbcType=INTEGER},
</if>
<if test="question != null" >
question = #{question,jdbcType=VARCHAR},
</if>
<if test="config != null" >
config = #{config,jdbcType=VARCHAR},
</if>
<if test="answer != null" >
answer = #{answer,jdbcType=VARCHAR},
</if>
<if test="errorRate != null" >
error_rate = #{errorRate,jdbcType=VARCHAR},
</if>
<if test="createdId != null" >
created_id = #{createdId,jdbcType=INTEGER},
</if>
<if test="createdTime != null" >
created_time = #{createdTime,jdbcType=TIMESTAMP},
</if>
<if test="modifiedId != null" >
modified_id = #{modifiedId,jdbcType=INTEGER},
</if>
<if test="modifiedTime != null" >
modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
</if>
<if test="isDeleted != null" >
is_deleted = #{isDeleted,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.pica.cloud.online.exam.analysis.server.entity.AnalysisRoundExamTitle" >
update p_analysis_round_exam_title
set analysis_id = #{analysisId,jdbcType=INTEGER},
round_id = #{roundId,jdbcType=INTEGER},
exam_title_type = #{examTitleType,jdbcType=INTEGER},
seq_no = #{seqNo,jdbcType=INTEGER},
question = #{question,jdbcType=VARCHAR},
config = #{config,jdbcType=VARCHAR},
answer = #{answer,jdbcType=VARCHAR},
error_rate = #{errorRate,jdbcType=VARCHAR},
created_id = #{createdId,jdbcType=INTEGER},
created_time = #{createdTime,jdbcType=TIMESTAMP},
modified_id = #{modifiedId,jdbcType=INTEGER},
modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
is_deleted = #{isDeleted,jdbcType=BIT}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.pica.cloud.online.exam.analysis.server.mapper.AnalysisRoundMapper" >
<resultMap id="BaseResultMap" type="com.pica.cloud.online.exam.analysis.server.entity.AnalysisRound" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="analysis_id" property="analysisId" jdbcType="INTEGER" />
<result column="round_name" property="roundName" jdbcType="VARCHAR" />
<result column="intro" property="intro" jdbcType="VARCHAR" />
<result column="seq_no" property="seqNo" jdbcType="TINYINT" />
<result column="start_time" property="startTime" jdbcType="TIMESTAMP" />
<result column="end_time" property="endTime" jdbcType="TIMESTAMP" />
<result column="is_published" property="isPublished" jdbcType="BIT" />
<result column="created_id" property="createdId" jdbcType="INTEGER" />
<result column="created_time" property="createdTime" jdbcType="TIMESTAMP" />
<result column="modified_id" property="modifiedId" jdbcType="INTEGER" />
<result column="modified_time" property="modifiedTime" jdbcType="TIMESTAMP" />
<result column="is_deleted" property="isDeleted" jdbcType="BIT" />
</resultMap>
<sql id="Base_Column_List" >
id, analysis_id, round_name, intro, seq_no, start_time, end_time, is_published, created_id,
created_time, modified_id, modified_time, is_deleted
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from p_analysis_round
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectRoundListById" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from p_analysis_round
where analysis_id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from p_analysis_round
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.pica.cloud.online.exam.analysis.server.entity.AnalysisRound" >
insert into p_analysis_round (id, analysis_id, round_name,
intro, seq_no, start_time,
end_time, is_published, created_id,
created_time, modified_id, modified_time,
is_deleted)
values (#{id,jdbcType=INTEGER}, #{analysisId,jdbcType=INTEGER}, #{roundName,jdbcType=VARCHAR},
#{intro,jdbcType=VARCHAR}, #{seqNo,jdbcType=TINYINT}, #{startTime,jdbcType=TIMESTAMP},
#{endTime,jdbcType=TIMESTAMP}, #{isPublished,jdbcType=BIT}, #{createdId,jdbcType=INTEGER},
#{createdTime,jdbcType=TIMESTAMP}, #{modifiedId,jdbcType=INTEGER}, #{modifiedTime,jdbcType=TIMESTAMP},
#{isDeleted,jdbcType=BIT})
</insert>
<insert id="insertSelective" parameterType="com.pica.cloud.online.exam.analysis.server.entity.AnalysisRound" >
insert into p_analysis_round
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="analysisId != null" >
analysis_id,
</if>
<if test="roundName != null" >
round_name,
</if>
<if test="intro != null" >
intro,
</if>
<if test="seqNo != null" >
seq_no,
</if>
<if test="startTime != null" >
start_time,
</if>
<if test="endTime != null" >
end_time,
</if>
<if test="isPublished != null" >
is_published,
</if>
<if test="createdId != null" >
created_id,
</if>
<if test="createdTime != null" >
created_time,
</if>
<if test="modifiedId != null" >
modified_id,
</if>
<if test="modifiedTime != null" >
modified_time,
</if>
<if test="isDeleted != null" >
is_deleted,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="analysisId != null" >
#{analysisId,jdbcType=INTEGER},
</if>
<if test="roundName != null" >
#{roundName,jdbcType=VARCHAR},
</if>
<if test="intro != null" >
#{intro,jdbcType=VARCHAR},
</if>
<if test="seqNo != null" >
#{seqNo,jdbcType=TINYINT},
</if>
<if test="startTime != null" >
#{startTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null" >
#{endTime,jdbcType=TIMESTAMP},
</if>
<if test="isPublished != null" >
#{isPublished,jdbcType=BIT},
</if>
<if test="createdId != null" >
#{createdId,jdbcType=INTEGER},
</if>
<if test="createdTime != null" >
#{createdTime,jdbcType=TIMESTAMP},
</if>
<if test="modifiedId != null" >
#{modifiedId,jdbcType=INTEGER},
</if>
<if test="modifiedTime != null" >
#{modifiedTime,jdbcType=TIMESTAMP},
</if>
<if test="isDeleted != null" >
#{isDeleted,jdbcType=BIT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.pica.cloud.online.exam.analysis.server.entity.AnalysisRound" >
update p_analysis_round
<set >
<if test="analysisId != null" >
analysis_id = #{analysisId,jdbcType=INTEGER},
</if>
<if test="roundName != null" >
round_name = #{roundName,jdbcType=VARCHAR},
</if>
<if test="intro != null" >
intro = #{intro,jdbcType=VARCHAR},
</if>
<if test="seqNo != null" >
seq_no = #{seqNo,jdbcType=TINYINT},
</if>
<if test="startTime != null" >
start_time = #{startTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null" >
end_time = #{endTime,jdbcType=TIMESTAMP},
</if>
<if test="isPublished != null" >
is_published = #{isPublished,jdbcType=BIT},
</if>
<if test="createdId != null" >
created_id = #{createdId,jdbcType=INTEGER},
</if>
<if test="createdTime != null" >
created_time = #{createdTime,jdbcType=TIMESTAMP},
</if>
<if test="modifiedId != null" >
modified_id = #{modifiedId,jdbcType=INTEGER},
</if>
<if test="modifiedTime != null" >
modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
</if>
<if test="isDeleted != null" >
is_deleted = #{isDeleted,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.pica.cloud.online.exam.analysis.server.entity.AnalysisRound" >
update p_analysis_round
set analysis_id = #{analysisId,jdbcType=INTEGER},
round_name = #{roundName,jdbcType=VARCHAR},
intro = #{intro,jdbcType=VARCHAR},
seq_no = #{seqNo,jdbcType=TINYINT},
start_time = #{startTime,jdbcType=TIMESTAMP},
end_time = #{endTime,jdbcType=TIMESTAMP},
is_published = #{isPublished,jdbcType=BIT},
created_id = #{createdId,jdbcType=INTEGER},
created_time = #{createdTime,jdbcType=TIMESTAMP},
modified_id = #{modifiedId,jdbcType=INTEGER},
modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
is_deleted = #{isDeleted,jdbcType=BIT}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.pica.cloud.online.exam.analysis.server.mapper.CHCAnalysisMapper" >
<resultMap id="BaseResultMap" type="com.pica.cloud.online.exam.analysis.server.entity.CHCAnalysis" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="analysis_name" property="analysisName" jdbcType="VARCHAR" />
<result column="main_title" property="mainTitle" jdbcType="VARCHAR" />
<result column="sub_title" property="subTitle" jdbcType="VARCHAR" />
<result column="intro" property="intro" jdbcType="VARCHAR" />
<result column="auth_user" property="authUser" jdbcType="VARCHAR" />
<result column="rule" property="rule" jdbcType="VARCHAR" />
<result column="start_time" property="startTime" jdbcType="TIMESTAMP" />
<result column="end_time" property="endTime" jdbcType="TIMESTAMP" />
<result column="logo_url" property="logoUrl" jdbcType="VARCHAR" />
<result column="prize_url" property="prizeUrl" jdbcType="VARCHAR" />
<result column="type" property="type" jdbcType="TINYINT" />
<result column="is_published" property="isPublished" jdbcType="BIT" />
<result column="created_id" property="createdId" jdbcType="INTEGER" />
<result column="created_time" property="createdTime" jdbcType="TIMESTAMP" />
<result column="modified_id" property="modifiedId" jdbcType="INTEGER" />
<result column="modified_time" property="modifiedTime" jdbcType="TIMESTAMP" />
<result column="is_deleted" property="isDeleted" jdbcType="BIT" />
</resultMap>
<sql id="Base_Column_List" >
id, analysis_name, main_title, sub_title, intro, auth_user, rule, start_time, end_time,
logo_url, prize_url, type, is_published, created_id, created_time, modified_id, modified_time,
is_deleted
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from p_chc_analysis
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from p_chc_analysis
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.pica.cloud.online.exam.analysis.server.entity.CHCAnalysis" >
insert into p_chc_analysis (id, analysis_name, main_title,
sub_title, intro, auth_user,
rule, start_time, end_time,
logo_url, prize_url, type,
is_published, created_id, created_time,
modified_id, modified_time, is_deleted
)
values (#{id,jdbcType=INTEGER}, #{analysisName,jdbcType=VARCHAR}, #{mainTitle,jdbcType=VARCHAR},
#{subTitle,jdbcType=VARCHAR}, #{intro,jdbcType=VARCHAR}, #{authUser,jdbcType=VARCHAR},
#{rule,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
#{logoUrl,jdbcType=VARCHAR}, #{prizeUrl,jdbcType=VARCHAR}, #{type,jdbcType=TINYINT},
#{isPublished,jdbcType=BIT}, #{createdId,jdbcType=INTEGER}, #{createdTime,jdbcType=TIMESTAMP},
#{modifiedId,jdbcType=INTEGER}, #{modifiedTime,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT}
)
</insert>
<insert id="insertSelective" parameterType="com.pica.cloud.online.exam.analysis.server.entity.CHCAnalysis" >
insert into p_chc_analysis
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="analysisName != null" >
analysis_name,
</if>
<if test="mainTitle != null" >
main_title,
</if>
<if test="subTitle != null" >
sub_title,
</if>
<if test="intro != null" >
intro,
</if>
<if test="authUser != null" >
auth_user,
</if>
<if test="rule != null" >
rule,
</if>
<if test="startTime != null" >
start_time,
</if>
<if test="endTime != null" >
end_time,
</if>
<if test="logoUrl != null" >
logo_url,
</if>
<if test="prizeUrl != null" >
prize_url,
</if>
<if test="type != null" >
type,
</if>
<if test="isPublished != null" >
is_published,
</if>
<if test="createdId != null" >
created_id,
</if>
<if test="createdTime != null" >
created_time,
</if>
<if test="modifiedId != null" >
modified_id,
</if>
<if test="modifiedTime != null" >
modified_time,
</if>
<if test="isDeleted != null" >
is_deleted,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="analysisName != null" >
#{analysisName,jdbcType=VARCHAR},
</if>
<if test="mainTitle != null" >
#{mainTitle,jdbcType=VARCHAR},
</if>
<if test="subTitle != null" >
#{subTitle,jdbcType=VARCHAR},
</if>
<if test="intro != null" >
#{intro,jdbcType=VARCHAR},
</if>
<if test="authUser != null" >
#{authUser,jdbcType=VARCHAR},
</if>
<if test="rule != null" >
#{rule,jdbcType=VARCHAR},
</if>
<if test="startTime != null" >
#{startTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null" >
#{endTime,jdbcType=TIMESTAMP},
</if>
<if test="logoUrl != null" >
#{logoUrl,jdbcType=VARCHAR},
</if>
<if test="prizeUrl != null" >
#{prizeUrl,jdbcType=VARCHAR},
</if>
<if test="type != null" >
#{type,jdbcType=TINYINT},
</if>
<if test="isPublished != null" >
#{isPublished,jdbcType=BIT},
</if>
<if test="createdId != null" >
#{createdId,jdbcType=INTEGER},
</if>
<if test="createdTime != null" >
#{createdTime,jdbcType=TIMESTAMP},
</if>
<if test="modifiedId != null" >
#{modifiedId,jdbcType=INTEGER},
</if>
<if test="modifiedTime != null" >
#{modifiedTime,jdbcType=TIMESTAMP},
</if>
<if test="isDeleted != null" >
#{isDeleted,jdbcType=BIT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.pica.cloud.online.exam.analysis.server.entity.CHCAnalysis" >
update p_chc_analysis
<set >
<if test="analysisName != null" >
analysis_name = #{analysisName,jdbcType=VARCHAR},
</if>
<if test="mainTitle != null" >
main_title = #{mainTitle,jdbcType=VARCHAR},
</if>
<if test="subTitle != null" >
sub_title = #{subTitle,jdbcType=VARCHAR},
</if>
<if test="intro != null" >
intro = #{intro,jdbcType=VARCHAR},
</if>
<if test="authUser != null" >
auth_user = #{authUser,jdbcType=VARCHAR},
</if>
<if test="rule != null" >
rule = #{rule,jdbcType=VARCHAR},
</if>
<if test="startTime != null" >
start_time = #{startTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null" >
end_time = #{endTime,jdbcType=TIMESTAMP},
</if>
<if test="logoUrl != null" >
logo_url = #{logoUrl,jdbcType=VARCHAR},
</if>
<if test="prizeUrl != null" >
prize_url = #{prizeUrl,jdbcType=VARCHAR},
</if>
<if test="type != null" >
type = #{type,jdbcType=TINYINT},
</if>
<if test="isPublished != null" >
is_published = #{isPublished,jdbcType=BIT},
</if>
<if test="createdId != null" >
created_id = #{createdId,jdbcType=INTEGER},
</if>
<if test="createdTime != null" >
created_time = #{createdTime,jdbcType=TIMESTAMP},
</if>
<if test="modifiedId != null" >
modified_id = #{modifiedId,jdbcType=INTEGER},
</if>
<if test="modifiedTime != null" >
modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
</if>
<if test="isDeleted != null" >
is_deleted = #{isDeleted,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.pica.cloud.online.exam.analysis.server.entity.CHCAnalysis" >
update p_chc_analysis
set analysis_name = #{analysisName,jdbcType=VARCHAR},
main_title = #{mainTitle,jdbcType=VARCHAR},
sub_title = #{subTitle,jdbcType=VARCHAR},
intro = #{intro,jdbcType=VARCHAR},
auth_user = #{authUser,jdbcType=VARCHAR},
rule = #{rule,jdbcType=VARCHAR},
start_time = #{startTime,jdbcType=TIMESTAMP},
end_time = #{endTime,jdbcType=TIMESTAMP},
logo_url = #{logoUrl,jdbcType=VARCHAR},
prize_url = #{prizeUrl,jdbcType=VARCHAR},
type = #{type,jdbcType=TINYINT},
is_published = #{isPublished,jdbcType=BIT},
created_id = #{createdId,jdbcType=INTEGER},
created_time = #{createdTime,jdbcType=TIMESTAMP},
modified_id = #{modifiedId,jdbcType=INTEGER},
modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
is_deleted = #{isDeleted,jdbcType=BIT}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.pica.cloud.online.exam.analysis.server.mapper.DoctorMapper" >
<resultMap id="BaseResultMap" type="com.pica.cloud.online.exam.analysis.server.entity.Doctor" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="INTEGER" />
<result column="hospital" property="hospital" jdbcType="VARCHAR" />
<result column="title" property="title" jdbcType="VARCHAR" />
<result column="avatar_image_url" property="avatarImageUrl" jdbcType="VARCHAR" />
</resultMap>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
id, name, status, hospital, title, avatar_image_url
from pica.p_doctor
where id = #{id,jdbcType=INTEGER}
limit 1
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.pica.cloud.online.exam.analysis.server.mapper.ReplyImageMapper" >
<resultMap id="BaseResultMap" type="com.pica.cloud.online.exam.analysis.server.entity.ReplyImage" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="reply_id" property="replyId" jdbcType="INTEGER" />
<result column="original_name" property="originalName" jdbcType="VARCHAR" />
<result column="url" property="url" jdbcType="VARCHAR" />
<result column="created_id" property="createdId" jdbcType="INTEGER" />
<result column="created_time" property="createdTime" jdbcType="TIMESTAMP" />
<result column="modified_id" property="modifiedId" jdbcType="INTEGER" />
<result column="modified_time" property="modifiedTime" jdbcType="TIMESTAMP" />
<result column="is_deleted" property="isDeleted" jdbcType="BIT" />
</resultMap>
<sql id="Base_Column_List" >
id, reply_id, original_name, url, created_id, created_time, modified_id, modified_time,
is_deleted
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from p_reply_image
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from p_reply_image
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.pica.cloud.online.exam.analysis.server.entity.ReplyImage" >
insert into p_reply_image (id, reply_id, original_name,
url, created_id, created_time,
modified_id, modified_time, is_deleted
)
values (#{id,jdbcType=INTEGER}, #{replyId,jdbcType=INTEGER}, #{originalName,jdbcType=VARCHAR},
#{url,jdbcType=VARCHAR}, #{createdId,jdbcType=INTEGER}, #{createdTime,jdbcType=TIMESTAMP},
#{modifiedId,jdbcType=INTEGER}, #{modifiedTime,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT}
)
</insert>
<insert id="insertSelective" parameterType="com.pica.cloud.online.exam.analysis.server.entity.ReplyImage" >
insert into p_reply_image
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="replyId != null" >
reply_id,
</if>
<if test="originalName != null" >
original_name,
</if>
<if test="url != null" >
url,
</if>
<if test="createdId != null" >
created_id,
</if>
<if test="createdTime != null" >
created_time,
</if>
<if test="modifiedId != null" >
modified_id,
</if>
<if test="modifiedTime != null" >
modified_time,
</if>
<if test="isDeleted != null" >
is_deleted,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="replyId != null" >
#{replyId,jdbcType=INTEGER},
</if>
<if test="originalName != null" >
#{originalName,jdbcType=VARCHAR},
</if>
<if test="url != null" >
#{url,jdbcType=VARCHAR},
</if>
<if test="createdId != null" >
#{createdId,jdbcType=INTEGER},
</if>
<if test="createdTime != null" >
#{createdTime,jdbcType=TIMESTAMP},
</if>
<if test="modifiedId != null" >
#{modifiedId,jdbcType=INTEGER},
</if>
<if test="modifiedTime != null" >
#{modifiedTime,jdbcType=TIMESTAMP},
</if>
<if test="isDeleted != null" >
#{isDeleted,jdbcType=BIT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.pica.cloud.online.exam.analysis.server.entity.ReplyImage" >
update p_reply_image
<set >
<if test="replyId != null" >
reply_id = #{replyId,jdbcType=INTEGER},
</if>
<if test="originalName != null" >
original_name = #{originalName,jdbcType=VARCHAR},
</if>
<if test="url != null" >
url = #{url,jdbcType=VARCHAR},
</if>
<if test="createdId != null" >
created_id = #{createdId,jdbcType=INTEGER},
</if>
<if test="createdTime != null" >
created_time = #{createdTime,jdbcType=TIMESTAMP},
</if>
<if test="modifiedId != null" >
modified_id = #{modifiedId,jdbcType=INTEGER},
</if>
<if test="modifiedTime != null" >
modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
</if>
<if test="isDeleted != null" >
is_deleted = #{isDeleted,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.pica.cloud.online.exam.analysis.server.entity.ReplyImage" >
update p_reply_image
set reply_id = #{replyId,jdbcType=INTEGER},
original_name = #{originalName,jdbcType=VARCHAR},
url = #{url,jdbcType=VARCHAR},
created_id = #{createdId,jdbcType=INTEGER},
created_time = #{createdTime,jdbcType=TIMESTAMP},
modified_id = #{modifiedId,jdbcType=INTEGER},
modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
is_deleted = #{isDeleted,jdbcType=BIT}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.pica.cloud.online.exam.analysis.server.mapper.ReplyMapper" >
<resultMap id="BaseResultMap" type="com.pica.cloud.online.exam.analysis.server.entity.Reply" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="analysis_round_exam_title_id" property="analysisRoundExamTitleId" jdbcType="INTEGER" />
<result column="user_id" property="userId" jdbcType="INTEGER" />
<result column="content" property="content" jdbcType="VARCHAR" />
<result column="reply_level" property="replyLevel" jdbcType="TINYINT" />
<result column="seq_no" property="seqNo" jdbcType="INTEGER" />
<result column="star_count" property="starCount" jdbcType="INTEGER" />
<result column="at_user_id" property="atUserId" jdbcType="INTEGER" />
<result column="at_content" property="atContent" jdbcType="VARCHAR" />
<result column="created_id" property="createdId" jdbcType="INTEGER" />
<result column="created_time" property="createdTime" jdbcType="TIMESTAMP" />
<result column="modified_id" property="modifiedId" jdbcType="INTEGER" />
<result column="modified_time" property="modifiedTime" jdbcType="TIMESTAMP" />
<result column="is_deleted" property="isDeleted" jdbcType="BIT" />
</resultMap>
<sql id="Base_Column_List" >
id, analysis_round_exam_title_id, user_id, content, reply_level, seq_no, star_count,
at_user_id, at_content, created_id, created_time, modified_id, modified_time, is_deleted
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from p_reply
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectReplyCountByAnalysisRoundExamTitleId" resultType="java.lang.Integer" parameterType="java.lang.Integer" >
select
count(1)
from p_reply
where analysis_round_exam_title_id = #{analysisRoundExamTitleId,jdbcType=INTEGER}
and is_deleted = 0
</select>
<select id="selectReplyListByAnalysisRoundExamTitleId" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from p_reply
where analysis_round_exam_title_id = #{analysisRoundExamTitleId,jdbcType=INTEGER}
and is_deleted = 0
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from p_reply
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.pica.cloud.online.exam.analysis.server.entity.Reply" >
insert into p_reply (id, analysis_round_exam_title_id, user_id,
content, reply_level, seq_no,
star_count, at_user_id, at_content,
created_id, created_time, modified_id,
modified_time, is_deleted)
values (#{id,jdbcType=INTEGER}, #{analysisRoundExamTitleId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER},
#{content,jdbcType=VARCHAR}, #{replyLevel,jdbcType=TINYINT}, #{seqNo,jdbcType=INTEGER},
#{starCount,jdbcType=INTEGER}, #{atUserId,jdbcType=INTEGER}, #{atContent,jdbcType=VARCHAR},
#{createdId,jdbcType=INTEGER}, #{createdTime,jdbcType=TIMESTAMP}, #{modifiedId,jdbcType=INTEGER},
#{modifiedTime,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT})
</insert>
<insert id="insertSelective" parameterType="com.pica.cloud.online.exam.analysis.server.entity.Reply" >
insert into p_reply
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="analysisRoundExamTitleId != null" >
analysis_round_exam_title_id,
</if>
<if test="userId != null" >
user_id,
</if>
<if test="content != null" >
content,
</if>
<if test="replyLevel != null" >
reply_level,
</if>
<if test="seqNo != null" >
seq_no,
</if>
<if test="starCount != null" >
star_count,
</if>
<if test="atUserId != null" >
at_user_id,
</if>
<if test="atContent != null" >
at_content,
</if>
<if test="createdId != null" >
created_id,
</if>
<if test="createdTime != null" >
created_time,
</if>
<if test="modifiedId != null" >
modified_id,
</if>
<if test="modifiedTime != null" >
modified_time,
</if>
<if test="isDeleted != null" >
is_deleted,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="analysisRoundExamTitleId != null" >
#{analysisRoundExamTitleId,jdbcType=INTEGER},
</if>
<if test="userId != null" >
#{userId,jdbcType=INTEGER},
</if>
<if test="content != null" >
#{content,jdbcType=VARCHAR},
</if>
<if test="replyLevel != null" >
#{replyLevel,jdbcType=TINYINT},
</if>
<if test="seqNo != null" >
#{seqNo,jdbcType=INTEGER},
</if>
<if test="starCount != null" >
#{starCount,jdbcType=INTEGER},
</if>
<if test="atUserId != null" >
#{atUserId,jdbcType=INTEGER},
</if>
<if test="atContent != null" >
#{atContent,jdbcType=VARCHAR},
</if>
<if test="createdId != null" >
#{createdId,jdbcType=INTEGER},
</if>
<if test="createdTime != null" >
#{createdTime,jdbcType=TIMESTAMP},
</if>
<if test="modifiedId != null" >
#{modifiedId,jdbcType=INTEGER},
</if>
<if test="modifiedTime != null" >
#{modifiedTime,jdbcType=TIMESTAMP},
</if>
<if test="isDeleted != null" >
#{isDeleted,jdbcType=BIT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.pica.cloud.online.exam.analysis.server.entity.Reply" >
update p_reply
<set >
<if test="analysisRoundExamTitleId != null" >
analysis_round_exam_title_id = #{analysisRoundExamTitleId,jdbcType=INTEGER},
</if>
<if test="userId != null" >
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="content != null" >
content = #{content,jdbcType=VARCHAR},
</if>
<if test="replyLevel != null" >
reply_level = #{replyLevel,jdbcType=TINYINT},
</if>
<if test="seqNo != null" >
seq_no = #{seqNo,jdbcType=INTEGER},
</if>
<if test="starCount != null" >
star_count = #{starCount,jdbcType=INTEGER},
</if>
<if test="atUserId != null" >
at_user_id = #{atUserId,jdbcType=INTEGER},
</if>
<if test="atContent != null" >
at_content = #{atContent,jdbcType=VARCHAR},
</if>
<if test="createdId != null" >
created_id = #{createdId,jdbcType=INTEGER},
</if>
<if test="createdTime != null" >
created_time = #{createdTime,jdbcType=TIMESTAMP},
</if>
<if test="modifiedId != null" >
modified_id = #{modifiedId,jdbcType=INTEGER},
</if>
<if test="modifiedTime != null" >
modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
</if>
<if test="isDeleted != null" >
is_deleted = #{isDeleted,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.pica.cloud.online.exam.analysis.server.entity.Reply" >
update p_reply
set analysis_round_exam_title_id = #{analysisRoundExamTitleId,jdbcType=INTEGER},
user_id = #{userId,jdbcType=INTEGER},
content = #{content,jdbcType=VARCHAR},
reply_level = #{replyLevel,jdbcType=TINYINT},
seq_no = #{seqNo,jdbcType=INTEGER},
star_count = #{starCount,jdbcType=INTEGER},
at_user_id = #{atUserId,jdbcType=INTEGER},
at_content = #{atContent,jdbcType=VARCHAR},
created_id = #{createdId,jdbcType=INTEGER},
created_time = #{createdTime,jdbcType=TIMESTAMP},
modified_id = #{modifiedId,jdbcType=INTEGER},
modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
is_deleted = #{isDeleted,jdbcType=BIT}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.pica.cloud.online.exam.analysis.server.mapper.StarRecordMapper">
<resultMap id="BaseResultMap" type="com.pica.cloud.online.exam.analysis.server.entity.StarRecord">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="analysis_id" jdbcType="INTEGER" property="analysisId" />
<result column="round_id" jdbcType="INTEGER" property="roundId" />
<result column="analysis_round_exam_title_id" jdbcType="INTEGER" property="analysisRoundExamTitleId" />
<result column="reply_id" jdbcType="INTEGER" property="replyId" />
<result column="created_id" jdbcType="INTEGER" property="createdId" />
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
<result column="modified_id" jdbcType="INTEGER" property="modifiedId" />
<result column="modified_time" jdbcType="TIMESTAMP" property="modifiedTime" />
<result column="is_deleted" jdbcType="BIT" property="isDeleted" />
</resultMap>
<sql id="Base_Column_List">
id, analysis_id, round_id, analysis_round_exam_title_id, reply_id, created_id, created_time,
modified_id, modified_time, is_deleted
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from p_star_record
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectStarCountByRoundExamTitleId" parameterType="java.lang.Integer" resultType="java.lang.Integer">
select
count(1)
from p_star_record
where analysis_round_exam_title_id = #{roundExamTitleId,jdbcType=INTEGER}
and is_deleted = 0
</select>
<select id="selectStarCountByReplyId" resultType="java.lang.Integer" parameterType="java.lang.Integer" >
select
count(1)
from p_star_record
where reply_id = #{replyId,jdbcType=INTEGER}
and is_deleted = 0
</select>
<select id="selectStarCountByRecord" parameterType="com.pica.cloud.online.exam.analysis.server.entity.StarRecord" resultType="java.lang.Integer">
select
count(1)
from p_star_record
where reply_id = #{replyId,jdbcType=INTEGER}
and created_id = #{createdId,jdbcType=INTEGER}
and is_deleted = 0
</select>
<select id="selectBySelective" parameterType="com.pica.cloud.online.exam.analysis.server.entity.StarRecord" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from p_star_record
where reply_id = #{replyId,jdbcType=INTEGER}
and created_id = #{createdId,jdbcType=INTEGER}
and is_deleted = 0
limit 1
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from p_star_record
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.pica.cloud.online.exam.analysis.server.entity.StarRecord">
insert into p_star_record (id, analysis_id, round_id,
analysis_round_exam_title_id, reply_id, created_id,
created_time, modified_id, modified_time,
is_deleted)
values (#{id,jdbcType=INTEGER}, #{analysisId,jdbcType=INTEGER}, #{roundId,jdbcType=INTEGER},
#{analysisRoundExamTitleId,jdbcType=INTEGER}, #{replyId,jdbcType=INTEGER}, #{createdId,jdbcType=INTEGER},
#{createdTime,jdbcType=TIMESTAMP}, #{modifiedId,jdbcType=INTEGER}, #{modifiedTime,jdbcType=TIMESTAMP},
#{isDeleted,jdbcType=BIT})
</insert>
<insert id="insertSelective" parameterType="com.pica.cloud.online.exam.analysis.server.entity.StarRecord">
insert into p_star_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="analysisId != null">
analysis_id,
</if>
<if test="roundId != null">
round_id,
</if>
<if test="analysisRoundExamTitleId != null">
analysis_round_exam_title_id,
</if>
<if test="replyId != null">
reply_id,
</if>
<if test="createdId != null">
created_id,
</if>
<if test="createdTime != null">
created_time,
</if>
<if test="modifiedId != null">
modified_id,
</if>
<if test="modifiedTime != null">
modified_time,
</if>
<if test="isDeleted != null">
is_deleted,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="analysisId != null">
#{analysisId,jdbcType=INTEGER},
</if>
<if test="roundId != null">
#{roundId,jdbcType=INTEGER},
</if>
<if test="analysisRoundExamTitleId != null">
#{analysisRoundExamTitleId,jdbcType=INTEGER},
</if>
<if test="replyId != null">
#{replyId,jdbcType=INTEGER},
</if>
<if test="createdId != null">
#{createdId,jdbcType=INTEGER},
</if>
<if test="createdTime != null">
#{createdTime,jdbcType=TIMESTAMP},
</if>
<if test="modifiedId != null">
#{modifiedId,jdbcType=INTEGER},
</if>
<if test="modifiedTime != null">
#{modifiedTime,jdbcType=TIMESTAMP},
</if>
<if test="isDeleted != null">
#{isDeleted,jdbcType=BIT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.pica.cloud.online.exam.analysis.server.entity.StarRecord">
update p_star_record
<set>
<if test="analysisId != null">
analysis_id = #{analysisId,jdbcType=INTEGER},
</if>
<if test="roundId != null">
round_id = #{roundId,jdbcType=INTEGER},
</if>
<if test="analysisRoundExamTitleId != null">
analysis_round_exam_title_id = #{analysisRoundExamTitleId,jdbcType=INTEGER},
</if>
<if test="replyId != null">
reply_id = #{replyId,jdbcType=INTEGER},
</if>
<if test="createdId != null">
created_id = #{createdId,jdbcType=INTEGER},
</if>
<if test="createdTime != null">
created_time = #{createdTime,jdbcType=TIMESTAMP},
</if>
<if test="modifiedId != null">
modified_id = #{modifiedId,jdbcType=INTEGER},
</if>
<if test="modifiedTime != null">
modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
</if>
<if test="isDeleted != null">
is_deleted = #{isDeleted,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.pica.cloud.online.exam.analysis.server.entity.StarRecord">
update p_star_record
set analysis_id = #{analysisId,jdbcType=INTEGER},
round_id = #{roundId,jdbcType=INTEGER},
analysis_round_exam_title_id = #{analysisRoundExamTitleId,jdbcType=INTEGER},
reply_id = #{replyId,jdbcType=INTEGER},
created_id = #{createdId,jdbcType=INTEGER},
created_time = #{createdTime,jdbcType=TIMESTAMP},
modified_id = #{modifiedId,jdbcType=INTEGER},
modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
is_deleted = #{isDeleted,jdbcType=BIT}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
package com.pica.cloud.online.exam.analysis;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
/**
* Unit test for simple App.
*/
public class AppTest
{
/**
* Rigorous Test :-)
*/
@Test
public void shouldAnswerWithTrue()
{
assertTrue( true );
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册