客服模块
This commit is contained in:
@@ -5,18 +5,22 @@ server:
|
||||
# context-path: /urban-lifeline/workcase # 微服务架构下,context-path由Gateway管理
|
||||
|
||||
# ================== Auth ====================
|
||||
urban-lifeline:
|
||||
auth:
|
||||
enabled: true
|
||||
whitelist:
|
||||
- /swagger-ui/**
|
||||
- /swagger-ui.html
|
||||
- /v3/api-docs/**
|
||||
- /webjars/**
|
||||
- /favicon.ico
|
||||
- /error
|
||||
- /actuator/health
|
||||
- /actuator/info
|
||||
auth:
|
||||
enabled: true
|
||||
gate-way: true
|
||||
whitelist:
|
||||
- /swagger-ui/**
|
||||
- /swagger-ui.html
|
||||
- /v3/api-docs/**
|
||||
- /webjars/**
|
||||
- /favicon.ico
|
||||
- /error
|
||||
- /actuator/health
|
||||
- /actuator/info
|
||||
# 微信客服回调接口(无需鉴权)
|
||||
- /workcase/chat/kefu/callback
|
||||
# CRM回调接口(无需鉴权,但需签名验证)
|
||||
- /workcase/receive/crm
|
||||
|
||||
security:
|
||||
aes:
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.xyzh.workcase.mapper.TbWordCloudMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="org.xyzh.api.workcase.dto.TbWordCloudDTO">
|
||||
<id column="word_id" property="wordId" jdbcType="VARCHAR"/>
|
||||
<result column="word" property="word" jdbcType="VARCHAR"/>
|
||||
<result column="frequency" property="frequency" jdbcType="VARCHAR"/>
|
||||
<result column="category" property="category" jdbcType="VARCHAR"/>
|
||||
<result column="stat_date" property="statDate" jdbcType="VARCHAR"/>
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
word_id, word, frequency, category, stat_date, create_time, update_time
|
||||
</sql>
|
||||
|
||||
<insert id="insertWordCloud" parameterType="org.xyzh.api.workcase.dto.TbWordCloudDTO">
|
||||
INSERT INTO workcase.tb_word_cloud (
|
||||
word_id, word, stat_date
|
||||
<if test="frequency != null">, frequency</if>
|
||||
<if test="category != null">, category</if>
|
||||
) VALUES (
|
||||
#{wordId}, #{word}, #{statDate}::date
|
||||
<if test="frequency != null">, #{frequency}</if>
|
||||
<if test="category != null">, #{category}</if>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateWordCloud" parameterType="org.xyzh.api.workcase.dto.TbWordCloudDTO">
|
||||
UPDATE workcase.tb_word_cloud
|
||||
<set>
|
||||
<if test="word != null and word != ''">word = #{word},</if>
|
||||
<if test="frequency != null">frequency = #{frequency},</if>
|
||||
<if test="category != null">category = #{category},</if>
|
||||
update_time = now()
|
||||
</set>
|
||||
WHERE word_id = #{wordId}
|
||||
</update>
|
||||
|
||||
<select id="selectWordCloudById" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM workcase.tb_word_cloud
|
||||
WHERE word_id = #{wordId}
|
||||
</select>
|
||||
|
||||
<select id="selectWordCloudOne" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM workcase.tb_word_cloud
|
||||
<where>
|
||||
<if test="filter.wordId != null and filter.wordId != ''">
|
||||
AND word_id = #{filter.wordId}
|
||||
</if>
|
||||
<if test="filter.word != null and filter.word != ''">
|
||||
AND word = #{filter.word}
|
||||
</if>
|
||||
<if test="filter.category != null and filter.category != ''">
|
||||
AND category = #{filter.category}
|
||||
</if>
|
||||
<if test="filter.statDate != null and filter.statDate != ''">
|
||||
AND stat_date = #{filter.statDate}::date
|
||||
</if>
|
||||
</where>
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="selectWordCloudList" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM workcase.tb_word_cloud
|
||||
<where>
|
||||
<if test="filter.wordId != null and filter.wordId != ''">
|
||||
AND word_id = #{filter.wordId}
|
||||
</if>
|
||||
<if test="filter.word != null and filter.word != ''">
|
||||
AND word LIKE CONCAT('%', #{filter.word}, '%')
|
||||
</if>
|
||||
<if test="filter.category != null and filter.category != ''">
|
||||
AND category = #{filter.category}
|
||||
</if>
|
||||
<if test="filter.statDate != null and filter.statDate != ''">
|
||||
AND stat_date = #{filter.statDate}::date
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY frequency DESC, create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectWordCloudPage" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM workcase.tb_word_cloud
|
||||
<where>
|
||||
<if test="filter.wordId != null and filter.wordId != ''">
|
||||
AND word_id = #{filter.wordId}
|
||||
</if>
|
||||
<if test="filter.word != null and filter.word != ''">
|
||||
AND word LIKE CONCAT('%', #{filter.word}, '%')
|
||||
</if>
|
||||
<if test="filter.category != null and filter.category != ''">
|
||||
AND category = #{filter.category}
|
||||
</if>
|
||||
<if test="filter.statDate != null and filter.statDate != ''">
|
||||
AND stat_date = #{filter.statDate}::date
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY frequency DESC, create_time DESC
|
||||
LIMIT #{pageParam.pageSize} OFFSET #{pageParam.offset}
|
||||
</select>
|
||||
|
||||
<select id="countWordClouds" resultType="long">
|
||||
SELECT COUNT(*)
|
||||
FROM workcase.tb_word_cloud
|
||||
<where>
|
||||
<if test="filter.wordId != null and filter.wordId != ''">
|
||||
AND word_id = #{filter.wordId}
|
||||
</if>
|
||||
<if test="filter.word != null and filter.word != ''">
|
||||
AND word LIKE CONCAT('%', #{filter.word}, '%')
|
||||
</if>
|
||||
<if test="filter.category != null and filter.category != ''">
|
||||
AND category = #{filter.category}
|
||||
</if>
|
||||
<if test="filter.statDate != null and filter.statDate != ''">
|
||||
AND stat_date = #{filter.statDate}::date
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<update id="incrementFrequency">
|
||||
UPDATE workcase.tb_word_cloud
|
||||
SET frequency = frequency + #{count}, update_time = now()
|
||||
WHERE word_id = #{wordId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user