Commit 9728c965 authored by renjie's avatar renjie

shop接口修改

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