Commit c98ec05f authored by tangtuo's avatar tangtuo

nft列表里踢出未发行成功的记录

parent bf6b5664
...@@ -198,6 +198,7 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe ...@@ -198,6 +198,7 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
public List<Nft> listCurrent(Integer categoryId, Integer userId) { public List<Nft> listCurrent(Integer categoryId, Integer userId) {
QueryWrapper<Nft> queryWrapper = new QueryWrapper<>(); QueryWrapper<Nft> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("user_id", userId); queryWrapper.eq("user_id", userId);
queryWrapper.ne("nft_hash", "");
if (categoryId != null) { if (categoryId != null) {
queryWrapper.eq("category_id", categoryId); queryWrapper.eq("category_id", categoryId);
} }
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
<select id="list" resultType="com.fzm.common.entity.Nft"> <select id="list" resultType="com.fzm.common.entity.Nft">
select * from tb_nft select * from tb_nft
where status = 1 where status = 1 and nft_hash != ''
<if test="categoryId != null and categoryId > 0"> <if test="categoryId != null and categoryId > 0">
and category_id=#{categoryId} and category_id=#{categoryId}
</if> </if>
order by is_top desc , update_date desc order by is_top desc , publish_time desc
limit #{pageNum},#{pageSize} limit #{pageNum},#{pageSize}
</select> </select>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
tb_nft n tb_nft n
LEFT JOIN tb_user u ON n.user_id = u.id LEFT JOIN tb_user u ON n.user_id = u.id
WHERE WHERE
1 = 1 nft_hash != ''
<if test="name != null and name != ''"> <if test="name != null and name != ''">
and n.name like concat ('%',#{name},'%') and n.name like concat ('%',#{name},'%')
</if> </if>
......
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