|
@@ -55,12 +55,23 @@
|
|
|
</if>
|
|
</if>
|
|
|
#end
|
|
#end
|
|
|
</set>
|
|
</set>
|
|
|
- where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
|
|
+ where
|
|
|
|
|
+ <if test="id != null and !"".equals(id)">
|
|
|
|
|
+ id = #{id,jdbcType=INTEGER}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="idStr != null and !"".equals(idStr)">
|
|
|
|
|
+ id in (${esc.d}{idStr})
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
</update>
|
|
</update>
|
|
|
<select id="query${model.className}ByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.${model.className}">
|
|
<select id="query${model.className}ByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.${model.className}">
|
|
|
select <include refid="Base_Column_List"/> from ${model.tableName}
|
|
select <include refid="Base_Column_List"/> from ${model.tableName}
|
|
|
<where>
|
|
<where>
|
|
|
and del_flag = 'N'
|
|
and del_flag = 'N'
|
|
|
|
|
+ <if test="record.idStr != null and !"".equals(record.idStr)">
|
|
|
|
|
+ and id in (${esc.d}{record.idStr})
|
|
|
|
|
+ </if>
|
|
|
#foreach($field in $model.fields)
|
|
#foreach($field in $model.fields)
|
|
|
<if test="record.$field.modelName != null and !"".equals(record.$field.modelName)">
|
|
<if test="record.$field.modelName != null and !"".equals(record.$field.modelName)">
|
|
|
and ${field.name} = #{record.$field.modelName}
|
|
and ${field.name} = #{record.$field.modelName}
|
|
@@ -134,6 +145,9 @@
|
|
|
select <include refid="Base_Column_List"/> from ${model.tableName}
|
|
select <include refid="Base_Column_List"/> from ${model.tableName}
|
|
|
<where>
|
|
<where>
|
|
|
and del_flag = 'N'
|
|
and del_flag = 'N'
|
|
|
|
|
+ <if test="idStr != null and !"".equals(idStr)">
|
|
|
|
|
+ and id in (${esc.d}{idStr})
|
|
|
|
|
+ </if>
|
|
|
#foreach($field in $model.fields)
|
|
#foreach($field in $model.fields)
|
|
|
<if test="$field.modelName != null and !"".equals($field.modelName)">
|
|
<if test="$field.modelName != null and !"".equals($field.modelName)">
|
|
|
and ${field.name} = #{$field.modelName}
|
|
and ${field.name} = #{$field.modelName}
|
|
@@ -217,9 +231,14 @@
|
|
|
</select>
|
|
</select>
|
|
|
<update id="delete">
|
|
<update id="delete">
|
|
|
UPDATE ${model.tableName} SET del_flag = 'Y'
|
|
UPDATE ${model.tableName} SET del_flag = 'Y'
|
|
|
- <where>
|
|
|
|
|
- AND id = #{id}
|
|
|
|
|
- </where>
|
|
|
|
|
|
|
+ where
|
|
|
|
|
+ <if test="id != null and !"".equals(id)">
|
|
|
|
|
+ id = #{id,jdbcType=INTEGER}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="idStr != null and !"".equals(idStr)">
|
|
|
|
|
+ id in (${esc.d}{idStr})
|
|
|
|
|
+ </if>
|
|
|
</update>
|
|
</update>
|
|
|
<select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.${model.className}">
|
|
<select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.${model.className}">
|
|
|
select <include refid="Base_Column_List"/> from ${model.tableName}
|
|
select <include refid="Base_Column_List"/> from ${model.tableName}
|