|
@@ -6,6 +6,7 @@
|
|
<resultMap id="PersonInfoMap" type="com.jpsoft.smart.modules.base.entity.PersonInfo">
|
|
<resultMap id="PersonInfoMap" type="com.jpsoft.smart.modules.base.entity.PersonInfo">
|
|
<id property="id" column="id_"/>
|
|
<id property="id" column="id_"/>
|
|
<result property="companyId" column="company_id"/>
|
|
<result property="companyId" column="company_id"/>
|
|
|
|
+ <result property="companyName" column="company_name" />
|
|
<result property="name" column="name_"/>
|
|
<result property="name" column="name_"/>
|
|
<result property="phone" column="phone_"/>
|
|
<result property="phone" column="phone_"/>
|
|
<result property="idCard" column="id_card"/>
|
|
<result property="idCard" column="id_card"/>
|
|
@@ -62,8 +63,8 @@
|
|
)
|
|
)
|
|
]]>
|
|
]]>
|
|
</insert>
|
|
</insert>
|
|
- <delete id="delete" parameterType="string">
|
|
|
|
- delete from base_person_info where id_=#{id,jdbcType=VARCHAR}
|
|
|
|
|
|
+ <delete id="delete" parameterType="long">
|
|
|
|
+ delete from base_person_info where id_=#{id,jdbcType=LONG}
|
|
</delete>
|
|
</delete>
|
|
<update id="update" parameterType="com.jpsoft.smart.modules.base.entity.PersonInfo">
|
|
<update id="update" parameterType="com.jpsoft.smart.modules.base.entity.PersonInfo">
|
|
update base_person_info
|
|
update base_person_info
|
|
@@ -131,12 +132,12 @@
|
|
</set>
|
|
</set>
|
|
where id_=#{id}
|
|
where id_=#{id}
|
|
</update>
|
|
</update>
|
|
- <select id="get" parameterType="string" resultMap="PersonInfoMap">
|
|
|
|
|
|
+ <select id="get" parameterType="long" resultMap="PersonInfoMap">
|
|
select
|
|
select
|
|
*
|
|
*
|
|
from base_person_info where id_=#{0} and del_flag = 0
|
|
from base_person_info where id_=#{0} and del_flag = 0
|
|
</select>
|
|
</select>
|
|
- <select id="exist" parameterType="string" resultType="int">
|
|
|
|
|
|
+ <select id="exist" parameterType="long" resultType="int">
|
|
select count(*) from base_person_info where id_=#{0} and del_flag = 0
|
|
select count(*) from base_person_info where id_=#{0} and del_flag = 0
|
|
</select>
|
|
</select>
|
|
<select id="list" resultMap="PersonInfoMap">
|
|
<select id="list" resultMap="PersonInfoMap">
|
|
@@ -144,12 +145,13 @@
|
|
</select>
|
|
</select>
|
|
<select id="search" parameterType="hashmap" resultMap="PersonInfoMap">
|
|
<select id="search" parameterType="hashmap" resultMap="PersonInfoMap">
|
|
<![CDATA[
|
|
<![CDATA[
|
|
- select * from base_person_info
|
|
|
|
|
|
+ select a.*,b.name_ as company_name from base_person_info a
|
|
|
|
+ LEFT JOIN base_company_info b ON a.company_id = b.id_
|
|
]]>
|
|
]]>
|
|
<where>
|
|
<where>
|
|
del_flag = 0
|
|
del_flag = 0
|
|
<if test="searchParams.id != null">
|
|
<if test="searchParams.id != null">
|
|
- and ID_ like #{searchParams.id}
|
|
|
|
|
|
+ and ID_ = #{searchParams.id}
|
|
</if>
|
|
</if>
|
|
<if test="searchParams.companyId != null">
|
|
<if test="searchParams.companyId != null">
|
|
and company_id like #{searchParams.companyId}
|
|
and company_id like #{searchParams.companyId}
|