|
@@ -100,6 +100,9 @@ public class GoodsMgrController extends BaseApiController {
|
|
|
if (file == null) {
|
|
|
return AjaxResult.error("文件不能为空");
|
|
|
}
|
|
|
+ if (!GoodsTypeEnum.CARD_GOODS.getValue().equals(goods.getType())) {
|
|
|
+ return AjaxResult.error("非卡密商品不支持导入");
|
|
|
+ }
|
|
|
String lockKey = RedisLockKey.build(RedisLockKey.GOODS_CARD_LOCK_KEY, goodsId);
|
|
|
// 加锁,自动续期,防止重复导入
|
|
|
if (!distributedLocker.tryLock(lockKey,0,-1, TimeUnit.SECONDS)) {
|