|
@@ -1,123 +1,129 @@
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
|
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<!-- namespace必须指向DAO接口 -->
|
|
<!-- namespace必须指向DAO接口 -->
|
|
<mapper namespace="com.jpsoft.bus.modules.merchant.dao.AccountInfoDAO">
|
|
<mapper namespace="com.jpsoft.bus.modules.merchant.dao.AccountInfoDAO">
|
|
- <resultMap id="AccountInfoMap" type="com.jpsoft.bus.modules.merchant.entity.AccountInfo">
|
|
|
|
- <id property="id" column="id_" />
|
|
|
|
- <result property="name" column="name_" />
|
|
|
|
- <result property="companyId" column="company_id" />
|
|
|
|
- <result property="openId" column="open_id" />
|
|
|
|
- <result property="phone" column="phone_" />
|
|
|
|
- <result property="withdrawAllow" column="withdraw_allow" />
|
|
|
|
- <result property="frozen" column="frozen_" />
|
|
|
|
- <result property="imageUrl" column="image_url" />
|
|
|
|
- <result property="bankName" column="bank_name" />
|
|
|
|
- <result property="bankNumber" column="bank_number" />
|
|
|
|
- <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="companyName" column="company_name" />
|
|
|
|
- </resultMap>
|
|
|
|
- <insert id="insert" parameterType="com.jpsoft.bus.modules.merchant.entity.AccountInfo">
|
|
|
|
- <!--
|
|
|
|
- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
|
|
- select sys_guid() from dual
|
|
|
|
- </selectKey>
|
|
|
|
- -->
|
|
|
|
- <![CDATA[
|
|
|
|
|
|
+ <resultMap id="AccountInfoMap" type="com.jpsoft.bus.modules.merchant.entity.AccountInfo">
|
|
|
|
+ <id property="id" column="id_"/>
|
|
|
|
+ <result property="name" column="name_"/>
|
|
|
|
+ <result property="companyId" column="company_id"/>
|
|
|
|
+ <result property="openId" column="open_id"/>
|
|
|
|
+ <result property="phone" column="phone_"/>
|
|
|
|
+ <result property="withdrawAllow" column="withdraw_allow"/>
|
|
|
|
+ <result property="frozen" column="frozen_"/>
|
|
|
|
+ <result property="imageUrl" column="image_url"/>
|
|
|
|
+ <result property="bankName" column="bank_name"/>
|
|
|
|
+ <result property="bankNumber" column="bank_number"/>
|
|
|
|
+ <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="companyName" column="company_name"/>
|
|
|
|
+ <result property="roles" column="roles_"/>
|
|
|
|
+ </resultMap>
|
|
|
|
+ <insert id="insert" parameterType="com.jpsoft.bus.modules.merchant.entity.AccountInfo">
|
|
|
|
+ <!--
|
|
|
|
+ <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
|
|
+ select sys_guid() from dual
|
|
|
|
+ </selectKey>
|
|
|
|
+ -->
|
|
|
|
+ <![CDATA[
|
|
insert into merchant_account_info
|
|
insert into merchant_account_info
|
|
- (id_,name_,company_id,open_id,phone_,withdraw_allow,frozen_,image_url,bank_name,bank_number,create_by,create_time,update_by,update_time,del_flag)
|
|
|
|
|
|
+ (id_,name_,company_id,open_id,phone_,withdraw_allow,frozen_,image_url,bank_name,bank_number,
|
|
|
|
+ create_by,create_time,update_by,update_time,del_flag,roles_)
|
|
values
|
|
values
|
|
(
|
|
(
|
|
-#{id,jdbcType=VARCHAR}
|
|
|
|
-,#{name,jdbcType=VARCHAR}
|
|
|
|
-,#{companyId,jdbcType=VARCHAR}
|
|
|
|
-,#{openId,jdbcType=VARCHAR}
|
|
|
|
-,#{phone,jdbcType=VARCHAR}
|
|
|
|
-,#{withdrawAllow,jdbcType= NUMERIC }
|
|
|
|
-,#{frozen,jdbcType= NUMERIC }
|
|
|
|
-,#{imageUrl,jdbcType=VARCHAR}
|
|
|
|
-,#{bankName,jdbcType=VARCHAR}
|
|
|
|
-,#{bankNumber,jdbcType=VARCHAR}
|
|
|
|
-,#{createBy,jdbcType=VARCHAR}
|
|
|
|
-,#{createTime,jdbcType= TIMESTAMP }
|
|
|
|
-,#{updateBy,jdbcType=VARCHAR}
|
|
|
|
-,#{updateTime,jdbcType= TIMESTAMP }
|
|
|
|
-,#{delFlag,jdbcType= NUMERIC }
|
|
|
|
|
|
+ #{id,jdbcType=VARCHAR}
|
|
|
|
+ ,#{name,jdbcType=VARCHAR}
|
|
|
|
+ ,#{companyId,jdbcType=VARCHAR}
|
|
|
|
+ ,#{openId,jdbcType=VARCHAR}
|
|
|
|
+ ,#{phone,jdbcType=VARCHAR}
|
|
|
|
+ ,#{withdrawAllow,jdbcType= NUMERIC }
|
|
|
|
+ ,#{frozen,jdbcType= NUMERIC }
|
|
|
|
+ ,#{imageUrl,jdbcType=VARCHAR}
|
|
|
|
+ ,#{bankName,jdbcType=VARCHAR}
|
|
|
|
+ ,#{bankNumber,jdbcType=VARCHAR}
|
|
|
|
+ ,#{createBy,jdbcType=VARCHAR}
|
|
|
|
+ ,#{createTime,jdbcType= TIMESTAMP }
|
|
|
|
+ ,#{updateBy,jdbcType=VARCHAR}
|
|
|
|
+ ,#{updateTime,jdbcType= TIMESTAMP }
|
|
|
|
+ ,#{delFlag,jdbcType= NUMERIC }
|
|
|
|
+ ,#{roles,jdbcType=VARCHAR}
|
|
)
|
|
)
|
|
]]>
|
|
]]>
|
|
- </insert>
|
|
|
|
- <delete id="delete" parameterType="string">
|
|
|
|
- delete from merchant_account_info where id_=#{id,jdbcType=VARCHAR}
|
|
|
|
- </delete>
|
|
|
|
- <update id="update" parameterType="com.jpsoft.bus.modules.merchant.entity.AccountInfo">
|
|
|
|
- update merchant_account_info
|
|
|
|
- <set>
|
|
|
|
- <if test="name!=null">
|
|
|
|
- name_=#{name,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="companyId!=null">
|
|
|
|
- company_id=#{companyId,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="openId!=null">
|
|
|
|
- open_id=#{openId,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="phone!=null">
|
|
|
|
- phone_=#{phone,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="withdrawAllow!=null">
|
|
|
|
- withdraw_allow=#{withdrawAllow,jdbcType= NUMERIC },
|
|
|
|
- </if>
|
|
|
|
- <if test="frozen!=null">
|
|
|
|
- frozen_=#{frozen,jdbcType= NUMERIC },
|
|
|
|
- </if>
|
|
|
|
- <if test="imageUrl!=null">
|
|
|
|
- image_url=#{imageUrl,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="bankName!=null">
|
|
|
|
- bank_name=#{bankName,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="bankNumber!=null">
|
|
|
|
- bank_number=#{bankNumber,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="createBy!=null">
|
|
|
|
- create_by=#{createBy,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="createTime!=null">
|
|
|
|
- create_time=#{createTime,jdbcType= TIMESTAMP },
|
|
|
|
- </if>
|
|
|
|
- <if test="updateBy!=null">
|
|
|
|
- update_by=#{updateBy,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="updateTime!=null">
|
|
|
|
- update_time=#{updateTime,jdbcType= TIMESTAMP },
|
|
|
|
- </if>
|
|
|
|
- <if test="delFlag!=null">
|
|
|
|
- del_flag=#{delFlag,jdbcType= NUMERIC },
|
|
|
|
- </if>
|
|
|
|
- </set>
|
|
|
|
- where id_=#{id}
|
|
|
|
- </update>
|
|
|
|
- <select id="get" parameterType="string" resultMap="AccountInfoMap">
|
|
|
|
- SELECT
|
|
|
|
- a.*,
|
|
|
|
- b.name_ AS company_name
|
|
|
|
- FROM
|
|
|
|
- merchant_account_info a
|
|
|
|
- LEFT JOIN bus_company_info b ON a.company_id = b.id_
|
|
|
|
- where a.id_=#{0}
|
|
|
|
- </select>
|
|
|
|
- <select id="exist" parameterType="string" resultType="int">
|
|
|
|
- select count(*) from merchant_account_info where id_=#{0}
|
|
|
|
- </select>
|
|
|
|
- <select id="list" resultMap="AccountInfoMap">
|
|
|
|
- select * from merchant_account_info
|
|
|
|
- </select>
|
|
|
|
- <select id="search" parameterType="hashmap" resultMap="AccountInfoMap">
|
|
|
|
- <![CDATA[
|
|
|
|
|
|
+ </insert>
|
|
|
|
+ <delete id="delete" parameterType="string">
|
|
|
|
+ delete from merchant_account_info where id_=#{id,jdbcType=VARCHAR}
|
|
|
|
+ </delete>
|
|
|
|
+ <update id="update" parameterType="com.jpsoft.bus.modules.merchant.entity.AccountInfo">
|
|
|
|
+ update merchant_account_info
|
|
|
|
+ <set>
|
|
|
|
+ <if test="name!=null">
|
|
|
|
+ name_=#{name,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="companyId!=null">
|
|
|
|
+ company_id=#{companyId,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="openId!=null">
|
|
|
|
+ open_id=#{openId,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="phone!=null">
|
|
|
|
+ phone_=#{phone,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="withdrawAllow!=null">
|
|
|
|
+ withdraw_allow=#{withdrawAllow,jdbcType= NUMERIC },
|
|
|
|
+ </if>
|
|
|
|
+ <if test="frozen!=null">
|
|
|
|
+ frozen_=#{frozen,jdbcType= NUMERIC },
|
|
|
|
+ </if>
|
|
|
|
+ <if test="imageUrl!=null">
|
|
|
|
+ image_url=#{imageUrl,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="bankName!=null">
|
|
|
|
+ bank_name=#{bankName,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="bankNumber!=null">
|
|
|
|
+ bank_number=#{bankNumber,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createBy!=null">
|
|
|
|
+ create_by=#{createBy,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createTime!=null">
|
|
|
|
+ create_time=#{createTime,jdbcType= TIMESTAMP },
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateBy!=null">
|
|
|
|
+ update_by=#{updateBy,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateTime!=null">
|
|
|
|
+ update_time=#{updateTime,jdbcType= TIMESTAMP },
|
|
|
|
+ </if>
|
|
|
|
+ <if test="delFlag!=null">
|
|
|
|
+ del_flag=#{delFlag,jdbcType= NUMERIC },
|
|
|
|
+ </if>
|
|
|
|
+ <if test="roles!=null">
|
|
|
|
+ roles_=#{roles,jdbcType= NUMERIC },
|
|
|
|
+ </if>
|
|
|
|
+ </set>
|
|
|
|
+ where id_=#{id}
|
|
|
|
+ </update>
|
|
|
|
+ <select id="get" parameterType="string" resultMap="AccountInfoMap">
|
|
|
|
+ SELECT
|
|
|
|
+ a.*,
|
|
|
|
+ b.name_ AS company_name
|
|
|
|
+ FROM
|
|
|
|
+ merchant_account_info a
|
|
|
|
+ LEFT JOIN bus_company_info b ON a.company_id = b.id_
|
|
|
|
+ where a.id_=#{0}
|
|
|
|
+ </select>
|
|
|
|
+ <select id="exist" parameterType="string" resultType="int">
|
|
|
|
+ select count(*) from merchant_account_info where id_=#{0}
|
|
|
|
+ </select>
|
|
|
|
+ <select id="list" resultMap="AccountInfoMap">
|
|
|
|
+ select * from merchant_account_info
|
|
|
|
+ </select>
|
|
|
|
+ <select id="search" parameterType="hashmap" resultMap="AccountInfoMap">
|
|
|
|
+ <![CDATA[
|
|
SELECT
|
|
SELECT
|
|
a.*,
|
|
a.*,
|
|
b.name_ AS company_name
|
|
b.name_ AS company_name
|
|
@@ -125,43 +131,43 @@
|
|
merchant_account_info a
|
|
merchant_account_info a
|
|
LEFT JOIN bus_company_info b ON b.id_ = a.company_id
|
|
LEFT JOIN bus_company_info b ON b.id_ = a.company_id
|
|
]]>
|
|
]]>
|
|
- <where>
|
|
|
|
- a.del_flag = 0
|
|
|
|
- <if test="searchParams.id != null">
|
|
|
|
- and a.ID_ like #{searchParams.id}
|
|
|
|
- </if>
|
|
|
|
- <if test="searchParams.companyCode != null">
|
|
|
|
- and b.code_ like #{searchParams.companyCode}
|
|
|
|
- </if>
|
|
|
|
- <if test="searchParams.name != null">
|
|
|
|
- and a.name_ like #{searchParams.name}
|
|
|
|
- </if>
|
|
|
|
- <if test="searchParams.phone != null">
|
|
|
|
- and a.phone_ like #{searchParams.phone}
|
|
|
|
- </if>
|
|
|
|
- <if test="searchParams.frozen != null">
|
|
|
|
- and a.frozen_ = #{searchParams.frozen}
|
|
|
|
- </if>
|
|
|
|
- </where>
|
|
|
|
- <foreach item="sort" collection="sortList" open="order by" separator=",">
|
|
|
|
- ${sort.name} ${sort.order}
|
|
|
|
- </foreach>
|
|
|
|
- </select>
|
|
|
|
|
|
+ <where>
|
|
|
|
+ a.del_flag = 0
|
|
|
|
+ <if test="searchParams.id != null">
|
|
|
|
+ and a.ID_ like #{searchParams.id}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchParams.companyCode != null">
|
|
|
|
+ and b.code_ like #{searchParams.companyCode}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchParams.name != null">
|
|
|
|
+ and a.name_ like #{searchParams.name}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchParams.phone != null">
|
|
|
|
+ and a.phone_ like #{searchParams.phone}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchParams.frozen != null">
|
|
|
|
+ and a.frozen_ = #{searchParams.frozen}
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ <foreach item="sort" collection="sortList" open="order by" separator=",">
|
|
|
|
+ ${sort.name} ${sort.order}
|
|
|
|
+ </foreach>
|
|
|
|
+ </select>
|
|
|
|
|
|
- <select id="findByPhone" resultMap="AccountInfoMap">
|
|
|
|
- <![CDATA[
|
|
|
|
|
|
+ <select id="findByPhone" resultMap="AccountInfoMap">
|
|
|
|
+ <![CDATA[
|
|
select * from merchant_account_info
|
|
select * from merchant_account_info
|
|
where del_flag = 0
|
|
where del_flag = 0
|
|
and phone_ = #{phone}
|
|
and phone_ = #{phone}
|
|
]]>
|
|
]]>
|
|
- </select>
|
|
|
|
|
|
+ </select>
|
|
|
|
|
|
- <select id="findByOpenId" resultMap="AccountInfoMap">
|
|
|
|
- <![CDATA[
|
|
|
|
|
|
+ <select id="findByOpenId" resultMap="AccountInfoMap">
|
|
|
|
+ <![CDATA[
|
|
select * from merchant_account_info
|
|
select * from merchant_account_info
|
|
where del_flag = 0
|
|
where del_flag = 0
|
|
and open_id = #{openId}
|
|
and open_id = #{openId}
|
|
limit 1
|
|
limit 1
|
|
]]>
|
|
]]>
|
|
- </select>
|
|
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|