记得上下班打卡 | git大法好,push需谨慎

Commit 4153488a authored by 胡佳晨's avatar 胡佳晨

wf hjc ajb

parent 476f3b9d
......@@ -36,7 +36,7 @@ public class GoblinGagoController extends BaseController {
RedisDataSourceUtil redisDataSourceUtil;
@Autowired
GoblinRedisUtils goblinRedisUtils;
// @Value("${liquidnet.service.order.url}")
// @Value("${liquidnet.service.order.url}")
// private String orderUrl;
private String orderUrl = "http://127.0.0.1:9004/order";
......@@ -74,11 +74,11 @@ public class GoblinGagoController extends BaseController {
@ResponseBody
public AjaxResult listByStatus(@RequestParam(value = "skuId") String skuId, @RequestParam(value = "nftNum") int nftNum, @RequestParam(value = "uid") String uid) {
//当前 nft序号
int cNufCount = goblinRedisUtils.getNftCountBySku(skuId);
GoblinGoodsSkuInfoVo skuInfoVo = goblinRedisUtils.getGoodsSkuInfoVo(skuId);
int cNufCount = goblinRedisUtils.getNftCountBySku(skuInfoVo.getRouteType(), skuId);
if (cNufCount >= nftNum) {
return AjaxResult.error("该序号已售卖");
}
GoblinGoodsSkuInfoVo skuInfoVo = goblinRedisUtils.getGoodsSkuInfoVo(skuId);
if (skuInfoVo == null || skuInfoVo.getSkuStock() <= nftNum) {
return AjaxResult.error("该序号不存在");
}
......@@ -105,7 +105,7 @@ public class GoblinGagoController extends BaseController {
dto.setNftOrderPayId(innerReturnVo.getData());
dto.setSkuId(skuId);
dto.setUserId(uid);
goblinRedisUtils.setNftNumDetails(nftNum+"",skuId,dto);
goblinRedisUtils.setNftNumDetails(nftNum + "", skuId, dto);
return AjaxResult.success();
} else {
return AjaxResult.error();
......
......@@ -158,8 +158,8 @@ public class GoblinRedisUtils {
}
//获取 当前xx链上SkuId 发行的数量
public int getNftCountBySku(String skuId) {
String redisKey = GalaxyConstant.REDIS_KEY_GALAXY_PUBLISH_NFT.concat(":").concat(skuId);
public int getNftCountBySku(String routerType,String skuId) {
String redisKey = GalaxyConstant.REDIS_KEY_GALAXY_PUBLISH_NFT.concat(routerType).concat(":").concat(skuId);
Object obj = redisDataSourceUtil.getRedisGoblinUtil().get(redisKey);
if (obj == null) {
return -1;
......
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