fix bug
This commit is contained in:
@ -64,8 +64,8 @@ public class ShopAssistantController {
|
|||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
@PreAuthorize("@ss.hasPermission('mall:shop-assistant:query')")
|
@PreAuthorize("@ss.hasPermission('mall:shop-assistant:query')")
|
||||||
public CommonResult<ShopAssistantRespVO> getShopAssistant(@RequestParam("id") Long id) {
|
public CommonResult<ShopAssistantRespVO> getShopAssistant(@RequestParam("id") Long id) {
|
||||||
ShopAssistantDO shopAssistant = shopAssistantService.getShopAssistant(id);
|
ShopAssistantRespVO vo = shopAssistantService.getShopAssistant(id);
|
||||||
return success(ShopAssistantConvert.INSTANCE.convert(shopAssistant));
|
return success(vo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
|
@ -43,7 +43,7 @@ public interface ShopAssistantService {
|
|||||||
* @param id 编号
|
* @param id 编号
|
||||||
* @return 门店店员
|
* @return 门店店员
|
||||||
*/
|
*/
|
||||||
ShopAssistantDO getShopAssistant(Long id);
|
ShopAssistantRespVO getShopAssistant(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得门店店员列表
|
* 获得门店店员列表
|
||||||
|
@ -120,8 +120,11 @@ public class ShopAssistantServiceImpl implements ShopAssistantService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ShopAssistantDO getShopAssistant(Long id) {
|
public ShopAssistantRespVO getShopAssistant(Long id) {
|
||||||
return shopAssistantMapper.selectById(id);
|
ShopAssistantDO shopAssistantDO = shopAssistantMapper.selectById(id);
|
||||||
|
ShopAssistantRespVO vo = ShopAssistantConvert.INSTANCE.convert(shopAssistantDO);
|
||||||
|
fillData(vo);
|
||||||
|
return vo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -155,6 +158,14 @@ public class ShopAssistantServiceImpl implements ShopAssistantService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void fillData(ShopAssistantRespVO vo) {
|
||||||
|
MemberUserDO user = userService.getUser(vo.getUserId());
|
||||||
|
ShopDO shop = shopService.getShop(vo.getStoreId());
|
||||||
|
vo.setAvatar(user.getAvatar());
|
||||||
|
vo.setNickname(user.getNickname());
|
||||||
|
vo.setStoreName(shop.getStoreName());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ShopAssistantDO> getShopAssistantList(ShopAssistantExportReqVO exportReqVO) {
|
public List<ShopAssistantDO> getShopAssistantList(ShopAssistantExportReqVO exportReqVO) {
|
||||||
return shopAssistantMapper.selectList(exportReqVO);
|
return shopAssistantMapper.selectList(exportReqVO);
|
||||||
|
Reference in New Issue
Block a user