|
@@ -4,23 +4,27 @@
|
|
|
<mapper namespace="com.ym.mec.biz.dal.dao.SysConfigDao">
|
|
|
|
|
|
<resultMap type="com.ym.mec.biz.dal.entity.SysConfig" id="SysConfig">
|
|
|
- <result column="id" property="id" />
|
|
|
+ <result column="id_" property="id" />
|
|
|
<result column="param_name_" property="paramName" />
|
|
|
<result column="paran_value_" property="paranValue" />
|
|
|
<result column="description_" property="description" />
|
|
|
<result column="create_on_" property="createOn" />
|
|
|
<result column="modify_on_" property="modifyOn" />
|
|
|
+ <result column="group_" property="group" />
|
|
|
</resultMap>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
|
<select id="get" resultMap="SysConfig">
|
|
|
- SELECT * FROM sys_config WHERE id = #{id}
|
|
|
+ SELECT * FROM sys_config WHERE id_ = #{id}
|
|
|
</select>
|
|
|
|
|
|
<!-- 全查询 -->
|
|
|
<select id="findAll" resultMap="SysConfig">
|
|
|
- SELECT * FROM sys_config ORDER BY
|
|
|
- id
|
|
|
+ SELECT * FROM sys_config where 1=1
|
|
|
+ <if test="group != null">
|
|
|
+ and group_ = #{group}
|
|
|
+ </if>
|
|
|
+ ORDER BY id_
|
|
|
</select>
|
|
|
|
|
|
<!-- 向数据库增加一条记录 -->
|
|
@@ -29,8 +33,8 @@
|
|
|
<!-- <selectKey resultClass="int" keyProperty="id" > SELECT SEQ_WSDEFINITION_ID.nextval
|
|
|
AS ID FROM DUAL </selectKey> -->
|
|
|
INSERT INTO sys_config
|
|
|
- (id,param_name_,paran_value_,description_,create_on_,modify_on_)
|
|
|
- VALUES(#{id},#{paramName},#{paranValue},#{description},#{createOn},#{modifyOn})
|
|
|
+ (id_,param_name_,paran_value_,description_,create_on_,modify_on_,group_)
|
|
|
+ VALUES(#{id},#{paramName},#{paranValue},#{description},#{createOn},#{modifyOn},#{group})
|
|
|
</insert>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
@@ -47,7 +51,7 @@
|
|
|
description_ = #{description},
|
|
|
</if>
|
|
|
<if test="id != null">
|
|
|
- id = #{id},
|
|
|
+ id_ = #{id},
|
|
|
</if>
|
|
|
<if test="createOn != null">
|
|
|
create_on_ = #{createOn},
|
|
@@ -55,26 +59,29 @@
|
|
|
<if test="paramName != null">
|
|
|
param_name_ = #{paramName},
|
|
|
</if>
|
|
|
+ <if test="group != null">
|
|
|
+ group_ = #{group},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
WHERE id = #{id}
|
|
|
</update>
|
|
|
|
|
|
<!-- 根据主键删除一条记录 -->
|
|
|
<delete id="delete">
|
|
|
- DELETE FROM sys_config WHERE id = #{id}
|
|
|
+ DELETE FROM sys_config WHERE id_ = #{id}
|
|
|
</delete>
|
|
|
|
|
|
<!-- 分页查询 -->
|
|
|
<select id="queryPage" resultMap="SysConfig" parameterType="map">
|
|
|
- SELECT * FROM sys_config ORDER BY id
|
|
|
+ SELECT * FROM sys_config ORDER BY id_
|
|
|
<include refid="global.limit" />
|
|
|
</select>
|
|
|
|
|
|
<!-- 查询当前表的总记录数 -->
|
|
|
<select id="queryCount" resultType="int">
|
|
|
- SELECT COUNT(*) FROM
|
|
|
- sys_config
|
|
|
+ SELECT COUNT(*) FROM sys_config
|
|
|
</select>
|
|
|
+
|
|
|
<select id="findByParamName" resultMap="SysConfig">
|
|
|
SELECT * FROM sys_config WHERE param_name_=#{paramName}
|
|
|
</select>
|