| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- <?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.ydtech.modules.admin.dao.SysUserAccountMapper">
- <resultMap id="BaseResultMap" type="com.ydtech.modules.admin.model.po.SysUserAccount">
- <id property="userId" column="user_id" jdbcType="VARCHAR"/>
- <result property="handlingFee" column="handling_fee" jdbcType="DECIMAL"/>
- <result property="documentary" column="documentary" jdbcType="DECIMAL"/>
- <result property="promotion" column="promotion" jdbcType="DECIMAL"/>
- <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
- <result property="name" column="name" jdbcType="VARCHAR"/>
- <result property="deptId" column="deptId" jdbcType="VARCHAR"/>
- <result property="deptName" column="deptName" jdbcType="VARCHAR"/>
- <result property="handlingAmountWithdrawal" column="handling_amount_withdrawal" jdbcType="DECIMAL"/>
- <result property="handlingAmountAccount" column="handling_amount_account" jdbcType="DECIMAL"/>
- <result property="handlingAmountPayment" column="handling_amount_payment" jdbcType="DECIMAL"/>
- <result property="documentaryAmountWithdrawal" column="documentary_amount_withdrawal" jdbcType="DECIMAL"/>
- <result property="documentaryAmountAccount" column="documentary_amount_account" jdbcType="DECIMAL"/>
- <result property="documentaryAmountpayment" column="documentary_amount_payment" jdbcType="DECIMAL"/>
- <result property="promotionAmountWithdrawal" column="promotion_amount_withdrawal" jdbcType="DECIMAL"/>
- <result property="promotionAmountAccount" column="promotion_amount_account" jdbcType="DECIMAL"/>
- <result property="promotionAmountPayment" column="promotion_amount_payment" jdbcType="DECIMAL"/>
- <collection property="sysUserAccountCardList" ofType="com.ydtech.modules.admin.model.po.SysUserBankCard"
- resultMap="sysUserAccountCardList"/>
- </resultMap>
- <resultMap id="sysUserAccountCardList" type="com.ydtech.modules.admin.model.po.SysUserBankCard">
- <result property="bankNumber" column="bank_number" jdbcType="VARCHAR"/>
- <result property="bankAccount" column="bank_account" jdbcType="VARCHAR"/>
- <result property="bankAddress" column="bank_address" jdbcType="VARCHAR"/>
- </resultMap>
- <sql id="Base_Column_List">
- user_id,handling_fee,documentary,
- promotion,create_time
- </sql>
- <select id="queryPageOrder" resultType="com.ydtech.modules.admin.model.po.SysUserAccount">
- select
- a.user_id as "userId",
- a.handling_fee as "handlingFee",
- a.documentary as "documentary",
- a.promotion as "promotion",
- a.create_time as "createTime",
- a.handling_amount_withdrawal as "handlingAmountWithdrawal",
- a.handling_amount_account as "handlingAmountAccount",
- a.handling_amount_payment as "handlingAmountPayment",
- a.documentary_amount_withdrawal as "documentaryAmountWithdrawal",
- a.documentary_amount_account as "documentaryAmountAccount",
- a.documentary_amount_payment as "documentaryAmountPayment",
- a.promotion_amount_withdrawal as "promotionAmountWithdrawal",
- a.promotion_amount_account as "promotionAmountAccount",
- a.promotion_amount_payment as "promotionAmountPayment",
- b.dept_id as "deptId",
- b.name as "name",
- sd.name as "deptName"
- from
- sys_user_account a
- left join sys_user b on a.user_id = b.id
- left join sys_dept sd on sd.id =b.dept_id
- <where>
- <if test="sysUserAccountVo.userId != null and sysUserAccountVo.userId != ''">
- and a.user_id = #{sysUserAccountVo.userId}
- </if>
- <if test="sysUserAccountVo.deptId != null and sysUserAccountVo.deptId != ''">
- and b.dept_id like concat(#{sysUserAccountVo.deptId},'%')
- </if>
- </where>
- </select>
- <select id="getById" resultType="com.ydtech.modules.admin.model.po.SysUserAccount">
- select
- a.user_id as "userId",
- a.handling_fee as "handlingFee",
- a.documentary as "documentary",
- a.promotion as "promotion",
- a.create_time as "createTime",
- a.handling_amount_withdrawal as "handlingAmountWithdrawal",
- a.handling_amount_account as "handlingAmountAccount",
- a.handling_amount_payment as "handlingAmountPayment",
- a.documentary_amount_withdrawal as "documentaryAmountWithdrawal",
- a.documentary_amount_account as "documentaryAmountAccount",
- a.documentary_amount_payment as "documentaryAmountPayment",
- a.promotion_amount_withdrawal as "promotionAmountWithdrawal",
- a.promotion_amount_account as "promotionAmountAccount",
- a.promotion_amount_payment as "promotionAmountPayment"
- from sys_user_account a
- <where>
- <if test="userId != null and userId != ''">
- and a.user_id = #{userId}
- </if>
- </where>
- </select>
- <select id="queryPageOrder1" resultMap="BaseResultMap">
- select
- a.user_id,
- a.handling_fee,
- a.documentary,
- a.promotion,
- a.create_time,
- a.handling_amount_withdrawal,
- a.handling_amount_account,
- a.handling_amount_payment,
- a.documentary_amount_withdrawal,
- a.documentary_amount_account,
- a.documentary_amount_payment,
- a.promotion_amount_withdrawal,
- a.promotion_amount_account,
- a.promotion_amount_payment,
- b.dept_id as deptId,
- b.name as name,
- sd.name as deptName,
- c.bank_number,
- c.bank_account,
- c.bank_address
- from
- sys_user_account a
- left join sys_user b on a.user_id = b.id
- left join sys_dept sd on sd.id =b.dept_id
- left join sys_user_bank_card c on c.user_id = a.user_id and c.audit_status = '1'
- <where>
- 1=1
- <if test="sysUserAccountVo.userId != null and sysUserAccountVo.userId != ''">
- and a.user_id = #{sysUserAccountVo.userId}
- </if>
- <if test="sysUserAccountVo.deptId != null and sysUserAccountVo.deptId != ''">
- and b.dept_id like concat(#{sysUserAccountVo.deptId},'%')
- </if>
- <if test="sysUserAccountVo.userName != null and sysUserAccountVo.userName != ''">
- and b.name = #{sysUserAccountVo.userName}
- </if>
- <if test="sysUserAccountVo.bankNumber != null and sysUserAccountVo.bankNumber != ''">
- and c.bank_number = #{sysUserAccountVo.bankNumber}
- </if>
- </where>
- </select>
- </mapper>
|