|
|
@@ -36,12 +36,24 @@ func (s Service) List(req model.ListReq) ([]accountModel.SettleAccountMain, int,
|
|
|
if entity.MainUserId != 0 {
|
|
|
where += fmt.Sprintf(" AND MainUserId='%v'", entity.MainUserId)
|
|
|
}
|
|
|
+ if entity.MainUser != "" {
|
|
|
+ where += fmt.Sprintf(" AND MainUser LIKE '%%%v%%'", entity.MainUser)
|
|
|
+ }
|
|
|
if entity.AttachUserId != 0 {
|
|
|
where += fmt.Sprintf(" AND AttachUserId='%v'", entity.AttachUserId)
|
|
|
}
|
|
|
+ if entity.AttachUser != "" {
|
|
|
+ where += fmt.Sprintf(" AND AttachUser LIKE '%%%v%%'", entity.AttachUser)
|
|
|
+ }
|
|
|
if entity.InstrumentId != 0 {
|
|
|
where += fmt.Sprintf(" AND InstrumentId='%v'", entity.InstrumentId)
|
|
|
}
|
|
|
+ if entity.AppointUserId != 0 {
|
|
|
+ where += fmt.Sprintf(" AND AppointUserId='%v'", entity.AppointUserId)
|
|
|
+ }
|
|
|
+ if entity.AppointUser != "" {
|
|
|
+ where += fmt.Sprintf(" AND AppointUser LIKE '%%%v%%'", entity.AppointUser)
|
|
|
+ }
|
|
|
if entity.Status != "" {
|
|
|
where += fmt.Sprintf(" AND Status='%v'", entity.Status)
|
|
|
}
|
|
|
@@ -51,6 +63,9 @@ func (s Service) List(req model.ListReq) ([]accountModel.SettleAccountMain, int,
|
|
|
if entity.FeeType != "" {
|
|
|
where += fmt.Sprintf(" AND FeeType='%v'", entity.FeeType)
|
|
|
}
|
|
|
+ if entity.AppointStartDate != "" && entity.AppointEndDate != "" {
|
|
|
+ where += fmt.Sprintf(" AND AppointStartDate>'%v' AND AppointEndDate<'%v'", entity.AppointStartDate, entity.AppointEndDate)
|
|
|
+ }
|
|
|
}
|
|
|
entityModel = entityModel.Where(where)
|
|
|
total, err := entityModel.Count()
|