| 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="api.mapper.system.MainProblemMapper">
- <select id="selectWorkroderType" resultType="Long" resultSets="api.entity.database.system.MainProblem">
- select *
- -- (SELECT
- -- GROUP_CONCAT(b.`type_name` SEPARATOR '/') from workorder_type b where FIND_IN_SET(b.id,CONCAT( a.ancestors,',',a.id)) ) ancestorsName
- FROM workorder_type a where a.is_delete=0
- <if test="id >0 ">
- and a.id=#{id}
- </if>
- order by a.id
- </select>
- <select id="selectWorkroderTypeById" resultType="Long" resultSets="api.entity.database.system.MainProblem">
- select *
- -- ,
- -- (SELECT
- -- GROUP_CONCAT(b.`type_name` SEPARATOR '/') from workorder_type b where FIND_IN_SET(b.id,CONCAT( a.ancestors,',',a.id)) ) ancestorsName
- FROM workorder_type a where a.is_delete=0 and a.id=#{id}
- order by a.id
- </select>
- </mapper>
|