|
@@ -0,0 +1,59 @@
|
|
|
+<?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.ym.mec.biz.dal.dao.SysManualDao">
|
|
|
+ <resultMap id="BaseResultMap" type="com.ym.mec.biz.dal.entity.SysManual">
|
|
|
+ <id column="id_" jdbcType="INTEGER" property="id"/>
|
|
|
+ <result column="menu_id_" jdbcType="INTEGER" property="menuId"/>
|
|
|
+ <result column="name_" jdbcType="VARCHAR" property="name"/>
|
|
|
+ <result column="op_flow_" jdbcType="VARCHAR" property="opFlow"/>
|
|
|
+ <result column="fun_rule_" jdbcType="VARCHAR" property="funRule"/>
|
|
|
+ <result column="video_url_" jdbcType="VARCHAR" property="videoUrl"/>
|
|
|
+ <result column="create_time_" jdbcType="TIMESTAMP" property="createTime"/>
|
|
|
+ <result column="update_time_" jdbcType="TIMESTAMP" property="updateTime"/>
|
|
|
+ <result column="operator_id_" jdbcType="INTEGER" property="operatorId"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ id_, menu_id_, name_, op_flow_, fun_rule_, video_url_, create_time_, update_time_, operator_id_
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <insert id="insertBatch" keyColumn="id_" keyProperty="id" useGeneratedKeys="true"
|
|
|
+ parameterType="com.ym.mec.biz.dal.entity.SysManual">
|
|
|
+ insert into sys_manual(menu_id_, name_, op_flow_, fun_rule_, video_url_, create_time_, update_time_, operator_id_)
|
|
|
+ values
|
|
|
+ <foreach collection="entities" item="entity" separator=",">
|
|
|
+ (#{entity.menuId}, #{entity.name}, #{entity.opFlow}, #{entity.funRule}, #{entity.videoUrl}, #{entity.createTime}, #{entity.updateTime}, #{entity.operatorId})
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+ <select id="findRecordCount" resultType="java.lang.Integer">
|
|
|
+ select count(1) from sys_manual sm
|
|
|
+ left join sys_user u on sm.operator_id_ = u.id_
|
|
|
+ <where>
|
|
|
+ 1 = 1 AND
|
|
|
+ <if test="menuId != null and menuId != '' ">
|
|
|
+ menu_id_ = #{menuId}
|
|
|
+ </if>
|
|
|
+ <if test="search != null and search != '' ">
|
|
|
+ (name_ like concat('%', #{menuId} '%') )
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ <include refid="global.limit"/>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="queryRecord" resultType="com.ym.mec.biz.dal.entity.SysManual">
|
|
|
+ select sm.*
|
|
|
+ , u.username_ as operatorName from sys_manual sm
|
|
|
+ left join sys_user u on sm.operator_id_ = u.id_
|
|
|
+ <where>
|
|
|
+ 1 = 1 AND
|
|
|
+ <if test="menuId != null and menuId != '' ">
|
|
|
+ sm.menu_id_ = #{menuId}
|
|
|
+ </if>
|
|
|
+ <if test="search != null and search != '' ">
|
|
|
+ (name_ like concat('%', #{menuId} '%') )
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ <include refid="global.limit"/>
|
|
|
+ </select>
|
|
|
+
|
|
|
+</mapper>
|