Просмотр исходного кода

[修改][审批流][修改审批审批项名称]

release_toaliyun_real
luozukai 6 лет назад
Родитель
Сommit
f753b063db
2 измененных файлов: 232 добавлений и 204 удалений
  1. +35
    -7
      mallinkService/src/main/java/com/iformall/service/impl/WxBillSettleServiceImpl.java
  2. +197
    -197
      mallinkService/src/main/resources/mapper/WxBillSettleBillMapper.xml

+ 35
- 7
mallinkService/src/main/java/com/iformall/service/impl/WxBillSettleServiceImpl.java Просмотреть файл

@@ -188,7 +188,11 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(dbBill!=null) { if(dbBill!=null) {
wxBillRent.setPay(dbBill.getPay()+dbBill.getReceivePay() ); //押金是ReceivePay wxBillRent.setPay(dbBill.getPay()+dbBill.getReceivePay() ); //押金是ReceivePay
wxBillRent.setPayDate(new Date()); wxBillRent.setPayDate(new Date());
wxBillRent.setStatus(EnumBillRentStatus.RETURN.getCode());
if(EnumSettleBillType.R.getCode().equals(bill.getType())){
wxBillRent.setStatus(EnumBillRentStatus.PAID.getCode());
}else{
wxBillRent.setStatus(EnumBillRentStatus.RETURN.getCode());
}
addBillAction(bill.getBillId(), dbBill.getOwe()); addBillAction(bill.getBillId(), dbBill.getOwe());
} }
} }
@@ -206,7 +210,11 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(dbBill!=null) { if(dbBill!=null) {
wxBillOtherDeposit.setPay(dbBill.getPay()+ dbBill.getReceivePay()); wxBillOtherDeposit.setPay(dbBill.getPay()+ dbBill.getReceivePay());
wxBillOtherDeposit.setPayDate(new Date()); wxBillOtherDeposit.setPayDate(new Date());
wxBillOtherDeposit.setStatus(EnumBillRentStatus.RETURN.getCode());
if(EnumSettleBillType.R.getCode().equals(bill.getType())){
wxBillOtherDeposit.setStatus(EnumBillRentStatus.PAID.getCode());
}else{
wxBillOtherDeposit.setStatus(EnumBillRentStatus.RETURN.getCode());
}
addBillAction(bill.getBillId(), dbBill.getOwe()); addBillAction(bill.getBillId(), dbBill.getOwe());
} }
} }
@@ -224,7 +232,11 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(dbBill!=null) { if(dbBill!=null) {
propertyDeposit.setPay(dbBill.getPay()+ dbBill.getReceivePay()); propertyDeposit.setPay(dbBill.getPay()+ dbBill.getReceivePay());
propertyDeposit.setPayDate(new Date()); propertyDeposit.setPayDate(new Date());
propertyDeposit.setStatus(EnumBillRentStatus.RETURN.getCode());
if(EnumSettleBillType.R.getCode().equals(bill.getType())){
propertyDeposit.setStatus(EnumBillRentStatus.PAID.getCode());
}else{
propertyDeposit.setStatus(EnumBillRentStatus.RETURN.getCode());
}
addBillAction(bill.getBillId(), dbBill.getOwe()); addBillAction(bill.getBillId(), dbBill.getOwe());
} }
} }
@@ -260,7 +272,11 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(dbBill!=null) { if(dbBill!=null) {
propertyDeposit.setPay(dbBill.getPay()+dbBill.getReceivePay()); propertyDeposit.setPay(dbBill.getPay()+dbBill.getReceivePay());
propertyDeposit.setPayDate(new Date()); propertyDeposit.setPayDate(new Date());
propertyDeposit.setStatus(EnumBillRentStatus.RETURN.getCode());
if(EnumSettleBillType.R.getCode().equals(bill.getType())){
propertyDeposit.setStatus(EnumBillRentStatus.PAID.getCode());
}else{
propertyDeposit.setStatus(EnumBillRentStatus.RETURN.getCode());
}
addBillAction(bill.getBillId(), dbBill.getOwe()); addBillAction(bill.getBillId(), dbBill.getOwe());
} }
} }
@@ -295,7 +311,11 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(dbBill!=null) { if(dbBill!=null) {
wxBillRent.setPay(dbBill.getPay()+dbBill.getReceivePay()); wxBillRent.setPay(dbBill.getPay()+dbBill.getReceivePay());
wxBillRent.setPayDate(new Date()); wxBillRent.setPayDate(new Date());
wxBillRent.setStatus(EnumBillRentStatus.RETURN.getCode());
if(EnumSettleBillType.R.getCode().equals(bill.getType())){
wxBillRent.setStatus(EnumBillRentStatus.PAID.getCode());
}else{
wxBillRent.setStatus(EnumBillRentStatus.RETURN.getCode());
}
addBillAction(bill.getBillId(), dbBill.getOwe()); addBillAction(bill.getBillId(), dbBill.getOwe());
} }
} }
@@ -321,7 +341,11 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(dbBill!=null) { if(dbBill!=null) {
wxBillRent.setPay(dbBill.getPay()+dbBill.getReceivePay()); wxBillRent.setPay(dbBill.getPay()+dbBill.getReceivePay());
wxBillRent.setPayDate(new Date()); wxBillRent.setPayDate(new Date());
wxBillRent.setStatus(EnumBillRentStatus.RETURN.getCode());
if(EnumSettleBillType.R.getCode().equals(bill.getType())){
wxBillRent.setStatus(EnumBillRentStatus.PAID.getCode());
}else{
wxBillRent.setStatus(EnumBillRentStatus.RETURN.getCode());
}
addBillAction(bill.getBillId(), dbBill.getOwe()); addBillAction(bill.getBillId(), dbBill.getOwe());
} }
} }
@@ -373,7 +397,11 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(dbBill!=null) { if(dbBill!=null) {
propertyDeposit.setPay(dbBill.getPay()+dbBill.getReceivePay()); propertyDeposit.setPay(dbBill.getPay()+dbBill.getReceivePay());
propertyDeposit.setPayDate(new Date()); propertyDeposit.setPayDate(new Date());
propertyDeposit.setStatus(EnumBillRentStatus.RETURN.getCode());
if(EnumSettleBillType.R.getCode().equals(bill.getType())){
propertyDeposit.setStatus(EnumBillRentStatus.PAID.getCode());
}else{
propertyDeposit.setStatus(EnumBillRentStatus.RETURN.getCode());
}
addBillAction(bill.getBillId(), dbBill.getOwe()); addBillAction(bill.getBillId(), dbBill.getOwe());
} }
} }


+ 197
- 197
mallinkService/src/main/resources/mapper/WxBillSettleBillMapper.xml Просмотреть файл

@@ -1,214 +1,214 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.iformall.mapper.WxBillSettleBillMapper"> <mapper namespace="com.iformall.mapper.WxBillSettleBillMapper">
<resultMap id="BaseResultMap" type="com.iformall.domain.po.WxBillSettleBill">
<id column="id" property="id"/>
<result column="tenant_id" property="tenantId"/>
<resultMap id="BaseResultMap" type="com.iformall.domain.po.WxBillSettleBill">
<id column="id" property="id"/>
<result column="tenant_id" property="tenantId"/>


<result column="settle_id" property="settleId"/>
<result column="type" property="type"/>
<result column="bill_id" property="billId"/>
<result column="bill_type" property="billType"/>
<result column="createtime" property="createtime"/>
<result column="updatetime" property="updatetime"/>
<result column="settle_id" property="settleId"/>
<result column="type" property="type"/>
<result column="bill_id" property="billId"/>
<result column="bill_type" property="billType"/>
<result column="createtime" property="createtime"/>
<result column="updatetime" property="updatetime"/>


<result column="billName" property="billName"/>
<result column="receivePay" property="receivePay"/>
<result column="starttime" property="starttime"/>
<result column="endtime" property="endtime"/>
<result column="billName" property="billName"/>
<result column="receivePay" property="receivePay"/>
<result column="starttime" property="starttime"/>
<result column="endtime" property="endtime"/>


</resultMap>
</resultMap>


<sql id="allColumns">
<sql id="allColumns">
`id`,`tenant_id`,`settle_id`,`type`,`bill_id`,`bill_type` `id`,`tenant_id`,`settle_id`,`type`,`bill_id`,`bill_type`
,`createtime`,`updatetime` ,`createtime`,`updatetime`
</sql> </sql>


<sql id="dynamicWhereConditions">
where 1=1
<if test=" null != id ">and `id` = #{id}</if>
<if test=" null != tenantId ">and `tenant_id` = #{tenantId}</if>
<if test=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
#{idItem}
</foreach>
</if>
<if test=" null != sortColumns">order by ${sortColumns}</if>
</sql>
<select id="findList" parameterType="com.iformall.domain.po.WxBillSettleBill" resultMap="BaseResultMap">
select
<include refid="allColumns"/>
from wx_bill_settle_bill
<include refid="dynamicWhereConditions"/>
</select>
<select id="findBySettleId" parameterType="com.iformall.domain.po.WxBillSettleBill" resultMap="BaseResultMap">
select bill.starttime,bill.endtime,bl.bill_id,bl.bill_type,bill.bill_type billName,IFNULL(bill.owe,0) receivePay
from wx_bill_settle_bill bl left join
(select id,merchant_id,shop_id,tenant_id,1 bill_type_value,'租金-租金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from wx_bill_rent where is_preview = 0
union all
select id,merchant_id,shop_id,tenant_id,2 bill_type_value,'租赁押金-租赁押金'
bill_type,need_pay,receive_pay,pay,
<choose>
<when test="1==type">
receive_pay owe
</when>
<otherwise>
owe
</otherwise>
</choose>
,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from
wx_bill_rent_deposit
union all
select id,merchant_id,shop_id,tenant_id,3 bill_type_value,'物业费-物业费'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from
wx_bill_property where is_preview = 0
union all
select id,merchant_id,shop_id,tenant_id,4 bill_type_value,'物业押金-物业押金'
bill_type,need_pay,receive_pay,pay,
<choose>
<when test="1==type">
receive_pay owe
</when>
<otherwise>
owe
</otherwise>
</choose>
,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from
wx_bill_property_deposit
union all
select id,merchant_id,shop_id,tenant_id,5 bill_type_value,'水费-水费' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from wx_bill_daily where
type=1
union all
select id,merchant_id,shop_id,tenant_id,6 bill_type_value,'电费-电费' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from wx_bill_daily where
type=2
union all
select id,merchant_id,shop_id,tenant_id,9 bill_type_value,'空调费-空调费' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from wx_bill_daily where
type=3
union all
select id,merchant_id,shop_id,tenant_id,7 bill_type_value,concat('其他费用-',name) as bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from wx_bill_other
union all
select id,merchant_id,shop_id,tenant_id,8 bill_type_value,concat('其他押金-',comments) as bill_type,0 as
need_pay,receive_pay,pay,
<choose>
<when test="1==type">
receive_pay owe
</when>
<otherwise>
owe
</otherwise>
</choose>
,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from wx_bill_other_deposit
union all
select id, id merchant_id,'' shop_id,tenant_id,10 bill_type_value,'补贴-补贴' bill_type,0 as
need_pay,subsidy receive_pay,0 pay,0 owe,'' receive_date,'' pay_date,'' expired_day,status,'' rent_shop_type,'' starttime,'' endtime from wx_merchant_subsidy
) bill
on(bl.bill_id = bill.id)
where 1=1
<if test=" null != billId ">and bill.`id` = #{billId}</if>
<if test=" null != tenantId ">and bl.`tenant_id` = #{tenantId}</if>
<if test=" null != settleId ">and bl.`settle_id` = #{settleId}</if>
<if test=" null != type ">and bl.`type` = #{type}</if>
</select>
<!--同上面的sql-->
<select id="findByBillId" parameterType="com.iformall.domain.po.WxBillSettleBill" resultMap="BaseResultMap">
select bill.bill_type billName,bill.owe receivePay FROM
(select id,merchant_id,shop_id,tenant_id,1 bill_type_value,'租金-租金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from wx_bill_rent where is_preview = 0
union all
select id,merchant_id,shop_id,tenant_id,2 bill_type_value,'租赁押金-租赁押金'
bill_type,need_pay,receive_pay,pay,
<choose>
<when test="1==type">
receive_pay owe
</when>
<otherwise>
owe
</otherwise>
</choose>
,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from
wx_bill_rent_deposit
union all
select id,merchant_id,shop_id,tenant_id,3 bill_type_value,'物业费-物业费'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from
wx_bill_property where is_preview = 0
union all
select id,merchant_id,shop_id,tenant_id,4 bill_type_value,'物业押金-物业押金'
bill_type,need_pay,receive_pay,pay,
<choose>
<when test="1==type">
receive_pay owe
</when>
<otherwise>
owe
</otherwise>
</choose>
,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from
wx_bill_property_deposit
union all
select id,merchant_id,shop_id,tenant_id,5 bill_type_value,'水费-水费' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from wx_bill_daily where
type=1
union all
select id,merchant_id,shop_id,tenant_id,6 bill_type_value,'电费-电费' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from wx_bill_daily where
type=2
union all
select id,merchant_id,shop_id,tenant_id,9 bill_type_value,'空调费-空调费' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from wx_bill_daily where
type=3
union all
select id,merchant_id,shop_id,tenant_id,7 bill_type_value,concat('其他费用-',name) as bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from wx_bill_other
union all
select id,merchant_id,shop_id,tenant_id,8 bill_type_value,concat('其他押金-',comments) as bill_type,0 as
need_pay,receive_pay,pay,
<choose>
<when test="1==type">
receive_pay owe
</when>
<otherwise>
owe
</otherwise>
</choose>
,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from wx_bill_other_deposit
union all
select id, id merchant_id,'' shop_id,tenant_id,10 bill_type_value,'补贴-补贴' bill_type,0 as
need_pay,subsidy receive_pay,0 pay,0 owe,'' receive_date,'' pay_date,'' expired_day,status,'' rent_shop_type,'' starttime,'' endtime from wx_merchant_subsidy
) bill
where 1=1
<if test=" null != billId ">and bill.`id` = #{billId}</if>
</select>
<update id="delBySettleId" parameterType="com.iformall.domain.po.WxBillSettle">
<sql id="dynamicWhereConditions">
where 1=1
<if test=" null != id ">and `id` = #{id}</if>
<if test=" null != tenantId ">and `tenant_id` = #{tenantId}</if>
<if test=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
#{idItem}
</foreach>
</if>
<if test=" null != sortColumns">order by ${sortColumns}</if>
</sql>
<select id="findList" parameterType="com.iformall.domain.po.WxBillSettleBill" resultMap="BaseResultMap">
select
<include refid="allColumns"/>
from wx_bill_settle_bill
<include refid="dynamicWhereConditions"/>
</select>
<select id="findBySettleId" parameterType="com.iformall.domain.po.WxBillSettleBill" resultMap="BaseResultMap">
select bill.starttime,bill.endtime,bl.bill_id,bl.bill_type,bill.bill_type billName,IFNULL(bill.owe,0) receivePay
from wx_bill_settle_bill bl left join
(select id,merchant_id,shop_id,tenant_id,1 bill_type_value,'租金-租金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from wx_bill_rent where is_preview = 0
union all
select id,merchant_id,shop_id,tenant_id,2 bill_type_value,'租赁押金-租赁押金'
bill_type,need_pay,receive_pay,pay,
<choose>
<when test="1==type">
receive_pay owe
</when>
<otherwise>
owe
</otherwise>
</choose>
,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from
wx_bill_rent_deposit
union all
select id,merchant_id,shop_id,tenant_id,3 bill_type_value,'物业费-物业费'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from
wx_bill_property where is_preview = 0
union all
select id,merchant_id,shop_id,tenant_id,4 bill_type_value,'物业押金-物业押金'
bill_type,need_pay,receive_pay,pay,
<choose>
<when test="1==type">
receive_pay owe
</when>
<otherwise>
owe
</otherwise>
</choose>
,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from
wx_bill_property_deposit
union all
select id,merchant_id,shop_id,tenant_id,5 bill_type_value,'水费-水费' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from wx_bill_daily where
type=1
union all
select id,merchant_id,shop_id,tenant_id,6 bill_type_value,'电费-电费' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from wx_bill_daily where
type=2
union all
select id,merchant_id,shop_id,tenant_id,9 bill_type_value,'空调费-空调费' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from wx_bill_daily where
type=3
union all
select id,merchant_id,shop_id,tenant_id,7 bill_type_value,concat('其他费用-',name) as bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from wx_bill_other
union all
select id,merchant_id,shop_id,tenant_id,8 bill_type_value,concat('其他押金-',comments) as bill_type,0 as
need_pay,receive_pay,pay,
<choose>
<when test="1==type">
receive_pay owe
</when>
<otherwise>
owe
</otherwise>
</choose>
,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from wx_bill_other_deposit
union all
select id, id merchant_id,'' shop_id,tenant_id,10 bill_type_value,'补贴-补贴' bill_type,0 as
need_pay,subsidy receive_pay,0 pay,subsidy owe,'' receive_date,'' pay_date,'' expired_day,status,'' rent_shop_type,'' starttime,'' endtime from wx_merchant_subsidy
) bill
on(bl.bill_id = bill.id)
where 1=1
<if test=" null != billId ">and bill.`id` = #{billId}</if>
<if test=" null != tenantId ">and bl.`tenant_id` = #{tenantId}</if>
<if test=" null != settleId ">and bl.`settle_id` = #{settleId}</if>
<if test=" null != type ">and bl.`type` = #{type}</if>
</select>
<!--同上面的sql-->
<select id="findByBillId" parameterType="com.iformall.domain.po.WxBillSettleBill" resultMap="BaseResultMap">
select bill.bill_type billName,bill.owe receivePay FROM
(select id,merchant_id,shop_id,tenant_id,1 bill_type_value,'租金-租金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from wx_bill_rent where is_preview = 0
union all
select id,merchant_id,shop_id,tenant_id,2 bill_type_value,'租赁押金-租赁押金'
bill_type,need_pay,receive_pay,pay,
<choose>
<when test="1==type">
receive_pay owe
</when>
<otherwise>
owe
</otherwise>
</choose>
,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from
wx_bill_rent_deposit
union all
select id,merchant_id,shop_id,tenant_id,3 bill_type_value,'物业费-物业费'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from
wx_bill_property where is_preview = 0
union all
select id,merchant_id,shop_id,tenant_id,4 bill_type_value,'物业押金-物业押金'
bill_type,need_pay,receive_pay,pay,
<choose>
<when test="1==type">
receive_pay owe
</when>
<otherwise>
owe
</otherwise>
</choose>
,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from
wx_bill_property_deposit
union all
select id,merchant_id,shop_id,tenant_id,5 bill_type_value,'水费-水费' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from wx_bill_daily where
type=1
union all
select id,merchant_id,shop_id,tenant_id,6 bill_type_value,'电费-电费' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from wx_bill_daily where
type=2
union all
select id,merchant_id,shop_id,tenant_id,9 bill_type_value,'空调费-空调费' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from wx_bill_daily where
type=3
union all
select id,merchant_id,shop_id,tenant_id,7 bill_type_value,concat('其他费用-',name) as bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from wx_bill_other
union all
select id,merchant_id,shop_id,tenant_id,8 bill_type_value,concat('其他押金-',comments) as bill_type,0 as
need_pay,receive_pay,pay,
<choose>
<when test="1==type">
receive_pay owe
</when>
<otherwise>
owe
</otherwise>
</choose>
,receive_date,pay_date,expired_day,status,rent_shop_type,starttime,endtime from wx_bill_other_deposit
union all
select id, id merchant_id,'' shop_id,tenant_id,10 bill_type_value,'补贴-补贴' bill_type,0 as
need_pay,subsidy receive_pay,0 pay,subsidy owe,'' receive_date,'' pay_date,'' expired_day,status,'' rent_shop_type,'' starttime,'' endtime from wx_merchant_subsidy
) bill
where 1=1
<if test=" null != billId ">and bill.`id` = #{billId}</if>
</select>
<update id="delBySettleId" parameterType="com.iformall.domain.po.WxBillSettle">
delete from wx_bill_settle_bill where settle_id = #{id} delete from wx_bill_settle_bill where settle_id = #{id}
</update> </update>


<select id="findExist" parameterType="com.iformall.domain.po.WxBillSettle" resultMap="BaseResultMap">
select * from wx_bill_settle_bill where 1=1
<if test=" null != id ">
and settle_id !=#{id}
</if>
<if test=" null != receiveBillIds ">
and bill_id in
<foreach collection="receiveBillIds" index="index" item="idItem" open="(" separator="," close=")">
#{idItem.billId}
</foreach>
</if>
</select>
<select id="findExist" parameterType="com.iformall.domain.po.WxBillSettle" resultMap="BaseResultMap">
select * from wx_bill_settle_bill where 1=1
<if test=" null != id ">
and settle_id !=#{id}
</if>
<if test=" null != receiveBillIds ">
and bill_id in
<foreach collection="receiveBillIds" index="index" item="idItem" open="(" separator="," close=")">
#{idItem.billId}
</foreach>
</if>
</select>


</mapper> </mapper>




Загрузка…
Отмена
Сохранить