操作日志记录(beta)-门店商品
This commit is contained in:
37
controllers/event.go
Normal file
37
controllers/event.go
Normal file
@@ -0,0 +1,37 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/event"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"github.com/astaxie/beego"
|
||||
)
|
||||
|
||||
// 操作事件明细相关API
|
||||
type EventController struct {
|
||||
beego.Controller
|
||||
}
|
||||
|
||||
// @Title 查询操作日志事件明细
|
||||
// @Description 查询操作日志事件明细
|
||||
// @Param token header string true "认证token"
|
||||
// @Param apiFunction query string false "功能名"
|
||||
// @Param name query string false "操作人姓名,支持模糊查询"
|
||||
// @Param operateType query int false "操作类型,1为修改,2为新增,4为删除"
|
||||
// @Param skuIDs query string false "商品ID列表"
|
||||
// @Param storeIDs query string false "门店ID列表"
|
||||
// @Param fromTime query string false "开始日期(包含),格式(2006-01-02 00:00:00)"
|
||||
// @Param toTime query string false "结束日期(包含),格式(2006-01-02 00:00:00)"
|
||||
// @Param offset query int false "门店列表起始序号(以0开始,缺省为0)"
|
||||
// @Param pageSize query int false "门店列表页大小(缺省为30)"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /GetOperateEvents [get]
|
||||
func (c *EventController) GetOperateEvents() {
|
||||
var storeIDList, skuIDList []int
|
||||
c.callGetOperateEvents(func(params *tEventGetOperateEventsParams) (retVal interface{}, errCode string, err error) {
|
||||
if jxutils.Strings2Objs(params.StoreIDs, &storeIDList, params.SkuIDs, &skuIDList); err == nil {
|
||||
retVal, err = event.GetOperateEvents(params.Ctx, params.ApiFunction, params.Name, params.OperateType, skuIDList, storeIDList, params.FromTime, params.ToTime, params.Offset, params.PageSize)
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user