Commit e4b1bc5a authored by tangtuo's avatar tangtuo

debug

parent a7b4dc77
...@@ -46,15 +46,4 @@ public class CollectionNftVo { ...@@ -46,15 +46,4 @@ public class CollectionNftVo {
@ApiModelProperty("是否已委托上架 0-否 1-是") @ApiModelProperty("是否已委托上架 0-否 1-是")
private Integer isEntrust; private Integer isEntrust;
public CollectionNftVo(Nft nft, Category category) {
this.id = nft.getId();
this.nftId = nft.getNftId();
this.category = category.getCategoryName();
this.name = nft.getName();
this.cover = nft.getCover();
this.isCommemorate = nft.getIsCommemorate();
this.fileUrl = nft.getFileUrl();
this.publishTime = nft.getPublishTime();
this.isEntrust = nft.getIsEntrust();
}
} }
...@@ -39,4 +39,12 @@ public interface EntrustShelfService extends IService<EntrustShelf> { ...@@ -39,4 +39,12 @@ public interface EntrustShelfService extends IService<EntrustShelf> {
* @return * @return
*/ */
PageInfo<EntrustShelf> getPages(Integer pageNum, Integer pageSize, String telephone, String name, String from, String to); PageInfo<EntrustShelf> getPages(Integer pageNum, Integer pageSize, String telephone, String name, String from, String to);
/**
* 根据nft哈希查询详情
*
* @param nftHash
* @return
*/
EntrustShelf getByNftHash(String nftHash);
} }
...@@ -86,4 +86,11 @@ public class EntrustShelfServiceImpl extends ServiceImpl<EntrustShelfMapper, Ent ...@@ -86,4 +86,11 @@ public class EntrustShelfServiceImpl extends ServiceImpl<EntrustShelfMapper, Ent
} }
return new PageInfo<>(this.list(queryWrapper)); return new PageInfo<>(this.list(queryWrapper));
} }
@Override
public EntrustShelf getByNftHash(String nftHash) {
QueryWrapper<EntrustShelf> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("nft_hash", nftHash);
return this.getOne(queryWrapper);
}
} }
...@@ -79,6 +79,8 @@ ...@@ -79,6 +79,8 @@
a.nft_id, a.nft_id,
a.nft_hash, a.nft_hash,
a.file_url, a.file_url,
a.is_entrust,
a.publish_time,
a.is_commemorate, a.is_commemorate,
b.category_name as category b.category_name as category
from tb_nft a left join tb_category b on a.category_id = b.id from tb_nft a left join tb_category b on a.category_id = b.id
......
...@@ -35,10 +35,10 @@ public class EntrustShelfController { ...@@ -35,10 +35,10 @@ public class EntrustShelfController {
return ResponseModel.success(entrustShelfService.submit(entrustShelf)); return ResponseModel.success(entrustShelfService.submit(entrustShelf));
} }
@GetMapping("/detail/{id}") @GetMapping("/detail/{nftHash}")
@ApiOperation(value = "根据id查询委托详情") @ApiOperation(value = "根据id查询委托详情")
public ResponseModel<EntrustShelf> getById(@PathVariable Integer id) { public ResponseModel<EntrustShelf> getById(@PathVariable String nftHash) {
return ResponseModel.success(entrustShelfService.getById(id)); return ResponseModel.success(entrustShelfService.getByNftHash(nftHash));
} }
@PostMapping("/update") @PostMapping("/update")
......
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