|
|
|
<?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.daqing.financial.guarantee.mapper.DgAuditProcessMapper">
|
|
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
|
|
<resultMap id="BaseResultMap" type="com.daqing.framework.domain.guarantee.DgAuditProcess">
|
|
|
|
<id column="id" property="id" />
|
|
|
|
<result column="business_id" property="businessId" />
|
|
|
|
<result column="approver" property="approver" />
|
|
|
|
<result column="dept_name" property="deptName"/>
|
|
|
|
<result column="create_time" property="createTime" />
|
|
|
|
<result column="status" property="status" />
|
|
|
|
<result column="audit_opinion" property="auditOpinion" />
|
|
|
|
<result column="reason" property="reason" />
|
|
|
|
<result column="loan_money" property="loanMoney" />
|
|
|
|
<result column="loan_tern" property="loanTern" />
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<select id="selectAuditProcessList" resultMap="BaseResultMap">
|
|
|
|
select dap.id,dap.business_id,dap.approver,dap.dept_name,dap.create_time,dap.audit_opinion,
|
|
|
|
dbps.business_status as status,dap.reason,dap.loan_money,dap.loan_tern
|
|
|
|
from dg_audit_process dap
|
|
|
|
left join dg_business_process_status dbps on dbps.business_id = dap.business_id
|
|
|
|
where dap.business_id = #{businessId}
|
|
|
|
<if test="processId != null and processId != ''">
|
|
|
|
AND dap.process_id = #{processId}
|
|
|
|
</if>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectProcessId" resultType="java.lang.Integer">
|
|
|
|
SELECT process_id FROM dg_audit_process WHERE business_id = #{businessId} group by process_id order by process_id asc
|
|
|
|
</select>
|
|
|
|
|
|
|
|
</mapper>
|