12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?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.fjhx.account.mapper.account.AccountRequestFundsDetailMapper">
- <select id="getPage" resultType="com.fjhx.account.entity.account.vo.AccountRequestFundsDetailVo">
- select arfd.id,
- arfd.account_request_funds_id,
- arfd.cost_type,
- arfd.amount,
- arfd.remarks,
- arfd.create_user,
- arfd.create_time,
- arfd.update_user,
- arfd.update_time
- from account_request_funds_detail arfd
- ${ew.customSqlSegment}
- </select>
- <select id="getListByContractId" resultType="com.fjhx.account.entity.account.vo.AccountRequestFundsDetailVo">
- SELECT t2.rate,
- t2.currency,
- t1.*
- FROM account_request_funds_detail t1
- LEFT JOIN account_request_funds t2 ON t1.account_request_funds_id = t2.id
- LEFT JOIN account_payment t3 ON t2.id = t3.business_id
- WHERE t1.contract_id = #{contractId}
- AND t3.`status` = 10
- </select>
- <select id="getListByContractIds" resultType="com.fjhx.account.entity.account.vo.AccountRequestFundsDetailVo">
- SELECT
- t2.rate,
- t2.currency,
- t1.*
- FROM
- account_request_funds_detail t1
- LEFT JOIN account_request_funds t2 ON t1.account_request_funds_id = t2.id
- LEFT JOIN account_payment t3 ON t2.id = t3.business_id
- <where>
- t3.`status` = 10
- <if test="contractIds neq null and contractIds.size() > 0">
- <foreach collection="contractIds" item="contractId" open="AND t1.contract_id IN (" separator=","
- close=")">
- #{contractId}
- </foreach>
- </if>
- </where>
- </select>
- <select id="listByAccountRequestFundsId"
- resultType="com.fjhx.account.entity.account.vo.AccountRequestFundsDetailVo">
- SELECT arfd.*,
- sc.`code` contractCode
- FROM account_request_funds_detail arfd
- LEFT JOIN bytesailing_jxst.sales_contract sc ON arfd.contract_id = sc.id
- WHERE arfd.account_request_funds_id = #{accountRequestFundsId}
- </select>
- <select id="getList" resultType="com.fjhx.account.entity.account.vo.AccountRequestFundsDetailVo">
- SELECT fd.*,
- sc.code contractCode
- FROM account_request_funds_detail fd
- LEFT JOIN bytesailing_jxst.sales_contract sc ON fd.contract_id = sc.id
- ${ew.customSqlSegment}
- </select>
- </mapper>
|