Parcourir la source

feature(结算): 字段新增

likai il y a 4 ans
Parent
commit
c4f5b2908c
2 fichiers modifiés avec 12 ajouts et 1 suppressions
  1. 11 0
      model/user/base_user.go
  2. 1 1
      service/system/system.go

+ 11 - 0
model/user/base_user.go

@@ -34,11 +34,17 @@ type UserInfoReq struct {
 	ReqType      int    `json:"req_type"` // 请求类型 设备预约(1:预约资格 2:优先预约权) 主从用户管理(1:主用户查询 2:从用户查询)
 	IsSelf       string `json:"isSelf"`
 }
+
 type UserInfoRsp struct {
 	Records []BaseUserInfo `json:"records"`
 	Total   int            `json:"total"'`
 }
 
+type SearchUserInfoRsp struct {
+	Records []SearchUserInfo `json:"records"`
+	Total   int            `json:"total"'`
+}
+
 // 添加、删除主从用户
 type AddMainOrSubReq struct {
 	Ids     []int `json:"ids"`      // 用户Id列表
@@ -122,3 +128,8 @@ type BaseUserInfo struct {
 	Unit                  string      `orm:"Unit"                  json:"unit"`                  //
 	DeletedAt             *gtime.Time `orm:"DeletedAt"             json:"deletedAt"`             // 删除时间
 }
+
+type SearchUserInfo struct {
+	BaseUserInfo
+	MasterId              int         `orm:"MasterId"              json:"master_id"`             // 主用户Id
+}

+ 1 - 1
service/system/system.go

@@ -78,7 +78,7 @@ func (s Service) GetProgramGroup(id int) ([]model.BaseProgramGroup, error) {
 }
 
 // GetUserList 主从用户管理:获取用户信息
-func (s Service) GetUserList(req *user.UserInfoReq, userId int32) (userInfos user.UserInfoRsp, err error) {
+func (s Service) GetUserList(req *user.UserInfoReq, userId int32) (userInfos user.SearchUserInfoRsp, err error) {
 	where := "a.Enabled = 1"
 	departmentId := strconv.Itoa(req.DepartmentId)
 	current := req.PageNun