pusong-crm/pusong-modules/pusong-business/src/main/resources/mapper/business/PsContractBusinessMapper.xml

34 lines
1.5 KiB
XML
Raw Normal View History

2024-07-31 17:04:22 +08:00
<?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.pusong.business.mapper.PsContractBusinessMapper">
<resultMap id="businessResult" type="com.pusong.business.domain.vo.PsContractBusinessVo">
2024-08-02 10:36:59 +08:00
<id column="ID" property="id"></id>
<collection columnPrefix="detail_" property="detailVoList" ofType="com.pusong.business.domain.vo.PsContractBusinessDetailVo" >
<!-- <id column="ID" property="id"></id>-->
<!-- <result column="CUSTOMER_NAME" property="customerName" />-->
<!-- <result column="CUSTOMER_ID_NO" property="customerIdNo" />-->
2024-07-31 17:04:22 +08:00
</collection>
</resultMap>
<select id="selectBusinessList" resultMap="businessResult">
select bus.*,
detail.contract_code detail_contract_code,
detail.business_project detail_business_project,
detail.business_project_label detail_business_project_label,
detail.amount detail_amount,
detail.amount_desc detail_amount_desc,
2024-08-02 10:36:59 +08:00
detail.extent_info detail_extent_info
2024-07-31 17:04:22 +08:00
from ps_contract_business bus
left join ps_contract_business_detail detail on bus.id = detail.business_id
where bus.del_flag = 0
2024-08-09 18:03:48 +08:00
and (detail.del_flag = 0 or detail.del_flag is null)
2024-08-23 17:39:18 +08:00
and bus.contract_code in
<foreach item="code" collection="contractCode" open="(" separator="," close=")">
#{code}
</foreach>
2024-07-31 17:04:22 +08:00
</select>
</mapper>