<?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.gkhy.assess.system.mapper.AssContractMapper">
|
<resultMap type="com.gkhy.assess.system.domain.AssContract" id="ContractResult">
|
<id property="id" column="id" />
|
<result property="contractMoney" column="contract_money" />
|
<result property="actualContractMoney" column="actual_contract_money" />
|
<result property="contractSignDate" column="contract_sign_date" />
|
<result property="projectId" column="project_id" />
|
<result property="contractIntroduction" column="contract_introduction" />
|
<result property="actualContractIntroduction" column="actual_contract_introduction" />
|
<result property="delFlag" column="del_flag" />
|
<result property="version" column="version" />
|
<result property="createBy" column="create_by" />
|
<result property="createTime" column="create_time" />
|
<result property="updateBy" column="update_by" />
|
<result property="updateTime" column="update_time" />
|
<result property="remark" column="remark" />
|
</resultMap>
|
|
<sql id="selectContractVo">
|
select c.id,c.contract_money, c.actual_contract_money,c.contract_sign_date,c.project_id,c.contract_introduction,c.actual_contract_introduction,
|
c.del_flag,c.create_by,c.create_time,c.update_by,c.update_time,c.remark
|
from ass_contract c
|
</sql>
|
|
|
<select id="getContractByProjectId" resultMap="ContractResult">
|
<include refid="selectContractVo"/>
|
where project_id=#{projectId} and del_flag=0 limit 1
|
</select>
|
|
<select id="getContractById" resultMap="ContractResult">
|
<include refid="selectContractVo"/>
|
where id=#{contractId}
|
</select>
|
|
<select id="getCountByProjectId" resultType="java.lang.Integer">
|
select count(1) from ass_contract where project_id=#{projectId} and del_flag=0
|
</select>
|
|
</mapper>
|