diff --git a/src/models/RolePlugin.lua b/src/models/RolePlugin.lua index 5ed7f95..88cb9ee 100644 --- a/src/models/RolePlugin.lua +++ b/src/models/RolePlugin.lua @@ -2174,16 +2174,16 @@ function RolePlugin.bind(Role) if not self.activity:isOpenById(rechargeData.activity_id, "ActShopGoods") then return "" end end - local orderId = redisproxy:hget(string.format(R_ORDERS, roleId), rechargeId) - if orderId then - local uid = orderId * MAX_SVR_ID + serverId - local orderObject = require("models.Order").new({ key = string.format("%d", uid), id = uid }) - if orderObject:load() and orderObject:getProperty("rechargeId") == rechargeId and math.abs(skynet.timex() - orderObject:getProperty("createTime")) < 5 * 60 then - return string.format("%d", uid) - end - end + -- local orderId = redisproxy:hget(string.format(R_ORDERS, roleId), rechargeId) + -- if orderId then + -- local uid = orderId * MAX_SVR_ID + serverId + -- local orderObject = require("models.Order").new({ key = string.format("%d", uid), id = uid }) + -- if orderObject:load() and orderObject:getProperty("rechargeId") == rechargeId and math.abs(skynet.timex() - orderObject:getProperty("createTime")) < 5 * 60 then + -- return string.format("%d", uid) + -- end + -- end - orderId = redisproxy:hincrby("autoincrement_set", "order", 1) + local orderId = redisproxy:hincrby("autoincrement_set", "order", 1) local uid = orderId * MAX_SVR_ID + serverId local partnerOrderId = string.format("%d", orderId * MAX_SVR_ID + serverId) local orderKey = string.format(R_ORDER, roleId, orderId) @@ -2200,7 +2200,7 @@ function RolePlugin.bind(Role) }) order:create() -- 正在进行中的订单 缓存 - redisproxy:hset(string.format(R_ORDERS, roleId), rechargeId, orderId) + -- redisproxy:hset(string.format(R_ORDERS, roleId), rechargeId, orderId) return partnerOrderId end @@ -2253,7 +2253,7 @@ function RolePlugin.bind(Role) -- redisproxy:hdel(string.format(R_ORDERS, roleId), rechargeId) elseif status == "finsh" then orderObject:setProperty("finishTime", skynet.time()) - redisproxy:hdel(string.format(R_ORDERS, roleId), rechargeId) + -- redisproxy:hdel(string.format(R_ORDERS, roleId), rechargeId) end orderObject:update() -- libgit2 0.21.2