12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <?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.gree.mall.manager.commonmapper.workorder.IncreMapper">
- <select id="list" resultType="com.gree.mall.manager.bean.workorder.IncreVO">
- SELECT
- ${ex.selected}
- FROM pg_incre a
- ${ex.query}
- <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
- AND a.company_wechat_id IN
- <foreach item="item" index="index" collection="adminCompanyIds" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="ex.orderBy == null or ex.orderBy ==''">
- ORDER BY a.create_time DESC
- </if>
- ${ex.orderBy}
- </select>
- <select id="listDispatch" resultType="com.gree.mall.manager.bean.workorder.DispatchVO">
- SELECT
- a.province_name,
- a.pid,
- a.city_name,
- a.city_code,
- a.area_name,
- a.area_code,
- a.name as streetName,
- a.id as streetCode,
- b.dict_value,
- b.dict_code,
- c.order_small_type_text,
- c.id as orderSmallId,
- d.name as categoryName,
- d.category_id,
- e.dict_value as order_source,
- e.dict_code as order_source_id
- FROM
- region a
- join sys_dict_company b on b.dict_type = 'ORDER_CHANNEL'
- <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
- AND b.company_wechat_id IN
- <foreach item="item" index="index" collection="adminCompanyIds" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- join order_small_type c
- <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
- on c.company_wechat_id IN
- <foreach item="item" index="index" collection="adminCompanyIds" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- join goods_category d on d.type = 2 and d.del =0 and d.`level` = 1
- <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
- AND d.company_wechat_id IN
- <foreach item="item" index="index" collection="adminCompanyIds" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- join sys_dict_company e on e.dict_type = 'WORKER_ORDER_SOURCE'
- <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
- AND e.company_wechat_id IN
- <foreach item="item" index="index" collection="adminCompanyIds" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- where
- a.city_name IN ( '广州市', '清远市', '韶关市', '佛山市', '肇庆市', '云浮市' )
- AND a.`level` = 4
- </select>
- </mapper>
|