PixelAI-backend/target/classes/mapper/AcGroupMapper.xml
2024-10-28 15:31:30 +08:00

58 lines
2.3 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.message.api.group.dao.AcGroupMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.message.api.group.entity.AcGroup">
<id column="id" property="id"/>
<result column="name" property="name"/>
<result column="grouptypeid" property="grouptypeid"/>
<result column="acgroup" property="acgroup"/>
<result column="show" property="show"/>
<result column="edit" property="edit"/>
<result column="description" property="description"/>
<result column="createtime" property="createtime"/>
<result column="state" property="state"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id, name, grouptypeid, acgroup,
show, edit, description, createtime, state
</sql>
<select id="findByAcgroup" resultMap="BaseResultMap" parameterType="java.lang.String">
select
<include refid="Base_Column_List"/>
FROM ac_group where acgroup = #{acgroup} and state = '1'
</select>
<select id="findByExample" resultType="com.message.api.group.vo.AcGroupVo"
parameterType="com.message.api.group.vo.AcGroupVo">
select id,
name,
grouptypeid,
grouptype_name,
acgroup,
show,
edit,
description,
createtime,
state
from (select ac_group.id as id,
ac_group.name as name,
ac_group.grouptypeid as grouptypeid,
ac_grouptype.name as grouptype_name,
ac_group.acgroup as acgroup,
ac_group.show as show,
ac_group.edit as edit,
ac_group.description as description,
ac_group.createtime as createtime,
ac_group.state as state
FROM ac_group
left join ac_grouptype on ac_group.grouptypeid = ac_grouptype.id) t
${ew.customSqlSegment}
</select>
</mapper>