|
@@ -21,10 +21,11 @@
|
|
|
<id column="id" property="id" />
|
|
|
<result column="company_name" property="companyName" />
|
|
|
<result column="company_address" property="companyAddress" />
|
|
|
- <result column="company_type" property="companyType" />
|
|
|
+ <result column="companytype" property="companyType" />
|
|
|
<result column="y_lng" property="yLng" />
|
|
|
<result column="x_lat" property="xLat" />
|
|
|
- <collection property="relateCompanyList" javaType="java.util.List" select="selectRelateCompanyList" column="{Id = id,companyType = company_type}"
|
|
|
+ <collection property="relateCompanyList" javaType="java.util.List" select="selectRelateCompanyList"
|
|
|
+ column="{Id=id,companyType = companytype}"
|
|
|
ofType="com.hssx.cloudmodel.entity.Company"/>
|
|
|
</resultMap>
|
|
|
<resultMap id="BaseResultMapMouldVO" type="com.hssx.cloudmodel.entity.vo.CompanyVO">
|
|
@@ -39,23 +40,23 @@
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
- <select id="getListByKeyName" resultMap="BaseResultMapVO">
|
|
|
- select
|
|
|
- <include refid="Base_Column_List"/>
|
|
|
- from
|
|
|
- tb_company
|
|
|
- <where>
|
|
|
- <if test="keyName != null and keyName != ''">
|
|
|
- and company_name like concat('%',#{keyName},'%')
|
|
|
- </if>
|
|
|
- <if test="companyType != null">
|
|
|
- and company_type = #{companyType}
|
|
|
- </if>
|
|
|
- </where>
|
|
|
- </select>
|
|
|
+ <!--<select id="getListByKeyName" resultMap="BaseResultMapVO">-->
|
|
|
+ <!--select-->
|
|
|
+ <!--<include refid="Base_Column_List"/>-->
|
|
|
+ <!--from-->
|
|
|
+ <!--tb_company-->
|
|
|
+ <!--<where>-->
|
|
|
+ <!--<if test="keyName != null and keyName != ''">-->
|
|
|
+ <!--and company_name like concat('%',#{keyName},'%')-->
|
|
|
+ <!--</if>-->
|
|
|
+ <!--<if test="companyType != null">-->
|
|
|
+ <!--and company_type = #{companyType}-->
|
|
|
+ <!--</if>-->
|
|
|
+ <!--</where>-->
|
|
|
+ <!--</select>-->
|
|
|
<select id="getCustomerListByKeyName" resultMap="BaseResultMapVO">
|
|
|
select
|
|
|
- t.id, t.company_name, t.company_address, t.company_type,tc.y_lng, tc.x_lat
|
|
|
+ t.id, t.company_name, t.company_address, t.company_type companytype,tc.y_lng, tc.x_lat
|
|
|
from
|
|
|
tb_company t
|
|
|
left join
|
|
@@ -70,25 +71,25 @@
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
- <select id="selectRelateCompanyList" resultType="com.hssx.cloudmodel.entity.vo.CompanyVO" parameterType="java.util.Map">
|
|
|
+ <select id="selectRelateCompanyList" resultType="com.hssx.cloudmodel.entity.Company" parameterType="java.util.Map">
|
|
|
SELECT
|
|
|
- t.id, t.company_name
|
|
|
+ t.id, t.company_name,t.company_type
|
|
|
from
|
|
|
tb_company t
|
|
|
left join
|
|
|
tb_asset_custom_company tbcc
|
|
|
- <if test="#{companyType}==0">
|
|
|
+ <if test="companyType == 0">
|
|
|
on t.id = tbcc.custom_id
|
|
|
</if>
|
|
|
- <if test="#{companyType}==1">
|
|
|
+ <if test="companyType == 1">
|
|
|
on t.id = tbcc.assert_id
|
|
|
</if>
|
|
|
<where>
|
|
|
- <if test="#{companyType}==0">
|
|
|
- tbcc.assert_id = #{id}
|
|
|
+ <if test="companyType == 0">
|
|
|
+ tbcc.assert_id = #{Id}
|
|
|
</if>
|
|
|
- <if test="#{companyType}==1">
|
|
|
- tbcc.custom_id = #{id}
|
|
|
+ <if test="companyType == 1">
|
|
|
+ tbcc.custom_id = #{Id}
|
|
|
</if>
|
|
|
</where>
|
|
|
|