|
@@ -11,8 +11,7 @@
|
|
|
<select id="getWechatMenu" resultType="com.caimei365.manager.entity.wechat.WechatMenu">
|
|
|
SELECT a.id, a.parentId, a.parentIds, a.`name`, a.sort, a.type, a.`key`,
|
|
|
a.url, a.mediaId, a.appid, a.pagepath AS pagePath, a.wxType
|
|
|
- FROM wechat_menu a
|
|
|
- WHERE a.id = #{id}
|
|
|
+ FROM wechat_menu a WHERE a.id = #{id}
|
|
|
</select>
|
|
|
<select id="countChildByParentId" resultType="java.lang.Integer">
|
|
|
SELECT IFNULL(COUNT(*),0) FROM wechat_menu WHERE parentId = #{parentId}
|
|
@@ -20,7 +19,7 @@
|
|
|
<update id="updateWechatMenu">
|
|
|
UPDATE wechat_menu SET parentId = #{parentId}, parentIds = #{parentIds}, name = #{name}, sort = #{sort},
|
|
|
type = #{type}, `key` = #{key}, url = #{url}, mediaId = #{mediaId}, appid = #{appid},
|
|
|
- pagepath = #{pagePath}, wxType = #{wxType}, updateBy = #{userId}, updateDate = NOW()
|
|
|
+ pagepath = #{pagePath}, updateBy = #{userId}, updateDate = NOW()
|
|
|
WHERE id = #{id}
|
|
|
</update>
|
|
|
<insert id="insertWechatMenu" keyProperty="id" useGeneratedKeys="true">
|
|
@@ -30,4 +29,41 @@
|
|
|
<delete id="deleteWechatMenu">
|
|
|
DELETE FROM wechat_menu WHERE id = #{id}
|
|
|
</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
|
|
|
+ FROM wechat_reply a
|
|
|
+ <where>
|
|
|
+ <if test=" wxType != null and wxType != ''">
|
|
|
+ AND a.wx_type =#{wxType}
|
|
|
+ </if>
|
|
|
+ <if test="responseType != null and responseType != ''">
|
|
|
+ AND a.responsetype = #{responseType}
|
|
|
+ </if>
|
|
|
+ <if test="msgType != null and msgType != ''">
|
|
|
+ AND a.msgtype = #{msgType}
|
|
|
+ </if>
|
|
|
+ <if test="title != null and title != ''">
|
|
|
+ AND a.title LIKE concat('%',#{title},'%')
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ ORDER BY a.update_date DESC
|
|
|
+ </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
|
|
|
+ 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()
|
|
|
+ WHERE cm_wxparamID = #{id}
|
|
|
+ </update>
|
|
|
+ <insert id="insertWechatReply" keyProperty="id" useGeneratedKeys="true">
|
|
|
+ INSERT INTO wechat_reply(keyword, title, responsetype, msgtype, relateID, wxType, create_by, create_date)
|
|
|
+ VALUES (#{keyword}, #{title}, #{responseType}, #{msgType}, #{relateId}, #{wxType}, #{userId}, NOW())
|
|
|
+ </insert>
|
|
|
+ <delete id="deleteWechatReply">
|
|
|
+ DELETE FROM wechat_reply WHERE cm_wxparamID = #{id}
|
|
|
+ </delete>
|
|
|
</mapper>
|