...
|
...
|
@@ -420,6 +420,7 @@ func (c *CompanyController) InitCompany() { |
|
|
return
|
|
|
}
|
|
|
|
|
|
// GetCompanyForUCenter 总后台调用
|
|
|
//@router /ucenter/company/info [post]
|
|
|
func (c *CompanyController) GetCompanyForUCenter() {
|
|
|
var msg *protocol.ResponseMessage
|
...
|
...
|
@@ -428,6 +429,28 @@ func (c *CompanyController) GetCompanyForUCenter() { |
|
|
}()
|
|
|
type Paremeter struct {
|
|
|
Companyid int64 `json:"company_id"`
|
|
|
CompanyName string `json:"company_name"`
|
|
|
}
|
|
|
var param Paremeter
|
|
|
if err := json.Unmarshal(c.Ctx.Input.RequestBody, ¶m); err != nil {
|
|
|
log.Error("json 解析失败 err:%s", err)
|
|
|
msg = protocol.BadRequestParam("1")
|
|
|
return
|
|
|
}
|
|
|
err := servecompany.CompanyEditFromUcenter(param.Companyid, param.CompanyName)
|
|
|
msg = protocol.NewReturnResponse(nil, err)
|
|
|
return
|
|
|
}
|
|
|
|
|
|
//EditCompanyForUCenter
|
|
|
//@router /ucenter/company/edit [post]
|
|
|
func (c *CompanyController) EditCompanyForUCenter() {
|
|
|
var msg *protocol.ResponseMessage
|
|
|
defer func() {
|
|
|
c.ResposeJson(msg)
|
|
|
}()
|
|
|
type Paremeter struct {
|
|
|
Companyid int64 `json:"company_id"`
|
|
|
}
|
|
|
var param Paremeter
|
|
|
if err := json.Unmarshal(c.Ctx.Input.RequestBody, ¶m); err != nil {
|
...
|
...
|
|