first commit
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?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.linke.finance.domain.invoice.repository.mapper.InvoiceInfoDetailsMapper">
|
||||
|
||||
<sql id="selectInvoiceInfoDetailsVo">
|
||||
SELECT
|
||||
a.*
|
||||
FROM
|
||||
invoice_info_details a
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<select id="selectInvoiceInfoDetailsList" parameterType="com.linke.finance.domain.invoice.repository.todo.InvoiceInfoDetailsDo"
|
||||
resultType="com.linke.finance.domain.invoice.repository.po.InvoiceInfoDetailsPo">
|
||||
<include refid="selectInvoiceInfoDetailsVo"/>
|
||||
</select>
|
||||
|
||||
<select id="selectInvoiceInfoDetailsById" parameterType="java.lang.Long"
|
||||
resultType="com.linke.finance.domain.invoice.repository.po.InvoiceInfoDetailsPo">
|
||||
<include refid="selectInvoiceInfoDetailsVo"/>
|
||||
and invoice_info_details_id = #{invoiceInfoDetailsId}
|
||||
</select>
|
||||
|
||||
<select id="selectDetailsListByInvoiceInfoId" resultType="com.linke.finance.domain.invoice.repository.po.InvoiceInfoDetailsPo" parameterType="java.lang.Long">
|
||||
<include refid="selectInvoiceInfoDetailsVo"/>
|
||||
AND a.invoice_info_id = #{invoiceInfoId}
|
||||
</select>
|
||||
|
||||
|
||||
<delete id="deleteInvoiceInfoDetailsByInvoiceInfoDetailsId" parameterType="java.lang.Long">
|
||||
delete from invoice_info_details where invoice_info_details_id = #{invoiceInfoDetailsId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInvoiceInfoDetailsByInvoiceInfoDetailsIds" parameterType="java.lang.String">
|
||||
delete from invoice_info_details where invoice_info_details_id in
|
||||
<foreach item="invoiceInfoDetailsId" collection="array" open="(" separator="," close=")">
|
||||
#{invoiceInfoDetailsId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,59 @@
|
||||
<?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.linke.finance.domain.invoice.repository.mapper.InvoiceInfoManageMapper">
|
||||
|
||||
<sql id="selectInvoiceInfoManageVo">
|
||||
SELECT
|
||||
a.*
|
||||
FROM
|
||||
invoice_info_manage a
|
||||
where
|
||||
a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<select id="selectInvoiceInfoManageList" parameterType="com.linke.finance.domain.invoice.repository.todo.InvoiceInfoManageDo" resultType="com.linke.finance.domain.invoice.repository.po.InvoiceInfoManagePo">
|
||||
<include refid="selectInvoiceInfoManageVo"/>
|
||||
<include refid="common_where"></include>
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
|
||||
<sql id="common_where">
|
||||
<if test="createBy != null">
|
||||
and a.create_by = #{createBy}
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
and a.user_id = #{userId}
|
||||
</if>
|
||||
<if test="organizationId != null">
|
||||
and a.organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="topOrganizationId != null">
|
||||
and a.top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="organizationIdList != null ">
|
||||
AND a.organization_id in
|
||||
<foreach item="id" collection="organizationIdList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectInvoiceInfoManageByInvoiceInfoId" parameterType="java.lang.Long" resultType="com.linke.finance.domain.invoice.repository.po.InvoiceInfoManagePo">
|
||||
<include refid="selectInvoiceInfoManageVo"/>
|
||||
and a.invoice_info_manage_id = #{invoiceInfoManageId}
|
||||
</select>
|
||||
|
||||
|
||||
<delete id="deleteInvoiceInfoManageByInvoiceInfoId" parameterType="java.lang.Long">
|
||||
delete from invoice_info_manage where invoice_info_manage_id = #{invoiceInfoManageId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInvoiceInfoManageByInvoiceInfoIds" parameterType="java.lang.String">
|
||||
delete from invoice_info_manage where invoice_info_manage_id in
|
||||
<foreach item="invoiceInfoManageId" collection="array" open="(" separator="," close=")">
|
||||
#{invoiceInfoManageId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,185 @@
|
||||
<?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.linke.finance.domain.invoice.repository.mapper.InvoiceInfoMapper">
|
||||
|
||||
<sql id="selectInvoiceInfoVo">
|
||||
SELECT
|
||||
a.*,
|
||||
(CASE
|
||||
a.invoice_status
|
||||
WHEN 1 THEN
|
||||
'未开票'
|
||||
WHEN 2 THEN
|
||||
'已撤回'
|
||||
WHEN 3 THEN
|
||||
'已驳回'
|
||||
WHEN 4 THEN
|
||||
'已开票'
|
||||
WHEN 5 THEN
|
||||
'已寄出'
|
||||
WHEN 6 THEN
|
||||
'已取消'
|
||||
WHEN 7 THEN
|
||||
'已作废'
|
||||
ELSE NULL
|
||||
END
|
||||
) AS invoiceStatusName
|
||||
FROM
|
||||
invoice_info a
|
||||
LEFT JOIN business_document b ON a.invoice_info_id = b.invoice_info_id
|
||||
LEFT JOIN invoice_info_details c ON a.invoice_info_id = c.invoice_info_id
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<select id="selectInvoiceInfoList" parameterType="com.linke.finance.domain.invoice.repository.todo.InvoiceInfoDo"
|
||||
resultType="com.linke.finance.domain.invoice.repository.po.InvoiceInfoPo">
|
||||
<include refid="selectInvoiceInfoVo"/>
|
||||
<include refid="common_where"></include>
|
||||
GROUP BY
|
||||
a.invoice_info_id
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
|
||||
<sql id="common_where">
|
||||
<if test="invoiceInfoDo.createTimeStart != null and invoiceInfoDo.createTimeStart != ''">
|
||||
AND date_format(a.create_time,'%Y-%m-%d') >= #{invoiceInfoDo.createTimeStart}
|
||||
</if>
|
||||
<if test="invoiceInfoDo.createTimeEnd != null and invoiceInfoDo.createTimeEnd != ''">
|
||||
AND date_format(a.create_time,'%Y-%m-%d') <![CDATA[<=]]> #{invoiceInfoDo.createTimeEnd}
|
||||
</if>
|
||||
<if test="invoiceInfoDo.invoiceApplyNum != null and invoiceInfoDo.invoiceApplyNum != ''">
|
||||
AND a.invoice_apply_num like concat('%', #{invoiceInfoDo.invoiceApplyNum}, '%')
|
||||
</if>
|
||||
<if test="invoiceInfoDo.createByName != null and invoiceInfoDo.createByName != ''">
|
||||
AND a.create_by_name like concat('%', #{invoiceInfoDo.createByName}, '%')
|
||||
</if>
|
||||
<if test="invoiceInfoDo.invoiceStatus != null and invoiceInfoDo.invoiceStatus != ''">
|
||||
AND a.invoice_status = #{invoiceInfoDo.invoiceStatus}
|
||||
</if>
|
||||
<if test="invoiceInfoDo.invoiceHeader != null and invoiceInfoDo.invoiceHeader != ''">
|
||||
AND a.invoice_remark like concat('%', #{invoiceInfoDo.invoiceHeader}, '%')
|
||||
</if>
|
||||
<if test="invoiceInfoDo.invoiceRemark != null and invoiceInfoDo.invoiceRemark != ''">
|
||||
AND a.invoice_header like concat('%', #{invoiceInfoDo.invoiceRemark}, '%')
|
||||
</if>
|
||||
<if test="invoiceInfoDo.invoiceMakeTimeStart != null and invoiceInfoDo.invoiceMakeTimeStart != ''">
|
||||
AND date_format(a.invoice_make_time,'%Y-%m-%d') >= #{invoiceInfoDo.invoiceMakeTimeStart}
|
||||
</if>
|
||||
<if test="invoiceInfoDo.invoiceMakeTimeEnd != null and invoiceInfoDo.invoiceMakeTimeEnd != ''">
|
||||
AND date_format(a.invoice_make_time,'%Y-%m-%d') <![CDATA[<=]]> #{invoiceInfoDo.invoiceMakeTimeEnd}
|
||||
</if>
|
||||
<if test="invoiceInfoDo.invoiceRejectTimeStart != null and invoiceInfoDo.invoiceRejectTimeStart != ''">
|
||||
AND date_format(a.invoice_reject_time,'%Y-%m-%d') >= #{invoiceInfoDo.invoiceRejectTimeStart}
|
||||
</if>
|
||||
<if test="invoiceInfoDo.invoiceRejectTimeEnd != null and invoiceInfoDo.invoiceRejectTimeEnd != ''">
|
||||
AND date_format(a.invoice_reject_time,'%Y-%m-%d') <![CDATA[<=]]> #{invoiceInfoDo.invoiceRejectTimeEnd}
|
||||
</if>
|
||||
<if test="invoiceInfoDo.invoiceNullifyTimeStart != null and invoiceInfoDo.invoiceNullifyTimeStart != ''">
|
||||
AND date_format(a.invoice_nullify_time,'%Y-%m-%d') >= #{invoiceInfoDo.invoiceNullifyTimeStart}
|
||||
</if>
|
||||
<if test="invoiceInfoDo.invoiceNullifyTimeEnd != null and invoiceInfoDo.invoiceNullifyTimeEnd != ''">
|
||||
AND date_format(a.invoice_nullify_time,'%Y-%m-%d') <![CDATA[<=]]> #{invoiceInfoDo.invoiceNullifyTimeEnd}
|
||||
</if>
|
||||
<if test="invoiceInfoDo.exportFlag != null and invoiceInfoDo.exportFlag != ''">
|
||||
AND a.export_flag = #{invoiceInfoDo.exportFlag}
|
||||
</if>
|
||||
<if test="invoiceInfoDo.mailFlag != null and invoiceInfoDo.mailFlag != ''">
|
||||
AND a.mail_flag = #{invoiceInfoDo.mailFlag}
|
||||
</if>
|
||||
<if test="invoiceInfoDo.waybillNumber != null and invoiceInfoDo.waybillNumber != ''">
|
||||
AND b.waybill_number like concat('%', #{invoiceInfoDo.waybillNumber}, '%')
|
||||
</if>
|
||||
<if test="invoiceInfoDo.invoiceNumber != null and invoiceInfoDo.invoiceNumber != ''">
|
||||
AND c.invoice_number like concat('%', #{invoiceInfoDo.invoiceNumber}, '%')
|
||||
</if>
|
||||
<if test="invoiceInfoDo.createBy != null"> and a.create_by = #{invoiceInfoDo.createBy}</if>
|
||||
<if test="invoiceInfoDo.organizationId != null"> and a.organization_id = #{invoiceInfoDo.organizationId}</if>
|
||||
<if test="invoiceInfoDo.organizationIdList != null ">
|
||||
AND a.organization_id in
|
||||
<foreach item="id" collection="invoiceInfoDo.organizationIdList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectInvoiceInfoById" parameterType="java.lang.Long" resultType="com.linke.finance.domain.invoice.repository.po.InvoiceInfoPo">
|
||||
SELECT
|
||||
a.*,
|
||||
(CASE
|
||||
a.invoice_status
|
||||
WHEN 1 THEN
|
||||
'未开票'
|
||||
WHEN 2 THEN
|
||||
'已撤回'
|
||||
WHEN 3 THEN
|
||||
'已驳回'
|
||||
WHEN 4 THEN
|
||||
'已开票'
|
||||
WHEN 5 THEN
|
||||
'已寄出'
|
||||
WHEN 6 THEN
|
||||
'已取消'
|
||||
WHEN 7 THEN
|
||||
'已作废'
|
||||
ELSE NULL
|
||||
END
|
||||
) AS invoiceStatusName
|
||||
FROM
|
||||
invoice_info a
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
and a.invoice_info_id = #{invoiceInfoId}
|
||||
</select>
|
||||
|
||||
<select id="invoiceInfoAppList" resultType="com.linke.finance.domain.invoice.repository.po.InvoiceInfoAppPo" parameterType="com.linke.finance.domain.invoice.repository.todo.InvoiceInfoDo">
|
||||
<include refid="selectInvoiceInfoVo"/>
|
||||
<include refid="common_where"></include>
|
||||
GROUP BY
|
||||
a.invoice_info_id
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="invoiceInfoDetailApp" resultType="com.linke.finance.domain.invoice.repository.po.InvoiceInfoAppPo" parameterType="java.lang.Long">
|
||||
SELECT
|
||||
a.*,
|
||||
(CASE
|
||||
a.invoice_status
|
||||
WHEN 1 THEN
|
||||
'未开票'
|
||||
WHEN 2 THEN
|
||||
'已撤回'
|
||||
WHEN 3 THEN
|
||||
'已驳回'
|
||||
WHEN 4 THEN
|
||||
'已开票'
|
||||
WHEN 5 THEN
|
||||
'已寄出'
|
||||
WHEN 6 THEN
|
||||
'已取消'
|
||||
WHEN 7 THEN
|
||||
'已作废'
|
||||
ELSE NULL
|
||||
END
|
||||
) AS invoiceStatusName
|
||||
FROM
|
||||
invoice_info a
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
and a.invoice_info_id = #{invoiceInfoId}
|
||||
</select>
|
||||
|
||||
|
||||
<delete id="deleteInvoiceInfoByInvoiceInfoId" parameterType="java.lang.Long">
|
||||
delete from invoice_info where invoice_info_id = #{invoiceInfoId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInvoiceInfoByInvoiceInfoIds" parameterType="java.lang.String">
|
||||
delete from invoice_info where invoice_info_id in
|
||||
<foreach item="invoiceInfoId" collection="array" open="(" separator="," close=")">
|
||||
#{invoiceInfoId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,123 @@
|
||||
<?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.linke.finance.domain.invoice.repository.mapper.InvoiceOrderMapper">
|
||||
|
||||
<sql id="selectInvoiceOrderVo">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
invoice_order
|
||||
where
|
||||
del_flag = 1
|
||||
</sql>
|
||||
|
||||
<select id="selectInvoiceOrderList" parameterType="com.linke.finance.domain.invoice.repository.todo.InvoiceOrderDo" resultType="com.linke.finance.domain.invoice.repository.po.InvoiceOrderPo">
|
||||
<include refid="selectInvoiceOrderVo"/>
|
||||
<include refid="common_where"></include>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<sql id="common_where">
|
||||
<if test="invoiceOrderDo.waybillVerifyFlag != null and invoiceOrderDo.waybillVerifyFlag != ''">
|
||||
AND waybill_verify_flag = #{invoiceOrderDo.waybillVerifyFlag}
|
||||
</if>
|
||||
<if test="invoiceOrderDo.applyStatus != null and invoiceOrderDo.applyStatus != ''">
|
||||
AND apply_status = #{invoiceOrderDo.applyStatus}
|
||||
</if>
|
||||
<if test="invoiceOrderDo.waybillNumber != null and invoiceOrderDo.waybillNumber != ''">
|
||||
AND waybill_number like concat('%', #{invoiceOrderDo.waybillNumber}, '%')
|
||||
</if>
|
||||
<if test="invoiceOrderDo.createTimeStart != null and invoiceOrderDo.createTimeStart != ''">
|
||||
AND date_format(create_time,'%Y-%m-%d') >= #{invoiceOrderDo.createTimeStart}
|
||||
</if>
|
||||
<if test="invoiceOrderDo.createTimeEnd != null and invoiceOrderDo.createTimeEnd != ''">
|
||||
AND date_format(create_time,'%Y-%m-%d') <![CDATA[<=]]> #{invoiceOrderDo.createTimeEnd}
|
||||
</if>
|
||||
<if test="invoiceOrderDo.payTimeStart != null and invoiceOrderDo.payTimeStart != ''">
|
||||
AND date_format(waybill_pay_time,'%Y-%m-%d') >= #{invoiceOrderDo.payTimeStart}
|
||||
</if>
|
||||
<if test="invoiceOrderDo.payTimeEnd != null and invoiceOrderDo.payTimeEnd != ''">
|
||||
AND date_format(waybill_pay_time,'%Y-%m-%d') <![CDATA[<=]]> #{invoiceOrderDo.payTimeEnd}
|
||||
</if>
|
||||
<if test="invoiceOrderDo.createBy != null"> and create_by = #{invoiceOrderDo.createBy}</if>
|
||||
<if test="invoiceOrderDo.createByName != null and invoiceOrderDo.createByName != ''">
|
||||
AND create_by_name like concat('%', #{invoiceOrderDo.createByName}, '%')
|
||||
</if>
|
||||
<if test="invoiceOrderDo.organizationId != null"> and organization_id = #{invoiceOrderDo.organizationId}</if>
|
||||
<if test="invoiceOrderDo.organizationIdList != null ">
|
||||
AND organization_id in
|
||||
<foreach item="id" collection="invoiceOrderDo.organizationIdList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectInvoiceOrderByInvoiceOrderId" parameterType="java.lang.Long" resultType="com.linke.finance.domain.invoice.repository.po.InvoiceOrderPo">
|
||||
<include refid="selectInvoiceOrderVo"/>
|
||||
where invoice_order_id = #{invoiceOrderId}
|
||||
</select>
|
||||
|
||||
<select id="getInvoiceCostCan" resultType="java.util.Map" parameterType="com.linke.finance.domain.invoice.repository.todo.InvoiceOrderDo">
|
||||
SELECT
|
||||
SUM( invoice_cost_can ) AS invoiceCostCan,
|
||||
SUM( invoice_cost_has ) AS invoiceCostHas
|
||||
FROM
|
||||
invoice_order
|
||||
WHERE
|
||||
del_flag = 1
|
||||
AND waybill_verify_flag = 2
|
||||
<include refid="common_where_two"></include>
|
||||
</select>
|
||||
|
||||
<sql id="common_where_two">
|
||||
<if test="invoiceOrderDo.applyStatus != null"> and apply_status = #{invoiceOrderDo.applyStatus}</if>
|
||||
<if test="invoiceOrderDo.createBy != null"> and create_by = #{invoiceOrderDo.createBy}</if>
|
||||
<if test="invoiceOrderDo.organizationId != null">
|
||||
and organization_id = #{invoiceOrderDo.organizationId}
|
||||
</if>
|
||||
<if test="invoiceOrderDo.organizationIdList != null ">
|
||||
AND organization_id in
|
||||
<foreach item="id" collection="invoiceOrderDo.organizationIdList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectOrderListByInvoiceInfoId" resultType="com.linke.finance.domain.invoice.entity.InvoiceOrder" parameterType="java.lang.Long">
|
||||
<include refid="selectInvoiceOrderVo"/>
|
||||
and invoice_info_id = #{invoiceInfoId}
|
||||
</select>
|
||||
|
||||
<select id="selectOrderListByInvoiceOrderIds" resultType="com.linke.finance.domain.invoice.repository.po.InvoiceOrderPo" parameterType="java.util.List">
|
||||
<include refid="selectInvoiceOrderVo"/>
|
||||
<if test="invoiceOrderIdList != null ">
|
||||
AND invoice_order_id in
|
||||
<foreach item="id" collection="invoiceOrderIdList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="invoiceOrderAppList" resultType="com.linke.finance.domain.invoice.repository.po.InvoiceOrderAppPo" parameterType="com.linke.finance.domain.invoice.repository.todo.InvoiceOrderDo">
|
||||
<include refid="selectInvoiceOrderVo"/>
|
||||
<include refid="common_where"></include>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<update id="unBindInvoiceInfo" parameterType="com.linke.finance.domain.invoice.entity.InvoiceOrder">
|
||||
UPDATE invoice_order
|
||||
SET
|
||||
update_by = #{invoiceOrder.updateBy},
|
||||
update_by_name = #{invoiceOrder.updateByName},
|
||||
update_time = #{invoiceOrder.updateTime},
|
||||
apply_status = 2,
|
||||
invoice_info_id = null,
|
||||
invoice_cost_has = 0
|
||||
WHERE
|
||||
invoice_info_id = #{invoiceOrder.invoiceInfoId}
|
||||
and del_flag = 1
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?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.linke.finance.domain.address.repository.mapper.ReceivingAddressManageMapper">
|
||||
|
||||
<sql id="selectReceivingAddressManageVo">
|
||||
SELECT
|
||||
a.*
|
||||
FROM
|
||||
receiving_address_manage a
|
||||
where
|
||||
a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<select id="selectReceivingAddressManageList" parameterType="com.linke.finance.domain.address.repository.todo.ReceivingAddressManageDo" resultType="com.linke.finance.domain.address.repository.po.ReceivingAddressManagePo">
|
||||
<include refid="selectReceivingAddressManageVo"/>
|
||||
<include refid="common_where"></include>
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
|
||||
<sql id="common_where">
|
||||
<if test="userId != null">
|
||||
and a.user_id = #{userId}
|
||||
</if>
|
||||
<if test="organizationId != null">
|
||||
and a.organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="topOrganizationId != null">
|
||||
and a.top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="organizationIdList != null ">
|
||||
AND a.organization_id in
|
||||
<foreach item="id" collection="organizationIdList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectByReceivingAddressId" parameterType="java.lang.Long" resultType="com.linke.finance.domain.address.repository.po.ReceivingAddressManagePo">
|
||||
<include refid="selectReceivingAddressManageVo"/>
|
||||
and a.receiving_address_id = #{receivingAddressId}
|
||||
</select>
|
||||
|
||||
<delete id="deleteByReceivingAddressId" parameterType="java.lang.Long">
|
||||
delete from receiving_address_manage where receiving_address_id = #{receivingAddressId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByReceivingAddressIds" parameterType="java.lang.String">
|
||||
delete from receiving_address_manage where receiving_address_id in
|
||||
<foreach item="receivingAddressId" collection="array" open="(" separator="," close=")">
|
||||
#{receivingAddressId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user