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

Commit f0a1d8e9 authored by 胡佳晨's avatar 胡佳晨

增加 nft技术开关 相关接口

parent 51a4ce29
...@@ -89,4 +89,12 @@ public class GoblinNftGoodsAppController { ...@@ -89,4 +89,12 @@ public class GoblinNftGoodsAppController {
public ResponseDto<Integer> getOpenNftTec() { public ResponseDto<Integer> getOpenNftTec() {
return ResponseDto.success(redisUtils.getOpenNftTec(CurrentUtil.getCurrentUid())); return ResponseDto.success(redisUtils.getOpenNftTec(CurrentUtil.getCurrentUid()));
} }
@GetMapping("hasNftTec")
@ApiOperation("获取 是否拥有技术nft权限")
public ResponseDto<Integer> getBuyNftTec() {
return ResponseDto.success(redisUtils.getBuyNftTec(CurrentUtil.getCurrentUid()));
}
} }
...@@ -1831,6 +1831,7 @@ public class GoblinRedisUtils { ...@@ -1831,6 +1831,7 @@ public class GoblinRedisUtils {
/** /**
* 设置 技术部nft特效开关 * 设置 技术部nft特效开关
*
* @param uid * @param uid
* @param status * @param status
*/ */
...@@ -1851,14 +1852,23 @@ public class GoblinRedisUtils { ...@@ -1851,14 +1852,23 @@ public class GoblinRedisUtils {
/** /**
* 获取 技术部nft特效开关 * 获取 技术部nft特效开关
*
* @param uid * @param uid
* @return * @return
*/ */
public Integer getOpenNftTec(String uid){ public Integer getOpenNftTec(String uid) {
String rdk = GoblinRedisConst.OPEN_NFT_TEC.concat(uid); String rdk = GoblinRedisConst.OPEN_NFT_TEC.concat(uid);
Object obj = redisUtil.get(rdk); Object obj = redisUtil.get(rdk);
if (obj == null) { if (obj == null) {
return null; Integer data = getBuyNftTec(uid);
if (data == null) {
return null;
} else if (data == 1) {
setOpenNftTec(uid, 1);
return 1;
} else {
return null;
}
} else { } else {
return (int) obj; return (int) obj;
} }
......
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