|
|
@ -14,16 +14,6 @@ type WsCtl struct { |
|
|
|
} |
|
|
|
|
|
|
|
// ws doc
|
|
|
|
// @Summary ws
|
|
|
|
// @Description get current operation
|
|
|
|
// @Tags ws
|
|
|
|
// @Accept json
|
|
|
|
// @Produce json
|
|
|
|
// @Param activity_id query int true "Activity ID"
|
|
|
|
// @Success 0 {array} models.CustomerOperation
|
|
|
|
// @Failure 503 {string} string "参数不存在"
|
|
|
|
// @Failure 504 {object} string "用户不存在"
|
|
|
|
// @Router /Pc/WsCtl/ops [get]
|
|
|
|
func (t *WsCtl) Ops() { |
|
|
|
customerId := t.MustGetUID() |
|
|
|
activityId, _ := t.GetInt64("activity_id") |
|
|
@ -56,16 +46,6 @@ func (t *WsCtl) Ops() { |
|
|
|
} |
|
|
|
|
|
|
|
// ws doc
|
|
|
|
// @Summary ws
|
|
|
|
// @Description save operation
|
|
|
|
// @Tags ws
|
|
|
|
// @Accept json
|
|
|
|
// @Produce json
|
|
|
|
// @Param operation query string true "操作内容"
|
|
|
|
// @Success 0 {string} string "success"
|
|
|
|
// @Failure 503 {string} string "参数不存在"
|
|
|
|
// @Failure 504 {object} string "用户不存在"
|
|
|
|
// @Router /Pc/WsCtl/saveOp [post]
|
|
|
|
func (t *WsCtl) SaveOp() { |
|
|
|
customerId := t.MustGetInt64("customer_id") |
|
|
|
extraData := t.Default("extra_data", "") |
|
|
@ -76,7 +56,7 @@ func (t *WsCtl) SaveOp() { |
|
|
|
CreatedAt: time.Now(), |
|
|
|
} |
|
|
|
if row := op.SaveCustomerOperation(); row != 1 { |
|
|
|
logger.Sugar.Debugf("save customer_operation出现错误") |
|
|
|
logger.Error("save customer_operation出现错误") |
|
|
|
t.ERROR("customer operation格式错误", code.MSG_ERR) |
|
|
|
} |
|
|
|
t.STRING("success") |
|
|
|