1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!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.BigScreamDao">
- <select id="data1" resultType="java.util.Map">
- SELECT
- a.*,
- ( SELECT count( 0 ) FROM ums_company_info WHERE comp_status = 0 ) AS companyNum,
- (select count(0) from ums_member_origin where state = 0) as originNum,
- (select count(0) from pms_product where delete_status = 0) as productNum
- FROM
- ums_platform a
- WHERE
- a.id = #{id}
- </select>
- <select id="data2" resultType="java.util.Map" parameterType="java.lang.String">
- SELECT
- a.comp_name AS compName,
- a.company_type AS companyType,
- a.longitude AS lng,
- a.latitude AS lat,
- a.comp_manage_product as compProduct
- FROM
- `ums_company_info` a
- WHERE
- 1=1
- <if test="compType != null and compType != ''">
- and a.company_type=#{compType}
- </if>
- </select>
- <resultMap id="productMap" type="java.util.Map">
- <collection property="productList" javaType="java.util.List" select="com.hwrj.cloud.admin.dao.BigScreamDao.data5"
- column="{productName=name}" ofType="java.util.Map">
- </collection>
- </resultMap>
- <!-- 获取产品分布信息 lym -->
- <select id="data4" resultMap="productMap">
- SELECT id,parent_id AS parentId,`name`,product_unit AS productUnit FROM pms_product_category
- WHERE parent_id = 0 AND show_status = 1
- ORDER BY sort ASC
- </select>
- <!-- 获取产品种植面积分布信息 lym -->
- <select id="data5" resultType="map">
- SELECT a.latitude AS lat,a.longitude AS lng,b.plant_area AS value FROM ums_member_origin a
- INNER JOIN ums_member_origin_product b ON a.id = b.fk_origin_id
- WHERE a.state = 0 AND b.state = 0
- AND b.product_name = #{productName}
- </select>
- <select id="data6" resultType="java.lang.String">
- SELECT CONCAT(IFNULL(a.comp_name,' '),'---',a.`name`,'---',IFNULL(a.spec,' '),'---',a.price) as pri FROM `pms_product` a where delete_status=0
- </select>
- <select id="data7" resultType="java.lang.String">
- SELECT CONCAT(CASE um.cert
- WHEN 1 THEN
- IFNULL(um.type,um.nickname)
- WHEN 2 THEN
- IFNULL(um.company_info,um.nickname)
- ELSE
- um.nickname
- END
- ,'---',op.product_name) FROM `oms_pre_item` op LEFT JOIN ums_member um on op.member_id= um.id where op.delete_status=0 and um.`status`=1
- </select>
- <select id="data8" resultType="java.lang.String">
- SELECT
- CONCAT(
- company_type,
- '---',
- company_type,
- '---',
- COUNT(0)
- ) comp
- FROM
- ums_company_info
- WHERE
- comp_status = 0
- GROUP BY
- company_type </select>
- <select id="data9" resultType="java.lang.String">
- SELECT
- concat(id, '---', comp_name)
- FROM
- ums_company_info
- WHERE
- comp_status = 0
- </select>
- </mapper>
|