bilifanxian
This commit is contained in:
@@ -53,6 +53,22 @@ func GetBillExpend(db *DaoDB, userID string, billType int, fromTime, toTime time
|
||||
return billExpends, err
|
||||
}
|
||||
|
||||
func GetBillIncome(db *DaoDB, jobID int) (billIncomes []*model.BillIncome, err error) {
|
||||
sql := `
|
||||
SELECT b.*
|
||||
FROM user_bill a
|
||||
LEFT JOIN bill_income b ON b.bill_id = a.bill_id
|
||||
WHERE a.deleted_at = ?
|
||||
`
|
||||
sqlParams := []interface{}{utils.DefaultTimeValue}
|
||||
if jobID != 0 {
|
||||
sql += ` AND b.job_id = ?`
|
||||
sqlParams = append(sqlParams, jobID)
|
||||
}
|
||||
err = GetRows(db, &billIncomes, sql, sqlParams)
|
||||
return billIncomes, err
|
||||
}
|
||||
|
||||
type UserBillDetail struct {
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
LastOperator string `json:"lastOperator"`
|
||||
|
||||
@@ -138,15 +138,16 @@ func (v *JobStep) TableIndex() [][]string {
|
||||
type JobOrder struct {
|
||||
ModelIDCUL
|
||||
|
||||
JobID int `orm:"column(job_id)" json:"jobID"` //任务ID
|
||||
JobOrderID int64 `orm:"column(job_order_id)" json:"jobOrderID"` //任务订单号
|
||||
UserID string `orm:"column(user_id)" json:"userID"` //接任务人ID
|
||||
Status int `json:"status"` //任务订单状态,接单,待审核,已审核,已结算等
|
||||
SubmitAuditAt time.Time `json:"submitAuditTime"` //提交审核日期
|
||||
AuditAt time.Time `json:"auditAt"` //审核日期
|
||||
Content string `josn:"content"` //任务审核内容
|
||||
Imgs string `json:"imgs"` //任务审核图片
|
||||
Comment string `json:"comment"` //审核理由
|
||||
JobID int `orm:"column(job_id)" json:"jobID"` //任务ID
|
||||
JobOrderID int64 `orm:"column(job_order_id)" json:"jobOrderID"` //任务订单号
|
||||
UserID string `orm:"column(user_id)" json:"userID"` //接任务人ID
|
||||
Status int `json:"status"` //任务订单状态,接单,待审核,已审核,已结算等
|
||||
SubmitAuditAt time.Time `json:"submitAuditTime"` //提交审核日期
|
||||
AuditAt time.Time `json:"auditAt"` //审核日期
|
||||
Content string `josn:"content"` //任务审核内容
|
||||
Imgs string `json:"imgs"` //任务审核图片
|
||||
Comment string `json:"comment"` //审核理由
|
||||
UserActualPrice int `json:"userActualPrice"` //用户订单实际支付(用户自填)
|
||||
}
|
||||
|
||||
func (v *JobOrder) TableIndex() [][]string {
|
||||
|
||||
Reference in New Issue
Block a user