|
@@ -6,6 +6,7 @@
|
|
|
<resultMap id="PersonInfoMap" type="com.jpsoft.smart.modules.base.entity.PersonInfo">
|
|
|
<id property="id" column="id_"/>
|
|
|
<result property="companyId" column="company_id"/>
|
|
|
+ <result property="companyName" column="company_name" />
|
|
|
<result property="name" column="name_"/>
|
|
|
<result property="phone" column="phone_"/>
|
|
|
<result property="idCard" column="id_card"/>
|
|
@@ -63,7 +64,7 @@
|
|
|
]]>
|
|
|
</insert>
|
|
|
<delete id="delete" parameterType="string">
|
|
|
- delete from base_person_info where id_=#{id,jdbcType=VARCHAR}
|
|
|
+ delete from base_person_info where id_=#{id,jdbcType=LONG}
|
|
|
</delete>
|
|
|
<update id="update" parameterType="com.jpsoft.smart.modules.base.entity.PersonInfo">
|
|
|
update base_person_info
|
|
@@ -144,12 +145,13 @@
|
|
|
</select>
|
|
|
<select id="search" parameterType="hashmap" resultMap="PersonInfoMap">
|
|
|
<![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>
|
|
|
del_flag = 0
|
|
|
<if test="searchParams.id != null">
|
|
|
- and ID_ like #{searchParams.id}
|
|
|
+ and ID_ = #{searchParams.id}
|
|
|
</if>
|
|
|
<if test="searchParams.companyId != null">
|
|
|
and company_id like #{searchParams.companyId}
|