|
|
@@ -26,6 +26,21 @@ public class NfttController extends MyController {
|
|
|
renderJson(MyRet.ok(service.hello()));
|
|
|
}
|
|
|
|
|
|
+ @Before(LoginInterceptor.class)
|
|
|
+ @EmptyInterface({"id"})
|
|
|
+ public void findById() {
|
|
|
+ JSONObject requestBodyJson = MyController.getJsonModelByRequestAndType(getRequest(), JSONObject.class);
|
|
|
+
|
|
|
+ String id = requestBodyJson.getString("id");
|
|
|
+ Nftt nftt = service.findNfttById(id);
|
|
|
+
|
|
|
+ if (nftt != null) {
|
|
|
+ renderJson(MyRet.ok("获取成功").setData(nftt));
|
|
|
+ } else {
|
|
|
+ renderJson(MyRet.fail("获取失败,非法请求可能会导致ip封禁!" + id));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@Before(LoginInterceptor.class)
|
|
|
@RequiredRoleInterface({UserController.ROLE_CHECK_ADMIN, UserController.ROLE_SUPER_ADMIN})
|
|
|
@EmptyInterface({"price", "name", "presale_start_time", "presale_end_time", "buying_start_time", "author", "max_quantity", "detail_image_list"})
|