Commit 9728c965 authored by renjie's avatar renjie

shop接口修改

parent 2190ec80
......@@ -34,7 +34,7 @@ public class ShopDto {
private IpResource bindIp;
public static ShopDto of(Shop shop, IpResource ipResources) {
public static ShopDto of(Shop shop, String group, IpResource ipResources) {
ShopDto shopDto = new ShopDto();
shopDto.setShopId(shop.getShopId());
if (shop.getShopName() != null)
......@@ -53,6 +53,9 @@ public class ShopDto {
shopDto.setShopUA(shop.getShopUA());
if (shop.getShopCookie() != null)
shopDto.setShopCookie(shop.getShopCookie());
if (shop.getShopAccount() != null)
shopDto.setShopAccount(shop.getShopAccount());
shopDto.setGroup(group);
shopDto.setBindIp(ipResources);
return shopDto;
}
......
......@@ -309,7 +309,8 @@ public class ShopServiceImpl implements ShopService {
IpResource ipResource = ipResourceRepository.findByAddrAndIsDeleted(x.getIp(), false);
if (ipResource == null)
ipResource = new IpResource();
shopDtos.add(ShopDto.of(x, ipResource));
String group1 = userShopRepository.findByUsernameAndShopId(username, x.getShopId()).getGroupId();
shopDtos.add(ShopDto.of(x, group1, ipResource));
});
Page<ShopDto> shopDtoPage = new PageImpl<>(shopDtos, pageable, shopDtos.size());
ShopPageResultDto shopPageResultDto = new ShopPageResultDto();
......
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