Commit 4829977d authored by jinliang's avatar jinliang

reduce info log size

parent 2d8cfaf2
...@@ -65,7 +65,7 @@ public class TempController { ...@@ -65,7 +65,7 @@ public class TempController {
public ResultDto getFavoritesByShopId(@PathVariable("shopId") String shopId) { public ResultDto getFavoritesByShopId(@PathVariable("shopId") String shopId) {
ResultDto resultDto = new ResultDto(); ResultDto resultDto = new ResultDto();
String logs = "【getFavoritesByShopId】 "; String logs = "【getFavoritesByShopId】 ";
log.info("{}, params : {}", logs, shopId); //log.info("{}, params : {}", logs, shopId);
try { try {
List<FavoriteUrl> list = shopService.getFavoritesByShopId(shopId); List<FavoriteUrl> list = shopService.getFavoritesByShopId(shopId);
resultDto.setData(list); resultDto.setData(list);
......
...@@ -517,7 +517,7 @@ public class ShopServiceImpl implements ShopService { ...@@ -517,7 +517,7 @@ public class ShopServiceImpl implements ShopService {
throw new ClientRequestException(AccountErrorCode.NOPERMISSION); throw new ClientRequestException(AccountErrorCode.NOPERMISSION);
} }
} }
logger.info("getshoplist step-2:{},{}", username, System.currentTimeMillis() - start); //logger.info("getshoplist step-2:{},{}", username, System.currentTimeMillis() - start);
// 3. 根据 groupId 与 username 来查询 shopIds (如果当前用户是父账户,则查询结果包含子账户的shopId) // 3. 根据 groupId 与 username 来查询 shopIds (如果当前用户是父账户,则查询结果包含子账户的shopId)
start = System.currentTimeMillis(); start = System.currentTimeMillis();
...@@ -535,7 +535,7 @@ public class ShopServiceImpl implements ShopService { ...@@ -535,7 +535,7 @@ public class ShopServiceImpl implements ShopService {
if ("penghai".equals(tag)) { if ("penghai".equals(tag)) {
allIds = userShopRepository.findByUsernameAndGroupId(username, groupId).stream().map(UserShop::getShopId).collect(Collectors.toList()); allIds = userShopRepository.findByUsernameAndGroupId(username, groupId).stream().map(UserShop::getShopId).collect(Collectors.toList());
} }
logger.info("getshoplist step-3:{},{}", username, System.currentTimeMillis() - start); //logger.info("getshoplist step-3:{},{}", username, System.currentTimeMillis() - start);
// 4. 根据传入的过滤条件得到 shopIds // 4. 根据传入的过滤条件得到 shopIds
start = System.currentTimeMillis(); start = System.currentTimeMillis();
...@@ -566,14 +566,14 @@ public class ShopServiceImpl implements ShopService { ...@@ -566,14 +566,14 @@ public class ShopServiceImpl implements ShopService {
allIds.removeAll(shopIds2); allIds.removeAll(shopIds2);
shopIds = allIds; shopIds = allIds;
} }
logger.info("getshoplist step-4:{},{}", username, System.currentTimeMillis() - start); //logger.info("getshoplist step-4:{},{}", username, System.currentTimeMillis() - start);
amount = amount > 100 ? 100 : amount; amount = amount > 100 ? 100 : amount;
Pageable pageable = PageRequest.of(pageNum, amount); Pageable pageable = PageRequest.of(pageNum, amount);
// 5. 根据过滤后的商铺ids 与 其他过滤条件 得到商铺信息并分页 // 5. 根据过滤后的商铺ids 与 其他过滤条件 得到商铺信息并分页
start = System.currentTimeMillis(); start = System.currentTimeMillis();
Page<Shop> shops = getShopsByFilter(shopFilterDto, shopIds, pageable); Page<Shop> shops = getShopsByFilter(shopFilterDto, shopIds, pageable);
logger.info("getshoplist step-5:{},{}", username, System.currentTimeMillis() - start); //logger.info("getshoplist step-5:{},{}", username, System.currentTimeMillis() - start);
// 6. 封装 shopResultDtos 信息并返回 // 6. 封装 shopResultDtos 信息并返回
start = System.currentTimeMillis(); start = System.currentTimeMillis();
...@@ -641,7 +641,7 @@ public class ShopServiceImpl implements ShopService { ...@@ -641,7 +641,7 @@ public class ShopServiceImpl implements ShopService {
ShopResultDto shopResultDto = getShopResultDto(groupId, x, ipResource, specialLine); ShopResultDto shopResultDto = getShopResultDto(groupId, x, ipResource, specialLine);
shopResultDtos.add(shopResultDto); shopResultDtos.add(shopResultDto);
logger.info("getshoplist step-6.x:{},{},{}", username, System.currentTimeMillis() - start1, Thread.currentThread().getName()); //logger.info("getshoplist step-6.x:{},{},{}", username, System.currentTimeMillis() - start1, Thread.currentThread().getName());
} }
); );
ipResourceRepository.saveAll(pageIpResourceListToSave); ipResourceRepository.saveAll(pageIpResourceListToSave);
......
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