|
@@ -16,6 +16,11 @@ type WechatArticleOp struct {
|
|
// @param source
|
|
// @param source
|
|
// @return bool
|
|
// @return bool
|
|
func AddWechatArticleOpToCache(wechatPlatformId int, source string) bool {
|
|
func AddWechatArticleOpToCache(wechatPlatformId int, source string) bool {
|
|
|
|
+ // 如果不在发布和调试模式,那么就不加入缓存
|
|
|
|
+ if !utils.InArrayByStr([]string{utils.BusinessCodeRelease, utils.BusinessCodeDebug}, utils.BusinessCode) {
|
|
|
|
+ return true
|
|
|
|
+ }
|
|
|
|
+
|
|
record := new(WechatArticleOp)
|
|
record := new(WechatArticleOp)
|
|
record.Source = source
|
|
record.Source = source
|
|
record.WechatPlatformId = wechatPlatformId
|
|
record.WechatPlatformId = wechatPlatformId
|
|
@@ -37,6 +42,10 @@ func AddWechatArticleOpToCache(wechatPlatformId int, source string) bool {
|
|
// @param source
|
|
// @param source
|
|
// @return bool
|
|
// @return bool
|
|
func AddWechatArticleLlmOpToCache(wechatPlatformId int, source string) bool {
|
|
func AddWechatArticleLlmOpToCache(wechatPlatformId int, source string) bool {
|
|
|
|
+ // 如果不在发布和调试模式,那么就不加入缓存
|
|
|
|
+ if !utils.InArrayByStr([]string{utils.BusinessCodeRelease, utils.BusinessCodeDebug}, utils.BusinessCode) {
|
|
|
|
+ return true
|
|
|
|
+ }
|
|
record := new(WechatArticleOp)
|
|
record := new(WechatArticleOp)
|
|
record.Source = source
|
|
record.Source = source
|
|
record.WechatPlatformId = wechatPlatformId
|
|
record.WechatPlatformId = wechatPlatformId
|