- financial/GetStoreBills

This commit is contained in:
gazebo
2018-10-24 11:45:37 +08:00
parent 5811d3cb68
commit 7b6c9fd73a
4 changed files with 40 additions and 5 deletions

View File

@@ -91,3 +91,16 @@ func SendFilesToStores(ctx *jxcontext.Context, files []*multipart.FileHeader, is
}
return task.ID, err
}
func GetStoreBills(ctx *jxcontext.Context, storeID int) (bills []*legacymodel.StoreBill, err error) {
db := dao.GetDB()
if err = dao.GetRows(db, &bills, `
SELECT *
FROM store_bill
WHERE store_id = ?
ORDER BY date DESC
`, storeID); err != nil {
return nil, err
}
return bills, err
}