|
|
@@ -43,6 +43,18 @@ func (a AgentSettlementDb) AgentSettlementInsertBySession(session *xorm.Session, |
|
|
|
} |
|
|
|
return insertAffected, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (a AgentSettlementDb) GetAgentSettlementById(id int) (mediumSettlement *model.AgentSettlement, err error) { |
|
|
|
mediumSettlement = new(model.AgentSettlement) |
|
|
|
has, err := a.Db.Where("id =?", id).Get(mediumSettlement) |
|
|
|
if err != nil { |
|
|
|
return nil, zhios_order_relate_logx.Error(err) |
|
|
|
} |
|
|
|
if has == false { |
|
|
|
return nil, nil |
|
|
|
} |
|
|
|
return mediumSettlement, nil |
|
|
|
} |
|
|
|
func (a AgentSettlementDb) FindAgentSettlementList(uuid, agentId, appId, payState, state, startDate, endDate string, page, limit int) (list []model.AgentSettlement, total int64, err error) { |
|
|
|
sess := a.Db.OrderBy("start_date desc,id desc").Limit(limit, (page-1)*limit) |
|
|
|
if uuid != "" { |
|
|
|