commit
e9947aeb46
@ -0,0 +1,49 @@
|
|||||||
|
package com.engine.organization.entity.extend.po;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/06/14
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class ExtendTitlePO {
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分组标识
|
||||||
|
*/
|
||||||
|
private Long groupid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分组名称
|
||||||
|
*/
|
||||||
|
private String title;
|
||||||
|
/**
|
||||||
|
* 展示排序
|
||||||
|
*/
|
||||||
|
private Integer showOrder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否展示
|
||||||
|
*/
|
||||||
|
private Integer isShow;
|
||||||
|
|
||||||
|
|
||||||
|
private Integer creator;
|
||||||
|
private Integer deleteType;
|
||||||
|
private Date createTime;
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.engine.organization.mapper.extend;
|
||||||
|
|
||||||
|
import com.engine.organization.entity.extend.po.ExtendTitlePO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/06/14
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public interface ExtendTitleMapper {
|
||||||
|
/**
|
||||||
|
* 根据分组类型获取标题信息
|
||||||
|
*
|
||||||
|
* @param groupId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ExtendTitlePO> getTitlesByGroupID(@Param("groupId") Long groupId);
|
||||||
|
|
||||||
|
List<ExtendTitlePO> getTitlesByIds(@Param("ids") Collection<Long> ids);
|
||||||
|
}
|
@ -0,0 +1,57 @@
|
|||||||
|
<?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.engine.organization.mapper.extend.ExtendTitleMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.engine.organization.entity.extend.po.ExtendTitlePO">
|
||||||
|
<result column="id" property="id"/>
|
||||||
|
<result column="group_id" property="groupid"/>
|
||||||
|
<result column="title" property="title"/>
|
||||||
|
<result column="show_order" property="showOrder"/>
|
||||||
|
<result column="is_show" property="isShow"/>
|
||||||
|
<result column="creator" property="creator"/>
|
||||||
|
<result column="delete_type" property="deleteType"/>
|
||||||
|
<result column="create_time" property="createTime"/>
|
||||||
|
<result column="update_time" property="updateTime"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 表字段 -->
|
||||||
|
<sql id="baseColumns">
|
||||||
|
t
|
||||||
|
.
|
||||||
|
id
|
||||||
|
, t.group_id
|
||||||
|
, t.title
|
||||||
|
, show_order
|
||||||
|
, is_show
|
||||||
|
, t.creator
|
||||||
|
, t.delete_type
|
||||||
|
, t.create_time
|
||||||
|
, t.update_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="getTitlesByGroupID" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="baseColumns"/>
|
||||||
|
FROM
|
||||||
|
jcl_field_extendtitle t
|
||||||
|
WHERE t.delete_type = 0
|
||||||
|
<if test=" groupId != null ">
|
||||||
|
and group_id = #{groupId}
|
||||||
|
</if>
|
||||||
|
order by show_order
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getTitlesByIds" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="baseColumns"/>
|
||||||
|
FROM
|
||||||
|
jcl_field_extendtitle t
|
||||||
|
WHERE t.delete_type = 0
|
||||||
|
AND id IN
|
||||||
|
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
order by show_order
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue