add error handle logic, fix bug(rankValue, rankedAt should be at table ChannelProduct not ChannelProductHisotry)