新增相对估值法所有功能
parent
48b2309ee8
commit
d717607320
@ -0,0 +1,55 @@
|
|||||||
|
package com.sztzjy.fund_investment.entity;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author xcj
|
||||||
|
* edu_project_valuation_answer
|
||||||
|
*/
|
||||||
|
public class EduProjectValuationAnswer {
|
||||||
|
@ApiModelProperty("相对估值法答案ID")
|
||||||
|
private String answerId;
|
||||||
|
|
||||||
|
@ApiModelProperty("流程ID")
|
||||||
|
private String flowId;
|
||||||
|
|
||||||
|
@ApiModelProperty("使用方法 PE PB PS")
|
||||||
|
private String method;
|
||||||
|
|
||||||
|
@ApiModelProperty("每股价值")
|
||||||
|
private BigDecimal valuePerShare;
|
||||||
|
|
||||||
|
public String getAnswerId() {
|
||||||
|
return answerId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAnswerId(String answerId) {
|
||||||
|
this.answerId = answerId == null ? null : answerId.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFlowId() {
|
||||||
|
return flowId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFlowId(String flowId) {
|
||||||
|
this.flowId = flowId == null ? null : flowId.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMethod() {
|
||||||
|
return method;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMethod(String method) {
|
||||||
|
this.method = method == null ? null : method.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getValuePerShare() {
|
||||||
|
return valuePerShare;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValuePerShare(BigDecimal valuePerShare) {
|
||||||
|
this.valuePerShare = valuePerShare;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,470 @@
|
|||||||
|
package com.sztzjy.fund_investment.entity;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class EduProjectValuationAnswerExample {
|
||||||
|
protected String orderByClause;
|
||||||
|
|
||||||
|
protected boolean distinct;
|
||||||
|
|
||||||
|
protected List<Criteria> oredCriteria;
|
||||||
|
|
||||||
|
public EduProjectValuationAnswerExample() {
|
||||||
|
oredCriteria = new ArrayList<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
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<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
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 andAnswerIdIsNull() {
|
||||||
|
addCriterion("answer_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andAnswerIdIsNotNull() {
|
||||||
|
addCriterion("answer_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andAnswerIdEqualTo(String value) {
|
||||||
|
addCriterion("answer_id =", value, "answerId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andAnswerIdNotEqualTo(String value) {
|
||||||
|
addCriterion("answer_id <>", value, "answerId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andAnswerIdGreaterThan(String value) {
|
||||||
|
addCriterion("answer_id >", value, "answerId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andAnswerIdGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("answer_id >=", value, "answerId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andAnswerIdLessThan(String value) {
|
||||||
|
addCriterion("answer_id <", value, "answerId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andAnswerIdLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("answer_id <=", value, "answerId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andAnswerIdLike(String value) {
|
||||||
|
addCriterion("answer_id like", value, "answerId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andAnswerIdNotLike(String value) {
|
||||||
|
addCriterion("answer_id not like", value, "answerId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andAnswerIdIn(List<String> values) {
|
||||||
|
addCriterion("answer_id in", values, "answerId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andAnswerIdNotIn(List<String> values) {
|
||||||
|
addCriterion("answer_id not in", values, "answerId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andAnswerIdBetween(String value1, String value2) {
|
||||||
|
addCriterion("answer_id between", value1, value2, "answerId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andAnswerIdNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("answer_id not between", value1, value2, "answerId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andFlowIdIsNull() {
|
||||||
|
addCriterion("flow_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andFlowIdIsNotNull() {
|
||||||
|
addCriterion("flow_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andFlowIdEqualTo(String value) {
|
||||||
|
addCriterion("flow_id =", value, "flowId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andFlowIdNotEqualTo(String value) {
|
||||||
|
addCriterion("flow_id <>", value, "flowId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andFlowIdGreaterThan(String value) {
|
||||||
|
addCriterion("flow_id >", value, "flowId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andFlowIdGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("flow_id >=", value, "flowId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andFlowIdLessThan(String value) {
|
||||||
|
addCriterion("flow_id <", value, "flowId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andFlowIdLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("flow_id <=", value, "flowId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andFlowIdLike(String value) {
|
||||||
|
addCriterion("flow_id like", value, "flowId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andFlowIdNotLike(String value) {
|
||||||
|
addCriterion("flow_id not like", value, "flowId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andFlowIdIn(List<String> values) {
|
||||||
|
addCriterion("flow_id in", values, "flowId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andFlowIdNotIn(List<String> values) {
|
||||||
|
addCriterion("flow_id not in", values, "flowId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andFlowIdBetween(String value1, String value2) {
|
||||||
|
addCriterion("flow_id between", value1, value2, "flowId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andFlowIdNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("flow_id not between", value1, value2, "flowId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMethodIsNull() {
|
||||||
|
addCriterion("method is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMethodIsNotNull() {
|
||||||
|
addCriterion("method is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMethodEqualTo(String value) {
|
||||||
|
addCriterion("method =", value, "method");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMethodNotEqualTo(String value) {
|
||||||
|
addCriterion("method <>", value, "method");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMethodGreaterThan(String value) {
|
||||||
|
addCriterion("method >", value, "method");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMethodGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("method >=", value, "method");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMethodLessThan(String value) {
|
||||||
|
addCriterion("method <", value, "method");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMethodLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("method <=", value, "method");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMethodLike(String value) {
|
||||||
|
addCriterion("method like", value, "method");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMethodNotLike(String value) {
|
||||||
|
addCriterion("method not like", value, "method");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMethodIn(List<String> values) {
|
||||||
|
addCriterion("method in", values, "method");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMethodNotIn(List<String> values) {
|
||||||
|
addCriterion("method not in", values, "method");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMethodBetween(String value1, String value2) {
|
||||||
|
addCriterion("method between", value1, value2, "method");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMethodNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("method not between", value1, value2, "method");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andValuePerShareIsNull() {
|
||||||
|
addCriterion("value_per_share is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andValuePerShareIsNotNull() {
|
||||||
|
addCriterion("value_per_share is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andValuePerShareEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("value_per_share =", value, "valuePerShare");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andValuePerShareNotEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("value_per_share <>", value, "valuePerShare");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andValuePerShareGreaterThan(BigDecimal value) {
|
||||||
|
addCriterion("value_per_share >", value, "valuePerShare");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andValuePerShareGreaterThanOrEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("value_per_share >=", value, "valuePerShare");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andValuePerShareLessThan(BigDecimal value) {
|
||||||
|
addCriterion("value_per_share <", value, "valuePerShare");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andValuePerShareLessThanOrEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("value_per_share <=", value, "valuePerShare");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andValuePerShareIn(List<BigDecimal> values) {
|
||||||
|
addCriterion("value_per_share in", values, "valuePerShare");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andValuePerShareNotIn(List<BigDecimal> values) {
|
||||||
|
addCriterion("value_per_share not in", values, "valuePerShare");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andValuePerShareBetween(BigDecimal value1, BigDecimal value2) {
|
||||||
|
addCriterion("value_per_share between", value1, value2, "valuePerShare");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andValuePerShareNotBetween(BigDecimal value1, BigDecimal value2) {
|
||||||
|
addCriterion("value_per_share not between", value1, value2, "valuePerShare");
|
||||||
|
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,32 @@
|
|||||||
|
package com.sztzjy.fund_investment.mapper;
|
||||||
|
|
||||||
|
import com.sztzjy.fund_investment.entity.EduProjectValuationAnswer;
|
||||||
|
import com.sztzjy.fund_investment.entity.EduProjectValuationAnswerExample;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
@Mapper
|
||||||
|
public interface EduProjectValuationAnswerMapper {
|
||||||
|
long countByExample(EduProjectValuationAnswerExample example);
|
||||||
|
|
||||||
|
int deleteByExample(EduProjectValuationAnswerExample example);
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(String answerId);
|
||||||
|
|
||||||
|
int insert(EduProjectValuationAnswer record);
|
||||||
|
|
||||||
|
int insertSelective(EduProjectValuationAnswer record);
|
||||||
|
|
||||||
|
List<EduProjectValuationAnswer> selectByExample(EduProjectValuationAnswerExample example);
|
||||||
|
|
||||||
|
EduProjectValuationAnswer selectByPrimaryKey(String answerId);
|
||||||
|
|
||||||
|
int updateByExampleSelective(@Param("record") EduProjectValuationAnswer record, @Param("example") EduProjectValuationAnswerExample example);
|
||||||
|
|
||||||
|
int updateByExample(@Param("record") EduProjectValuationAnswer record, @Param("example") EduProjectValuationAnswerExample example);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(EduProjectValuationAnswer record);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(EduProjectValuationAnswer record);
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
package com.sztzjy.fund_investment.service;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
public interface ISysProjectValuationAnswerSerivce {
|
||||||
|
BigDecimal selectByFlowIdAndMethod(String flowId, String method);
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package com.sztzjy.fund_investment.service.serviceImpl;
|
||||||
|
|
||||||
|
import com.sztzjy.fund_investment.entity.EduProjectValuationAnswer;
|
||||||
|
import com.sztzjy.fund_investment.entity.EduProjectValuationAnswerExample;
|
||||||
|
import com.sztzjy.fund_investment.mapper.EduProjectValuationAnswerMapper;
|
||||||
|
import com.sztzjy.fund_investment.service.ISysProjectValuationAnswerSerivce;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class SysProjectValuationAnswerSerivceImpl implements ISysProjectValuationAnswerSerivce {
|
||||||
|
@Autowired
|
||||||
|
EduProjectValuationAnswerMapper answerMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BigDecimal selectByFlowIdAndMethod(String flowId, String method) {
|
||||||
|
EduProjectValuationAnswerExample example = new EduProjectValuationAnswerExample();
|
||||||
|
EduProjectValuationAnswerExample.Criteria criteria = example.createCriteria();
|
||||||
|
criteria.andFlowIdEqualTo(flowId).andMethodEqualTo(method);
|
||||||
|
List<EduProjectValuationAnswer> eduProjectValuationAnswers = answerMapper.selectByExample(example);
|
||||||
|
if(eduProjectValuationAnswers.size()==0){
|
||||||
|
return BigDecimal.ZERO;
|
||||||
|
}
|
||||||
|
BigDecimal valuePerShare = answerMapper.selectByExample(example).get(0).getValuePerShare();
|
||||||
|
return valuePerShare;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,196 @@
|
|||||||
|
<?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.sztzjy.fund_investment.mapper.EduProjectValuationAnswerMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.sztzjy.fund_investment.entity.EduProjectValuationAnswer">
|
||||||
|
<id column="answer_id" jdbcType="VARCHAR" property="answerId" />
|
||||||
|
<result column="flow_id" jdbcType="VARCHAR" property="flowId" />
|
||||||
|
<result column="method" jdbcType="VARCHAR" property="method" />
|
||||||
|
<result column="value_per_share" jdbcType="DECIMAL" property="valuePerShare" />
|
||||||
|
</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">
|
||||||
|
answer_id, flow_id, method, value_per_share
|
||||||
|
</sql>
|
||||||
|
<select id="selectByExample" parameterType="com.sztzjy.fund_investment.entity.EduProjectValuationAnswerExample" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<if test="distinct">
|
||||||
|
distinct
|
||||||
|
</if>
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from edu_project_valuation_answer
|
||||||
|
<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.String" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from edu_project_valuation_answer
|
||||||
|
where answer_id = #{answerId,jdbcType=VARCHAR}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||||
|
delete from edu_project_valuation_answer
|
||||||
|
where answer_id = #{answerId,jdbcType=VARCHAR}
|
||||||
|
</delete>
|
||||||
|
<delete id="deleteByExample" parameterType="com.sztzjy.fund_investment.entity.EduProjectValuationAnswerExample">
|
||||||
|
delete from edu_project_valuation_answer
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" parameterType="com.sztzjy.fund_investment.entity.EduProjectValuationAnswer">
|
||||||
|
insert into edu_project_valuation_answer (answer_id, flow_id, method,
|
||||||
|
value_per_share)
|
||||||
|
values (#{answerId,jdbcType=VARCHAR}, #{flowId,jdbcType=VARCHAR}, #{method,jdbcType=VARCHAR},
|
||||||
|
#{valuePerShare,jdbcType=DECIMAL})
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" parameterType="com.sztzjy.fund_investment.entity.EduProjectValuationAnswer">
|
||||||
|
insert into edu_project_valuation_answer
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="answerId != null">
|
||||||
|
answer_id,
|
||||||
|
</if>
|
||||||
|
<if test="flowId != null">
|
||||||
|
flow_id,
|
||||||
|
</if>
|
||||||
|
<if test="method != null">
|
||||||
|
method,
|
||||||
|
</if>
|
||||||
|
<if test="valuePerShare != null">
|
||||||
|
value_per_share,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="answerId != null">
|
||||||
|
#{answerId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="flowId != null">
|
||||||
|
#{flowId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="method != null">
|
||||||
|
#{method,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="valuePerShare != null">
|
||||||
|
#{valuePerShare,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<select id="countByExample" parameterType="com.sztzjy.fund_investment.entity.EduProjectValuationAnswerExample" resultType="java.lang.Long">
|
||||||
|
select count(*) from edu_project_valuation_answer
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<update id="updateByExampleSelective" parameterType="map">
|
||||||
|
update edu_project_valuation_answer
|
||||||
|
<set>
|
||||||
|
<if test="record.answerId != null">
|
||||||
|
answer_id = #{record.answerId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.flowId != null">
|
||||||
|
flow_id = #{record.flowId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.method != null">
|
||||||
|
method = #{record.method,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.valuePerShare != null">
|
||||||
|
value_per_share = #{record.valuePerShare,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByExample" parameterType="map">
|
||||||
|
update edu_project_valuation_answer
|
||||||
|
set answer_id = #{record.answerId,jdbcType=VARCHAR},
|
||||||
|
flow_id = #{record.flowId,jdbcType=VARCHAR},
|
||||||
|
method = #{record.method,jdbcType=VARCHAR},
|
||||||
|
value_per_share = #{record.valuePerShare,jdbcType=DECIMAL}
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.fund_investment.entity.EduProjectValuationAnswer">
|
||||||
|
update edu_project_valuation_answer
|
||||||
|
<set>
|
||||||
|
<if test="flowId != null">
|
||||||
|
flow_id = #{flowId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="method != null">
|
||||||
|
method = #{method,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="valuePerShare != null">
|
||||||
|
value_per_share = #{valuePerShare,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where answer_id = #{answerId,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="com.sztzjy.fund_investment.entity.EduProjectValuationAnswer">
|
||||||
|
update edu_project_valuation_answer
|
||||||
|
set flow_id = #{flowId,jdbcType=VARCHAR},
|
||||||
|
method = #{method,jdbcType=VARCHAR},
|
||||||
|
value_per_share = #{valuePerShare,jdbcType=DECIMAL}
|
||||||
|
where answer_id = #{answerId,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue