From 55385ab563c413bfa6c0d7aaa0f231a825b866f5 Mon Sep 17 00:00:00 2001 From: gazebo Date: Wed, 23 Jan 2019 19:59:57 +0800 Subject: [PATCH] - change SendFilesToStores.title to optional. --- business/jxutils/weixinmsg/weixinmsg.go | 3 +++ controllers/financial.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/business/jxutils/weixinmsg/weixinmsg.go b/business/jxutils/weixinmsg/weixinmsg.go index e4795bb45..f12f22062 100644 --- a/business/jxutils/weixinmsg/weixinmsg.go +++ b/business/jxutils/weixinmsg/weixinmsg.go @@ -303,6 +303,9 @@ func PushJDBadCommentToWeiXin(comment *legacymodel.JxBadComments) (err error) { func NotifySaleBill(storeID int, title, fileURL string) (err error) { globals.SugarLogger.Debugf("NotifySaleBill storeID:%d, fileURL:%s", storeID, fileURL) + if title == "" { + title = "当期账单" + } data := map[string]interface{}{ "first": map[string]interface{}{ "value": "新的账单上传成功!", diff --git a/controllers/financial.go b/controllers/financial.go index 8ccb7bd91..83bc10b96 100644 --- a/controllers/financial.go +++ b/controllers/financial.go @@ -18,7 +18,7 @@ type FinancialController struct { // @Title 发送文件给门店 // @Description 发送文件给门店,调用GET方法得到浏览器端参考的上传HTML实现,userfiles // @Param token header string true "认证token" -// @Param title query string true "消息标题" +// @Param title query string false "消息标题" // @Param isAsync query bool false "是否异步,缺省是同步" // @Success 200 {object} controllers.CallResult // @Failure 200 {object} controllers.CallResult