Commit 7eaa622d74a65c3d5d08d9e17e44a017b62319fe
Committed by
jiyue
1 parent
b6a84789
payAction Order不缓存
Showing
1 changed file
with
11 additions
and
11 deletions
Show diff stats
src/models/RolePlugin.lua
| ... | ... | @@ -2174,16 +2174,16 @@ function RolePlugin.bind(Role) |
| 2174 | 2174 | if not self.activity:isOpenById(rechargeData.activity_id, "ActShopGoods") then return "" end |
| 2175 | 2175 | end |
| 2176 | 2176 | |
| 2177 | - local orderId = redisproxy:hget(string.format(R_ORDERS, roleId), rechargeId) | |
| 2178 | - if orderId then | |
| 2179 | - local uid = orderId * MAX_SVR_ID + serverId | |
| 2180 | - local orderObject = require("models.Order").new({ key = string.format("%d", uid), id = uid }) | |
| 2181 | - if orderObject:load() and orderObject:getProperty("rechargeId") == rechargeId and math.abs(skynet.timex() - orderObject:getProperty("createTime")) < 5 * 60 then | |
| 2182 | - return string.format("%d", uid) | |
| 2183 | - end | |
| 2184 | - end | |
| 2177 | + -- local orderId = redisproxy:hget(string.format(R_ORDERS, roleId), rechargeId) | |
| 2178 | + -- if orderId then | |
| 2179 | + -- local uid = orderId * MAX_SVR_ID + serverId | |
| 2180 | + -- local orderObject = require("models.Order").new({ key = string.format("%d", uid), id = uid }) | |
| 2181 | + -- if orderObject:load() and orderObject:getProperty("rechargeId") == rechargeId and math.abs(skynet.timex() - orderObject:getProperty("createTime")) < 5 * 60 then | |
| 2182 | + -- return string.format("%d", uid) | |
| 2183 | + -- end | |
| 2184 | + -- end | |
| 2185 | 2185 | |
| 2186 | - orderId = redisproxy:hincrby("autoincrement_set", "order", 1) | |
| 2186 | + local orderId = redisproxy:hincrby("autoincrement_set", "order", 1) | |
| 2187 | 2187 | local uid = orderId * MAX_SVR_ID + serverId |
| 2188 | 2188 | local partnerOrderId = string.format("%d", orderId * MAX_SVR_ID + serverId) |
| 2189 | 2189 | local orderKey = string.format(R_ORDER, roleId, orderId) |
| ... | ... | @@ -2200,7 +2200,7 @@ function RolePlugin.bind(Role) |
| 2200 | 2200 | }) |
| 2201 | 2201 | order:create() |
| 2202 | 2202 | -- 正在进行中的订单 缓存 |
| 2203 | - redisproxy:hset(string.format(R_ORDERS, roleId), rechargeId, orderId) | |
| 2203 | + -- redisproxy:hset(string.format(R_ORDERS, roleId), rechargeId, orderId) | |
| 2204 | 2204 | return partnerOrderId |
| 2205 | 2205 | end |
| 2206 | 2206 | |
| ... | ... | @@ -2253,7 +2253,7 @@ function RolePlugin.bind(Role) |
| 2253 | 2253 | -- redisproxy:hdel(string.format(R_ORDERS, roleId), rechargeId) |
| 2254 | 2254 | elseif status == "finsh" then |
| 2255 | 2255 | orderObject:setProperty("finishTime", skynet.time()) |
| 2256 | - redisproxy:hdel(string.format(R_ORDERS, roleId), rechargeId) | |
| 2256 | + -- redisproxy:hdel(string.format(R_ORDERS, roleId), rechargeId) | |
| 2257 | 2257 | end |
| 2258 | 2258 | |
| 2259 | 2259 | orderObject:update() | ... | ... |