app主题网站增加关联关系
This commit is contained in:
@@ -23,6 +23,7 @@ import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.WebsiteDomainTopic;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
@@ -94,4 +95,7 @@ public interface AppCfgDao {
|
||||
//修改配置状态
|
||||
public void updateCfgValid(BaseCfg entity);
|
||||
public void deleteSubscribeIdCfg(AppPolicyCfg entity);
|
||||
//域名关联表操作
|
||||
public List<WebsiteDomainTopic> getDomainDict(WebsiteDomainTopic websiteDomainTopic);
|
||||
public void saveDomainDict(WebsiteDomainTopic websiteDomainTopic);
|
||||
}
|
||||
|
||||
@@ -140,8 +140,8 @@
|
||||
<resultMap id="AppTopicDomainCfgMap" type="com.nis.domain.configuration.AppTopicDomainCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="spec_service_id" property="specServiceId" jdbcType="INTEGER" />
|
||||
<result column="topic" property="topic" jdbcType="VARCHAR" />
|
||||
<result column="behav_code" property="behavCode" jdbcType="INTEGER" />
|
||||
<result column="topic_id" property="topicId" jdbcType="BIGINT" />
|
||||
<result column="website_service_id" property="websiteServiceId" jdbcType="BIGINT" />
|
||||
<result column="domain" property="domain" jdbcType="VARCHAR" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
@@ -357,7 +357,19 @@
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="do_log" property="doLog" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<resultMap id="WebsiteDomainTopicMap" type="com.nis.domain.configuration.WebsiteDomainTopic" >
|
||||
<id column="id" property="id" jdbcType="BIGINT" />
|
||||
<result column="website_service_id" property="websiteServiceId" jdbcType="BIGINT" />
|
||||
<result column="domain" property="domain" jdbcType="VARCHAR" />
|
||||
<result column="topic_id" property="topicId" jdbcType="BIGINT" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<sql id="WebsiteDomainTopic_Column">
|
||||
id,website_service_id websiteServiceId,domain,topic_id topicId,create_time createTime,creator_id creatorId,is_valid isValid
|
||||
</sql>
|
||||
<sql id="AppTcpCfg_Column" >
|
||||
r.CFG_ID, r.APP_CODE,r.BEHAV_CODE,r.SPEC_SERVICE_ID,r.CFG_DESC,r.ACTION,r.IS_VALID,r.IS_AUDIT,
|
||||
r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME,
|
||||
@@ -402,7 +414,7 @@
|
||||
</sql>
|
||||
|
||||
<sql id="AppTopicDomainCfg_Column" >
|
||||
r.CFG_ID, r.TOPIC,r.BEHAV_CODE,r.SPEC_SERVICE_ID,r.CFG_DESC,r.ACTION,r.IS_VALID,r.IS_AUDIT,
|
||||
r.CFG_ID, r.TOPIC_ID,r.WEBSITE_SERVICE_ID,r.SPEC_SERVICE_ID,r.CFG_DESC,r.ACTION,r.IS_VALID,r.IS_AUDIT,
|
||||
r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME,
|
||||
r.SERVICE_ID,r.REQUEST_ID,r.COMPILE_ID,r.IS_AREA_EFFECTIVE,r.CLASSIFY,
|
||||
r.ATTRIBUTE,r.LABLE,r.AREA_EFFECTIVE_IDS,r.RATELIMIT,r.FUNCTION_ID,r.CFG_TYPE,r.CFG_REGION_CODE,
|
||||
@@ -436,7 +448,7 @@
|
||||
#{cfgType,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER}
|
||||
</sql>
|
||||
<sql id="AppTopicCommonCfg_Value_List" >
|
||||
#{topic,jdbcType=VARCHAR},#{behavCode,jdbcType=INTEGER},#{specServiceId,jdbcType=INTEGER},
|
||||
#{topicId,jdbcType=BIGINT},#{websiteServiceId,jdbcType=BIGINT},#{specServiceId,jdbcType=INTEGER},
|
||||
#{cfgDesc,jdbcType=VARCHAR},#{action,jdbcType=INTEGER},
|
||||
#{isValid,jdbcType=INTEGER},#{isAudit,jdbcType=INTEGER},#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},#{editorId,jdbcType=INTEGER},#{editTime,jdbcType=TIMESTAMP},
|
||||
@@ -1728,7 +1740,7 @@
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into app_topic_domain_cfg (
|
||||
TOPIC,BEHAV_CODE,SPEC_SERVICE_ID,CFG_DESC,ACTION,IS_VALID,IS_AUDIT,
|
||||
TOPIC_ID,WEBSITE_SERVICE_ID,SPEC_SERVICE_ID,CFG_DESC,ACTION,IS_VALID,IS_AUDIT,
|
||||
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
||||
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
||||
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,RATELIMIT,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE,
|
||||
@@ -2306,11 +2318,11 @@
|
||||
<if test="cfgDesc != null and cfgDesc != ''" >
|
||||
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="topic != null">
|
||||
TOPIC = #{topic,jdbcType=VARCHAR},
|
||||
<if test="topicId != null">
|
||||
TOPIC_ID = #{topicId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="behavCode != null">
|
||||
BEHAV_CODE = #{behavCode,jdbcType=INTEGER},
|
||||
<if test="websiteServiceId != null">
|
||||
WEBSITE_SERVICE_ID = #{websiteServiceId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="specServiceId != null">
|
||||
SPEC_SERVICE_ID = #{specServiceId,jdbcType=INTEGER},
|
||||
@@ -2839,4 +2851,53 @@
|
||||
<include refid="IpCfg_Column" />
|
||||
FROM ip_port_cfg a where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</select>
|
||||
|
||||
<!-- 查询域名关联表 -->
|
||||
<select id="getDomainDict" resultMap="WebsiteDomainTopicMap" parameterType="com.nis.domain.configuration.WebsiteDomainTopic" >
|
||||
select
|
||||
<include refid="WebsiteDomainTopic_Column"/>
|
||||
from website_domain_topic r
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="id != null">
|
||||
AND r.id=#{id,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="websiteServiceId != null">
|
||||
AND r.website_service_id=#{websiteServiceId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="topicId != null">
|
||||
AND r.topic_id=#{topicId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="domain != null and domain !=''">
|
||||
AND r.domain=#{domain,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid == null">
|
||||
AND r.IS_VALID != -1
|
||||
</if>
|
||||
<if test="createTime != null and createTime != ''">
|
||||
AND r.CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
<!-- ${sqlMap.dsf} -->
|
||||
</trim>
|
||||
</select>
|
||||
<!--saveDomainDict -->
|
||||
<insert id="saveDomainDict" parameterType="com.nis.domain.configuration.WebsiteDomainTopic" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="id">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into website_domain_topic (
|
||||
website_service_id,domain,topic_id,create_time,creator_id,is_valid
|
||||
)values (
|
||||
#{websiteServiceId},
|
||||
#{domain},
|
||||
#{topicId},
|
||||
#{createTime},
|
||||
#{creatorId},
|
||||
#{isValid}
|
||||
)
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user