|
|
@@ -37,7 +37,7 @@ func NewSrv(tenant string) Service {
|
|
|
}
|
|
|
|
|
|
// List 预约列表
|
|
|
-func (s Service) List(req model.ListReq) ([]meeting3.List, int, error) {
|
|
|
+func (s Service) List(req model.ListReq, userInfo request.UserInfo) ([]meeting3.List, int, error) {
|
|
|
entityModel := s.Dao.M
|
|
|
|
|
|
if req.Entity != nil {
|
|
|
@@ -53,6 +53,9 @@ func (s Service) List(req model.ListReq) ([]meeting3.List, int, error) {
|
|
|
if entity.UserName != "" {
|
|
|
entityModel = entityModel.WhereLike(tableSql+s.Dao.Columns.UserName, "%"+entity.UserName+"%")
|
|
|
}
|
|
|
+ if entity.Mine {
|
|
|
+ entityModel = entityModel.Where(tableSql+s.Dao.Columns.UserId, userInfo.Id)
|
|
|
+ }
|
|
|
// 预约状态(1:预定 2:取消)
|
|
|
if entity.Status != 0 {
|
|
|
entityModel = entityModel.Where(tableSql+s.Dao.Columns.Status, entity.Status)
|