存储所有评价
3至4星评价发送中评提醒消息
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/authz/autils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxcallback/orderman"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/autonavi"
|
||||
"git.rosy.net.cn/baseapi/platformapi/baidunavi"
|
||||
@@ -1024,12 +1025,17 @@ func DeleteStore(ctx *jxcontext.Context, storeID int) (num int64, err error) {
|
||||
// return 0, errors.New("暂不支持删除京西门店")
|
||||
}
|
||||
|
||||
// 状态是未解决,且初始是2星以下
|
||||
func TmpGetJxBadCommentsNo(ctx *jxcontext.Context, storeID int) (count int, err error) {
|
||||
db := dao.GetDB()
|
||||
var ctInfo struct {
|
||||
Ct int
|
||||
}
|
||||
if err = dao.GetRow(db, &ctInfo, "SELECT COUNT(*) ct FROM jx_bad_comments WHERE status = 0 AND jxstoreid = ?", utils.Int2Str(storeID)); err == nil {
|
||||
if err = dao.GetRow(db, &ctInfo, `
|
||||
SELECT COUNT(*) ct
|
||||
FROM jx_bad_comments
|
||||
WHERE status = ? AND jxstoreid = ? AND score <= ?
|
||||
`, orderman.COMMENT_NOT_RESOLVED, utils.Int2Str(storeID), orderman.JX_BAD_COMMENTS_MAX_LEVEL); err == nil {
|
||||
count = ctInfo.Ct
|
||||
}
|
||||
return count, err
|
||||
@@ -1055,9 +1061,10 @@ func TmpGetJxBadCommentsByStoreId(ctx *jxcontext.Context, storeIDs []int, offset
|
||||
if commentType != GET_ALL_COMMENTS_TYPE {
|
||||
sql += " AND t1.status = ?"
|
||||
if commentType == GET_BAD_COMMENTS_TYPE {
|
||||
sqlParams = append(sqlParams, 0)
|
||||
sql += " AND t1.score <= ?"
|
||||
sqlParams = append(sqlParams, orderman.COMMENT_NOT_RESOLVED, orderman.JX_BAD_COMMENTS_MAX_LEVEL)
|
||||
} else {
|
||||
sqlParams = append(sqlParams, 1)
|
||||
sqlParams = append(sqlParams, orderman.COMMENT_RESOLVED)
|
||||
}
|
||||
}
|
||||
if !utils.IsTimeZero(fromTime) {
|
||||
|
||||
Reference in New Issue
Block a user