(1)app策略修改dao.xml,update操作除了creatorId,creatorTime,editorId,editTime,auditor,aduitTime之外,去掉if

null的判断
(2)app策略,基础协议页面ratelimit字段提交表单时如果atction不为限速,置空
This commit is contained in:
wangxin
2018-07-25 12:41:54 +08:00
parent b670ef811f
commit fe2c7df204
3 changed files with 61 additions and 53 deletions

View File

@@ -1180,96 +1180,96 @@
update app_policy_cfg
<set >
<trim suffixOverrides=",">
<if test="cfgDesc != null and cfgDesc != ''" >
<!-- <if test="cfgDesc != null and cfgDesc != ''" > -->
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
</if>
<if test="appCode != null">
<!-- </if>
<if test="appCode != null"> -->
APP_CODE = #{appCode,jdbcType=INTEGER},
</if>
<if test="behavCode != null">
<!-- </if>
<if test="behavCode != null"> -->
BEHAV_CODE = #{behavCode,jdbcType=INTEGER},
</if>
<if test="specServiceId != null">
<!-- </if>
<if test="specServiceId != null"> -->
SPEC_SERVICE_ID = #{specServiceId,jdbcType=INTEGER},
</if>
<if test="action != null" >
<!-- </if>
<if test="action != null" > -->
action = #{action,jdbcType=INTEGER},
</if>
<if test="isValid != null" >
<!-- </if>
<if test="isValid != null" > -->
is_valid = #{isValid,jdbcType=INTEGER},
</if>
<if test="isAudit != null" >
<!-- </if>
<if test="isAudit != null" > -->
is_audit = #{isAudit,jdbcType=INTEGER},
</if>
<!-- </if> -->
<if test="creatorId != null" >
creator_id = #{creatorId,jdbcType=INTEGER},
</if>
</if>
<if test="createTime != null and createTime != ''" >
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
</if>
<if test="editorId != null" >
editor_id = #{editorId,jdbcType=INTEGER},
</if>
<if test="editTime != null and editTime != ''" >
edit_time = #{editTime,jdbcType=TIMESTAMP},
</if>
<if test="auditorId != null" >
<if test="auditorId != null" > -->
auditor_id = #{auditorId,jdbcType=INTEGER},
</if>
<if test="auditTime != null and auditTime != ''" >
</if>
<if test="auditTime != null and auditTime != ''" >
audit_time = #{auditTime,jdbcType=TIMESTAMP},
</if>
<if test="serviceId != null" >
<!-- <if test="serviceId != null" > -->
service_id = #{serviceId,jdbcType=INTEGER},
</if>
<if test="requestId != null" >
<!-- </if>
<if test="requestId != null" > -->
request_id = #{requestId,jdbcType=INTEGER},
</if>
<if test="compileId != null" >
<!-- </if>
<if test="compileId != null" > -->
compile_id = #{compileId,jdbcType=INTEGER},
</if>
<if test="isAreaEffective != null" >
<!-- </if>
<if test="isAreaEffective != null" > -->
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
</if>
<if test="classify != null and classify != ''" >
<!-- </if>
<if test="classify != null and classify != ''" > -->
classify = #{classify,jdbcType=VARCHAR},
</if>
<if test="attribute != null and attribute != ''" >
<!-- </if>
<if test="attribute != null and attribute != ''" > -->
attribute = #{attribute,jdbcType=VARCHAR},
</if>
<if test="lable != null and lable != ''" >
<!-- </if>
<if test="lable != null and lable != ''" > -->
lable = #{lable,jdbcType=VARCHAR},
</if>
<if test="areaEffectiveIds != null" >
<!-- </if>
<if test="areaEffectiveIds != null" > -->
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
</if>
<if test="functionId != null" >
<!-- </if>
<if test="functionId != null" > -->
function_id = #{functionId,jdbcType=INTEGER},
</if>
<if test="ratelimit != null">
<!-- </if>
<if test="ratelimit != null"> -->
RATELIMIT=#{ratelimit,jdbcType=INTEGER},
</if>
<if test="cfgRegionCode != null">
<!-- </if>
<if test="cfgRegionCode != null"> -->
CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER},
</if>
<if test="cfgType != null and cfgType != ''">
<!-- </if>
<if test="cfgType != null and cfgType != ''"> -->
CFG_TYPE =#{cfgType,jdbcType=VARCHAR},
</if>
<if test="userRegion1 != null and userRegion1 != ''">
<!-- </if>
<if test="userRegion1 != null and userRegion1 != ''"> -->
USER_REGION1 =#{userRegion1,jdbcType=VARCHAR},
</if>
<if test="userRegion2 != null and userRegion2 != ''">
<!-- </if>
<if test="userRegion2 != null and userRegion2 != ''"> -->
USER_REGION2 =#{userRegion2,jdbcType=VARCHAR},
</if>
<if test="userRegion3 != null and userRegion3 != ''">
<!-- </if>
<if test="userRegion3 != null and userRegion3 != ''"> -->
USER_REGION1 =#{userRegion3,jdbcType=VARCHAR},
</if>
<if test="userRegion4 != null and userRegion4 != ''">
<!-- </if>
<if test="userRegion4 != null and userRegion4 != ''"> -->
USER_REGION1 =#{userRegion4,jdbcType=VARCHAR},
</if>
<if test="userRegion5 != null and userRegion5 != ''">
<!-- </if>
<if test="userRegion5 != null and userRegion5 != ''"> -->
USER_REGION1 =#{userRegion5,jdbcType=VARCHAR},
</if>
<!-- </if> -->
</trim>
</set>
where cfg_id = #{cfgId,jdbcType=BIGINT}

View File

@@ -53,6 +53,9 @@ $(function(){
if($("[name='behavCode']")&&$("[name='behavCode']").val()!=""){
$("input[name$='exprType']").val(1);
}
if($("input[name='ratelimit']").is(":hidden")){
$("input[name='ratelimit']").val("");
}
/* $("#appCode").val($("#specServiceIdId").val()); */
loading('onloading...');
form.submit();
@@ -190,12 +193,14 @@ var delContent = function(contentClassName, addBtnClassName) {
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><spring:message code="behaviour_type"/></label>
<div class="col-md-6" id="behaviour">
<select name="behavCode" data-live-search="true" class="selectpicker form-control">
<option value=""><spring:message code="select"/></option>
</select>
</div>
</div>
</div>
</div>
<div class="row">

View File

@@ -53,6 +53,9 @@ $(function(){
if($("[name='behavCode']")&&$("[name='behavCode']").val()!=""){
$("input[name$='exprType']").val(1);
}
if($("input[name='ratelimit']").is(":hidden")){
$("input[name='ratelimit']").val("");
}
/* $("#appCode").val($("#specServiceIdId").val()); */
loading('onloading...');
form.submit();