|  | @@ -2,28 +2,28 @@
 | 
											
												
													
														|  |  <!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">
 | 
											
												
													
														|  |  <mapper namespace="com.hwrj.cloud.admin.dao.BigCompanyDao">
 |  |  <mapper namespace="com.hwrj.cloud.admin.dao.BigCompanyDao">
 | 
											
												
													
														|  |      <select id="bigCompanyInfo" resultType="java.util.Map">
 |  |      <select id="bigCompanyInfo" resultType="java.util.Map">
 | 
											
												
													
														|  | -<!--        SELECT-->
 |  | 
 | 
											
												
													
														|  | -<!--            a.id,-->
 |  | 
 | 
											
												
													
														|  | -<!--            a.comp_name AS name,-->
 |  | 
 | 
											
												
													
														|  | -<!--            a.comp_con_person as compConPerson,-->
 |  | 
 | 
											
												
													
														|  | -<!--            a.comp_con_num as compConNum,-->
 |  | 
 | 
											
												
													
														|  | -<!--            concat(a.province_id,a.city_id,a.county_id) as address,-->
 |  | 
 | 
											
												
													
														|  | -<!--            a.longitude as lng,-->
 |  | 
 | 
											
												
													
														|  | -<!--            a.latitude as latitude,-->
 |  | 
 | 
											
												
													
														|  | -<!--            a.company_type as companyType-->
 |  | 
 | 
											
												
													
														|  | -<!--        FROM-->
 |  | 
 | 
											
												
													
														|  | -<!--            ums_company_info a-->
 |  | 
 | 
											
												
													
														|  | -<!--        WHERE-->
 |  | 
 | 
											
												
													
														|  | -<!--            a.comp_status =0-->
 |  | 
 | 
											
												
													
														|  | -<!--            <if test="key != null and key != ''">-->
 |  | 
 | 
											
												
													
														|  | -<!--                and a.comp_name like concat('%',#{key},'%')-->
 |  | 
 | 
											
												
													
														|  | -<!--            </if>-->
 |  | 
 | 
											
												
													
														|  | -<!--            <if test="catId != null">-->
 |  | 
 | 
											
												
													
														|  | -<!--                and a.id in (-->
 |  | 
 | 
											
												
													
														|  | -<!--                select p.ums_company_info_id from pms_product p LEFT JOIN pms_product_category pc on p.product_category_id = pc.id  where pc.parent_id = #{catId} GROUP BY p.ums_company_info_id-->
 |  | 
 | 
											
												
													
														|  | 
 |  | +        <!--        SELECT-->
 | 
											
												
													
														|  | 
 |  | +        <!--            a.id,-->
 | 
											
												
													
														|  | 
 |  | +        <!--            a.comp_name AS name,-->
 | 
											
												
													
														|  | 
 |  | +        <!--            a.comp_con_person as compConPerson,-->
 | 
											
												
													
														|  | 
 |  | +        <!--            a.comp_con_num as compConNum,-->
 | 
											
												
													
														|  | 
 |  | +        <!--            concat(a.province_id,a.city_id,a.county_id) as address,-->
 | 
											
												
													
														|  | 
 |  | +        <!--            a.longitude as lng,-->
 | 
											
												
													
														|  | 
 |  | +        <!--            a.latitude as latitude,-->
 | 
											
												
													
														|  | 
 |  | +        <!--            a.company_type as companyType-->
 | 
											
												
													
														|  | 
 |  | +        <!--        FROM-->
 | 
											
												
													
														|  | 
 |  | +        <!--            ums_company_info a-->
 | 
											
												
													
														|  | 
 |  | +        <!--        WHERE-->
 | 
											
												
													
														|  | 
 |  | +        <!--            a.comp_status =0-->
 | 
											
												
													
														|  | 
 |  | +        <!--            <if test="key != null and key != ''">-->
 | 
											
												
													
														|  | 
 |  | +        <!--                and a.comp_name like concat('%',#{key},'%')-->
 | 
											
												
													
														|  | 
 |  | +        <!--            </if>-->
 | 
											
												
													
														|  | 
 |  | +        <!--            <if test="catId != null">-->
 | 
											
												
													
														|  | 
 |  | +        <!--                and a.id in (-->
 | 
											
												
													
														|  | 
 |  | +        <!--                select p.ums_company_info_id from pms_product p LEFT JOIN pms_product_category pc on p.product_category_id = pc.id  where pc.parent_id = #{catId} GROUP BY p.ums_company_info_id-->
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -<!--                )-->
 |  | 
 | 
											
												
													
														|  | -<!--            </if>-->
 |  | 
 | 
											
												
													
														|  | 
 |  | +        <!--                )-->
 | 
											
												
													
														|  | 
 |  | +        <!--            </if>-->
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          SELECT
 |  |          SELECT
 | 
											
												
													
														|  |          a.id,
 |  |          a.id,
 | 
											
										
											
												
													
														|  | @@ -38,15 +38,16 @@
 | 
											
												
													
														|  |          ums_company_info a
 |  |          ums_company_info a
 | 
											
												
													
														|  |          WHERE
 |  |          WHERE
 | 
											
												
													
														|  |          a.comp_status = 0
 |  |          a.comp_status = 0
 | 
											
												
													
														|  | -                    <if test="key != null and key != ''">
 |  | 
 | 
											
												
													
														|  | -                        and a.comp_name like concat('%',#{key},'%')
 |  | 
 | 
											
												
													
														|  | -                    </if>
 |  | 
 | 
											
												
													
														|  | -                    <if test="catId != null">
 |  | 
 | 
											
												
													
														|  | -                        and a.id in (
 |  | 
 | 
											
												
													
														|  | -                        select p.ums_company_info_id from pms_product p LEFT JOIN pms_product_category pc on p.product_category_id = pc.id  where pc.parent_id = #{catId} GROUP BY p.ums_company_info_id
 |  | 
 | 
											
												
													
														|  | 
 |  | +        <if test="key != null and key != ''">
 | 
											
												
													
														|  | 
 |  | +            and a.comp_name like concat('%',#{key},'%')
 | 
											
												
													
														|  | 
 |  | +        </if>
 | 
											
												
													
														|  | 
 |  | +        <if test="catId != null">
 | 
											
												
													
														|  | 
 |  | +            and a.id in (
 | 
											
												
													
														|  | 
 |  | +            select p.comp_id from pms_product p LEFT JOIN pms_product_category pc on p.product_category_id =
 | 
											
												
													
														|  | 
 |  | +            pc.id where pc.parent_id = #{catId} GROUP BY p.comp_id
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -                        )
 |  | 
 | 
											
												
													
														|  | -                    </if>
 |  | 
 | 
											
												
													
														|  | 
 |  | +            )
 | 
											
												
													
														|  | 
 |  | +        </if>
 | 
											
												
													
														|  |          UNION ALL
 |  |          UNION ALL
 | 
											
												
													
														|  |          SELECT
 |  |          SELECT
 | 
											
												
													
														|  |          CONCAT( b.id, '9999' ) AS id,
 |  |          CONCAT( b.id, '9999' ) AS id,
 | 
											
										
											
												
													
														|  | @@ -61,12 +62,12 @@
 | 
											
												
													
														|  |          ums_company_info_ext b
 |  |          ums_company_info_ext b
 | 
											
												
													
														|  |          WHERE
 |  |          WHERE
 | 
											
												
													
														|  |          b.delete_status = 0
 |  |          b.delete_status = 0
 | 
											
												
													
														|  | -        <if test = "key != null and key != ''" >
 |  | 
 | 
											
												
													
														|  | -        AND b.comp_name LIKE concat( '%', #{key},'%')
 |  | 
 | 
											
												
													
														|  | 
 |  | +        <if test="key != null and key != ''">
 | 
											
												
													
														|  | 
 |  | +            AND b.comp_name LIKE concat( '%', #{key},'%')
 | 
											
												
													
														|  | 
 |  | +        </if>
 | 
											
												
													
														|  | 
 |  | +        <if test="catId != null">
 | 
											
												
													
														|  | 
 |  | +            and b.product_category_id = #{catId}
 | 
											
												
													
														|  |          </if>
 |  |          </if>
 | 
											
												
													
														|  | -          <if test = "catId != null" >
 |  | 
 | 
											
												
													
														|  | -           and b.product_category_id = #{catId}
 |  | 
 | 
											
												
													
														|  | -          </if>
 |  | 
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      </select>
 |  |      </select>
 | 
											
												
													
														|  |      <select id="getCat" resultType="java.lang.String">
 |  |      <select id="getCat" resultType="java.lang.String">
 |