添加注释

master
panqihua 5 years ago
parent d5baa78b44
commit b2582a99c1
  1. 2
      src/main/java/com/community/pocket/repository/android/UserDao.java
  2. 15
      src/test/java/com/community/pocket/DemoApplicationTests.java

@ -214,7 +214,7 @@ public class UserDao extends BaseDao<MyInfo> {
}
}
//获取活跃用户
//获取用户以信用分降序排列
public List<UserHot> rankUser(int num) {
List<UserHot> userHots = new ArrayList<>();
List<MyInfo> myInfos = mongoTemplate.find(new Query().with(Sort.by("creditScore").descending()).limit(num), entityClass());

@ -109,6 +109,7 @@ class DemoApplicationTests {
}
}
//废品价格数据
@Test
void loadPriceData() {
for (int i = 0; i < 100; i++) {
@ -119,6 +120,20 @@ class DemoApplicationTests {
}
}
//废品数据名字自定义
@Test
void initPriceDataWithName() {
String[] nameList = new String[]{"废品1", "废品2", "废品2", "废品2", "废品2"};
for (String name : nameList) {
GarbageWastePrice price = new GarbageWastePrice();
price.setName(name);
price.setPrice(new Random().nextInt(100) * 1F);
garbagePriceDao.save(price);
}
}
@Test
void testMessage() {
LOG.info(messageService.getMessage(GarbageCateGory.type1));

Loading…
Cancel
Save