midnight2104 commented on a change in pull request #3094:
URL: https://github.com/apache/incubator-shenyu/pull/3094#discussion_r833315115
##########
File path: shenyu-admin/src/main/resources/mappers/shenyu-dict-sqlmap.xml
##########
@@ -187,66 +211,71 @@
date_updated = #{dateUpdated,jdbcType=TIMESTAMP},
</if>
</set>
- where id = #{id,jdbcType=VARCHAR}
+ WHERE id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey"
parameterType="org.apache.shenyu.admin.model.entity.ShenyuDictDO">
- update shenyu_dict
- set `type` = #{type,jdbcType=VARCHAR},
- dict_code = #{dictCode,jdbcType=VARCHAR},
- dict_name = #{dictName,jdbcType=VARCHAR},
- dict_value = #{dictValue,jdbcType=VARCHAR},
- `desc` = #{desc,jdbcType=VARCHAR},
- sort = #{sort,jdbcType=INTEGER},
- enabled = #{enabled,jdbcType=TINYINT},
- date_created = #{dateCreated,jdbcType=TIMESTAMP},
- date_updated = #{dateUpdated,jdbcType=TIMESTAMP}
- where id = #{id,jdbcType=VARCHAR}
+ UPDATE shenyu_dict
+ SET `type` = #{type,jdbcType=VARCHAR},
+ dict_code = #{dictCode,jdbcType=VARCHAR},
+ dict_name = #{dictName,jdbcType=VARCHAR},
+ dict_value = #{dictValue,jdbcType=VARCHAR},
+ `desc` = #{desc,jdbcType=VARCHAR},
+ sort = #{sort,jdbcType=INTEGER},
+ enabled = #{enabled,jdbcType=TINYINT},
+ date_created = #{dateCreated,jdbcType=TIMESTAMP},
+ date_updated = #{dateUpdated,jdbcType=TIMESTAMP}
+ WHERE id = #{id,jdbcType=VARCHAR}
</update>
<select id="countByQuery"
parameterType="org.apache.shenyu.admin.model.query.ShenyuDictQuery"
resultType="java.lang.Integer">
- select count(1)
- from shenyu_dict
+ SELECT count(1)
+ FROM shenyu_dict
<where>
<if test="type != null and type != ''">
- and `type` = #{type,jdbcType=VARCHAR}
+ AND `type` = #{type,jdbcType=VARCHAR}
</if>
<if test="dictCode != null and dictCode != ''">
- and dict_code = #{dictCode,jdbcType=VARCHAR}
+ AND dict_code = #{dictCode,jdbcType=VARCHAR}
</if>
<if test="dictName != null and dictName != ''">
- and dict_name = #{dictName,jdbcType=VARCHAR}
+ AND dict_name = #{dictName,jdbcType=VARCHAR}
</if>
</where>
</select>
<select id="selectByQuery"
parameterType="org.apache.shenyu.admin.model.query.ShenyuDictQuery"
resultMap="BaseResultMap">
- select
+ SELECT
<include refid="Base_Column_List"/>
- from shenyu_dict
+ FROM shenyu_dict
<where>
<if test="type != null and type != ''">
- and `type` = #{type,jdbcType=VARCHAR}
+ AND `type` = #{type,jdbcType=VARCHAR}
</if>
<if test="dictCode != null and dictCode != ''">
- and dict_code = #{dictCode,jdbcType=VARCHAR}
+ AND dict_code = #{dictCode,jdbcType=VARCHAR}
</if>
<if test="dictName != null and dictName != ''">
<bind name="dictNameLike" value="('%' + dictName + '%')"/>
- and dict_name like #{dictNameLike,jdbcType=VARCHAR}
+ AND dict_name LIKE #{dictNameLike,jdbcType=VARCHAR}
</if>
</where>
- order by `type`,sort asc
+ ORDER BY `type`,sort ASC
</select>
<select id="existed" resultType="java.lang.Boolean">
- select true from shenyu_dict where id = #{id} limit 1
+ SELECT true
+ FROM shenyu_dict
+ WHERE id = #{id}
+ LIMIT 1
</select>
<update id="enabled">
- update shenyu_dict set enabled = #{enabled,jdbcType=TINYINT} where id
in
+ UPDATE shenyu_dict
+ SET enabled = #{enabled,jdbcType=TINYINT}
+ WHERE id IN
<foreach item="item" index="index" collection="ids" open="("
separator="," close=")">
#{item}
</foreach>
Review comment:
good, pls check ci
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]