...
|
...
|
@@ -206,26 +206,26 @@ func (this *ChanceController) ChanceType() { |
|
|
msg = protocol.NewReturnResponse(chance.ChanceType(header, request))
|
|
|
}
|
|
|
|
|
|
//Permission 机会权限
|
|
|
//@router /permission [post]
|
|
|
//func (this *ChanceController) Permission() {
|
|
|
// var msg *protocol.ResponseMessage
|
|
|
// defer func() {
|
|
|
// this.Resp(msg)
|
|
|
// }()//
|
|
|
// var request *protocol.ChancePermissionRequest
|
|
|
// 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(chance.ChancePermission(header, request))
|
|
|
//}
|
|
|
//ChanceReserveType 机会储备类型
|
|
|
//@router /chanceReserveType [post]
|
|
|
func (this *ChanceController) ChanceReserveType() {
|
|
|
var msg *protocol.ResponseMessage
|
|
|
defer func() {
|
|
|
this.Resp(msg)
|
|
|
}()
|
|
|
var request *protocol.ChanceReserveTypeRequest
|
|
|
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(chance.ChanceReserveType(header, request))
|
|
|
}
|
|
|
|
|
|
//Templates
|
|
|
//@router /templates [post]
|
...
|
...
|
@@ -643,6 +643,28 @@ func (this *ChanceController) ChancePool() { |
|
|
msg = protocol.NewReturnResponse(chance.ChancePool(header, request))
|
|
|
}
|
|
|
|
|
|
//ChanceReservePool 储备池
|
|
|
//@router /chanceReservePool [post]
|
|
|
func (this *ChanceController) ChanceReservePool() {
|
|
|
var msg *protocol.ResponseMessage
|
|
|
defer func() {
|
|
|
this.Resp(msg)
|
|
|
}()
|
|
|
var request *protocol.ChancePoolRequest
|
|
|
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)
|
|
|
request.Type = 1
|
|
|
msg = protocol.NewReturnResponse(chance.ChancePool(header, request))
|
|
|
}
|
|
|
|
|
|
//ChanceReviseDetail 机会补充详情
|
|
|
//@router /chanceReviseDetail [post]
|
|
|
func (this *ChanceController) ChanceReviseDetail() {
|
...
|
...
|
|