作者 yangfu

修改

appname = opportunity
httpport = 8080
runmode = "${RUN_MODE||prod_test}"
runmode = "${RUN_MODE||dev}"
#没设置的话 this.Ctx.Input.RequestBody 没有值
copyrequestbody = true
... ... @@ -14,6 +14,5 @@ include "dev.conf"
include "dev-online.conf"
include "test.conf"
include "prod.conf"
include "prod_test.conf"
... ...
... ... @@ -47,6 +47,3 @@ cname ="https://media.fjmaimaimai.com/"
#企业平台
BUSINESS_ADMIN_SERVICE_HOST ="${BUSINESS_ADMIN_SERVICE_HOST||http://suplus-business-admin-dev.fjmaimaimai.com}"
\ No newline at end of file
#服务地址
VOD_SVR_ADDRESS ="http://mmm-open-api-dev.fjmaimaimai.com"
\ No newline at end of file
... ...
... ... @@ -48,6 +48,3 @@ cname ="https://media.goexample.live/"
#企业平台
BUSINESS_ADMIN_SERVICE_HOST ="${BUSINESS_ADMIN_SERVICE_HOST||http://suplus-business-admin-dev.fjmaimaimai.com}"
\ No newline at end of file
#服务地址
VOD_SVR_ADDRESS ="http://mmm-open-api-dev.fjmaimaimai.com"
\ No newline at end of file
... ...
... ... @@ -47,6 +47,3 @@ BUSINESS_ADMIN_SERVICE_HOST ="${BUSINESS_ADMIN_SERVICE_HOST||http://suplus-busin
#阿里云
cname ="https://media.fjmaimaimai.com/"
\ No newline at end of file
#服务地址
VOD_SVR_ADDRESS ="http://mmm-open-api-prd.fjmaimaimai.com"
\ No newline at end of file
... ...
[prod_test]
[prod]
#数据库相关
mysql_user = "${MYSQL_USER||suplus_user}"
mysql_password = "${MYSQL_PASSWORD||suplus2019!}"
... ... @@ -47,6 +47,3 @@ BUSINESS_ADMIN_SERVICE_HOST ="${BUSINESS_ADMIN_SERVICE_HOST||http://suplus-busin
#阿里云
cname ="https://media.fjmaimaimai.com/"
\ No newline at end of file
#服务地址
VOD_SVR_ADDRESS ="http://mmm-open-api-prd.fjmaimaimai.com"
\ No newline at end of file
... ...
... ... @@ -34,24 +34,3 @@ func (this *ConfigController) GetConfigScore() {
header := controllers.GetRequestHeader(this.Ctx)
msg = protocol.NewReturnResponse(config.GetConfigScore(header, request))
}
//ServiceConfig 服务配置
//@router /service [post]
func (this *ConfigController) ServiceConfig() {
var msg *protocol.ResponseMessage
defer func() {
this.Resp(msg)
}()
var request *protocol.ServiceConfigRequest
if err := json.Unmarshal(this.ByteBody, &request); err != nil {
log.Error(err)
msg = protocol.BadRequestParam(1)
return
}
if b, m := this.Valid(request); !b {
msg = m
return
}
header := controllers.GetRequestHeader(this.Ctx)
msg = protocol.NewReturnResponse(config.ServiceConfig(header, request))
}
... ...
... ... @@ -4,12 +4,12 @@ const (
RegionID = "cn-shanghai"
//公司
//AccessKeyID = "LTAI4Fz1LUBW2fXp6QWaJHRS"
//AccessKeySecret = "aLZXwK8pgrs10Ws03qcN7NsrSXFVsg"
AccessKeyID = "LTAI4Fz1LUBW2fXp6QWaJHRS"
AccessKeySecret = "aLZXwK8pgrs10Ws03qcN7NsrSXFVsg"
//个人
AccessKeyID = "LTAI4FhiZ3UktC6N1u3H5GFC"
AccessKeySecret = "UyspWwdni55CYQ02hUCint4qY2jNYO"
//AccessKeyID = "LTAI4FhiZ3UktC6N1u3H5GFC"
//AccessKeySecret = "UyspWwdni55CYQ02hUCint4qY2jNYO"
)
const (
... ...
... ... @@ -32,19 +32,3 @@ type ScoreRange struct {
Max float64 `json:"max"` //最大分
Step float64 `json:"step"` //步长
}
/*ServiceConfig 服务配置*/
type ServiceConfigRequest struct {
}
type ServiceConfigResponse struct {
ServeConfig *ServeConfig `json:"serveConfig"` //服务配置
}
type ServeConfig struct {
VodAddress string `json:"vodSvrAddress"` //视频服务地址
}
func (s *ServeConfig) SetVodAddress(addr string) *ServeConfig {
s.VodAddress = addr
return s
}
... ...
... ... @@ -415,14 +415,6 @@ func init() {
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["opp/controllers/v1:ConfigController"] = append(beego.GlobalControllerRouter["opp/controllers/v1:ConfigController"],
beego.ControllerComments{
Method: "ServiceConfig",
Router: `/service`,
AllowHTTPMethods: []string{"post"},
MethodParams: param.Make(),
Params: nil})
beego.GlobalControllerRouter["opp/controllers/v1:DepartmentController"] = append(beego.GlobalControllerRouter["opp/controllers/v1:DepartmentController"],
beego.ControllerComments{
Method: "Departments",
... ...
... ... @@ -442,7 +442,7 @@ func CheckBusinessAuth(header *protocol.RequestHeader, muid int64) (err error) {
authMessage *protocol.Message
)
if authMessage, hasAuth = agg.GetUserModuleAuth(muid); !hasAuth {
err = protocol.NewCustomMessage(2002, authMessage.Errmsg) //账号不存在
err = protocol.NewCustomMessage(authMessage.Errno, authMessage.Errmsg) //账号不存在
return
}
if authMessage.Errno != 0 {
... ...
... ... @@ -2,7 +2,6 @@ package config
import (
"encoding/json"
"github.com/astaxie/beego"
"gitlab.fjmaimaimai.com/mmm-go/gocomm/pkg/log"
"opp/models"
"opp/protocol"
... ... @@ -23,13 +22,3 @@ func GetConfigScore(header *protocol.RequestHeader, request *protocol.GetConfigS
}
return
}
//ServiceConfig 服务配置
func ServiceConfig(header *protocol.RequestHeader, request *protocol.ServiceConfigRequest) (rsp *protocol.ServiceConfigResponse, err error) {
var ()
rsp = &protocol.ServiceConfigResponse{
ServeConfig: new(protocol.ServeConfig),
}
rsp.ServeConfig.SetVodAddress(beego.AppConfig.String("VOD_SVR_ADDRESS"))
return
}
... ...