作者 唐旭辉

bug 调试

@@ -415,6 +415,7 @@ func (c *CompanyController) GetCompanyForUCenter() { @@ -415,6 +415,7 @@ func (c *CompanyController) GetCompanyForUCenter() {
415 msg = protocol.BadRequestParam("1") 415 msg = protocol.BadRequestParam("1")
416 return 416 return
417 } 417 }
  418 +
418 msg = protocol.NewReturnResponse(nil, nil) 419 msg = protocol.NewReturnResponse(nil, nil)
419 return 420 return
420 } 421 }
@@ -89,8 +89,8 @@ var AllowOption = func(ctx *context.Context) { @@ -89,8 +89,8 @@ var AllowOption = func(ctx *context.Context) {
89 AllowAllOrigins: true, //允许的请求来源 89 AllowAllOrigins: true, //允许的请求来源
90 }) 90 })
91 f(ctx) 91 f(ctx)
92 - ctx.Output.SetStatus(204)  
93 ctx.Output.Body([]byte("{}")) 92 ctx.Output.Body([]byte("{}"))
  93 + ctx.Output.SetStatus(204)
94 return 94 return
95 } 95 }
96 96
@@ -48,7 +48,7 @@ type BulletinListRequest struct { @@ -48,7 +48,7 @@ type BulletinListRequest struct {
48 RequestPageInfo 48 RequestPageInfo
49 } 49 }
50 type BulletinListResponse struct { 50 type BulletinListResponse struct {
51 - List []*BulletinItem `json:"list"` 51 + List []*BulletinItem `json:"lists"`
52 //Total int 52 //Total int
53 ResponsePageInfo 53 ResponsePageInfo
54 } 54 }
@@ -115,7 +115,7 @@ type BulletinFeedbacksRequest struct { @@ -115,7 +115,7 @@ type BulletinFeedbacksRequest struct {
115 } 115 }
116 type BulletinFeedbacksResponse struct { 116 type BulletinFeedbacksResponse struct {
117 ResponsePageInfo 117 ResponsePageInfo
118 - List []FeedBackItem `json:"list"` 118 + List []FeedBackItem `json:"lists"`
119 } 119 }
120 120
121 type FeedBackItem struct { 121 type FeedBackItem struct {
@@ -10,7 +10,7 @@ type RequestPageInfo struct { @@ -10,7 +10,7 @@ type RequestPageInfo struct {
10 type ResponsePageInfo struct { 10 type ResponsePageInfo struct {
11 TotalPage int `json:"totalRow"` 11 TotalPage int `json:"totalRow"`
12 CurrentPage int `json:"pageNumber"` 12 CurrentPage int `json:"pageNumber"`
13 - // ListData interface{} `json:"list"` 13 + // ListData interface{} `json:"lists"`
14 } 14 }
15 15
16 // DepartmentBase下拉选择列表-部门 16 // DepartmentBase下拉选择列表-部门
@@ -48,7 +48,7 @@ type ResponseDepartmentInfo struct { @@ -48,7 +48,7 @@ type ResponseDepartmentInfo struct {
48 48
49 //ResponseDepartmentList .... 49 //ResponseDepartmentList ....
50 type ResponseDepartmentList struct { 50 type ResponseDepartmentList struct {
51 - List []ResponseDepartmentInfo `json:"list"` 51 + List []ResponseDepartmentInfo `json:"lists"`
52 } 52 }
53 53
54 //RequestPositionAdd 添加职位 54 //RequestPositionAdd 添加职位
@@ -103,7 +103,7 @@ type RequestUserList struct { @@ -103,7 +103,7 @@ type RequestUserList struct {
103 //ResponseUserList 响应的用户列表 103 //ResponseUserList 响应的用户列表
104 type ResponseUserList struct { 104 type ResponseUserList struct {
105 ResponsePageInfo 105 ResponsePageInfo
106 - List []UserListItem `json:"list"` 106 + List []UserListItem `json:"lists"`
107 } 107 }
108 108
109 type UserListItem struct { 109 type UserListItem struct {
@@ -145,4 +145,23 @@ func (c CenterCompanyInfo) IsForbid() bool { @@ -145,4 +145,23 @@ func (c CenterCompanyInfo) IsForbid() bool {
145 return false 145 return false
146 } 146 }
147 147
148 -// type ResponseCenterCompany 148 +// type Request
  149 +
  150 +type ResponseCenterCompany struct {
  151 + UCenterCompanyId int64 `json:"comopany_id"` //总
  152 + Exist int8 `json:"exist"` //公司【1:存在;【-1:不存在】
  153 + Status int8 `json:"status"` //公司的启用状态【1:启用,-1:禁用】
  154 +}
  155 +
  156 +func (r *ResponseCenterCompany) ExistYes() {
  157 + r.Exist = 1
  158 +}
  159 +func (r *ResponseCenterCompany) ExistNo() {
  160 + r.Exist = -1
  161 +}
  162 +func (r *ResponseCenterCompany) StatusYes() {
  163 + r.Status = 1
  164 +}
  165 +func (r *ResponseCenterCompany) StatusNo() {
  166 + r.Status = -1
  167 +}
@@ -440,6 +440,7 @@ func CompanyBaseInfo(companyid int64) (*protocol.ResponseCompanyBase, error) { @@ -440,6 +440,7 @@ func CompanyBaseInfo(companyid int64) (*protocol.ResponseCompanyBase, error) {
440 return companyinfo, nil 440 return companyinfo, nil
441 } 441 }
442 442
  443 +//ForbidCompany 禁用公司
443 func ForbidCompany(ucenterCompany int64) error { 444 func ForbidCompany(ucenterCompany int64) error {
444 var ( 445 var (
445 err error 446 err error
@@ -464,3 +465,14 @@ func ForbidCompany(ucenterCompany int64) error { @@ -464,3 +465,14 @@ func ForbidCompany(ucenterCompany int64) error {
464 } 465 }
465 return nil 466 return nil
466 } 467 }
  468 +
  469 +func CompanyInfoForUCenter(uCenterid int64) {
  470 + // var (
  471 + // err error
  472 + // companyinfo *models.Company
  473 + // )
  474 + // companyinfo, err = models.GetCompanyByUCenter(uCenterid)
  475 + // if err != nil && err != orm.ErrNoRows {
  476 +
  477 + // }
  478 +}