|
@@ -8,7 +8,15 @@
|
|
<result column="company_name" property="companyName" />
|
|
<result column="company_name" property="companyName" />
|
|
<result column="company_address" property="companyAddress" />
|
|
<result column="company_address" property="companyAddress" />
|
|
<result column="company_type" property="companyType" />
|
|
<result column="company_type" property="companyType" />
|
|
|
|
+ <result column="administrator_id" property="administratorId" />
|
|
|
|
+ <result column="administrator" property="administrator" />
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
+
|
|
|
|
+ <!-- 通用查询结果列 -->
|
|
|
|
+ <sql id="Base_Column_List">
|
|
|
|
+ id, company_name, company_address, company_type, administrator_id, administrator
|
|
|
|
+ </sql>
|
|
|
|
+
|
|
<resultMap id="BaseResultMapVO" type="com.hssx.cloudmodel.entity.vo.CompanyVO">
|
|
<resultMap id="BaseResultMapVO" type="com.hssx.cloudmodel.entity.vo.CompanyVO">
|
|
<id column="id" property="id" />
|
|
<id column="id" property="id" />
|
|
<result column="company_name" property="companyName" />
|
|
<result column="company_name" property="companyName" />
|
|
@@ -28,10 +36,6 @@
|
|
ofType="com.hssx.cloudmodel.entity.Mould"/>
|
|
ofType="com.hssx.cloudmodel.entity.Mould"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
- <!-- 通用查询结果列 -->
|
|
|
|
- <sql id="Base_Column_List">
|
|
|
|
- id, company_name, company_address, company_type
|
|
|
|
- </sql>
|
|
|
|
|
|
|
|
<select id="getListByKeyName" resultMap="BaseResultMapVO">
|
|
<select id="getListByKeyName" resultMap="BaseResultMapVO">
|
|
select
|
|
select
|
|
@@ -40,7 +44,7 @@
|
|
tb_company
|
|
tb_company
|
|
<where>
|
|
<where>
|
|
<if test="keyName != null and keyName != ''">
|
|
<if test="keyName != null and keyName != ''">
|
|
- and company_name like concat('%',#{keyName},'%')
|
|
|
|
|
|
+ and company_name like concat('%',#{keyName},'%')
|
|
</if>
|
|
</if>
|
|
<if test="companyType != null">
|
|
<if test="companyType != null">
|
|
and company_type = #{companyType}
|
|
and company_type = #{companyType}
|
|
@@ -58,7 +62,7 @@
|
|
on tc.company_id = t.id
|
|
on tc.company_id = t.id
|
|
<where>
|
|
<where>
|
|
<if test="keyName != null and keyName != ''">
|
|
<if test="keyName != null and keyName != ''">
|
|
- and t.company_name like concat('%',#{keyName},'%')
|
|
|
|
|
|
+ and t.company_name like concat('%',#{keyName},'%')
|
|
</if>
|
|
</if>
|
|
<if test="companyType != null">
|
|
<if test="companyType != null">
|
|
and t.company_type = #{companyType}
|
|
and t.company_type = #{companyType}
|
|
@@ -68,18 +72,18 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="getListMould" resultMap="BaseResultMapMouldVO">
|
|
<select id="getListMould" resultMap="BaseResultMapMouldVO">
|
|
- select
|
|
|
|
|
|
+ select
|
|
t.id, t.company_name, t.company_address, t.company_type,tbc.y_lng, tbc.x_lat
|
|
t.id, t.company_name, t.company_address, t.company_type,tbc.y_lng, tbc.x_lat
|
|
from
|
|
from
|
|
- tb_mould tm
|
|
|
|
|
|
+ tb_mould tm
|
|
LEFT JOIN
|
|
LEFT JOIN
|
|
- tb_company t
|
|
|
|
|
|
+ tb_company t
|
|
on
|
|
on
|
|
- tm.produce_company_id = t.id
|
|
|
|
|
|
+ tm.produce_company_id = t.id
|
|
LEFT JOIN
|
|
LEFT JOIN
|
|
- tb_lng_lat_company tbc
|
|
|
|
|
|
+ tb_lng_lat_company tbc
|
|
ON
|
|
ON
|
|
- tbc.company_id = t.id
|
|
|
|
|
|
+ tbc.company_id = t.id
|
|
where t.id IS NOT NULL AND tm.id in
|
|
where t.id IS NOT NULL AND tm.id in
|
|
<foreach item="item" index="index" collection="mouldIds"
|
|
<foreach item="item" index="index" collection="mouldIds"
|
|
open="(" separator="," close=")">
|
|
open="(" separator="," close=")">
|