local ZhuanpanLogic = require("zhuanpan.ZhuanpanLogic")
local ZhuanpanGift = require("zhuanpan.ZhuanpanGift")
local Log = require("common.Log")

-- 转盘查询
function CG_ZHUANPAN_QUERY(human, msg)
	ZhuanpanLogic.query(human, msg.type)
end

-- 刷新
function CG_ZHUANPAN_REFRESH(human, msg)
	ZhuanpanLogic.refresh(human, msg.type, true, true)
end

-- 抽奖
function CG_ZHUANPAN_GET_REWARD(human, msg)
	ZhuanpanLogic.getReward(human, msg.type, msg.cnt)
end

-- 购买许愿珠
function CG_BUY_ZHUANPAN_CNT(human, msg)
	ZhuanpanLogic.buyCnt(human, msg.type, msg.cnt)
end

-- 获取进度奖励
function CG_ZHUANPAN_GET_LUCK(human, msg)
	ZhuanpanLogic.getLuck(human, msg)
end

-- 获取精炼祝福
function CG_XUNXING_JINGLINGZHUFU(human)
    ZhuanpanLogic.getFree(human)
end


------------------寻星礼包---------------------

function CG_ZHUANPAN_GIFT_QUERY(human)
    ZhuanpanGift.ZhuanpanGift_Query(human)
end

-- 每日固定奖励查询
function CG_ZHUANPAN_DAILY_FIXED_QUERY(human)
	ZhuanpanLogic.dailyFixedRewardQuery(human)
end

-- 每日固定奖励领取
function CG_ZHUANPAN_DAILY_FIXED_GET(human, msg)
	ZhuanpanLogic.dailyFixedRewardGet(human, msg.channelId)
end

-- 抖音渠道一次性奖励查询
function CG_ZHUANPAN_ONCE_REWARD_QUERY(human)
	ZhuanpanLogic.onceRewardQuery(human)
end

-- 抖音渠道一次性奖励领取
function CG_ZHUANPAN_ONCE_REWARD_GET(human, msg)
	ZhuanpanLogic.onceRewardGet(human, msg.channelId)
end

-- 美团订阅奖励查询（同时上报订阅状态）
function CG_ZHUANPAN_SUBSCRIBE_REWARD_QUERY(human, msg)
	ZhuanpanLogic.subscribeRewardQuery(human, msg)
end

-- 美团订阅奖励领取
function CG_ZHUANPAN_SUBSCRIBE_REWARD_GET(human, msg)
	ZhuanpanLogic.subscribeRewardGet(human, msg.channelId)
end


-----------------------淘宝小程序桌面活动-----------------------

-- 添加桌面上报
function CG_ZHUANPAN_TB_ADD_DESKTOP(human)
	ZhuanpanLogic.tbminiappAddDesktop(human)
end

-- 桌面活动查询
function CG_ZHUANPAN_TB_QUERY(human, msg)
	ZhuanpanLogic.tbminiappQuery(human, msg.status)
end

-- 活动奖励领取
function CG_ZHUANPAN_TB_REWARD_GET(human, msg)
	ZhuanpanLogic.tbminiappRewardGet(human, msg.status)
end


-----------------------游戏圈任务-----------------------

-- 游戏圈任务查询（前端上传SDK数据）
function CG_ZHUANPAN_YOUXI_TASK_QUERY(human, msg)
	ZhuanpanLogic.youxiTaskQuery(human, msg)
end

-- 游戏圈任务领取
function CG_ZHUANPAN_YOUXI_TASK_GET(human, msg)
	ZhuanpanLogic.youxiTaskGetReward(human, msg.taskId)
end


-----------------------添加桌面-----------------------

-- 上报添加桌面
function CG_ZHUANPAN_DY_DESKTOP_SET(human, msg)
	ZhuanpanLogic.dyDesktopSetLocal(human, msg.channelId, msg.platform)
end

-- 查询桌面添加状态
function CG_ZHUANPAN_DY_DESKTOP_QUERY(human, msg)
	ZhuanpanLogic.dyDesktopQueryLocal(human, msg.channelId, msg.platform)
end