2 changed files with 37 additions and 11 deletions
@ -0,0 +1,31 @@ |
|||||||
|
<?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.biutag.supervision.mapper.NegativeMapper"> |
||||||
|
|
||||||
|
<select id="getYellowBetNegativeList" resultType="com.biutag.supervision.pojo.entity.Negative"> |
||||||
|
SELECT ng.* FROM negative ng |
||||||
|
LEFT JOIN sup_depart sd ON ng.involveDepartId = sd.id |
||||||
|
LEFT JOIN sup_depart sdd ON sd.pid = sdd.id |
||||||
|
LEFT JOIN sup_depart sddd ON sdd.pid = sddd.id |
||||||
|
<where> |
||||||
|
<if test="beginTime != null"> |
||||||
|
AND ng.crtTime >= #{beginTime} |
||||||
|
</if> |
||||||
|
<if test="endTime != null"> |
||||||
|
AND ng.crtTime <= #{endTime} |
||||||
|
</if> |
||||||
|
<if test="id != null and id != ''"> |
||||||
|
AND (sd.id = #{id} OR sdd.id = #{id} OR sddd.id = #{id}) |
||||||
|
</if> |
||||||
|
<choose> |
||||||
|
<when test="specialSupervision != null and specialSupervision != ''"> |
||||||
|
AND FIND_IN_SET(#{specialSupervision}, ng.special_supervision) > 0 |
||||||
|
</when> |
||||||
|
<otherwise> |
||||||
|
</otherwise> |
||||||
|
</choose> |
||||||
|
</where> |
||||||
|
</select> |
||||||
|
|
||||||
|
</mapper> |
||||||
Loading…
Reference in new issue