[service] name = "WMall" desc = "商城服务" [[method]] name = "List" desc = "商城列表" [method.req] field = [ "int32 page //当前页", "int32 per_page //每页条数", "string project_hash_id //项目hash_id", "string title //商城标题", "int32 status //状态(1-使用中,2-暂未使用)", "repeated int32 order_by //排序字段(1-创建最晚优先,2-创建最早优先,3-使用中优先,4-暂未使用优先)", ] [method.res] field = [ "repeated One list //列表数据", "int64 total //总数", ] [[method.res.message]] name = "One" field = [ "int64 id //商城ID", "string title //商城标题", "int32 status //状态(1-使用中,2-暂未使用)", "int64 created_at //创建时间", "repeated Relate relates //关联使用数据", "repeated Reward rewards //商城上架奖品", ] [[method.res.message]] name = "Relate" field = [ "int64 id //关系ID", "int32 source //来源(1-任务中心,2-活动)", "string title //来源标题", ] [[method.res.message]] name = "Reward" field = [ "int64 id //商城奖品id", "string title //奖品标题", "string img_url //奖品图片URL", ] [[method]] name = "Store" desc = "商城创建" [method.req] field = [ "string project_hash_id //项目hash_id", "string title //商城标题", ] [method.res] field = [ "int64 id //商城id", ] [[method]] name = "Update" desc = "商城更新" [method.req] field = [ "string project_hash_id //项目hash_id", "int64 id //商城id", "string title //商城标题", ] [method.res] field = [ "int64 id //商城id", ] [[method]] name = "Destroy" desc = "商城删除" [method.req] field = [ "string project_hash_id //项目hash_id", "int64 id //商城id", ] [method.res] field = [ "int64 id //商城id", ] [[method]] name = "ItemList" desc = "商城奖品列表" [method.req] field = [ "int64 mall_id //商城ID", "int32 status //状态(1-上架,2-下架)", ] [method.res] field = [ "repeated One list //列表数据", ] [[method.res.message]] name = "One" field = [ "int64 id //商城奖品id", "int64 reward_id //奖品id", "string title //奖品标题", "string img_url //奖品图片URL", "int64 stock //奖品库存", "int64 remain //剩余库存", "int32 up_type //上架类型(1-立即上架,2-指定时间)", "int64 up_custom //自定义上架时间", "int64 up_at //上架时间", "string up_from //上架来源(auto-自定上架,manual-手动上架)", "repeated string up_show //指定上架展示配置", "int32 down_type //下架类型(1-永久上架,2-指定时间)", "int64 down_custom //自定义下架时间", "int64 down_at //下架时间", "string down_from //下架来源(auto-自定下架,manual-手动下架)", "repeated string down_show //指定下架展示配置", "int32 status //状态(1-上架,2-待上架,3-下架,4-删除)", "int32 coin_num //奖品金币数量", "int64 use_stock //发放库存", ] [[method]] name = "ItemStore" desc = "商城奖品创建" [method.req] field = [ "int64 mall_id //商城ID", "int64 reward_id //奖品id", "int32 coin_num //奖品金币数量", "int64 stock //奖品库存", "int32 up_type //上架类型(1-立即上架,2-指定时间)", "int64 up_custom //自定义上架时间", "repeated string up_show //指定上架展示配置", "int32 down_type //下架类型(1-永久上架,2-指定时间)", "int64 down_custom //自定义下架时间", "repeated string down_show //指定下架展示配置", ] [method.res] field = [ "int64 id //商城奖品id", ] [[method]] name = "ItemUpdate" desc = "商城奖品更新" [method.req] field = [ "int64 id //奖品id", "int64 reward_id //奖品id", "int32 coin_num //奖品金币数量", "int64 stock //奖品库存", "int32 up_type //上架类型(1-立即上架,2-指定时间)", "int64 up_custom //自定义上架时间", "repeated string up_show //指定上架展示配置 [\"client\",\"countdown\"]", "int32 down_type //下架类型(1-永久上架,2-指定时间)", "int64 down_custom //自定义下架时间", "repeated string down_show //指定下架展示配置 [\"countdown\"]", ] [method.res] field = [ "int64 id //商城奖品id", ] [[method]] name = "ItemStatus" desc = "商城奖品状态修改" [method.req] field = [ "int64 id //奖品id", "int32 status //状态(1-上架,2-下架,3-删除)", ] [method.res] field = [ "int64 id //商城奖品id", ] [[method]] name = "ItemSort" desc = "商城奖品排序" [method.req] field = [ "repeated int64 ids //奖品id列表", ] [method.res] [[method]] name = "Select" desc = "商城选择" [method.req] field = [ "string project_hash_id //项目hash_id", ] [method.res] field = [ "repeated One list //列表数据", ] [[method.res.message]] name = "One" field = [ "int64 id //商城ID", "string title //商城标题", ] [[method]] name = "RelateMall" desc = "关联商城" [method.req] field = [ "int64 project_id //项目id", "int32 source //来源(1-任务中心,2-活动)", "int64 relate_id //关联id", "string relate_table //关联表名字,如果不是dplk_db库,建议带上库名字如dbname.relate_table_name", "repeated int64 mall_ids //关联的商城id集合", ] [method.res] [[method]] name = "UserItemList" desc = "用户商城奖品列表" [method.req] field = [ "int64 mall_id //商城ID", "string user_id //用户id", "string lang_mark //语言标记", "int32 source //来源(1-任务中心,2-活动)", "int64 source_id //来源id", ] [method.res] field = [ "repeated One list //列表数据", ] [[method.res.message]] name = "One" field = [ "int64 id //商城奖品id", "int64 reward_id //奖品id", "string title //奖品标题", "string img_url //奖品图片URL", "int64 remain //剩余库存", "int32 status //状态(1-上架,2-待上架,3-下架,4-删除)", "int64 up_remain //上架剩余时间", "int32 coin_num //奖品金币数量", ] [[method]] name = "ExchangeItem" desc = "商城奖品兑换" [method.req] field = [ "int64 project_id //项目id", "int64 mall_item_id //商城商品id", "string user_id //用户id", "string lang_mark //语言标记", "int32 point_source //积分来源(0-应用内部,1-系统自带)", "int64 url_id //请求地址id", "int32 source //来源(1-任务中心,2-活动)", "SourceData source_data //来源数据", ] [[method.req.message]] name = "SourceData" field = [ "int64 center_id //任务中心id", "string center_hash_id //任务中心hash_id", "string center_title //任务中心标题", "string user_platform //用户平台", "string parent_user_id //父用户id", "string parent_user_platform //父用户平台", "int64 module_id //模块id", "int64 relate_id //关联id", ] [method.res] field = [ "int32 status //状态(0-成功,1-库存不足,2-兑换上限,3-商品已下架)", "int64 id //兑换记录id", "int64 reward_id //奖品id", "string title //奖品名称", "string img_url //图片地址", "repeated KV kv_data //奖品对应的键值数据", "int32 receive_type //领取类型(0-不需要处理,1-服务端推送,2-客户自主发放,3-监听器)", "string contact //联系方式", "int32 open_to_use //开启去使用(0-否,1-是)", "string custom_reward_val //自定义数据", "string web_url //Web端的跳转地址", "string app_param //App端的跳转参数", "string pc_param //pc端的跳转参数", "string fail_type //失败类型", "string fail_msg //失败具体原因", ] [[method.res.message]] name = "KV" field = [ "string key //对应字段名", "string value //对应字段值", "int32 is_show //是否展示(0-否,1-是)", ]