...
|
...
|
@@ -348,14 +348,20 @@ func (c *AuditController) ChanceStoreChange() { |
|
|
msg = protocol.BadRequestParam("1")
|
|
|
return
|
|
|
}
|
|
|
// companyId := c.GetCompanyId()
|
|
|
companyId := c.GetCompanyId()
|
|
|
var (
|
|
|
chanceData *models.Chance
|
|
|
err error
|
|
|
)
|
|
|
chanceId, _ := strconv.ParseInt(param.ChanceId, 64, 10)
|
|
|
chanceId, _ := strconv.ParseInt(param.ChanceId, 10, 64)
|
|
|
chanceData, err = models.GetChanceById(chanceId)
|
|
|
if err != nil {
|
|
|
log.Error("获取chance数据失败,err;%s", err)
|
|
|
msg = protocol.BadRequestParam("1")
|
|
|
return
|
|
|
}
|
|
|
if chanceData.CompanyId != companyId {
|
|
|
log.Error("chance数据的公司不一致")
|
|
|
msg = protocol.BadRequestParam("1")
|
|
|
return
|
|
|
}
|
...
|
...
|
@@ -364,3 +370,29 @@ func (c *AuditController) ChanceStoreChange() { |
|
|
msg = protocol.NewReturnResponse(nil, nil)
|
|
|
return
|
|
|
}
|
|
|
|
|
|
//GetChangeMedia 获取机会的图片、音频、视频的地址
|
|
|
//@router /v1/chance/media
|
|
|
func (c *AuditController) GetChangeMedia() {
|
|
|
var msg *protocol.ResponseMessage
|
|
|
defer func() {
|
|
|
c.ResposeJson(msg)
|
|
|
}()
|
|
|
type Parameter struct {
|
|
|
ChanceId string `json:"chance_id"`
|
|
|
CheckSum string `json:"check_sum"`
|
|
|
}
|
|
|
var param Parameter
|
|
|
if err := json.Unmarshal(c.Ctx.Input.RequestBody, ¶m); err != nil {
|
|
|
log.Error("json 解析失败", err)
|
|
|
msg = protocol.BadRequestParam("1")
|
|
|
return
|
|
|
}
|
|
|
// chanceId, _ := strconv.ParseInt(param.ChanceId, 10, 64)
|
|
|
// var (
|
|
|
// err error
|
|
|
// chanceData models.ChanceData
|
|
|
// )
|
|
|
// models.GetChanceDataByChanceId(chanceId)
|
|
|
return
|
|
|
} |
...
|
...
|
|