1234567891011121314151617181920212223242526272829303132 |
- <?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.huaxu.dao.AppReportMonitorMapper">
- <select id="getSceneByCompany" resultType="com.huaxu.entity.SceneEntity">
- select
- s.id,
- s.SCENE_NAME as "sceneName",
- s.PARENT_SCENE_ID as "parentSceneId"
- from sms_scene_type st
- left join sms_scene s on st.id=s.SCENE_TYPE_ID
- where st.SCENE_TYPE_NAME =#{sceneType}
- and s.COMPANY_ORG_ID = #{companyOrgId}
- order by s.SCENE_NAME
- </select>
- <select id="getCompanyBySceneCondition" resultType="java.lang.Integer">
- select
- distinct
- s.COMPANY_ORG_ID
- from sms_scene_type st
- left join sms_scene s on st.id=s.SCENE_TYPE_ID
- where
- st.SCENE_TYPE_NAME =#{sceneType}
- <if test="condition != null and condition !=''">
- and s.SCENE_NAME like concat('%',#{condition},'%')
- </if>
- </select>
- </mapper>
|