feature:代码初始化。
This commit is contained in:
@@ -0,0 +1,157 @@
|
||||
<?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.ruoyi.invest.mapper.AccountsDealRecordMapper">
|
||||
|
||||
<resultMap type="AccountsDealRecordVo" id="AccountsDealRecordResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="type" column="type" />
|
||||
<result property="accountId" column="account_id" />
|
||||
<result property="amount" column="amount" />
|
||||
<result property="dealType" column="deal_type" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="dealCategory" column="deal_category" />
|
||||
<result property="accountName" column="account_name" />
|
||||
<result property="transferRecordId" column="transfer_record_id" />
|
||||
<result property="currentBalance" column="current_balance" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAccountsDealRecordVo">
|
||||
select
|
||||
a.id,
|
||||
a.name,
|
||||
a.type,
|
||||
a.account_id,
|
||||
a.amount,
|
||||
a.transfer_record_id,
|
||||
a.deal_type,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time,
|
||||
a.del_flag,
|
||||
a.remark,
|
||||
a.deal_category,
|
||||
a.current_balance,
|
||||
CONCAT(a2."name", '(', right(a2.code, 4), ')') as account_name
|
||||
from
|
||||
accounts_deal_record a
|
||||
left join accounts a2 on a2.id =a.account_id
|
||||
|
||||
</sql>
|
||||
|
||||
<select id="selectAccountsDealRecordList" parameterType="AccountsDealRecordDto" resultMap="AccountsDealRecordResult">
|
||||
<include refid="selectAccountsDealRecordVo"/>
|
||||
<where>
|
||||
a.del_flag='0'
|
||||
<if test="name != null and name != ''"> and a.name like '%'|| #{name}||'%'</if>
|
||||
<if test="type != null and type != ''"> and a.type = #{type}</if>
|
||||
<if test="accountId != null and accountId != ''"> and a.account_id = #{accountId}</if>
|
||||
<if test="dealType != null and dealType != ''"> and a.deal_type = #{dealType}</if>
|
||||
<if test="dealCategory != null and dealCategory != ''"> and a.deal_category = #{dealCategory}</if>
|
||||
<if test="endTime!=null and endTime !=''">
|
||||
and #{endTime}>=to_char(a.create_time, 'yyyy-MM-dd')
|
||||
</if>
|
||||
<if test="startTime!=null and startTime !=''">
|
||||
and to_char(a.create_time, 'yyyy-MM-dd')>=#{startTime}
|
||||
</if>
|
||||
</where>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectAccountsDealRecordById" parameterType="Long" resultMap="AccountsDealRecordResult">
|
||||
<include refid="selectAccountsDealRecordVo"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertAccountsDealRecord" parameterType="AccountsDealRecord">
|
||||
insert into accounts_deal_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="type != null and type != ''">type,</if>
|
||||
<if test="accountId != null and accountId != ''">account_id,</if>
|
||||
<if test="amount != null">amount,</if>
|
||||
<if test="dealType != null and dealType != ''">deal_type,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="dealCategory != null and dealCategory != ''">deal_category,</if>
|
||||
<if test="transferRecordId != null and transferRecordId != ''">transfer_record_id,</if>
|
||||
<if test="currentBalance != null">current_balance,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="type != null and type != ''">#{type},</if>
|
||||
<if test="accountId != null and accountId != ''">#{accountId},</if>
|
||||
<if test="amount != null">#{amount},</if>
|
||||
<if test="dealType != null and dealType != ''">#{dealType},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="dealCategory != null and dealCategory != ''">#{dealCategory},</if>
|
||||
<if test="transferRecordId != null and transferRecordId != ''">#{transferRecordId},</if>
|
||||
<if test="currentBalance != null">#{currentBalance},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateAccountsDealRecord" parameterType="AccountsDealRecord">
|
||||
update accounts_deal_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="type != null and type != ''">type = #{type},</if>
|
||||
<if test="accountId != null and accountId != ''">account_id = #{accountId},</if>
|
||||
<if test="amount != null">amount = #{amount},</if>
|
||||
<if test="dealType != null and dealType != ''">deal_type = #{dealType},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="dealCategory != null and dealCategory != ''">deal_category = #{dealCategory},</if>
|
||||
<if test="transferRecordId != null and transferRecordId != ''">transfer_record_id = #{transferRecordId},</if>
|
||||
<if test="currentBalance != null ">current_balance = #{currentBalance},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAccountsDealRecordById" parameterType="Long">
|
||||
delete from accounts_deal_record where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAccountsDealRecordByTransferId" parameterType="Long">
|
||||
delete from accounts_deal_record where transfer_record_id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAccountsDealRecordByIds" parameterType="String">
|
||||
delete from accounts_deal_record where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<update id="removeAccountsDealRecordById" parameterType="Long">
|
||||
update accounts_deal_record set del_flag='1' where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="removeAccountsDealRecordByIds" parameterType="String">
|
||||
update accounts_deal_record set del_flag='1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,124 @@
|
||||
<?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.ruoyi.invest.mapper.AccountsMapper">
|
||||
|
||||
<resultMap type="AccountsVo" id="AccountsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="type" column="type" />
|
||||
<result property="code" column="code" />
|
||||
<result property="balance" column="balance" />
|
||||
<result property="creditLimit" column="credit_limit" />
|
||||
<result property="availableLimit" column="available_limit" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="accountId" column="account_id" />
|
||||
<result property="state" column="state" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAccountsVo">
|
||||
select a.id, a.name, a.type, a.code, a.balance, a.credit_limit, a.available_limit, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag, a.remark, a.account_id, a.state from accounts a
|
||||
</sql>
|
||||
|
||||
<select id="selectAccountsList" parameterType="AccountsDto" resultMap="AccountsResult">
|
||||
<include refid="selectAccountsVo"/>
|
||||
<where>
|
||||
a.del_flag='0'
|
||||
<if test="name != null and name != ''"> and a.name like '%'|| #{name}||'%'</if>
|
||||
<if test="type != null and type != ''"> and a.type = #{type}</if>
|
||||
<if test="state != null and state != ''"> and a.state = #{state}</if>
|
||||
</where>
|
||||
order by a.type asc,a.update_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectAccountsById" parameterType="Long" resultMap="AccountsResult">
|
||||
<include refid="selectAccountsVo"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertAccounts" parameterType="Accounts">
|
||||
insert into accounts
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="type != null and type != ''">type,</if>
|
||||
<if test="code != null and code != ''">code,</if>
|
||||
<if test="balance != null">balance,</if>
|
||||
<if test="creditLimit != null">credit_limit,</if>
|
||||
<if test="availableLimit != null">available_limit,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="accountId != null and accountId != ''">account_id,</if>
|
||||
<if test="state != null">state,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="type != null and type != ''">#{type},</if>
|
||||
<if test="code != null and code != ''">#{code},</if>
|
||||
<if test="balance != null">#{balance},</if>
|
||||
<if test="creditLimit != null">#{creditLimit},</if>
|
||||
<if test="availableLimit != null">#{availableLimit},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="accountId != null and accountId != ''">#{accountId},</if>
|
||||
<if test="state != null">#{state},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateAccounts" parameterType="Accounts">
|
||||
update accounts
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="type != null and type != ''">type = #{type},</if>
|
||||
<if test="code != null and code != ''">code = #{code},</if>
|
||||
<if test="balance != null">balance = #{balance},</if>
|
||||
<if test="creditLimit != null">credit_limit = #{creditLimit},</if>
|
||||
<if test="availableLimit != null">available_limit = #{availableLimit},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="accountId != null and accountId != ''">account_id = #{accountId},</if>
|
||||
<if test="state != null">state = #{state},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAccountsById" parameterType="Long">
|
||||
delete from accounts where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAccountsByIds" parameterType="String">
|
||||
delete from accounts where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<update id="removeAccountsById" parameterType="Long">
|
||||
update accounts set del_flag='1' where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="removeAccountsByIds" parameterType="String">
|
||||
update accounts set del_flag='1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,171 @@
|
||||
<?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.ruoyi.invest.mapper.AccountsTransferRecordMapper">
|
||||
|
||||
<resultMap type="AccountsTransferRecordVo" id="AccountsTransferRecordResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="type" column="type" />
|
||||
<result property="outAccountId" column="out_account_id" />
|
||||
<result property="inAccountId" column="in_account_id" />
|
||||
<result property="posId" column="pos_id" />
|
||||
<result property="commission" column="commission" />
|
||||
<result property="amount" column="amount" />
|
||||
<result property="actualAmount" column="actual_amount" />
|
||||
<result property="dealType" column="deal_type" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="posName" column="pos_name" />
|
||||
<result property="outAccountName" column="out_account_name" />
|
||||
<result property="inAccountName" column="in_account_name" />
|
||||
<result property="merchantName" column="merchant_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAccountsTransferRecordVo">
|
||||
select
|
||||
a.id,
|
||||
a.name,
|
||||
a.type,
|
||||
a.out_account_id,
|
||||
a.in_account_id,
|
||||
a.pos_id,
|
||||
a.commission,
|
||||
a.amount,
|
||||
a.actual_amount,
|
||||
a.deal_type,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time,
|
||||
a.del_flag,
|
||||
a.remark,
|
||||
pm."name" as pos_name,
|
||||
pm.merchant_name,
|
||||
CONCAT(a3."name", '(', right(a3.code, 4), ')') as out_account_name,
|
||||
CONCAT(a4."name", '(', right(a4.code, 4), ')') as in_account_name
|
||||
from
|
||||
accounts_transfer_record a
|
||||
left join pos_machine pm on
|
||||
pm.id = a.pos_id
|
||||
left join accounts a3 on
|
||||
a3.id = a.out_account_id
|
||||
left join accounts a4 on
|
||||
a4.id = a.in_account_id
|
||||
|
||||
</sql>
|
||||
|
||||
<select id="selectAccountsTransferRecordList" parameterType="AccountsTransferRecordDto" resultMap="AccountsTransferRecordResult">
|
||||
<include refid="selectAccountsTransferRecordVo"/>
|
||||
<where>
|
||||
a.del_flag='0'
|
||||
<if test="name != null and name != ''"> and a.name like '%'|| #{name}||'%'</if>
|
||||
<if test="type != null and type != ''"> and a.type = #{type}</if>
|
||||
<if test="inAccountId != null "> and a.in_account_id = #{inAccountId}</if>
|
||||
<if test="outAccountId != null "> and a.out_account_id = #{outAccountId}</if>
|
||||
<if test="accountId != null "> and (a.out_account_id = #{accountId} or a.in_account_id = #{accountId} or a.pos_id = #{accountId})</if>
|
||||
<if test="posId != null "> and a.pos_id = #{posId}</if>
|
||||
<if test="dealType != null and dealType != ''"> and a.deal_type = #{dealType}</if>
|
||||
<if test="endTime!=null and endTime !=''">
|
||||
and #{endTime}>=to_char(a.create_time, 'yyyy-MM-dd')
|
||||
</if>
|
||||
<if test="startTime!=null and startTime !=''">
|
||||
and to_char(a.create_time, 'yyyy-MM-dd')>=#{startTime}
|
||||
</if>
|
||||
</where>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectAccountsTransferRecordById" parameterType="Long" resultMap="AccountsTransferRecordResult">
|
||||
<include refid="selectAccountsTransferRecordVo"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertAccountsTransferRecord" parameterType="AccountsTransferRecord">
|
||||
insert into accounts_transfer_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="outAccountId != null">out_account_id,</if>
|
||||
<if test="inAccountId != null">in_account_id,</if>
|
||||
<if test="posId != null">pos_id,</if>
|
||||
<if test="commission != null">commission,</if>
|
||||
<if test="amount != null">amount,</if>
|
||||
<if test="actualAmount != null">actual_amount,</if>
|
||||
<if test="dealType != null">deal_type,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="outAccountId != null">#{outAccountId},</if>
|
||||
<if test="inAccountId != null">#{inAccountId},</if>
|
||||
<if test="posId != null">#{posId},</if>
|
||||
<if test="commission != null">#{commission},</if>
|
||||
<if test="amount != null">#{amount},</if>
|
||||
<if test="actualAmount != null">#{actualAmount},</if>
|
||||
<if test="dealType != null">#{dealType},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateAccountsTransferRecord" parameterType="AccountsTransferRecord">
|
||||
update accounts_transfer_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="outAccountId != null">out_account_id = #{outAccountId},</if>
|
||||
<if test="inAccountId != null">in_account_id = #{inAccountId},</if>
|
||||
<if test="posId != null">pos_id = #{posId},</if>
|
||||
<if test="commission != null">commission = #{commission},</if>
|
||||
<if test="amount != null">amount = #{amount},</if>
|
||||
<if test="actualAmount != null">actual_amount = #{actualAmount},</if>
|
||||
<if test="dealType != null">deal_type = #{dealType},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAccountsTransferRecordById" parameterType="Long">
|
||||
delete from accounts_transfer_record where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAccountsTransferRecordByIds" parameterType="String">
|
||||
delete from accounts_transfer_record where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<update id="removeAccountsTransferRecordById" parameterType="Long">
|
||||
update accounts_transfer_record set del_flag='1' where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="removeAccountsTransferRecordByIds" parameterType="String">
|
||||
update accounts_transfer_record set del_flag='1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,157 @@
|
||||
<?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.ruoyi.invest.mapper.BankCardLendMapper">
|
||||
|
||||
<resultMap type="BankCardLendVo" id="BankCardLendResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="type" column="type" />
|
||||
<result property="code" column="code" />
|
||||
<result property="openingBank" column="opening_bank" />
|
||||
<result property="activationDate" column="activation_date" />
|
||||
<result property="billDate" column="bill_date" />
|
||||
<result property="payDate" column="pay_date" />
|
||||
<result property="delayPeriod" column="delay_period" />
|
||||
<result property="creditLimit" column="credit_limit" />
|
||||
<result property="effectiveDate" column="effective_date" />
|
||||
<result property="cvv" column="cvv" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="debitType" column="debit_type" />
|
||||
<result property="lendType" column="lend_type" />
|
||||
<result property="isNextBillDate" column="is_next_bill_date" />
|
||||
<result property="nextBillDateTime" column="next_bill_date_time" />
|
||||
<result property="isZeroBill" column="is_zero_bill" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBankCardLendVo">
|
||||
select a.id, a.name, a.type, a.code, a.opening_bank, a.activation_date, a.bill_date, a.pay_date, a.delay_period, a.credit_limit, a.effective_date, a.cvv, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag, a.remark, a.debit_type, a.lend_type, a.is_next_bill_date, a.next_bill_date_time, a.is_zero_bill from bank_card_lend a
|
||||
</sql>
|
||||
|
||||
<select id="selectBankCardLendList" parameterType="BankCardLendDto" resultMap="BankCardLendResult">
|
||||
<include refid="selectBankCardLendVo"/>
|
||||
<where>
|
||||
a.del_flag='0'
|
||||
<if test="name != null and name != ''"> and a.name like '%'|| #{name}||'%'</if>
|
||||
<if test="type != null and type != ''"> and a.type = #{type}</if>
|
||||
<if test="creditCardId != null "> and a.id = #{creditCardId}</if>
|
||||
<if test="lendType != null and lendType != ''"> and a.lend_type = #{lendType}</if>
|
||||
</where>
|
||||
order by a.bill_date asc,a.update_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectBankCardLendById" parameterType="Long" resultMap="BankCardLendResult">
|
||||
<include refid="selectBankCardLendVo"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBankCardLend" parameterType="BankCardLend">
|
||||
insert into bank_card_lend
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="type != null and type != ''">type,</if>
|
||||
<if test="code != null and code != ''">code,</if>
|
||||
<if test="openingBank != null">opening_bank,</if>
|
||||
<if test="activationDate != null">activation_date,</if>
|
||||
<if test="billDate != null and billDate != ''">bill_date,</if>
|
||||
<if test="payDate != null and payDate != ''">pay_date,</if>
|
||||
<if test="delayPeriod != null">delay_period,</if>
|
||||
<if test="creditLimit != null and creditLimit != ''">credit_limit,</if>
|
||||
<if test="effectiveDate != null">effective_date,</if>
|
||||
<if test="cvv != null and cvv != ''">cvv,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="debitType != null">debit_type,</if>
|
||||
<if test="lendType != null">lend_type,</if>
|
||||
<if test="isNextBillDate != null">is_next_bill_date,</if>
|
||||
<if test="nextBillDateTime != null">next_bill_date_time,</if>
|
||||
<if test="isZeroBill != null">is_zero_bill,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="type != null and type != ''">#{type},</if>
|
||||
<if test="code != null and code != ''">#{code},</if>
|
||||
<if test="openingBank != null">#{openingBank},</if>
|
||||
<if test="activationDate != null">#{activationDate},</if>
|
||||
<if test="billDate != null and billDate != ''">#{billDate},</if>
|
||||
<if test="payDate != null and payDate != ''">#{payDate},</if>
|
||||
<if test="delayPeriod != null">#{delayPeriod},</if>
|
||||
<if test="creditLimit != null and creditLimit != ''">#{creditLimit},</if>
|
||||
<if test="effectiveDate != null">#{effectiveDate},</if>
|
||||
<if test="cvv != null and cvv != ''">#{cvv},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="debitType != null">#{debitType},</if>
|
||||
<if test="lendType != null">#{lendType},</if>
|
||||
<if test="isNextBillDate != null">#{isNextBillDate},</if>
|
||||
<if test="nextBillDateTime != null">#{nextBillDateTime},</if>
|
||||
<if test="isZeroBill != null">#{isZeroBill},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBankCardLend" parameterType="BankCardLend">
|
||||
update bank_card_lend
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="type != null and type != ''">type = #{type},</if>
|
||||
<if test="code != null and code != ''">code = #{code},</if>
|
||||
<if test="openingBank != null">opening_bank = #{openingBank},</if>
|
||||
<if test="activationDate != null">activation_date = #{activationDate},</if>
|
||||
<if test="billDate != null and billDate != ''">bill_date = #{billDate},</if>
|
||||
<if test="payDate != null and payDate != ''">pay_date = #{payDate},</if>
|
||||
<if test="delayPeriod != null">delay_period = #{delayPeriod},</if>
|
||||
<if test="creditLimit != null and creditLimit != ''">credit_limit = #{creditLimit},</if>
|
||||
<if test="effectiveDate != null">effective_date = #{effectiveDate},</if>
|
||||
<if test="cvv != null and cvv != ''">cvv = #{cvv},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="debitType != null">debit_type = #{debitType},</if>
|
||||
<if test="lendType != null">lend_type = #{lendType},</if>
|
||||
<if test="isNextBillDate != null">is_next_bill_date = #{isNextBillDate},</if>
|
||||
<if test="nextBillDateTime != null">next_bill_date_time = #{nextBillDateTime},</if>
|
||||
<if test="isZeroBill != null">is_zero_bill = #{isZeroBill},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBankCardLendById" parameterType="Long">
|
||||
delete from bank_card_lend where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBankCardLendByIds" parameterType="String">
|
||||
delete from bank_card_lend where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<update id="removeBankCardLendById" parameterType="Long">
|
||||
update bank_card_lend set del_flag='1' where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="removeBankCardLendByIds" parameterType="String">
|
||||
update bank_card_lend set del_flag='1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,132 @@
|
||||
<?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.ruoyi.invest.mapper.CreditCardBillMapper">
|
||||
|
||||
<resultMap type="CreditCardBillVo" id="CreditCardBillResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="billDate" column="bill_date" />
|
||||
<result property="creditCardId" column="credit_card_id" />
|
||||
<result property="billDatePeriod" column="bill_date_period" />
|
||||
<result property="billAmount" column="bill_amount" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="bankName" column="bank_name" />
|
||||
<result property="bankCode" column="bank_code" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCreditCardBillVo">
|
||||
select
|
||||
a.id,
|
||||
a.name,
|
||||
a.bill_date,
|
||||
a.credit_card_id,
|
||||
a.bill_date_period,
|
||||
a.bill_amount,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time,
|
||||
a.del_flag,
|
||||
bc."name" as bank_name,
|
||||
bc.code as bank_code
|
||||
from
|
||||
credit_card_bill a
|
||||
left join bank_card_lend bc on
|
||||
bc.id = a.credit_card_id
|
||||
</sql>
|
||||
|
||||
<select id="selectCreditCardBillList" parameterType="CreditCardBillDto" resultMap="CreditCardBillResult">
|
||||
<include refid="selectCreditCardBillVo"/>
|
||||
<where>
|
||||
a.del_flag='0'
|
||||
<if test="name != null and name != ''"> and a.name like '%'|| #{name}||'%'</if>
|
||||
<if test="creditCardId != null "> and a.credit_card_id = #{creditCardId}</if>
|
||||
<if test="startMonth!=null and startMonth !=''">
|
||||
and to_char(a.bill_date, 'yyyy-MM')>=#{startMonth}
|
||||
</if>
|
||||
<if test="endMonth!=null and endMonth !=''">
|
||||
and #{endMonth}>=to_char(a.bill_date, 'yyyy-MM')
|
||||
</if>
|
||||
</where>
|
||||
order by a.bill_date desc
|
||||
</select>
|
||||
|
||||
<select id="selectCreditCardBillById" parameterType="Long" resultMap="CreditCardBillResult">
|
||||
<include refid="selectCreditCardBillVo"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCreditCardBill" parameterType="CreditCardBill">
|
||||
insert into credit_card_bill
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="billDate != null">bill_date,</if>
|
||||
<if test="creditCardId != null">credit_card_id,</if>
|
||||
<if test="billDatePeriod != null">bill_date_period,</if>
|
||||
<if test="billAmount != null">bill_amount,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="billDate != null">#{billDate},</if>
|
||||
<if test="creditCardId != null">#{creditCardId},</if>
|
||||
<if test="billDatePeriod != null">#{billDatePeriod},</if>
|
||||
<if test="billAmount != null">#{billAmount},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCreditCardBill" parameterType="CreditCardBill">
|
||||
update credit_card_bill
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="billDate != null">bill_date = #{billDate},</if>
|
||||
<if test="creditCardId != null">credit_card_id = #{creditCardId},</if>
|
||||
<if test="billDatePeriod != null">bill_date_period = #{billDatePeriod},</if>
|
||||
<if test="billAmount != null">bill_amount = #{billAmount},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteCreditCardBillById" parameterType="Long">
|
||||
delete from credit_card_bill where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCreditCardBillByIds" parameterType="String">
|
||||
delete from credit_card_bill where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<update id="removeCreditCardBillById" parameterType="Long">
|
||||
update credit_card_bill set del_flag='1' where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="removeCreditCardBillByIds" parameterType="String">
|
||||
update credit_card_bill set del_flag='1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,126 @@
|
||||
<?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.ruoyi.invest.mapper.CreditReportQueryRecordMapper">
|
||||
|
||||
<resultMap type="CreditReportQueryRecordVo" id="CreditReportQueryRecordResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="queryInstitution" column="query_institution" />
|
||||
<result property="type" column="type" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="queryDate" column="query_date" />
|
||||
<result property="queryType" column="query_type" />
|
||||
<result property="queryCount" column="query_count" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCreditReportQueryRecordVo">
|
||||
select a.id, a.query_institution,a.query_count, a.type,a.query_type, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag, a.remark, a.query_date from credit_report_query_record a
|
||||
</sql>
|
||||
|
||||
<select id="selectCreditReportQueryRecordList" parameterType="CreditReportQueryRecordDto" resultMap="CreditReportQueryRecordResult">
|
||||
<include refid="selectCreditReportQueryRecordVo"/>
|
||||
<where>
|
||||
a.del_flag='0'
|
||||
<if test="queryInstitution != null and queryInstitution != ''"> and a.query_institution like '%'|| #{queryInstitution}||'%'</if>
|
||||
<if test="type != null and type != ''"> and a.type = #{type}</if>
|
||||
<if test="queryType != null and queryType != ''"> and a.query_type= #{queryType}</if>
|
||||
<if test="queryDateStart!=null and queryDateStart !=''">
|
||||
and to_char(a.query_date, 'yyyy-MM-dd')>=#{queryDateStart}
|
||||
</if>
|
||||
<if test="queryDateEnd!=null and queryDateEnd !=''">
|
||||
and #{queryDateEnd}>=to_char(a.query_date, 'yyyy-MM-dd')
|
||||
</if>
|
||||
</where>
|
||||
order by a.query_date desc
|
||||
</select>
|
||||
|
||||
<select id="selectCreditReportQueryRecordById" parameterType="Long" resultMap="CreditReportQueryRecordResult">
|
||||
<include refid="selectCreditReportQueryRecordVo"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCreditReportQueryRecord" parameterType="CreditReportQueryRecord">
|
||||
insert into credit_report_query_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="queryInstitution != null">query_institution,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="queryType != null">query_type,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="queryDate != null">query_date,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="queryInstitution != null">#{queryInstitution},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="queryType != null">#{queryType},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="queryDate != null">#{queryDate},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCreditReportQueryRecord" parameterType="CreditReportQueryRecord">
|
||||
update credit_report_query_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="queryInstitution != null">query_institution = #{queryInstitution},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="queryType != null">query_type = #{queryType},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="queryDate != null">query_date = #{queryDate},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteCreditReportQueryRecordById" parameterType="Long">
|
||||
delete from credit_report_query_record where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCreditReportQueryRecordByIds" parameterType="String">
|
||||
delete from credit_report_query_record where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<update id="removeCreditReportQueryRecordById" parameterType="Long">
|
||||
update credit_report_query_record set del_flag='1' where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="removeCreditReportQueryRecordByIds" parameterType="String">
|
||||
update credit_report_query_record set del_flag='1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
<select id="selectQueryInstitutionList" parameterType="CreditReportQueryRecordDto" resultMap="CreditReportQueryRecordResult">
|
||||
select
|
||||
distinct
|
||||
a.query_institution
|
||||
from
|
||||
credit_report_query_record a
|
||||
where
|
||||
a.del_flag = '0'
|
||||
order by
|
||||
a.query_institution desc
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,164 @@
|
||||
<?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.ruoyi.invest.mapper.DebitInforsMapper">
|
||||
|
||||
<resultMap type="DebitInforsVo" id="DebitInforsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="type" column="type" />
|
||||
<result property="lenders" column="lenders" />
|
||||
<result property="applicableCustomerGroups" column="applicable_customer_groups" />
|
||||
<result property="requiredMaterials" column="required_materials" />
|
||||
<result property="creditConditions" column="credit_conditions" />
|
||||
<result property="lendingRate" column="lending_rate" />
|
||||
<result property="loanTerm" column="loan_term" />
|
||||
<result property="repaymentMethod" column="repayment_method" />
|
||||
<result property="loanLimit" column="loan_limit" />
|
||||
<result property="loanPurpose" column="loan_purpose" />
|
||||
<result property="applyMethod" column="apply_method" />
|
||||
<result property="creditQueryCount" column="credit_query_count" />
|
||||
<result property="debtCount" column="debt_count" />
|
||||
<result property="creditCardCount" column="credit_card_count" />
|
||||
<result property="creditCardUsageRate" column="credit_card_usage_rate" />
|
||||
<result property="loanBalance" column="loan_balance" />
|
||||
<result property="debtRequirements" column="debt_requirements" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDebitInforsVo">
|
||||
select a.id, a.name, a.type, a.lenders, a.applicable_customer_groups, a.required_materials, a.credit_conditions, a.lending_rate, a.loan_term, a.repayment_method, a.loan_limit, a.loan_purpose, a.apply_method, a.credit_query_count, a.debt_count, a.credit_card_count, a.credit_card_usage_rate, a.loan_balance, a.debt_requirements, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag, a.remark from debit_infors a
|
||||
</sql>
|
||||
|
||||
<select id="selectDebitInforsList" parameterType="DebitInforsDto" resultMap="DebitInforsResult">
|
||||
<include refid="selectDebitInforsVo"/>
|
||||
<where>
|
||||
a.del_flag='0'
|
||||
<if test="name != null and name != ''"> and a.name like '%'|| #{name}||'%'</if>
|
||||
<if test="type != null and type != ''"> and a.type = #{type}</if>
|
||||
<if test="lenders != null and lenders != ''"> and a.lenders = #{lenders}</if>
|
||||
</where>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectDebitInforsById" parameterType="Long" resultMap="DebitInforsResult">
|
||||
<include refid="selectDebitInforsVo"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDebitInfors" parameterType="DebitInfors">
|
||||
insert into debit_infors
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="lenders != null and lenders != ''">lenders,</if>
|
||||
<if test="applicableCustomerGroups != null">applicable_customer_groups,</if>
|
||||
<if test="requiredMaterials != null">required_materials,</if>
|
||||
<if test="creditConditions != null">credit_conditions,</if>
|
||||
<if test="lendingRate != null">lending_rate,</if>
|
||||
<if test="loanTerm != null">loan_term,</if>
|
||||
<if test="repaymentMethod != null">repayment_method,</if>
|
||||
<if test="loanLimit != null">loan_limit,</if>
|
||||
<if test="loanPurpose != null">loan_purpose,</if>
|
||||
<if test="applyMethod != null">apply_method,</if>
|
||||
<if test="creditQueryCount != null">credit_query_count,</if>
|
||||
<if test="debtCount != null">debt_count,</if>
|
||||
<if test="creditCardCount != null">credit_card_count,</if>
|
||||
<if test="creditCardUsageRate != null">credit_card_usage_rate,</if>
|
||||
<if test="loanBalance != null">loan_balance,</if>
|
||||
<if test="debtRequirements != null">debt_requirements,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="lenders != null and lenders != ''">#{lenders},</if>
|
||||
<if test="applicableCustomerGroups != null">#{applicableCustomerGroups},</if>
|
||||
<if test="requiredMaterials != null">#{requiredMaterials},</if>
|
||||
<if test="creditConditions != null">#{creditConditions},</if>
|
||||
<if test="lendingRate != null">#{lendingRate},</if>
|
||||
<if test="loanTerm != null">#{loanTerm},</if>
|
||||
<if test="repaymentMethod != null">#{repaymentMethod},</if>
|
||||
<if test="loanLimit != null">#{loanLimit},</if>
|
||||
<if test="loanPurpose != null">#{loanPurpose},</if>
|
||||
<if test="applyMethod != null">#{applyMethod},</if>
|
||||
<if test="creditQueryCount != null">#{creditQueryCount},</if>
|
||||
<if test="debtCount != null">#{debtCount},</if>
|
||||
<if test="creditCardCount != null">#{creditCardCount},</if>
|
||||
<if test="creditCardUsageRate != null">#{creditCardUsageRate},</if>
|
||||
<if test="loanBalance != null">#{loanBalance},</if>
|
||||
<if test="debtRequirements != null">#{debtRequirements},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDebitInfors" parameterType="DebitInfors">
|
||||
update debit_infors
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="lenders != null and lenders != ''">lenders = #{lenders},</if>
|
||||
<if test="applicableCustomerGroups != null">applicable_customer_groups = #{applicableCustomerGroups},</if>
|
||||
<if test="requiredMaterials != null">required_materials = #{requiredMaterials},</if>
|
||||
<if test="creditConditions != null">credit_conditions = #{creditConditions},</if>
|
||||
<if test="lendingRate != null">lending_rate = #{lendingRate},</if>
|
||||
<if test="loanTerm != null">loan_term = #{loanTerm},</if>
|
||||
<if test="repaymentMethod != null">repayment_method = #{repaymentMethod},</if>
|
||||
<if test="loanLimit != null">loan_limit = #{loanLimit},</if>
|
||||
<if test="loanPurpose != null">loan_purpose = #{loanPurpose},</if>
|
||||
<if test="applyMethod != null">apply_method = #{applyMethod},</if>
|
||||
<if test="creditQueryCount != null">credit_query_count = #{creditQueryCount},</if>
|
||||
<if test="debtCount != null">debt_count = #{debtCount},</if>
|
||||
<if test="creditCardCount != null">credit_card_count = #{creditCardCount},</if>
|
||||
<if test="creditCardUsageRate != null">credit_card_usage_rate = #{creditCardUsageRate},</if>
|
||||
<if test="loanBalance != null">loan_balance = #{loanBalance},</if>
|
||||
<if test="debtRequirements != null">debt_requirements = #{debtRequirements},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDebitInforsById" parameterType="Long">
|
||||
delete from debit_infors where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDebitInforsByIds" parameterType="String">
|
||||
delete from debit_infors where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<update id="removeDebitInforsById" parameterType="Long">
|
||||
update debit_infors set del_flag='1' where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="removeDebitInforsByIds" parameterType="String">
|
||||
update debit_infors set del_flag='1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,151 @@
|
||||
<?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.ruoyi.invest.mapper.FutureStocksBillMapper">
|
||||
|
||||
<resultMap type="FutureStocksBillVo" id="FutureStocksBillResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="billDate" column="bill_date" />
|
||||
<result property="futureStocksId" column="future_stocks_id" />
|
||||
<result property="billDatePeriod" column="bill_date_period" />
|
||||
<result property="billAmount" column="bill_amount" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="type" column="type" />
|
||||
<result property="billYear" column="bill_year" />
|
||||
<result property="billMonth" column="bill_month" />
|
||||
<result property="futureStocksName" column="future_stocks_name" />
|
||||
<result property="futureStocksCode" column="future_stocks_code" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectFutureStocksBillVo">
|
||||
select
|
||||
a.id,
|
||||
a.name,
|
||||
a.bill_date,
|
||||
a.future_stocks_id,
|
||||
a.bill_date_period,
|
||||
a.bill_amount,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time,
|
||||
a.del_flag,
|
||||
a.type,
|
||||
a.bill_year,
|
||||
a.bill_month,
|
||||
fs2 ."name" as future_stocks_name,
|
||||
fs2.code as future_stocks_code
|
||||
from
|
||||
future_stocks_bill a
|
||||
left join future_stocks fs2 on fs2 .id =a.future_stocks_id
|
||||
|
||||
</sql>
|
||||
|
||||
<select id="selectFutureStocksBillList" parameterType="FutureStocksBillDto" resultMap="FutureStocksBillResult">
|
||||
<include refid="selectFutureStocksBillVo"/>
|
||||
<where>
|
||||
a.del_flag='0'
|
||||
<if test="name != null and name != ''"> and a.name like '%'|| #{name}||'%'</if>
|
||||
<if test="billDate != null "> and a.bill_date = #{billDate}</if>
|
||||
<if test="futureStocksId != null "> and a.future_stocks_id = #{futureStocksId}</if>
|
||||
<if test="billDatePeriod != null and billDatePeriod != ''"> and a.bill_date_period = #{billDatePeriod}</if>
|
||||
<if test="billAmount != null and billAmount != ''"> and a.bill_amount = #{billAmount}</if>
|
||||
<if test="type != null and type != ''"> and a.type = #{type}</if>
|
||||
<if test="startMonth!=null and startMonth !=''">
|
||||
and to_char(a.bill_date, 'yyyy-MM')>=#{startMonth}
|
||||
</if>
|
||||
<if test="endMonth!=null and endMonth !=''">
|
||||
and #{endMonth}>=to_char(a.bill_date, 'yyyy-MM')
|
||||
</if>
|
||||
</where>
|
||||
order by a.bill_date_period desc
|
||||
</select>
|
||||
|
||||
<select id="selectFutureStocksBillById" parameterType="Long" resultMap="FutureStocksBillResult">
|
||||
<include refid="selectFutureStocksBillVo"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertFutureStocksBill" parameterType="FutureStocksBill">
|
||||
insert into future_stocks_bill
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="billDate != null">bill_date,</if>
|
||||
<if test="futureStocksId != null">future_stocks_id,</if>
|
||||
<if test="billDatePeriod != null">bill_date_period,</if>
|
||||
<if test="billAmount != null">bill_amount,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="billYear != null">bill_year,</if>
|
||||
<if test="billMonth != null">bill_month,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="billDate != null">#{billDate},</if>
|
||||
<if test="futureStocksId != null">#{futureStocksId},</if>
|
||||
<if test="billDatePeriod != null">#{billDatePeriod},</if>
|
||||
<if test="billAmount != null">#{billAmount},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="billYear != null">#{billYear},</if>
|
||||
<if test="billMonth != null">#{billMonth},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateFutureStocksBill" parameterType="FutureStocksBill">
|
||||
update future_stocks_bill
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="billDate != null">bill_date = #{billDate},</if>
|
||||
<if test="futureStocksId != null">future_stocks_id = #{futureStocksId},</if>
|
||||
<if test="billDatePeriod != null">bill_date_period = #{billDatePeriod},</if>
|
||||
<if test="billAmount != null">bill_amount = #{billAmount},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="billYear != null">bill_year = #{billYear},</if>
|
||||
<if test="billMonth != null">bill_month = #{billMonth},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteFutureStocksBillById" parameterType="Long">
|
||||
delete from future_stocks_bill where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteFutureStocksBillByIds" parameterType="String">
|
||||
delete from future_stocks_bill where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<update id="removeFutureStocksBillById" parameterType="Long">
|
||||
update future_stocks_bill set del_flag='1' where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="removeFutureStocksBillByIds" parameterType="String">
|
||||
update future_stocks_bill set del_flag='1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,161 @@
|
||||
<?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.ruoyi.invest.mapper.FutureStocksMapper">
|
||||
|
||||
<resultMap type="FutureStocksVo" id="FutureStocksResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="type" column="type" />
|
||||
<result property="code" column="code" />
|
||||
<result property="password" column="password" />
|
||||
<result property="tradingCenterCode" column="trading_center_code" />
|
||||
<result property="tradingCenterPassword" column="trading_center_password" />
|
||||
<result property="fundPassword" column="fund_password" />
|
||||
<result property="commission" column="commission" />
|
||||
<result property="bond" column="bond" />
|
||||
<result property="debitCard" column="debit_card" />
|
||||
<result property="activationDate" column="activation_date" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="bankName" column="bank_name" />
|
||||
<result property="bankCode" column="bank_code" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectFutureStocksVo">
|
||||
select
|
||||
a.id,
|
||||
a.name,
|
||||
a.type,
|
||||
a.code,
|
||||
a.password,
|
||||
a.trading_center_code,
|
||||
a.trading_center_password,
|
||||
a.fund_password,
|
||||
a.commission,
|
||||
a.bond,
|
||||
a.debit_card,
|
||||
a.activation_date,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time,
|
||||
a.del_flag,
|
||||
a.remark ,
|
||||
bc."name" as bank_name,
|
||||
bc.code as bank_code
|
||||
from
|
||||
future_stocks a
|
||||
left join bank_card_lend bc on
|
||||
bc.id = a.debit_card
|
||||
</sql>
|
||||
|
||||
<select id="selectFutureStocksList" parameterType="FutureStocksDto" resultMap="FutureStocksResult">
|
||||
<include refid="selectFutureStocksVo"/>
|
||||
<where>
|
||||
a.del_flag='0'
|
||||
<if test="name != null and name != ''"> and a.name like '%'|| #{name}||'%'</if>
|
||||
<if test="type != null and type != ''"> and a.type = #{type}</if>
|
||||
</where>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectFutureStocksById" parameterType="Long" resultMap="FutureStocksResult">
|
||||
<include refid="selectFutureStocksVo"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertFutureStocks" parameterType="FutureStocks">
|
||||
insert into future_stocks
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="code != null and code != ''">code,</if>
|
||||
<if test="password != null and password != ''">password,</if>
|
||||
<if test="tradingCenterCode != null and tradingCenterCode != ''">trading_center_code,</if>
|
||||
<if test="tradingCenterPassword != null and tradingCenterPassword != ''">trading_center_password,</if>
|
||||
<if test="fundPassword != null and fundPassword != ''">fund_password,</if>
|
||||
<if test="commission != null">commission,</if>
|
||||
<if test="bond != null">bond,</if>
|
||||
<if test="debitCard != null and debitCard != ''">debit_card,</if>
|
||||
<if test="activationDate != null">activation_date,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="code != null and code != ''">#{code},</if>
|
||||
<if test="password != null and password != ''">#{password},</if>
|
||||
<if test="tradingCenterCode != null and tradingCenterCode != ''">#{tradingCenterCode},</if>
|
||||
<if test="tradingCenterPassword != null and tradingCenterPassword != ''">#{tradingCenterPassword},</if>
|
||||
<if test="fundPassword != null and fundPassword != ''">#{fundPassword},</if>
|
||||
<if test="commission != null">#{commission},</if>
|
||||
<if test="bond != null">#{bond},</if>
|
||||
<if test="debitCard != null and debitCard != ''">#{debitCard},</if>
|
||||
<if test="activationDate != null">#{activationDate},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateFutureStocks" parameterType="FutureStocks">
|
||||
update future_stocks
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="code != null and code != ''">code = #{code},</if>
|
||||
<if test="password != null and password != ''">password = #{password},</if>
|
||||
<if test="tradingCenterCode != null and tradingCenterCode != ''">trading_center_code = #{tradingCenterCode},</if>
|
||||
<if test="tradingCenterPassword != null and tradingCenterPassword != ''">trading_center_password = #{tradingCenterPassword},</if>
|
||||
<if test="fundPassword != null and fundPassword != ''">fund_password = #{fundPassword},</if>
|
||||
<if test="commission != null">commission = #{commission},</if>
|
||||
<if test="bond != null">bond = #{bond},</if>
|
||||
<if test="debitCard != null and debitCard != ''">debit_card = #{debitCard},</if>
|
||||
<if test="activationDate != null">activation_date = #{activationDate},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteFutureStocksById" parameterType="Long">
|
||||
delete from future_stocks where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteFutureStocksByIds" parameterType="String">
|
||||
delete from future_stocks where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<update id="removeFutureStocksById" parameterType="Long">
|
||||
update future_stocks set del_flag='1' where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="removeFutureStocksByIds" parameterType="String">
|
||||
update future_stocks set del_flag='1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,99 @@
|
||||
<?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.ruoyi.invest.mapper.HeartJourneyMapper">
|
||||
|
||||
<resultMap type="HeartJourneyVo" id="HeartJourneyResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="type" column="type" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHeartJourneyVo">
|
||||
select a.id, a.name, a.type, a.remark, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag from heart_journey a
|
||||
</sql>
|
||||
|
||||
<select id="selectHeartJourneyList" parameterType="HeartJourneyDto" resultMap="HeartJourneyResult">
|
||||
<include refid="selectHeartJourneyVo"/>
|
||||
<where>
|
||||
a.del_flag='0'
|
||||
<if test="name != null and name != ''"> and a.name like '%'|| #{name}||'%'</if>
|
||||
<if test="type != null and type != ''"> and a.type = #{type}</if>
|
||||
</where>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectHeartJourneyById" parameterType="Long" resultMap="HeartJourneyResult">
|
||||
<include refid="selectHeartJourneyVo"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertHeartJourney" parameterType="HeartJourney">
|
||||
insert into heart_journey
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="type != null and type != ''">type,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="type != null and type != ''">#{type},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateHeartJourney" parameterType="HeartJourney">
|
||||
update heart_journey
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="type != null and type != ''">type = #{type},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteHeartJourneyById" parameterType="Long">
|
||||
delete from heart_journey where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteHeartJourneyByIds" parameterType="String">
|
||||
delete from heart_journey where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<update id="removeHeartJourneyById" parameterType="Long">
|
||||
update heart_journey set del_flag='1' where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="removeHeartJourneyByIds" parameterType="String">
|
||||
update heart_journey set del_flag='1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,142 @@
|
||||
<?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.ruoyi.invest.mapper.InstallmentHistoryDetailMapper">
|
||||
|
||||
<resultMap type="InstallmentHistoryDetailVo" id="InstallmentHistoryDetailResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="installmentHistoryId" column="installment_history_id" />
|
||||
<result property="bankCardLendId" column="bank_card_lend_id" />
|
||||
<result property="currentAmount" column="current_amount" />
|
||||
<result property="repaymentDate" column="repayment_date" />
|
||||
<result property="principal" column="principal" />
|
||||
<result property="interest" column="interest" />
|
||||
<result property="postingState" column="posting_state" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="type" column="type" />
|
||||
<result property="periods" column="periods" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInstallmentHistoryDetailVo">
|
||||
select a.id, a.installment_history_id, a.bank_card_lend_id, a.current_amount, a.repayment_date, a.principal, a.interest, a.posting_state, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag, a.remark, a.type, a.periods from installment_history_detail a
|
||||
</sql>
|
||||
|
||||
<select id="selectInstallmentHistoryDetailList" parameterType="InstallmentHistoryDetailDto" resultMap="InstallmentHistoryDetailResult">
|
||||
<include refid="selectInstallmentHistoryDetailVo"/>
|
||||
<where>
|
||||
a.del_flag='0'
|
||||
<if test="installmentHistoryId != null "> and a.installment_history_id = #{installmentHistoryId}</if>
|
||||
<if test="bankCardLendId != null "> and a.bank_card_lend_id = #{bankCardLendId}</if>
|
||||
<if test="type != null and type != ''"> and a.type = #{type}</if>
|
||||
<if test="periods != null "> and a.periods = #{periods}</if>
|
||||
<if test="state != null and state != ''"> and a.posting_state = #{state}</if>
|
||||
<if test="repaymentMonth!=null and repaymentMonth !=''">
|
||||
and #{repaymentMonth}=to_char(a.repayment_date, 'yyyy-MM')
|
||||
</if>
|
||||
<if test="repaymentDate!=null and repaymentDate !=''">
|
||||
and #{repaymentDate}>=to_char(a.repayment_date, 'yyyy-MM-dd')
|
||||
</if>
|
||||
<if test="startDate!=null and startDate !=''">
|
||||
and to_char(a.repayment_date, 'yyyy-MM-dd')>=#{startDate}
|
||||
</if>
|
||||
<if test="endDate!=null and endDate !=''">
|
||||
and #{endDate}>=to_char(a.repayment_date, 'yyyy-MM-dd')
|
||||
</if>
|
||||
</where>
|
||||
order by a.repayment_date desc
|
||||
</select>
|
||||
|
||||
<select id="selectInstallmentHistoryDetailById" parameterType="Long" resultMap="InstallmentHistoryDetailResult">
|
||||
<include refid="selectInstallmentHistoryDetailVo"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertInstallmentHistoryDetail" parameterType="InstallmentHistoryDetail">
|
||||
insert into installment_history_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="installmentHistoryId != null">installment_history_id,</if>
|
||||
<if test="bankCardLendId != null">bank_card_lend_id,</if>
|
||||
<if test="currentAmount != null and currentAmount != ''">current_amount,</if>
|
||||
<if test="repaymentDate != null">repayment_date,</if>
|
||||
<if test="principal != null">principal,</if>
|
||||
<if test="interest != null">interest,</if>
|
||||
<if test="postingState != null and postingState != ''">posting_state,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="periods != null">periods,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="installmentHistoryId != null">#{installmentHistoryId},</if>
|
||||
<if test="bankCardLendId != null">#{bankCardLendId},</if>
|
||||
<if test="currentAmount != null and currentAmount != ''">#{currentAmount},</if>
|
||||
<if test="repaymentDate != null">#{repaymentDate},</if>
|
||||
<if test="principal != null">#{principal},</if>
|
||||
<if test="interest != null">#{interest},</if>
|
||||
<if test="postingState != null and postingState != ''">#{postingState},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="periods != null">#{periods},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInstallmentHistoryDetail" parameterType="InstallmentHistoryDetail">
|
||||
update installment_history_detail
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="installmentHistoryId != null">installment_history_id = #{installmentHistoryId},</if>
|
||||
<if test="bankCardLendId != null">bank_card_lend_id = #{bankCardLendId},</if>
|
||||
<if test="currentAmount != null and currentAmount != ''">current_amount = #{currentAmount},</if>
|
||||
<if test="repaymentDate != null">repayment_date = #{repaymentDate},</if>
|
||||
<if test="principal != null">principal = #{principal},</if>
|
||||
<if test="interest != null">interest = #{interest},</if>
|
||||
<if test="postingState != null and postingState != ''">posting_state = #{postingState},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="periods != null">periods = #{periods},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInstallmentHistoryDetailById" parameterType="Long">
|
||||
delete from installment_history_detail where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInstallmentHistoryDetailByIds" parameterType="String">
|
||||
delete from installment_history_detail where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<update id="removeInstallmentHistoryDetailById" parameterType="Long">
|
||||
update installment_history_detail set del_flag='1' where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="removeInstallmentHistoryDetailByIds" parameterType="String">
|
||||
update installment_history_detail set del_flag='1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,198 @@
|
||||
<?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.ruoyi.invest.mapper.InstallmentHistoryMapper">
|
||||
|
||||
<resultMap type="InstallmentHistoryVo" id="InstallmentHistoryResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="type" column="type" />
|
||||
<result property="code" column="code" />
|
||||
<result property="bankCardLendId" column="bank_card_lend_id" />
|
||||
<result property="installmentAmount" column="installment_amount" />
|
||||
<result property="installmentDate" column="installment_date" />
|
||||
<result property="period" column="period" />
|
||||
<result property="repaidPeriod" column="repaid_period" />
|
||||
<result property="totalInterest" column="total_interest" />
|
||||
<result property="interestRate" column="interest_rate" />
|
||||
<result property="dueDate" column="due_date" />
|
||||
<result property="closeDate" column="close_date" />
|
||||
<result property="state" column="state" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="balance" column="balance" />
|
||||
<result property="bankName" column="bank_name" />
|
||||
<result property="bankCode" column="bank_code" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInstallmentHistoryVo">
|
||||
select
|
||||
a.id,
|
||||
a.name,
|
||||
a.type,
|
||||
a.code,
|
||||
a.bank_card_lend_id,
|
||||
a.installment_amount,
|
||||
a.installment_date,
|
||||
a.period,
|
||||
(
|
||||
select
|
||||
CASE
|
||||
WHEN sum(ihd.current_amount) is null THEN 0
|
||||
ELSE sum(ihd.current_amount)
|
||||
END
|
||||
from
|
||||
installment_history_detail ihd
|
||||
where
|
||||
ihd.installment_history_id = a.id
|
||||
and ihd .posting_state = '0'
|
||||
) as balance,
|
||||
a.repaid_period,
|
||||
a.total_interest,
|
||||
a.interest_rate,
|
||||
a.due_date,
|
||||
a.close_date,
|
||||
a.state,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time,
|
||||
a.del_flag,
|
||||
a.remark,
|
||||
bc."name" as bank_name,
|
||||
bc.code as bank_code
|
||||
from
|
||||
installment_history a
|
||||
left join bank_card_lend bc on
|
||||
bc.id = a.bank_card_lend_id
|
||||
</sql>
|
||||
|
||||
<select id="selectInstallmentHistoryList" parameterType="InstallmentHistoryDto" resultMap="InstallmentHistoryResult">
|
||||
<include refid="selectInstallmentHistoryVo"/>
|
||||
<where>
|
||||
a.del_flag='0'
|
||||
<if test="name != null and name != ''"> and a.name like '%'|| #{name}||'%'</if>
|
||||
<if test="bankCardLendId != null and bankCardLendId != ''"> and a.bank_card_lend_id = #{bankCardLendId}</if>
|
||||
<if test="state != null and state != ''"> and a.state = #{state}</if>
|
||||
<if test="type != null and type != ''"> and a.type = #{type}</if>
|
||||
<if test="startMonth!=null and startMonth !=''">
|
||||
and to_char(a.installment_date, 'yyyy-MM')>=#{startMonth}
|
||||
</if>
|
||||
<if test="endMonth!=null and endMonth !=''">
|
||||
and #{endMonth}>=to_char(a.installment_date, 'yyyy-MM')
|
||||
</if>
|
||||
</where>
|
||||
order by a.installment_date desc
|
||||
</select>
|
||||
|
||||
<select id="selectInstallmentHistoryById" parameterType="Long" resultMap="InstallmentHistoryResult">
|
||||
<include refid="selectInstallmentHistoryVo"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertInstallmentHistory" parameterType="InstallmentHistory">
|
||||
insert into installment_history
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="code != null">code,</if>
|
||||
<if test="bankCardLendId != null and bankCardLendId != ''">bank_card_lend_id,</if>
|
||||
<if test="installmentAmount != null and installmentAmount != ''">installment_amount,</if>
|
||||
<if test="installmentDate != null">installment_date,</if>
|
||||
<if test="period != null">period,</if>
|
||||
<if test="repaidPeriod != null">repaid_period,</if>
|
||||
<if test="totalInterest != null">total_interest,</if>
|
||||
<if test="interestRate != null">interest_rate,</if>
|
||||
<if test="dueDate != null">due_date,</if>
|
||||
<if test="closeDate != null">close_date,</if>
|
||||
<if test="state != null and state != ''">state,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="balance != null">balance,</if>
|
||||
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="code != null">#{code},</if>
|
||||
<if test="bankCardLendId != null and bankCardLendId != ''">#{bankCardLendId},</if>
|
||||
<if test="installmentAmount != null and installmentAmount != ''">#{installmentAmount},</if>
|
||||
<if test="installmentDate != null">#{installmentDate},</if>
|
||||
<if test="period != null">#{period},</if>
|
||||
<if test="repaidPeriod != null">#{repaidPeriod},</if>
|
||||
<if test="totalInterest != null">#{totalInterest},</if>
|
||||
<if test="interestRate != null">#{interestRate},</if>
|
||||
<if test="dueDate != null">#{dueDate},</if>
|
||||
<if test="closeDate != null">#{closeDate},</if>
|
||||
<if test="state != null and state != ''">#{state},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="balance != null">#{balance},</if>
|
||||
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInstallmentHistory" parameterType="InstallmentHistory">
|
||||
update installment_history
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="code != null">code = #{code},</if>
|
||||
<if test="bankCardLendId != null and bankCardLendId != ''">bank_card_lend_id = #{bankCardLendId},</if>
|
||||
<if test="installmentAmount != null and installmentAmount != ''">installment_amount = #{installmentAmount},</if>
|
||||
<if test="installmentDate != null">installment_date = #{installmentDate},</if>
|
||||
<if test="period != null">period = #{period},</if>
|
||||
<if test="repaidPeriod != null">repaid_period = #{repaidPeriod},</if>
|
||||
<if test="totalInterest != null">total_interest = #{totalInterest},</if>
|
||||
<if test="interestRate != null">interest_rate = #{interestRate},</if>
|
||||
<if test="dueDate != null">due_date = #{dueDate},</if>
|
||||
<if test="closeDate != null">close_date = #{closeDate},</if>
|
||||
<if test="state != null and state != ''">state = #{state},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="balance != null">balance = #{balance},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInstallmentHistoryById" parameterType="Long">
|
||||
delete from installment_history where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInstallmentHistoryByIds" parameterType="String">
|
||||
delete from installment_history where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<update id="removeInstallmentHistoryById" parameterType="Long">
|
||||
update installment_history set del_flag='1' where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="removeInstallmentHistoryByIds" parameterType="String">
|
||||
update installment_history set del_flag='1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,167 @@
|
||||
<?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.ruoyi.invest.mapper.PosMachineMapper">
|
||||
|
||||
<resultMap type="PosMachineVo" id="PosMachineResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="type" column="type" />
|
||||
<result property="manufacture" column="manufacture" />
|
||||
<result property="payCompany" column="pay_company" />
|
||||
<result property="merchantName" column="merchant_name" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="code" column="code" />
|
||||
<result property="rate" column="rate" />
|
||||
<result property="debitCard" column="debit_card" />
|
||||
<result property="merchantType" column="merchant_type" />
|
||||
<result property="merchantCode" column="merchant_code" />
|
||||
<result property="activationDate" column="activation_date" />
|
||||
<result property="ratePlus" column="rate_plus" />
|
||||
<result property="bankName" column="bank_name" />
|
||||
<result property="bankCode" column="bank_code" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPosMachineVo">
|
||||
select
|
||||
a.id,
|
||||
a.name,
|
||||
a.type,
|
||||
a.manufacture,
|
||||
a.pay_company,
|
||||
a.merchant_name,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time,
|
||||
a.del_flag,
|
||||
a.remark,
|
||||
a.code,
|
||||
a.rate,
|
||||
a.rate_plus,
|
||||
a.debit_card,
|
||||
a.merchant_type,
|
||||
a.merchant_code,
|
||||
a.activation_date,
|
||||
bc."name" as bank_name,
|
||||
bc.code as bank_code
|
||||
from
|
||||
pos_machine a
|
||||
left join bank_card_lend bc on bc.id =a.debit_card
|
||||
</sql>
|
||||
|
||||
<select id="selectPosMachineList" parameterType="PosMachineDto" resultMap="PosMachineResult">
|
||||
<include refid="selectPosMachineVo"/>
|
||||
<where>
|
||||
a.del_flag='0'
|
||||
<if test="name != null and name != ''"> and a.name like '%'|| #{name}||'%'</if>
|
||||
<if test="type != null and type != ''"> and a.type = #{type}</if>
|
||||
<if test="merchantName != null and merchantName != ''"> and a.merchant_name like '%'|| #{merchantName}||'%'</if>
|
||||
</where>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectPosMachineById" parameterType="Long" resultMap="PosMachineResult">
|
||||
<include refid="selectPosMachineVo"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertPosMachine" parameterType="PosMachine">
|
||||
insert into pos_machine
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="manufacture != null">manufacture,</if>
|
||||
<if test="payCompany != null">pay_company,</if>
|
||||
<if test="merchantName != null">merchant_name,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="code != null">code,</if>
|
||||
<if test="rate != null">rate,</if>
|
||||
<if test="ratePlus != null">rate_plus,</if>
|
||||
<if test="debitCard != null">debit_card,</if>
|
||||
<if test="merchantType != null">merchant_type,</if>
|
||||
<if test="merchantCode != null">merchant_code,</if>
|
||||
<if test="activationDate != null">activation_date,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="manufacture != null">#{manufacture},</if>
|
||||
<if test="payCompany != null">#{payCompany},</if>
|
||||
<if test="merchantName != null">#{merchantName},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="code != null">#{code},</if>
|
||||
<if test="rate != null">#{rate},</if>
|
||||
<if test="ratePlus != null">#{ratePlus},</if>
|
||||
<if test="debitCard != null">#{debitCard},</if>
|
||||
<if test="merchantType != null">#{merchantType},</if>
|
||||
<if test="merchantCode != null">#{merchantCode},</if>
|
||||
<if test="activationDate != null">#{activationDate},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updatePosMachine" parameterType="PosMachine">
|
||||
update pos_machine
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="manufacture != null">manufacture = #{manufacture},</if>
|
||||
<if test="payCompany != null">pay_company = #{payCompany},</if>
|
||||
<if test="merchantName != null">merchant_name = #{merchantName},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="code != null">code = #{code},</if>
|
||||
<if test="rate != null">rate = #{rate},</if>
|
||||
<if test="ratePlus != null">rate_plus = #{ratePlus},</if>
|
||||
<if test="debitCard != null">debit_card = #{debitCard},</if>
|
||||
<if test="merchantType != null">merchant_type = #{merchantType},</if>
|
||||
<if test="merchantCode != null">merchant_code = #{merchantCode},</if>
|
||||
<if test="activationDate != null">activation_date = #{activationDate},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deletePosMachineById" parameterType="Long">
|
||||
delete from pos_machine where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deletePosMachineByIds" parameterType="String">
|
||||
delete from pos_machine where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<update id="removePosMachineById" parameterType="Long">
|
||||
update pos_machine set del_flag='1' where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="removePosMachineByIds" parameterType="String">
|
||||
update pos_machine set del_flag='1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?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.ruoyi.invest.mapper.StatisticAnalysisMapper">
|
||||
|
||||
<resultMap type="BankCardLendVo" id="BankCardLendResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="type" column="type" />
|
||||
<result property="code" column="code" />
|
||||
<result property="openingBank" column="opening_bank" />
|
||||
<result property="activationDate" column="activation_date" />
|
||||
<result property="billDate" column="bill_date" />
|
||||
<result property="payDate" column="pay_date" />
|
||||
<result property="delayPeriod" column="delay_period" />
|
||||
<result property="creditLimit" column="credit_limit" />
|
||||
<result property="effectiveDate" column="effective_date" />
|
||||
<result property="cvv" column="cvv" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="debitType" column="debit_type" />
|
||||
<result property="lendType" column="lend_type" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBankCardLendVo">
|
||||
select
|
||||
a.name,
|
||||
a.type,
|
||||
a.credit_limit
|
||||
from
|
||||
bank_card_lend a
|
||||
</sql>
|
||||
|
||||
<select id="selectBankCardLendList" parameterType="BankCardLendDto" resultMap="BankCardLendResult">
|
||||
<include refid="selectBankCardLendVo"/>
|
||||
<where>
|
||||
a.del_flag='0'
|
||||
<if test="name != null and name != ''"> and a.name like '%'|| #{name}||'%'</if>
|
||||
<if test="type != null and type != ''"> and a.type = #{type}</if>
|
||||
<if test="creditCardId != null "> and a.id = #{creditCardId}</if>
|
||||
<if test="lendType != null and lendType != ''"> and a.lend_type = #{lendType}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user