| | |
| | | <mapper namespace="org.springblade.modules.punish.mapper.PunishMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="punishResultMap" type="org.springblade.modules.punish.entity.Punish"> |
| | | <id column="id" property="id"/> |
| | | <result column="deptid" property="deptid"/> |
| | | <resultMap id="punishResultMap" type="org.springblade.modules.punish.vo.PunishVO"> |
| | | <result column="punishtype" property="punishtype"/> |
| | | <result column="punishreason" property="punishreason"/> |
| | | <result column="punishresult" property="punishresult"/> |
| | | <result column="punishtime" property="punishtime"/> |
| | | <result column="punisnum" property="punisnum"/> |
| | | <result column="jurisdiction" property="jurisdiction"/> |
| | | <result column="enterpriseName" property="enterpriseName"/> |
| | | <result column="jurname" property="jurname"/> |
| | | <result column="penalty" property="penalty"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectPunishPage" resultMap="punishResultMap"> |
| | | select * from sys_punish |
| | | SELECT i.enterpriseName, |
| | | j.dept_name as jurname, |
| | | p.punishtype, |
| | | p.punishreason, |
| | | p.punishresult, |
| | | p.punishtime, |
| | | p.punisnum, |
| | | p.penalty |
| | | FROM sys_punish p |
| | | LEFT JOIN sys_information i ON i.departmentid = p.deptid |
| | | LEFT JOIN sys_jurisdiction j ON j.id = p.jurisdiction |
| | | where 1=1 |
| | | <if test="punish.jurisdiction!=null and punish.jurisdiction!='' and punish.jurisdiction!='1123598813738675201'"> |
| | | and p.jurisdiction = #{punish.jurisdiction} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |