mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-21 02:04:26 +08:00
format code
This commit is contained in:
@@ -88,7 +88,7 @@ func (s *TransactionService) GetTransactionsByMaxTime(uid int64, maxTime int64,
|
|||||||
|
|
||||||
if keyword != "" {
|
if keyword != "" {
|
||||||
condition = condition + " AND comment LIKE ?"
|
condition = condition + " AND comment LIKE ?"
|
||||||
conditionParams = append(conditionParams, "%%" + keyword + "%%")
|
conditionParams = append(conditionParams, "%%"+keyword+"%%")
|
||||||
}
|
}
|
||||||
|
|
||||||
if maxTime > 0 {
|
if maxTime > 0 {
|
||||||
@@ -174,7 +174,7 @@ func (s *TransactionService) GetTransactionsInMonthByPage(uid int64, year int, m
|
|||||||
|
|
||||||
if keyword != "" {
|
if keyword != "" {
|
||||||
condition = condition + " AND comment LIKE ?"
|
condition = condition + " AND comment LIKE ?"
|
||||||
conditionParams = append(conditionParams, "%%" + keyword + "%%")
|
conditionParams = append(conditionParams, "%%"+keyword+"%%")
|
||||||
}
|
}
|
||||||
|
|
||||||
err = s.UserDataDB(uid).Where(condition, conditionParams...).Limit(count, count*(page-1)).OrderBy("transaction_time desc").Find(&transactions)
|
err = s.UserDataDB(uid).Where(condition, conditionParams...).Limit(count, count*(page-1)).OrderBy("transaction_time desc").Find(&transactions)
|
||||||
|
|||||||
+1
-1
@@ -22,7 +22,7 @@ func PrintJsonSuccessResult(c *core.Context, result interface{}) {
|
|||||||
// PrintDataSuccessResult writes success response in custom content type to current http context
|
// PrintDataSuccessResult writes success response in custom content type to current http context
|
||||||
func PrintDataSuccessResult(c *core.Context, contentType string, fileName string, result []byte) {
|
func PrintDataSuccessResult(c *core.Context, contentType string, fileName string, result []byte) {
|
||||||
if fileName != "" {
|
if fileName != "" {
|
||||||
c.Header("Content-Disposition", "attachment;filename=" + fileName)
|
c.Header("Content-Disposition", "attachment;filename="+fileName)
|
||||||
}
|
}
|
||||||
|
|
||||||
c.Data(http.StatusOK, contentType, result)
|
c.Data(http.StatusOK, contentType, result)
|
||||||
|
|||||||
Reference in New Issue
Block a user