提交 bebcc5b6 authored 作者: 吴德鹏's avatar 吴德鹏

导出

上级 b1860139
......@@ -162,4 +162,12 @@ public class TbCfItemCommentController {
List<SkuVo> list = tbCfItemCommentService.queryItemSku(itemId);
return R.ok().put("list", list);
}
@GetMapping("/selectRandomUser")
@ResponseBody
public R selectRandomUser() {
String userId = tbCfItemCommentService.selectRandomUser();
return R.ok().put("userId", userId);
}
}
......@@ -46,4 +46,6 @@ public interface TbCfUserInfoDao extends BaseDao<TbCfUserInfoEntity> {
int queryVirtualUserCount(Map<String, Object> map);
int countUser(@Param("account") String account, @Param("avatar") String avatar, @Param("nick") String nick);
String selectRandomUser();
}
......@@ -72,4 +72,6 @@ public interface TbCfItemCommentService {
int deleteBatch(String[] ids);
List<SkuVo> queryItemSku(String itemId);
String selectRandomUser();
}
......@@ -122,4 +122,9 @@ public class TbCfItemCommentServiceImpl implements TbCfItemCommentService {
});
return list;
}
@Override
public String selectRandomUser() {
return tbCfUserInfoDao.selectRandomUser();
}
}
......@@ -333,4 +333,8 @@
AND (account LIKE concat('%',#{name},'%') or nick LIKE concat('%',#{name},'%'))
</if>
</select>
<select id="selectRandomUser" resultType="string">
SELECT user_id FROM `tb_cf_user_info` WHERE `real` = 0 ORDER BY RAND() LIMIT 1;
</select>
</mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论