59 lines
2.1 KiB
XML
59 lines
2.1 KiB
XML
<?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.bonus.gzrn.rnbmw.basic.dao.MessageInformDao">
|
|
<!--工程查询页面-->
|
|
<select id="getProList" resultType="com.bonus.gzrn.rnbmw.basic.entity.ProjectBean">
|
|
SELECT bp.id ,pc.`org_name` as orgName,bp.name as name,bp.pro_type as proType,sdd.name as voltageLevel,bp.status as status,
|
|
bp.origin AS origin,bp.is_push as isPush, bp.push_time as pushTime
|
|
FROM bm_project bp
|
|
LEFT JOIN pm_company pc on bp.company_id = pc.ID
|
|
LEFT JOIN sys_dic_detail sdd on sdd.id = bp.voltage_level
|
|
where bp.IS_ACTIVE = 1
|
|
<if test="params.companyId!=null and params.companyId!='' ">
|
|
and pc.ID =#{params.companyId}
|
|
</if>
|
|
<if test="params.status!='全部'">
|
|
and bp.`STATUS` =#{params.status}
|
|
</if>
|
|
<if test="params.proId!=null and params.proId!='' ">
|
|
and bp.ID= #{params.proId}
|
|
</if>
|
|
|
|
limit #{offset}, #{limit}
|
|
</select>
|
|
<select id="getCount" resultType="java.lang.Integer">
|
|
select
|
|
count(id)
|
|
FROM
|
|
msg_inform
|
|
WHERE
|
|
msg_time between #{params.startTime} and #{params.endTime}
|
|
<if test="params.keyWord!=null and params.keyWord!='' ">
|
|
and (
|
|
instr(msg_type,#{params.keyWord}) > 0
|
|
or instr(msg_content,#{params.keyWord}) > 0
|
|
)
|
|
</if>
|
|
</select>
|
|
<select id="getList" resultType="com.bonus.gzrn.rnbmw.push.entity.MsgInformBean">
|
|
select
|
|
msg_type as msgType,
|
|
msg_content as msgContent,
|
|
msg_time as msgTime
|
|
FROM
|
|
msg_inform
|
|
WHERE
|
|
msg_time between #{params.startTime} and #{params.endTime}
|
|
<if test="params.keyWord!=null and params.keyWord!='' ">
|
|
and (
|
|
instr(msg_type,#{params.keyWord}) > 0
|
|
or instr(msg_content,#{params.keyWord}) > 0
|
|
)
|
|
</if>
|
|
limit #{offset}, #{limit}
|
|
</select>
|
|
|
|
|
|
</mapper> |