Commit 040bc010 authored by gaoyingwei's avatar gaoyingwei

修改 活动下单扣库存

parent f948631b
package org.rcisoft.business.cmsActivity.service.impl;
import cn.hutool.core.lang.Assert;
import org.apache.commons.lang3.StringUtils;
import org.rcisoft.core.util.IStockCallback;
import org.redisson.api.RLock;
import org.redisson.api.RedissonClient;
......@@ -206,7 +207,7 @@ public class StockService {
long result = UNINITIALIZED_STOCK;
JedisPoolConfig config = new JedisPoolConfig();
try (JedisPool jedisPool = new JedisPool(config,redisIP,Integer.parseInt(redisPort), timeout,
password,database);){
(StringUtils.isAnyEmpty(password) ? null : password),database);){
// try (JedisPool jedisPool = new JedisPool(redisIP, Integer.parseInt(redisPort));){
Jedis jedis = jedisPool.getResource();
result = (long) jedis.evalsha(jedis.scriptLoad(STOCK_LUA), keys , args);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment