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.PsCompanyInfoMapper">
|
2024-09-13 15:27:48 +08:00
|
|
|
<resultMap id="serviceCompanyServiceResult" type="com.pusong.business.domain.vo.PsCompanyInfoVo">
|
2024-09-25 10:16:02 +08:00
|
|
|
<id column="id" property="id"></id>
|
2024-09-13 15:27:48 +08:00
|
|
|
<collection columnPrefix="bus_" property="businessVoList" ofType="com.pusong.business.domain.vo.PsContractBusinessVo" >
|
2024-09-25 10:16:02 +08:00
|
|
|
<id column="id" property="id"></id>
|
|
|
|
<collection columnPrefix="det_" column="det" property="detailVoList" ofType="com.pusong.business.domain.vo.PsContractBusinessDetailVo" >
|
2024-09-13 15:27:48 +08:00
|
|
|
</collection>
|
|
|
|
</collection>
|
2024-09-25 10:16:02 +08:00
|
|
|
|
2024-09-26 11:18:22 +08:00
|
|
|
<collection columnPrefix="fu_" property="followUsers" ofType="com.pusong.system.domain.vo.SysUserVo" >
|
|
|
|
|
|
|
|
|
|
|
|
</collection>
|
|
|
|
|
|
|
|
|
2024-09-13 15:27:48 +08:00
|
|
|
</resultMap>
|
|
|
|
|
2024-09-27 17:55:40 +08:00
|
|
|
<select id="selectVoCustomManagerById" resultType="com.pusong.business.domain.vo.PsCompanyInfoVo">
|
|
|
|
select
|
|
|
|
com.*
|
|
|
|
,cus.custom_manager
|
|
|
|
from ps_company_info com
|
|
|
|
left join ps_custom_info cus on cus.id = com.custom_id
|
|
|
|
where com.id = ${id}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-09-26 11:18:22 +08:00
|
|
|
<select id="selectPageList" resultMap="serviceCompanyServiceResult">
|
|
|
|
select
|
|
|
|
com.*,
|
|
|
|
cus.custom_manager,
|
2024-09-04 17:33:32 +08:00
|
|
|
cus.custom_name,
|
|
|
|
cus.custom_mobile,
|
|
|
|
cusi.custom_name custom_introducer,
|
2024-09-26 11:18:22 +08:00
|
|
|
usr.user_id fu_user_id,
|
|
|
|
usr.nick_name fu_nick_name
|
2024-09-04 17:33:32 +08:00
|
|
|
from ps_company_info com
|
|
|
|
left join ps_custom_info cus on com.custom_id = cus.id
|
2024-09-05 09:27:29 +08:00
|
|
|
left join ps_custom_info cusi on cus.custom_introducer = cusi.id
|
2024-09-26 11:18:22 +08:00
|
|
|
left join ps_company_follow cf on com.id = cf.company_id
|
|
|
|
left join sys_user usr on cf.user_id = usr.user_id
|
|
|
|
${ew.getCustomSqlSegment}
|
2024-09-04 17:33:32 +08:00
|
|
|
</select>
|
2024-09-13 15:27:48 +08:00
|
|
|
|
2024-09-27 17:55:40 +08:00
|
|
|
<select id="selectPageList2" resultMap="serviceCompanyServiceResult">
|
|
|
|
select
|
|
|
|
com.*,
|
|
|
|
cus.custom_manager,
|
|
|
|
cus.custom_name,
|
|
|
|
cus.custom_mobile,
|
|
|
|
cusi.custom_name custom_introducer,
|
|
|
|
usr.user_id fu_user_id,
|
|
|
|
usr.nick_name fu_nick_name
|
|
|
|
from ps_company_info com
|
|
|
|
left join ps_custom_info cus on com.custom_id = cus.id
|
|
|
|
left join ps_custom_info cusi on cus.custom_introducer = cusi.id
|
|
|
|
left join ps_company_follow cf on com.id = cf.company_id
|
|
|
|
left join sys_user usr on cf.user_id = usr.user_id
|
|
|
|
${ew.getCustomSqlSegment}
|
|
|
|
</select>
|
2024-09-26 11:18:22 +08:00
|
|
|
|
2024-09-13 15:27:48 +08:00
|
|
|
<select id="selectServiceCompanyList" resultMap="serviceCompanyServiceResult">
|
|
|
|
select com.*,
|
|
|
|
bus.business_amount bus_business_amount,
|
|
|
|
bus.business_desc bus_business_desc,
|
|
|
|
bus.business_type bus_business_type,
|
|
|
|
bus.company_id bus_company_id,
|
|
|
|
bus.contract_code bus_contract_code,
|
|
|
|
bus.end_date bus_end_date,
|
|
|
|
bus.id bus_id,
|
|
|
|
bus.start_date bus_start_date,
|
2024-09-25 10:16:02 +08:00
|
|
|
bus.is_proxy bus_is_proxy,
|
|
|
|
bus.is_old bus_is_old,
|
|
|
|
det.id det_id,
|
|
|
|
det.business_id bus_det_business_id,
|
|
|
|
det.contract_code bus_det_contract_code,
|
|
|
|
det.business_project bus_det_business_project,
|
|
|
|
det.business_project_label bus_det_business_project_label,
|
|
|
|
det.amount bus_det_amount,
|
|
|
|
det.amount_desc bus_det_amount_desc,
|
|
|
|
det.extent_info bus_det_extent_info
|
2024-09-13 15:27:48 +08:00
|
|
|
from ps_contract_company pcc
|
|
|
|
left join ps_company_info com on pcc.company_id = com.id
|
|
|
|
left join ps_contract_business bus on bus.company_id = com.id and bus.contract_code = pcc.contract_code
|
|
|
|
left join ps_contract_business_detail det on det.business_id = bus.id
|
|
|
|
${ew.getCustomSqlSegment}
|
|
|
|
</select>
|
|
|
|
|
2024-09-26 11:18:22 +08:00
|
|
|
|
2024-07-31 17:04:22 +08:00
|
|
|
</mapper>
|