18 changed files with 2363 additions and 5 deletions
@ -0,0 +1,48 @@ |
|||
package com.ccsens.ht.api; |
|||
|
|||
import com.ccsens.cloudutil.annotation.MustLogin; |
|||
import com.ccsens.ht.annotation.DoctorAudit; |
|||
import com.ccsens.ht.bean.dto.IntelligenceDto; |
|||
import com.ccsens.ht.bean.dto.QuestionDto; |
|||
import com.ccsens.ht.bean.vo.IntelligenceVo; |
|||
import com.ccsens.ht.bean.vo.QuestionVo; |
|||
import com.ccsens.ht.service.IIntelligenceService; |
|||
import com.ccsens.util.JsonResponse; |
|||
import com.ccsens.util.bean.dto.QueryDto; |
|||
import io.swagger.annotations.*; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestMethod; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.annotation.Resource; |
|||
import javax.validation.Valid; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: whj |
|||
* @time: 2022/3/11 9:56 |
|||
*/ |
|||
@Slf4j |
|||
@Api(tags = "智能测评",value = "智能测评,1:五边形测评") |
|||
@RestController |
|||
public class IntelligenceController { |
|||
|
|||
@Resource |
|||
private IIntelligenceService intelligenceService; |
|||
|
|||
@MustLogin |
|||
@DoctorAudit |
|||
@ApiOperation(value = "智能测评",notes = "智能测评") |
|||
@ApiImplicitParams({ |
|||
@ApiImplicitParam(name = "json", value = "智能测评", required = true) |
|||
}) |
|||
@RequestMapping(value="/intelligence", method = RequestMethod.POST) |
|||
public JsonResponse<IntelligenceVo.Result> intelligence(@RequestBody @ApiParam @Valid QueryDto<IntelligenceDto.Query> queryDto){ |
|||
log.info("智能测评:{}", queryDto); |
|||
IntelligenceVo.Result result = intelligenceService.intelligence(queryDto.getParam(), queryDto.getUserId()); |
|||
log.info("智能测评结果:{}", result); |
|||
return JsonResponse.newInstance().ok(result); |
|||
} |
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.ccsens.ht.bean.dto; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: whj |
|||
* @time: 2022/3/11 10:32 |
|||
*/ |
|||
public class IntelligenceDto { |
|||
|
|||
@Data |
|||
@ApiModel("智能测评-请求") |
|||
public static class Query { |
|||
@ApiModelProperty("报告单ID") |
|||
private Long patientReportId; |
|||
@ApiModelProperty("题目ID") |
|||
private Long questionId; |
|||
@ApiModelProperty("图片路径") |
|||
private String url; |
|||
} |
|||
} |
@ -0,0 +1,106 @@ |
|||
package com.ccsens.ht.bean.po; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
public class HtPatientIntelligence implements Serializable { |
|||
private Long id; |
|||
|
|||
private Long patientReportId; |
|||
|
|||
private Long questionId; |
|||
|
|||
private String url; |
|||
|
|||
private String result; |
|||
|
|||
private Date createTime; |
|||
|
|||
private Date updateTime; |
|||
|
|||
private Byte isDel; |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
public Long getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(Long id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public Long getPatientReportId() { |
|||
return patientReportId; |
|||
} |
|||
|
|||
public void setPatientReportId(Long patientReportId) { |
|||
this.patientReportId = patientReportId; |
|||
} |
|||
|
|||
public Long getQuestionId() { |
|||
return questionId; |
|||
} |
|||
|
|||
public void setQuestionId(Long questionId) { |
|||
this.questionId = questionId; |
|||
} |
|||
|
|||
public String getUrl() { |
|||
return url; |
|||
} |
|||
|
|||
public void setUrl(String url) { |
|||
this.url = url == null ? null : url.trim(); |
|||
} |
|||
|
|||
public String getResult() { |
|||
return result; |
|||
} |
|||
|
|||
public void setResult(String result) { |
|||
this.result = result == null ? null : result.trim(); |
|||
} |
|||
|
|||
public Date getCreateTime() { |
|||
return createTime; |
|||
} |
|||
|
|||
public void setCreateTime(Date createTime) { |
|||
this.createTime = createTime; |
|||
} |
|||
|
|||
public Date getUpdateTime() { |
|||
return updateTime; |
|||
} |
|||
|
|||
public void setUpdateTime(Date updateTime) { |
|||
this.updateTime = updateTime; |
|||
} |
|||
|
|||
public Byte getIsDel() { |
|||
return isDel; |
|||
} |
|||
|
|||
public void setIsDel(Byte isDel) { |
|||
this.isDel = isDel; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
StringBuilder sb = new StringBuilder(); |
|||
sb.append(getClass().getSimpleName()); |
|||
sb.append(" ["); |
|||
sb.append("Hash = ").append(hashCode()); |
|||
sb.append(", id=").append(id); |
|||
sb.append(", patientReportId=").append(patientReportId); |
|||
sb.append(", questionId=").append(questionId); |
|||
sb.append(", url=").append(url); |
|||
sb.append(", result=").append(result); |
|||
sb.append(", createTime=").append(createTime); |
|||
sb.append(", updateTime=").append(updateTime); |
|||
sb.append(", isDel=").append(isDel); |
|||
sb.append("]"); |
|||
return sb.toString(); |
|||
} |
|||
} |
@ -0,0 +1,701 @@ |
|||
package com.ccsens.ht.bean.po; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
public class HtPatientIntelligenceExample { |
|||
protected String orderByClause; |
|||
|
|||
protected boolean distinct; |
|||
|
|||
protected List<Criteria> oredCriteria; |
|||
|
|||
public HtPatientIntelligenceExample() { |
|||
oredCriteria = new ArrayList<Criteria>(); |
|||
} |
|||
|
|||
public void setOrderByClause(String orderByClause) { |
|||
this.orderByClause = orderByClause; |
|||
} |
|||
|
|||
public String getOrderByClause() { |
|||
return orderByClause; |
|||
} |
|||
|
|||
public void setDistinct(boolean distinct) { |
|||
this.distinct = distinct; |
|||
} |
|||
|
|||
public boolean isDistinct() { |
|||
return distinct; |
|||
} |
|||
|
|||
public List<Criteria> getOredCriteria() { |
|||
return oredCriteria; |
|||
} |
|||
|
|||
public void or(Criteria criteria) { |
|||
oredCriteria.add(criteria); |
|||
} |
|||
|
|||
public Criteria or() { |
|||
Criteria criteria = createCriteriaInternal(); |
|||
oredCriteria.add(criteria); |
|||
return criteria; |
|||
} |
|||
|
|||
public Criteria createCriteria() { |
|||
Criteria criteria = createCriteriaInternal(); |
|||
if (oredCriteria.size() == 0) { |
|||
oredCriteria.add(criteria); |
|||
} |
|||
return criteria; |
|||
} |
|||
|
|||
protected Criteria createCriteriaInternal() { |
|||
Criteria criteria = new Criteria(); |
|||
return criteria; |
|||
} |
|||
|
|||
public void clear() { |
|||
oredCriteria.clear(); |
|||
orderByClause = null; |
|||
distinct = false; |
|||
} |
|||
|
|||
protected abstract static class GeneratedCriteria { |
|||
protected List<Criterion> criteria; |
|||
|
|||
protected GeneratedCriteria() { |
|||
super(); |
|||
criteria = new ArrayList<Criterion>(); |
|||
} |
|||
|
|||
public boolean isValid() { |
|||
return criteria.size() > 0; |
|||
} |
|||
|
|||
public List<Criterion> getAllCriteria() { |
|||
return criteria; |
|||
} |
|||
|
|||
public List<Criterion> getCriteria() { |
|||
return criteria; |
|||
} |
|||
|
|||
protected void addCriterion(String condition) { |
|||
if (condition == null) { |
|||
throw new RuntimeException("Value for condition cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition)); |
|||
} |
|||
|
|||
protected void addCriterion(String condition, Object value, String property) { |
|||
if (value == null) { |
|||
throw new RuntimeException("Value for " + property + " cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition, value)); |
|||
} |
|||
|
|||
protected void addCriterion(String condition, Object value1, Object value2, String property) { |
|||
if (value1 == null || value2 == null) { |
|||
throw new RuntimeException("Between values for " + property + " cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition, value1, value2)); |
|||
} |
|||
|
|||
public Criteria andIdIsNull() { |
|||
addCriterion("id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdIsNotNull() { |
|||
addCriterion("id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdEqualTo(Long value) { |
|||
addCriterion("id =", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotEqualTo(Long value) { |
|||
addCriterion("id <>", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdGreaterThan(Long value) { |
|||
addCriterion("id >", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("id >=", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdLessThan(Long value) { |
|||
addCriterion("id <", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdLessThanOrEqualTo(Long value) { |
|||
addCriterion("id <=", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdIn(List<Long> values) { |
|||
addCriterion("id in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotIn(List<Long> values) { |
|||
addCriterion("id not in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdBetween(Long value1, Long value2) { |
|||
addCriterion("id between", value1, value2, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotBetween(Long value1, Long value2) { |
|||
addCriterion("id not between", value1, value2, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPatientReportIdIsNull() { |
|||
addCriterion("patient_report_id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPatientReportIdIsNotNull() { |
|||
addCriterion("patient_report_id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPatientReportIdEqualTo(Long value) { |
|||
addCriterion("patient_report_id =", value, "patientReportId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPatientReportIdNotEqualTo(Long value) { |
|||
addCriterion("patient_report_id <>", value, "patientReportId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPatientReportIdGreaterThan(Long value) { |
|||
addCriterion("patient_report_id >", value, "patientReportId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPatientReportIdGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("patient_report_id >=", value, "patientReportId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPatientReportIdLessThan(Long value) { |
|||
addCriterion("patient_report_id <", value, "patientReportId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPatientReportIdLessThanOrEqualTo(Long value) { |
|||
addCriterion("patient_report_id <=", value, "patientReportId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPatientReportIdIn(List<Long> values) { |
|||
addCriterion("patient_report_id in", values, "patientReportId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPatientReportIdNotIn(List<Long> values) { |
|||
addCriterion("patient_report_id not in", values, "patientReportId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPatientReportIdBetween(Long value1, Long value2) { |
|||
addCriterion("patient_report_id between", value1, value2, "patientReportId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPatientReportIdNotBetween(Long value1, Long value2) { |
|||
addCriterion("patient_report_id not between", value1, value2, "patientReportId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andQuestionIdIsNull() { |
|||
addCriterion("question_id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andQuestionIdIsNotNull() { |
|||
addCriterion("question_id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andQuestionIdEqualTo(Long value) { |
|||
addCriterion("question_id =", value, "questionId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andQuestionIdNotEqualTo(Long value) { |
|||
addCriterion("question_id <>", value, "questionId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andQuestionIdGreaterThan(Long value) { |
|||
addCriterion("question_id >", value, "questionId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andQuestionIdGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("question_id >=", value, "questionId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andQuestionIdLessThan(Long value) { |
|||
addCriterion("question_id <", value, "questionId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andQuestionIdLessThanOrEqualTo(Long value) { |
|||
addCriterion("question_id <=", value, "questionId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andQuestionIdIn(List<Long> values) { |
|||
addCriterion("question_id in", values, "questionId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andQuestionIdNotIn(List<Long> values) { |
|||
addCriterion("question_id not in", values, "questionId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andQuestionIdBetween(Long value1, Long value2) { |
|||
addCriterion("question_id between", value1, value2, "questionId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andQuestionIdNotBetween(Long value1, Long value2) { |
|||
addCriterion("question_id not between", value1, value2, "questionId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlIsNull() { |
|||
addCriterion("url is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlIsNotNull() { |
|||
addCriterion("url is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlEqualTo(String value) { |
|||
addCriterion("url =", value, "url"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlNotEqualTo(String value) { |
|||
addCriterion("url <>", value, "url"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlGreaterThan(String value) { |
|||
addCriterion("url >", value, "url"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlGreaterThanOrEqualTo(String value) { |
|||
addCriterion("url >=", value, "url"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlLessThan(String value) { |
|||
addCriterion("url <", value, "url"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlLessThanOrEqualTo(String value) { |
|||
addCriterion("url <=", value, "url"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlLike(String value) { |
|||
addCriterion("url like", value, "url"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlNotLike(String value) { |
|||
addCriterion("url not like", value, "url"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlIn(List<String> values) { |
|||
addCriterion("url in", values, "url"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlNotIn(List<String> values) { |
|||
addCriterion("url not in", values, "url"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlBetween(String value1, String value2) { |
|||
addCriterion("url between", value1, value2, "url"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlNotBetween(String value1, String value2) { |
|||
addCriterion("url not between", value1, value2, "url"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andResultIsNull() { |
|||
addCriterion("result is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andResultIsNotNull() { |
|||
addCriterion("result is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andResultEqualTo(String value) { |
|||
addCriterion("result =", value, "result"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andResultNotEqualTo(String value) { |
|||
addCriterion("result <>", value, "result"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andResultGreaterThan(String value) { |
|||
addCriterion("result >", value, "result"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andResultGreaterThanOrEqualTo(String value) { |
|||
addCriterion("result >=", value, "result"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andResultLessThan(String value) { |
|||
addCriterion("result <", value, "result"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andResultLessThanOrEqualTo(String value) { |
|||
addCriterion("result <=", value, "result"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andResultLike(String value) { |
|||
addCriterion("result like", value, "result"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andResultNotLike(String value) { |
|||
addCriterion("result not like", value, "result"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andResultIn(List<String> values) { |
|||
addCriterion("result in", values, "result"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andResultNotIn(List<String> values) { |
|||
addCriterion("result not in", values, "result"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andResultBetween(String value1, String value2) { |
|||
addCriterion("result between", value1, value2, "result"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andResultNotBetween(String value1, String value2) { |
|||
addCriterion("result not between", value1, value2, "result"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeIsNull() { |
|||
addCriterion("create_time is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeIsNotNull() { |
|||
addCriterion("create_time is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeEqualTo(Date value) { |
|||
addCriterion("create_time =", value, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeNotEqualTo(Date value) { |
|||
addCriterion("create_time <>", value, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeGreaterThan(Date value) { |
|||
addCriterion("create_time >", value, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { |
|||
addCriterion("create_time >=", value, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeLessThan(Date value) { |
|||
addCriterion("create_time <", value, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeLessThanOrEqualTo(Date value) { |
|||
addCriterion("create_time <=", value, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeIn(List<Date> values) { |
|||
addCriterion("create_time in", values, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeNotIn(List<Date> values) { |
|||
addCriterion("create_time not in", values, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeBetween(Date value1, Date value2) { |
|||
addCriterion("create_time between", value1, value2, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeNotBetween(Date value1, Date value2) { |
|||
addCriterion("create_time not between", value1, value2, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeIsNull() { |
|||
addCriterion("update_time is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeIsNotNull() { |
|||
addCriterion("update_time is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeEqualTo(Date value) { |
|||
addCriterion("update_time =", value, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeNotEqualTo(Date value) { |
|||
addCriterion("update_time <>", value, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeGreaterThan(Date value) { |
|||
addCriterion("update_time >", value, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { |
|||
addCriterion("update_time >=", value, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeLessThan(Date value) { |
|||
addCriterion("update_time <", value, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { |
|||
addCriterion("update_time <=", value, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeIn(List<Date> values) { |
|||
addCriterion("update_time in", values, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeNotIn(List<Date> values) { |
|||
addCriterion("update_time not in", values, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeBetween(Date value1, Date value2) { |
|||
addCriterion("update_time between", value1, value2, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { |
|||
addCriterion("update_time not between", value1, value2, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIsDelIsNull() { |
|||
addCriterion("is_del is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIsDelIsNotNull() { |
|||
addCriterion("is_del is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIsDelEqualTo(Byte value) { |
|||
addCriterion("is_del =", value, "isDel"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIsDelNotEqualTo(Byte value) { |
|||
addCriterion("is_del <>", value, "isDel"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIsDelGreaterThan(Byte value) { |
|||
addCriterion("is_del >", value, "isDel"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIsDelGreaterThanOrEqualTo(Byte value) { |
|||
addCriterion("is_del >=", value, "isDel"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIsDelLessThan(Byte value) { |
|||
addCriterion("is_del <", value, "isDel"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIsDelLessThanOrEqualTo(Byte value) { |
|||
addCriterion("is_del <=", value, "isDel"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIsDelIn(List<Byte> values) { |
|||
addCriterion("is_del in", values, "isDel"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIsDelNotIn(List<Byte> values) { |
|||
addCriterion("is_del not in", values, "isDel"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIsDelBetween(Byte value1, Byte value2) { |
|||
addCriterion("is_del between", value1, value2, "isDel"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIsDelNotBetween(Byte value1, Byte value2) { |
|||
addCriterion("is_del not between", value1, value2, "isDel"); |
|||
return (Criteria) this; |
|||
} |
|||
} |
|||
|
|||
public static class Criteria extends GeneratedCriteria { |
|||
|
|||
protected Criteria() { |
|||
super(); |
|||
} |
|||
} |
|||
|
|||
public static class Criterion { |
|||
private String condition; |
|||
|
|||
private Object value; |
|||
|
|||
private Object secondValue; |
|||
|
|||
private boolean noValue; |
|||
|
|||
private boolean singleValue; |
|||
|
|||
private boolean betweenValue; |
|||
|
|||
private boolean listValue; |
|||
|
|||
private String typeHandler; |
|||
|
|||
public String getCondition() { |
|||
return condition; |
|||
} |
|||
|
|||
public Object getValue() { |
|||
return value; |
|||
} |
|||
|
|||
public Object getSecondValue() { |
|||
return secondValue; |
|||
} |
|||
|
|||
public boolean isNoValue() { |
|||
return noValue; |
|||
} |
|||
|
|||
public boolean isSingleValue() { |
|||
return singleValue; |
|||
} |
|||
|
|||
public boolean isBetweenValue() { |
|||
return betweenValue; |
|||
} |
|||
|
|||
public boolean isListValue() { |
|||
return listValue; |
|||
} |
|||
|
|||
public String getTypeHandler() { |
|||
return typeHandler; |
|||
} |
|||
|
|||
protected Criterion(String condition) { |
|||
super(); |
|||
this.condition = condition; |
|||
this.typeHandler = null; |
|||
this.noValue = true; |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value, String typeHandler) { |
|||
super(); |
|||
this.condition = condition; |
|||
this.value = value; |
|||
this.typeHandler = typeHandler; |
|||
if (value instanceof List<?>) { |
|||
this.listValue = true; |
|||
} else { |
|||
this.singleValue = true; |
|||
} |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value) { |
|||
this(condition, value, null); |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { |
|||
super(); |
|||
this.condition = condition; |
|||
this.value = value; |
|||
this.secondValue = secondValue; |
|||
this.typeHandler = typeHandler; |
|||
this.betweenValue = true; |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value, Object secondValue) { |
|||
this(condition, value, secondValue, null); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,95 @@ |
|||
package com.ccsens.ht.bean.po; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
public class HtQuestionIntelligence implements Serializable { |
|||
private Long id; |
|||
|
|||
private Long questionId; |
|||
|
|||
private String url; |
|||
|
|||
private Byte type; |
|||
|
|||
private Date createTime; |
|||
|
|||
private Date updateTime; |
|||
|
|||
private Byte isDel; |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
public Long getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(Long id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public Long getQuestionId() { |
|||
return questionId; |
|||
} |
|||
|
|||
public void setQuestionId(Long questionId) { |
|||
this.questionId = questionId; |
|||
} |
|||
|
|||
public String getUrl() { |
|||
return url; |
|||
} |
|||
|
|||
public void setUrl(String url) { |
|||
this.url = url == null ? null : url.trim(); |
|||
} |
|||
|
|||
public Byte getType() { |
|||
return type; |
|||
} |
|||
|
|||
public void setType(Byte type) { |
|||
this.type = type; |
|||
} |
|||
|
|||
public Date getCreateTime() { |
|||
return createTime; |
|||
} |
|||
|
|||
public void setCreateTime(Date createTime) { |
|||
this.createTime = createTime; |
|||
} |
|||
|
|||
public Date getUpdateTime() { |
|||
return updateTime; |
|||
} |
|||
|
|||
public void setUpdateTime(Date updateTime) { |
|||
this.updateTime = updateTime; |
|||
} |
|||
|
|||
public Byte getIsDel() { |
|||
return isDel; |
|||
} |
|||
|
|||
public void setIsDel(Byte isDel) { |
|||
this.isDel = isDel; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
StringBuilder sb = new StringBuilder(); |
|||
sb.append(getClass().getSimpleName()); |
|||
sb.append(" ["); |
|||
sb.append("Hash = ").append(hashCode()); |
|||
sb.append(", id=").append(id); |
|||
sb.append(", questionId=").append(questionId); |
|||
sb.append(", url=").append(url); |
|||
sb.append(", type=").append(type); |
|||
sb.append(", createTime=").append(createTime); |
|||
sb.append(", updateTime=").append(updateTime); |
|||
sb.append(", isDel=").append(isDel); |
|||
sb.append("]"); |
|||
return sb.toString(); |
|||
} |
|||
} |
@ -0,0 +1,631 @@ |
|||
package com.ccsens.ht.bean.po; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
public class HtQuestionIntelligenceExample { |
|||
protected String orderByClause; |
|||
|
|||
protected boolean distinct; |
|||
|
|||
protected List<Criteria> oredCriteria; |
|||
|
|||
public HtQuestionIntelligenceExample() { |
|||
oredCriteria = new ArrayList<Criteria>(); |
|||
} |
|||
|
|||
public void setOrderByClause(String orderByClause) { |
|||
this.orderByClause = orderByClause; |
|||
} |
|||
|
|||
public String getOrderByClause() { |
|||
return orderByClause; |
|||
} |
|||
|
|||
public void setDistinct(boolean distinct) { |
|||
this.distinct = distinct; |
|||
} |
|||
|
|||
public boolean isDistinct() { |
|||
return distinct; |
|||
} |
|||
|
|||
public List<Criteria> getOredCriteria() { |
|||
return oredCriteria; |
|||
} |
|||
|
|||
public void or(Criteria criteria) { |
|||
oredCriteria.add(criteria); |
|||
} |
|||
|
|||
public Criteria or() { |
|||
Criteria criteria = createCriteriaInternal(); |
|||
oredCriteria.add(criteria); |
|||
return criteria; |
|||
} |
|||
|
|||
public Criteria createCriteria() { |
|||
Criteria criteria = createCriteriaInternal(); |
|||
if (oredCriteria.size() == 0) { |
|||
oredCriteria.add(criteria); |
|||
} |
|||
return criteria; |
|||
} |
|||
|
|||
protected Criteria createCriteriaInternal() { |
|||
Criteria criteria = new Criteria(); |
|||
return criteria; |
|||
} |
|||
|
|||
public void clear() { |
|||
oredCriteria.clear(); |
|||
orderByClause = null; |
|||
distinct = false; |
|||
} |
|||
|
|||
protected abstract static class GeneratedCriteria { |
|||
protected List<Criterion> criteria; |
|||
|
|||
protected GeneratedCriteria() { |
|||
super(); |
|||
criteria = new ArrayList<Criterion>(); |
|||
} |
|||
|
|||
public boolean isValid() { |
|||
return criteria.size() > 0; |
|||
} |
|||
|
|||
public List<Criterion> getAllCriteria() { |
|||
return criteria; |
|||
} |
|||
|
|||
public List<Criterion> getCriteria() { |
|||
return criteria; |
|||
} |
|||
|
|||
protected void addCriterion(String condition) { |
|||
if (condition == null) { |
|||
throw new RuntimeException("Value for condition cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition)); |
|||
} |
|||
|
|||
protected void addCriterion(String condition, Object value, String property) { |
|||
if (value == null) { |
|||
throw new RuntimeException("Value for " + property + " cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition, value)); |
|||
} |
|||
|
|||
protected void addCriterion(String condition, Object value1, Object value2, String property) { |
|||
if (value1 == null || value2 == null) { |
|||
throw new RuntimeException("Between values for " + property + " cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition, value1, value2)); |
|||
} |
|||
|
|||
public Criteria andIdIsNull() { |
|||
addCriterion("id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdIsNotNull() { |
|||
addCriterion("id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdEqualTo(Long value) { |
|||
addCriterion("id =", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotEqualTo(Long value) { |
|||
addCriterion("id <>", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdGreaterThan(Long value) { |
|||
addCriterion("id >", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("id >=", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdLessThan(Long value) { |
|||
addCriterion("id <", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdLessThanOrEqualTo(Long value) { |
|||
addCriterion("id <=", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdIn(List<Long> values) { |
|||
addCriterion("id in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotIn(List<Long> values) { |
|||
addCriterion("id not in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdBetween(Long value1, Long value2) { |
|||
addCriterion("id between", value1, value2, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotBetween(Long value1, Long value2) { |
|||
addCriterion("id not between", value1, value2, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andQuestionIdIsNull() { |
|||
addCriterion("question_id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andQuestionIdIsNotNull() { |
|||
addCriterion("question_id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andQuestionIdEqualTo(Long value) { |
|||
addCriterion("question_id =", value, "questionId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andQuestionIdNotEqualTo(Long value) { |
|||
addCriterion("question_id <>", value, "questionId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andQuestionIdGreaterThan(Long value) { |
|||
addCriterion("question_id >", value, "questionId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andQuestionIdGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("question_id >=", value, "questionId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andQuestionIdLessThan(Long value) { |
|||
addCriterion("question_id <", value, "questionId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andQuestionIdLessThanOrEqualTo(Long value) { |
|||
addCriterion("question_id <=", value, "questionId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andQuestionIdIn(List<Long> values) { |
|||
addCriterion("question_id in", values, "questionId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andQuestionIdNotIn(List<Long> values) { |
|||
addCriterion("question_id not in", values, "questionId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andQuestionIdBetween(Long value1, Long value2) { |
|||
addCriterion("question_id between", value1, value2, "questionId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andQuestionIdNotBetween(Long value1, Long value2) { |
|||
addCriterion("question_id not between", value1, value2, "questionId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlIsNull() { |
|||
addCriterion("url is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlIsNotNull() { |
|||
addCriterion("url is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlEqualTo(String value) { |
|||
addCriterion("url =", value, "url"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlNotEqualTo(String value) { |
|||
addCriterion("url <>", value, "url"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlGreaterThan(String value) { |
|||
addCriterion("url >", value, "url"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlGreaterThanOrEqualTo(String value) { |
|||
addCriterion("url >=", value, "url"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlLessThan(String value) { |
|||
addCriterion("url <", value, "url"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlLessThanOrEqualTo(String value) { |
|||
addCriterion("url <=", value, "url"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlLike(String value) { |
|||
addCriterion("url like", value, "url"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlNotLike(String value) { |
|||
addCriterion("url not like", value, "url"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlIn(List<String> values) { |
|||
addCriterion("url in", values, "url"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlNotIn(List<String> values) { |
|||
addCriterion("url not in", values, "url"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlBetween(String value1, String value2) { |
|||
addCriterion("url between", value1, value2, "url"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUrlNotBetween(String value1, String value2) { |
|||
addCriterion("url not between", value1, value2, "url"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTypeIsNull() { |
|||
addCriterion("type is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTypeIsNotNull() { |
|||
addCriterion("type is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTypeEqualTo(Byte value) { |
|||
addCriterion("type =", value, "type"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTypeNotEqualTo(Byte value) { |
|||
addCriterion("type <>", value, "type"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTypeGreaterThan(Byte value) { |
|||
addCriterion("type >", value, "type"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTypeGreaterThanOrEqualTo(Byte value) { |
|||
addCriterion("type >=", value, "type"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTypeLessThan(Byte value) { |
|||
addCriterion("type <", value, "type"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTypeLessThanOrEqualTo(Byte value) { |
|||
addCriterion("type <=", value, "type"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTypeIn(List<Byte> values) { |
|||
addCriterion("type in", values, "type"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTypeNotIn(List<Byte> values) { |
|||
addCriterion("type not in", values, "type"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTypeBetween(Byte value1, Byte value2) { |
|||
addCriterion("type between", value1, value2, "type"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTypeNotBetween(Byte value1, Byte value2) { |
|||
addCriterion("type not between", value1, value2, "type"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeIsNull() { |
|||
addCriterion("create_time is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeIsNotNull() { |
|||
addCriterion("create_time is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeEqualTo(Date value) { |
|||
addCriterion("create_time =", value, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeNotEqualTo(Date value) { |
|||
addCriterion("create_time <>", value, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeGreaterThan(Date value) { |
|||
addCriterion("create_time >", value, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { |
|||
addCriterion("create_time >=", value, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeLessThan(Date value) { |
|||
addCriterion("create_time <", value, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeLessThanOrEqualTo(Date value) { |
|||
addCriterion("create_time <=", value, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeIn(List<Date> values) { |
|||
addCriterion("create_time in", values, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeNotIn(List<Date> values) { |
|||
addCriterion("create_time not in", values, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeBetween(Date value1, Date value2) { |
|||
addCriterion("create_time between", value1, value2, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreateTimeNotBetween(Date value1, Date value2) { |
|||
addCriterion("create_time not between", value1, value2, "createTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeIsNull() { |
|||
addCriterion("update_time is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeIsNotNull() { |
|||
addCriterion("update_time is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeEqualTo(Date value) { |
|||
addCriterion("update_time =", value, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeNotEqualTo(Date value) { |
|||
addCriterion("update_time <>", value, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeGreaterThan(Date value) { |
|||
addCriterion("update_time >", value, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { |
|||
addCriterion("update_time >=", value, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeLessThan(Date value) { |
|||
addCriterion("update_time <", value, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { |
|||
addCriterion("update_time <=", value, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeIn(List<Date> values) { |
|||
addCriterion("update_time in", values, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeNotIn(List<Date> values) { |
|||
addCriterion("update_time not in", values, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeBetween(Date value1, Date value2) { |
|||
addCriterion("update_time between", value1, value2, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { |
|||
addCriterion("update_time not between", value1, value2, "updateTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIsDelIsNull() { |
|||
addCriterion("is_del is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIsDelIsNotNull() { |
|||
addCriterion("is_del is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIsDelEqualTo(Byte value) { |
|||
addCriterion("is_del =", value, "isDel"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIsDelNotEqualTo(Byte value) { |
|||
addCriterion("is_del <>", value, "isDel"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIsDelGreaterThan(Byte value) { |
|||
addCriterion("is_del >", value, "isDel"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIsDelGreaterThanOrEqualTo(Byte value) { |
|||
addCriterion("is_del >=", value, "isDel"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIsDelLessThan(Byte value) { |
|||
addCriterion("is_del <", value, "isDel"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIsDelLessThanOrEqualTo(Byte value) { |
|||
addCriterion("is_del <=", value, "isDel"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIsDelIn(List<Byte> values) { |
|||
addCriterion("is_del in", values, "isDel"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIsDelNotIn(List<Byte> values) { |
|||
addCriterion("is_del not in", values, "isDel"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIsDelBetween(Byte value1, Byte value2) { |
|||
addCriterion("is_del between", value1, value2, "isDel"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIsDelNotBetween(Byte value1, Byte value2) { |
|||
addCriterion("is_del not between", value1, value2, "isDel"); |
|||
return (Criteria) this; |
|||
} |
|||
} |
|||
|
|||
public static class Criteria extends GeneratedCriteria { |
|||
|
|||
protected Criteria() { |
|||
super(); |
|||
} |
|||
} |
|||
|
|||
public static class Criterion { |
|||
private String condition; |
|||
|
|||
private Object value; |
|||
|
|||
private Object secondValue; |
|||
|
|||
private boolean noValue; |
|||
|
|||
private boolean singleValue; |
|||
|
|||
private boolean betweenValue; |
|||
|
|||
private boolean listValue; |
|||
|
|||
private String typeHandler; |
|||
|
|||
public String getCondition() { |
|||
return condition; |
|||
} |
|||
|
|||
public Object getValue() { |
|||
return value; |
|||
} |
|||
|
|||
public Object getSecondValue() { |
|||
return secondValue; |
|||
} |
|||
|
|||
public boolean isNoValue() { |
|||
return noValue; |
|||
} |
|||
|
|||
public boolean isSingleValue() { |
|||
return singleValue; |
|||
} |
|||
|
|||
public boolean isBetweenValue() { |
|||
return betweenValue; |
|||
} |
|||
|
|||
public boolean isListValue() { |
|||
return listValue; |
|||
} |
|||
|
|||
public String getTypeHandler() { |
|||
return typeHandler; |
|||
} |
|||
|
|||
protected Criterion(String condition) { |
|||
super(); |
|||
this.condition = condition; |
|||
this.typeHandler = null; |
|||
this.noValue = true; |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value, String typeHandler) { |
|||
super(); |
|||
this.condition = condition; |
|||
this.value = value; |
|||
this.typeHandler = typeHandler; |
|||
if (value instanceof List<?>) { |
|||
this.listValue = true; |
|||
} else { |
|||
this.singleValue = true; |
|||
} |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value) { |
|||
this(condition, value, null); |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { |
|||
super(); |
|||
this.condition = condition; |
|||
this.value = value; |
|||
this.secondValue = secondValue; |
|||
this.typeHandler = typeHandler; |
|||
this.betweenValue = true; |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value, Object secondValue) { |
|||
this(condition, value, secondValue, null); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.ccsens.ht.bean.vo; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: whj |
|||
* @time: 2022/3/11 10:32 |
|||
*/ |
|||
public class IntelligenceVo { |
|||
|
|||
@Data |
|||
@ApiModel("智能测评结果-返回") |
|||
public static class Result{ |
|||
@ApiModelProperty("有无返回结果 0:无答案 1:有答案") |
|||
private byte result; |
|||
@ApiModelProperty("选项ID") |
|||
private Long optionId; |
|||
} |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.ccsens.ht.persist.mapper; |
|||
|
|||
import com.ccsens.ht.bean.po.HtPatientIntelligence; |
|||
import com.ccsens.ht.bean.po.HtPatientIntelligenceExample; |
|||
import java.util.List; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
public interface HtPatientIntelligenceMapper { |
|||
long countByExample(HtPatientIntelligenceExample example); |
|||
|
|||
int deleteByExample(HtPatientIntelligenceExample example); |
|||
|
|||
int deleteByPrimaryKey(Long id); |
|||
|
|||
int insert(HtPatientIntelligence record); |
|||
|
|||
int insertSelective(HtPatientIntelligence record); |
|||
|
|||
List<HtPatientIntelligence> selectByExample(HtPatientIntelligenceExample example); |
|||
|
|||
HtPatientIntelligence selectByPrimaryKey(Long id); |
|||
|
|||
int updateByExampleSelective(@Param("record") HtPatientIntelligence record, @Param("example") HtPatientIntelligenceExample example); |
|||
|
|||
int updateByExample(@Param("record") HtPatientIntelligence record, @Param("example") HtPatientIntelligenceExample example); |
|||
|
|||
int updateByPrimaryKeySelective(HtPatientIntelligence record); |
|||
|
|||
int updateByPrimaryKey(HtPatientIntelligence record); |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.ccsens.ht.persist.mapper; |
|||
|
|||
import com.ccsens.ht.bean.po.HtQuestionIntelligence; |
|||
import com.ccsens.ht.bean.po.HtQuestionIntelligenceExample; |
|||
import java.util.List; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
public interface HtQuestionIntelligenceMapper { |
|||
long countByExample(HtQuestionIntelligenceExample example); |
|||
|
|||
int deleteByExample(HtQuestionIntelligenceExample example); |
|||
|
|||
int deleteByPrimaryKey(Long id); |
|||
|
|||
int insert(HtQuestionIntelligence record); |
|||
|
|||
int insertSelective(HtQuestionIntelligence record); |
|||
|
|||
List<HtQuestionIntelligence> selectByExample(HtQuestionIntelligenceExample example); |
|||
|
|||
HtQuestionIntelligence selectByPrimaryKey(Long id); |
|||
|
|||
int updateByExampleSelective(@Param("record") HtQuestionIntelligence record, @Param("example") HtQuestionIntelligenceExample example); |
|||
|
|||
int updateByExample(@Param("record") HtQuestionIntelligence record, @Param("example") HtQuestionIntelligenceExample example); |
|||
|
|||
int updateByPrimaryKeySelective(HtQuestionIntelligence record); |
|||
|
|||
int updateByPrimaryKey(HtQuestionIntelligence record); |
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.ccsens.ht.service; |
|||
|
|||
import com.ccsens.ht.bean.dto.IntelligenceDto; |
|||
import com.ccsens.ht.bean.vo.IntelligenceVo; |
|||
|
|||
/** |
|||
* @author: whj |
|||
* @time: 2022/3/11 10:58 |
|||
*/ |
|||
public interface IIntelligenceService { |
|||
/** |
|||
* 智能测评 |
|||
* @param param 请求参数 |
|||
* @param userId 操作人ID |
|||
* @return 结果 |
|||
*/ |
|||
IntelligenceVo.Result intelligence(IntelligenceDto.Query param, Long userId); |
|||
} |
@ -0,0 +1,135 @@ |
|||
package com.ccsens.ht.service; |
|||
|
|||
import cn.hutool.core.collection.CollectionUtil; |
|||
import cn.hutool.core.lang.Snowflake; |
|||
import cn.hutool.core.util.StrUtil; |
|||
import com.ccsens.ht.bean.dto.IntelligenceDto; |
|||
import com.ccsens.ht.bean.po.*; |
|||
import com.ccsens.ht.bean.vo.IntelligenceVo; |
|||
import com.ccsens.ht.persist.mapper.HtPatientIntelligenceMapper; |
|||
import com.ccsens.ht.persist.mapper.HtQuestionIntelligenceMapper; |
|||
import com.ccsens.ht.persist.mapper.HtQuestionOptionMapper; |
|||
import com.ccsens.ht.uitl.Constant; |
|||
import com.ccsens.util.PropUtil; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Propagation; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import javax.annotation.Resource; |
|||
|
|||
|
|||
import java.io.*; |
|||
import java.math.BigDecimal; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: whj |
|||
* @time: 2022/3/11 10:58 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) |
|||
public class IntelligenceService implements IIntelligenceService { |
|||
|
|||
@Resource |
|||
private Snowflake snowflake; |
|||
@Resource |
|||
private HtQuestionIntelligenceMapper htQuestionIntelligenceMapper; |
|||
@Resource |
|||
private HtPatientIntelligenceMapper htPatientIntelligenceMapper; |
|||
@Resource |
|||
private HtQuestionOptionMapper htQuestionOptionMapper; |
|||
|
|||
|
|||
@Override |
|||
public IntelligenceVo.Result intelligence(IntelligenceDto.Query param, Long userId) { |
|||
IntelligenceVo.Result result = new IntelligenceVo.Result(); |
|||
// 查询智能请求
|
|||
HtQuestionIntelligenceExample intelligenceExample = new HtQuestionIntelligenceExample(); |
|||
intelligenceExample.createCriteria().andQuestionIdEqualTo(param.getQuestionId()); |
|||
intelligenceExample.setOrderByClause("id desc limit 1"); |
|||
List<HtQuestionIntelligence> htQuestionIntelligences = |
|||
htQuestionIntelligenceMapper.selectByExample(intelligenceExample); |
|||
log.info("测评路径:{}", htQuestionIntelligences); |
|||
if (CollectionUtil.isEmpty(htQuestionIntelligences)) { |
|||
result.setResult(Constant.Intelligence.RESULT_FAIL); |
|||
return result; |
|||
} |
|||
HtQuestionIntelligence url = htQuestionIntelligences.get(0); |
|||
StringBuilder builder = new StringBuilder(); |
|||
switch (url.getType()) { |
|||
case Constant.Intelligence.METHOD_TYPE_PYTHON: |
|||
String path = PropUtil.path + "python/" + param.getPatientReportId() + "/" + param.getQuestionId() + ".txt"; |
|||
File file = new File(path); |
|||
if (!file.getParentFile().exists()) { |
|||
file.getParentFile().mkdirs(); |
|||
} |
|||
if (!file.exists()) { |
|||
try { |
|||
file.createNewFile(); |
|||
} catch (IOException e) { |
|||
e.printStackTrace(); |
|||
} |
|||
} |
|||
String python = url.getUrl().replace("{img}", getImg(param.getUrl())); |
|||
log.info("python:{}", python); |
|||
Process proc = null; |
|||
BufferedReader in = null; |
|||
String line = null; |
|||
try { |
|||
|
|||
proc = Runtime.getRuntime().exec(python, null, file); |
|||
|
|||
// InputStream inputStream = proc.getInputStream();
|
|||
// byte[] buf = new byte[1024];
|
|||
// int length = -1;
|
|||
// while ((length = inputStream.read(buf) ) > 0) {
|
|||
// builder.append(new String(buf, 0, length));
|
|||
// }
|
|||
in = new BufferedReader(new InputStreamReader(proc.getInputStream())); |
|||
while ((line = in.readLine()) != null) { |
|||
builder.append(line); |
|||
} |
|||
in.close(); |
|||
proc.waitFor(); |
|||
} catch (Exception e) { |
|||
log.error("执行python异常", e); |
|||
result.setResult(Constant.Intelligence.RESULT_FAIL); |
|||
return result; |
|||
} |
|||
} |
|||
log.info("智能测评结果:{}", builder.toString()); |
|||
if (StrUtil.isEmpty(builder.toString()) || !(builder.toString().endsWith("1") || builder.toString().endsWith("0")) ) { |
|||
result.setResult(Constant.Intelligence.RESULT_FAIL); |
|||
return result; |
|||
} |
|||
|
|||
HtQuestionOptionExample optionExample = new HtQuestionOptionExample(); |
|||
optionExample.createCriteria().andQuestionIdEqualTo(param.getQuestionId()).andScoreEqualTo(new BigDecimal(builder.toString().substring(builder.length() - 2))); |
|||
List<HtQuestionOption> options = htQuestionOptionMapper.selectByExample(optionExample); |
|||
if (CollectionUtil.isEmpty(options)) { |
|||
result.setResult(Constant.Intelligence.RESULT_FAIL); |
|||
} else { |
|||
result.setResult(Constant.Intelligence.RESULT_SUCCESS); |
|||
result.setOptionId(options.get(0).getId()); |
|||
} |
|||
|
|||
// 记录智能测评答案
|
|||
HtPatientIntelligence intelligence = new HtPatientIntelligence(); |
|||
intelligence.setId(snowflake.nextId()); |
|||
intelligence.setPatientReportId(param.getPatientReportId()); |
|||
intelligence.setQuestionId(param.getQuestionId()); |
|||
intelligence.setResult(builder.toString()); |
|||
intelligence.setUrl(param.getUrl()); |
|||
htPatientIntelligenceMapper.insertSelective(intelligence); |
|||
return result; |
|||
} |
|||
|
|||
private String getImg(String url) { |
|||
return url.replace(PropUtil.imgDomain + "/", PropUtil.path); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,258 @@ |
|||
<?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.ccsens.ht.persist.mapper.HtPatientIntelligenceMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.ht.bean.po.HtPatientIntelligence"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="patient_report_id" jdbcType="BIGINT" property="patientReportId" /> |
|||
<result column="question_id" jdbcType="BIGINT" property="questionId" /> |
|||
<result column="url" jdbcType="VARCHAR" property="url" /> |
|||
<result column="result" jdbcType="VARCHAR" property="result" /> |
|||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> |
|||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> |
|||
<result column="is_del" jdbcType="TINYINT" property="isDel" /> |
|||
</resultMap> |
|||
<sql id="Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Update_By_Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Base_Column_List"> |
|||
id, patient_report_id, question_id, url, result, create_time, update_time, is_del |
|||
</sql> |
|||
<select id="selectByExample" parameterType="com.ccsens.ht.bean.po.HtPatientIntelligenceExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_ht_patient_intelligence |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
<if test="orderByClause != null"> |
|||
order by ${orderByClause} |
|||
</if> |
|||
</select> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from t_ht_patient_intelligence |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_ht_patient_intelligence |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.ht.bean.po.HtPatientIntelligenceExample"> |
|||
delete from t_ht_patient_intelligence |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.ht.bean.po.HtPatientIntelligence"> |
|||
insert into t_ht_patient_intelligence (id, patient_report_id, question_id, |
|||
url, result, create_time, |
|||
update_time, is_del) |
|||
values (#{id,jdbcType=BIGINT}, #{patientReportId,jdbcType=BIGINT}, #{questionId,jdbcType=BIGINT}, |
|||
#{url,jdbcType=VARCHAR}, #{result,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, |
|||
#{updateTime,jdbcType=TIMESTAMP}, #{isDel,jdbcType=TINYINT}) |
|||
</insert> |
|||
<insert id="insertSelective" parameterType="com.ccsens.ht.bean.po.HtPatientIntelligence"> |
|||
insert into t_ht_patient_intelligence |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="patientReportId != null"> |
|||
patient_report_id, |
|||
</if> |
|||
<if test="questionId != null"> |
|||
question_id, |
|||
</if> |
|||
<if test="url != null"> |
|||
url, |
|||
</if> |
|||
<if test="result != null"> |
|||
result, |
|||
</if> |
|||
<if test="createTime != null"> |
|||
create_time, |
|||
</if> |
|||
<if test="updateTime != null"> |
|||
update_time, |
|||
</if> |
|||
<if test="isDel != null"> |
|||
is_del, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="patientReportId != null"> |
|||
#{patientReportId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="questionId != null"> |
|||
#{questionId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="url != null"> |
|||
#{url,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="result != null"> |
|||
#{result,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="createTime != null"> |
|||
#{createTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updateTime != null"> |
|||
#{updateTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="isDel != null"> |
|||
#{isDel,jdbcType=TINYINT}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="com.ccsens.ht.bean.po.HtPatientIntelligenceExample" resultType="java.lang.Long"> |
|||
select count(*) from t_ht_patient_intelligence |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_ht_patient_intelligence |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.patientReportId != null"> |
|||
patient_report_id = #{record.patientReportId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.questionId != null"> |
|||
question_id = #{record.questionId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.url != null"> |
|||
url = #{record.url,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.result != null"> |
|||
result = #{record.result,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.createTime != null"> |
|||
create_time = #{record.createTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.updateTime != null"> |
|||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.isDel != null"> |
|||
is_del = #{record.isDel,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
update t_ht_patient_intelligence |
|||
set id = #{record.id,jdbcType=BIGINT}, |
|||
patient_report_id = #{record.patientReportId,jdbcType=BIGINT}, |
|||
question_id = #{record.questionId,jdbcType=BIGINT}, |
|||
url = #{record.url,jdbcType=VARCHAR}, |
|||
result = #{record.result,jdbcType=VARCHAR}, |
|||
create_time = #{record.createTime,jdbcType=TIMESTAMP}, |
|||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, |
|||
is_del = #{record.isDel,jdbcType=TINYINT} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ht.bean.po.HtPatientIntelligence"> |
|||
update t_ht_patient_intelligence |
|||
<set> |
|||
<if test="patientReportId != null"> |
|||
patient_report_id = #{patientReportId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="questionId != null"> |
|||
question_id = #{questionId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="url != null"> |
|||
url = #{url,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="result != null"> |
|||
result = #{result,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="createTime != null"> |
|||
create_time = #{createTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updateTime != null"> |
|||
update_time = #{updateTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="isDel != null"> |
|||
is_del = #{isDel,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.ccsens.ht.bean.po.HtPatientIntelligence"> |
|||
update t_ht_patient_intelligence |
|||
set patient_report_id = #{patientReportId,jdbcType=BIGINT}, |
|||
question_id = #{questionId,jdbcType=BIGINT}, |
|||
url = #{url,jdbcType=VARCHAR}, |
|||
result = #{result,jdbcType=VARCHAR}, |
|||
create_time = #{createTime,jdbcType=TIMESTAMP}, |
|||
update_time = #{updateTime,jdbcType=TIMESTAMP}, |
|||
is_del = #{isDel,jdbcType=TINYINT} |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
</mapper> |
@ -0,0 +1,243 @@ |
|||
<?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.ccsens.ht.persist.mapper.HtQuestionIntelligenceMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.ht.bean.po.HtQuestionIntelligence"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="question_id" jdbcType="BIGINT" property="questionId" /> |
|||
<result column="url" jdbcType="VARCHAR" property="url" /> |
|||
<result column="type" jdbcType="TINYINT" property="type" /> |
|||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> |
|||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> |
|||
<result column="is_del" jdbcType="TINYINT" property="isDel" /> |
|||
</resultMap> |
|||
<sql id="Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Update_By_Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Base_Column_List"> |
|||
id, question_id, url, type, create_time, update_time, is_del |
|||
</sql> |
|||
<select id="selectByExample" parameterType="com.ccsens.ht.bean.po.HtQuestionIntelligenceExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_ht_question_intelligence |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
<if test="orderByClause != null"> |
|||
order by ${orderByClause} |
|||
</if> |
|||
</select> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from t_ht_question_intelligence |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_ht_question_intelligence |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.ht.bean.po.HtQuestionIntelligenceExample"> |
|||
delete from t_ht_question_intelligence |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.ht.bean.po.HtQuestionIntelligence"> |
|||
insert into t_ht_question_intelligence (id, question_id, url, |
|||
type, create_time, update_time, |
|||
is_del) |
|||
values (#{id,jdbcType=BIGINT}, #{questionId,jdbcType=BIGINT}, #{url,jdbcType=VARCHAR}, |
|||
#{type,jdbcType=TINYINT}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, |
|||
#{isDel,jdbcType=TINYINT}) |
|||
</insert> |
|||
<insert id="insertSelective" parameterType="com.ccsens.ht.bean.po.HtQuestionIntelligence"> |
|||
insert into t_ht_question_intelligence |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="questionId != null"> |
|||
question_id, |
|||
</if> |
|||
<if test="url != null"> |
|||
url, |
|||
</if> |
|||
<if test="type != null"> |
|||
type, |
|||
</if> |
|||
<if test="createTime != null"> |
|||
create_time, |
|||
</if> |
|||
<if test="updateTime != null"> |
|||
update_time, |
|||
</if> |
|||
<if test="isDel != null"> |
|||
is_del, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="questionId != null"> |
|||
#{questionId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="url != null"> |
|||
#{url,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="type != null"> |
|||
#{type,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="createTime != null"> |
|||
#{createTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updateTime != null"> |
|||
#{updateTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="isDel != null"> |
|||
#{isDel,jdbcType=TINYINT}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="com.ccsens.ht.bean.po.HtQuestionIntelligenceExample" resultType="java.lang.Long"> |
|||
select count(*) from t_ht_question_intelligence |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_ht_question_intelligence |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.questionId != null"> |
|||
question_id = #{record.questionId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.url != null"> |
|||
url = #{record.url,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.type != null"> |
|||
type = #{record.type,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="record.createTime != null"> |
|||
create_time = #{record.createTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.updateTime != null"> |
|||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.isDel != null"> |
|||
is_del = #{record.isDel,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
update t_ht_question_intelligence |
|||
set id = #{record.id,jdbcType=BIGINT}, |
|||
question_id = #{record.questionId,jdbcType=BIGINT}, |
|||
url = #{record.url,jdbcType=VARCHAR}, |
|||
type = #{record.type,jdbcType=TINYINT}, |
|||
create_time = #{record.createTime,jdbcType=TIMESTAMP}, |
|||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, |
|||
is_del = #{record.isDel,jdbcType=TINYINT} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ht.bean.po.HtQuestionIntelligence"> |
|||
update t_ht_question_intelligence |
|||
<set> |
|||
<if test="questionId != null"> |
|||
question_id = #{questionId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="url != null"> |
|||
url = #{url,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="type != null"> |
|||
type = #{type,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="createTime != null"> |
|||
create_time = #{createTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updateTime != null"> |
|||
update_time = #{updateTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="isDel != null"> |
|||
is_del = #{isDel,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.ccsens.ht.bean.po.HtQuestionIntelligence"> |
|||
update t_ht_question_intelligence |
|||
set question_id = #{questionId,jdbcType=BIGINT}, |
|||
url = #{url,jdbcType=VARCHAR}, |
|||
type = #{type,jdbcType=TINYINT}, |
|||
create_time = #{createTime,jdbcType=TIMESTAMP}, |
|||
update_time = #{updateTime,jdbcType=TIMESTAMP}, |
|||
is_del = #{isDel,jdbcType=TINYINT} |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
</mapper> |
Loading…
Reference in new issue