| | |
| | | @Before("@annotation(rateLimiter)")
|
| | | public void doBefore(JoinPoint point, RateLimiter rateLimiter) throws Throwable
|
| | | {
|
| | | String key = rateLimiter.key();
|
| | | int time = rateLimiter.time();
|
| | | int count = rateLimiter.count();
|
| | |
|
| | |
| | | {
|
| | | throw new ServiceException("访问过于频繁,请稍候再试");
|
| | | }
|
| | | log.info("限制请求'{}',当前请求'{}',缓存key'{}'", count, number.intValue(), key);
|
| | | log.info("限制请求'{}',当前请求'{}',缓存key'{}'", count, number.intValue(), combineKey);
|
| | | }
|
| | | catch (ServiceException e)
|
| | | {
|
| | |
| | | <update id="updateGenTableColumn" parameterType="GenTableColumn">
|
| | | update gen_table_column
|
| | | <set>
|
| | | column_comment = #{columnComment},
|
| | | java_type = #{javaType},
|
| | | java_field = #{javaField},
|
| | | is_insert = #{isInsert},
|
| | | is_edit = #{isEdit},
|
| | | is_list = #{isList},
|
| | | is_query = #{isQuery},
|
| | | is_required = #{isRequired},
|
| | | query_type = #{queryType},
|
| | | html_type = #{htmlType},
|
| | | dict_type = #{dictType},
|
| | | sort = #{sort},
|
| | | update_by = #{updateBy},
|
| | | <if test="columnComment != null">column_comment = #{columnComment},</if>
|
| | | <if test="javaType != null">java_type = #{javaType},</if>
|
| | | <if test="javaField != null">java_field = #{javaField},</if>
|
| | | <if test="queryType != null">query_type = #{queryType},</if>
|
| | | <if test="htmlType != null">html_type = #{htmlType},</if>
|
| | | <if test="dictType != null">dict_type = #{dictType},</if>
|
| | | <if test="sort != null">sort = #{sort},</if>
|
| | | <if test="updateBy != null">update_by = #{updateBy},</if>
|
| | | update_time = sysdate()
|
| | | </set>
|
| | | where column_id = #{columnId}
|