|
@@ -31,7 +31,7 @@
|
|
|
</delete>
|
|
|
<select id="getReplyList" resultType="com.caimei365.manager.entity.wechat.WechatReply">
|
|
|
SELECT a.cm_wxparamID AS id, a.keyword, a.title, a.responsetype AS responseType,
|
|
|
- a.msgtype AS msgType, a.relateID AS relateId, a.wx_type AS wxType, IFNULL(a.updatee_date,a.create_date) AS updateTime
|
|
|
+ a.msgtype AS msgType, a.relateID AS relateId, a.wx_type AS wxType, IFNULL(a.update_date,a.create_date) AS updateTime
|
|
|
FROM wechat_reply a
|
|
|
<where>
|
|
|
<if test=" wxType != null and wxType != ''">
|
|
@@ -51,12 +51,12 @@
|
|
|
</select>
|
|
|
<select id="getWechatReply" resultType="com.caimei365.manager.entity.wechat.WechatReply">
|
|
|
SELECT a.cm_wxparamID AS id, a.keyword, a.title, a.responsetype AS responseType,
|
|
|
- a.msgtype AS msgType, a.relateID AS relateId, a.wx_type AS wxType, IFNULL(a.updatee_date,a.create_date) AS updateTime
|
|
|
+ a.msgtype AS msgType, a.relateID AS relateId, a.wx_type AS wxType, IFNULL(a.update_date,a.create_date) AS updateTime
|
|
|
FROM wechat_reply a WHERE a.cm_wxparamID = #{id}
|
|
|
</select>
|
|
|
<update id="updateWechatReply">
|
|
|
UPDATE wechat_reply SET keyword = #{keyword}, title = #{title}, responsetype = #{responseType},
|
|
|
- msgtype = #{msgType}, relateID = #{relateId}, update_by = #{userId}, updatee_date = NOW()
|
|
|
+ msgtype = #{msgType}, relateID = #{relateId}, update_by = #{userId}, update_date = NOW()
|
|
|
WHERE cm_wxparamID = #{id}
|
|
|
</update>
|
|
|
<insert id="insertWechatReply" keyProperty="id" useGeneratedKeys="true">
|
|
@@ -68,7 +68,7 @@
|
|
|
</delete>
|
|
|
<select id="getTextList" resultType="com.caimei365.manager.entity.wechat.WechatText">
|
|
|
SELECT a.cm_wxtextID AS id, a.title, a.content, a.wx_type AS wxType,
|
|
|
- IFNULL(a.updatee_date,a.create_date) AS updateTime
|
|
|
+ IFNULL(a.update_date,a.create_date) AS updateTime
|
|
|
FROM wechat_text a
|
|
|
<where>
|
|
|
<if test=" wxType != null and wxType != ''">
|
|
@@ -82,11 +82,11 @@
|
|
|
</select>
|
|
|
<select id="getWechatText" resultType="com.caimei365.manager.entity.wechat.WechatText">
|
|
|
SELECT a.cm_wxtextID AS id, a.title, a.content, a.wx_type AS wxType,
|
|
|
- IFNULL(a.updatee_date,a.create_date) AS updateTime
|
|
|
+ IFNULL(a.update_date,a.create_date) AS updateTime
|
|
|
FROM wechat_text a WHERE a.cm_wxtextID = #{id}
|
|
|
</select>
|
|
|
<update id="updateWechatText">
|
|
|
- UPDATE wechat_text SET title = #{title}, content = #{content}, wx_type = #{wxType}, update_by = #{userId}, updatee_date = NOW()
|
|
|
+ UPDATE wechat_text SET title = #{title}, content = #{content}, wx_type = #{wxType}, update_by = #{userId}, update_date = NOW()
|
|
|
WHERE cm_wxtextID = #{id}
|
|
|
</update>
|
|
|
<insert id="insertWechatText" keyProperty="id" useGeneratedKeys="true">
|
|
@@ -96,4 +96,53 @@
|
|
|
<delete id="deleteWechatText">
|
|
|
DELETE FROM wechat_text WHERE cm_wxtextID = #{id}
|
|
|
</delete>
|
|
|
+ <select id="getArticleList" resultType="com.caimei365.manager.entity.wechat.WechatArticle">
|
|
|
+ SELECT a.cm_wxarticleID AS id, a.title, a.wx_type AS wxType,
|
|
|
+ IFNULL(a.update_date,a.create_date) AS updateTime
|
|
|
+ FROM wechat_article a
|
|
|
+ <where>
|
|
|
+ <if test=" wxType != null and wxType != ''">
|
|
|
+ AND a.wx_type =#{wxType}
|
|
|
+ </if>
|
|
|
+ <if test="title != null and title != ''">
|
|
|
+ AND a.title LIKE concat('%',#{title},'%')
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ ORDER BY updateTime DESC
|
|
|
+ </select>
|
|
|
+ <select id="getWechatArticle" resultType="com.caimei365.manager.entity.wechat.WechatArticle">
|
|
|
+ SELECT a.cm_wxarticleID AS id, a.title, a.wx_type AS wxType,
|
|
|
+ IFNULL(a.update_date,a.create_date) AS updateTime
|
|
|
+ FROM wechat_article a WHERE a.cm_wxarticleID = #{id}
|
|
|
+ </select>
|
|
|
+ <select id="getArticleDetailList" resultType="com.caimei365.manager.entity.wechat.WechatArticleDetail">
|
|
|
+ SELECT a.cm_wxarticledtlID AS id,a.cm_wxarticleID AS articleId, a.title, a.linkurl AS linkUrl, a.picurl AS pictureUrl
|
|
|
+ FROM wechat_article_detail a WHERE a.cm_wxarticleID = #{articleId}
|
|
|
+ </select>
|
|
|
+ <select id="getWechatArticleDetail" resultType="com.caimei365.manager.entity.wechat.WechatArticleDetail">
|
|
|
+ SELECT a.cm_wxarticledtlID AS id,a.cm_wxarticleID AS articleId, a.title, a.linkurl AS linkUrl, a.picurl AS pictureUrl
|
|
|
+ FROM wechat_article_detail a WHERE a.cm_wxarticledtlID = #{id}
|
|
|
+ </select>
|
|
|
+ <update id="updateWechatArticle">
|
|
|
+ UPDATE wechat_article SET title = #{title}, wx_type = #{wxType}, update_by = #{userId}, update_date = NOW()
|
|
|
+ WHERE cm_wxarticleID = #{id}
|
|
|
+ </update>
|
|
|
+ <update id="updateWechatArticleDetail">
|
|
|
+ UPDATE wechat_article_detail SET title = #{title}, linkurl = #{linkUrl}, picurl = #{pictureUrl}, update_by = #{userId}, update_date = NOW()
|
|
|
+ WHERE cm_wxarticledtlID = #{id}
|
|
|
+ </update>
|
|
|
+ <insert id="insertWechatArticle">
|
|
|
+ INSERT INTO wechat_article(title, wx_type, create_by, create_date)
|
|
|
+ VALUES (#{title}, #{wxType}, #{userId}, NOW())
|
|
|
+ </insert>
|
|
|
+ <insert id="insertWechatArticleDetail">
|
|
|
+ INSERT INTO wechat_article_detail(cm_wxarticleID, title, linkurl, picurl, create_by, create_date)
|
|
|
+ VALUES (#{articleId}, #{title}, #{linkUrl},#{pictureUrl}, #{userId}, NOW())
|
|
|
+ </insert>
|
|
|
+ <delete id="deleteWechatArticle">
|
|
|
+ DELETE FROM wechat_article WHERE cm_wxarticleID = #{id}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteWechatArticleDetail">
|
|
|
+ DELETE FROM wechat_article_detail WHERE cm_wxarticleID = #{articleId}
|
|
|
+ </delete>
|
|
|
</mapper>
|