作者 唐旭辉

bug 调试

... ... @@ -415,6 +415,7 @@ func (c *CompanyController) GetCompanyForUCenter() {
msg = protocol.BadRequestParam("1")
return
}
msg = protocol.NewReturnResponse(nil, nil)
return
}
... ...
... ... @@ -89,8 +89,8 @@ var AllowOption = func(ctx *context.Context) {
AllowAllOrigins: true, //允许的请求来源
})
f(ctx)
ctx.Output.SetStatus(204)
ctx.Output.Body([]byte("{}"))
ctx.Output.SetStatus(204)
return
}
... ...
... ... @@ -48,7 +48,7 @@ type BulletinListRequest struct {
RequestPageInfo
}
type BulletinListResponse struct {
List []*BulletinItem `json:"list"`
List []*BulletinItem `json:"lists"`
//Total int
ResponsePageInfo
}
... ... @@ -115,7 +115,7 @@ type BulletinFeedbacksRequest struct {
}
type BulletinFeedbacksResponse struct {
ResponsePageInfo
List []FeedBackItem `json:"list"`
List []FeedBackItem `json:"lists"`
}
type FeedBackItem struct {
... ...
... ... @@ -10,7 +10,7 @@ type RequestPageInfo struct {
type ResponsePageInfo struct {
TotalPage int `json:"totalRow"`
CurrentPage int `json:"pageNumber"`
// ListData interface{} `json:"list"`
// ListData interface{} `json:"lists"`
}
// DepartmentBase下拉选择列表-部门
... ...
... ... @@ -48,7 +48,7 @@ type ResponseDepartmentInfo struct {
//ResponseDepartmentList ....
type ResponseDepartmentList struct {
List []ResponseDepartmentInfo `json:"list"`
List []ResponseDepartmentInfo `json:"lists"`
}
//RequestPositionAdd 添加职位
... ... @@ -103,7 +103,7 @@ type RequestUserList struct {
//ResponseUserList 响应的用户列表
type ResponseUserList struct {
ResponsePageInfo
List []UserListItem `json:"list"`
List []UserListItem `json:"lists"`
}
type UserListItem struct {
... ... @@ -145,4 +145,23 @@ func (c CenterCompanyInfo) IsForbid() bool {
return false
}
// type ResponseCenterCompany
// type Request
type ResponseCenterCompany struct {
UCenterCompanyId int64 `json:"comopany_id"` //总
Exist int8 `json:"exist"` //公司【1:存在;【-1:不存在】
Status int8 `json:"status"` //公司的启用状态【1:启用,-1:禁用】
}
func (r *ResponseCenterCompany) ExistYes() {
r.Exist = 1
}
func (r *ResponseCenterCompany) ExistNo() {
r.Exist = -1
}
func (r *ResponseCenterCompany) StatusYes() {
r.Status = 1
}
func (r *ResponseCenterCompany) StatusNo() {
r.Status = -1
}
... ...
... ... @@ -440,6 +440,7 @@ func CompanyBaseInfo(companyid int64) (*protocol.ResponseCompanyBase, error) {
return companyinfo, nil
}
//ForbidCompany 禁用公司
func ForbidCompany(ucenterCompany int64) error {
var (
err error
... ... @@ -464,3 +465,14 @@ func ForbidCompany(ucenterCompany int64) error {
}
return nil
}
func CompanyInfoForUCenter(uCenterid int64) {
// var (
// err error
// companyinfo *models.Company
// )
// companyinfo, err = models.GetCompanyByUCenter(uCenterid)
// if err != nil && err != orm.ErrNoRows {
// }
}
... ...