页面权限
This commit is contained in:
@@ -4,8 +4,8 @@ import com.czg.account.dto.pagepath.PagePathPermissionAddDTO;
|
|||||||
import com.czg.account.entity.ShopPagePath;
|
import com.czg.account.entity.ShopPagePath;
|
||||||
import com.czg.account.entity.ShopStaff;
|
import com.czg.account.entity.ShopStaff;
|
||||||
import com.czg.account.service.ShopPagePathService;
|
import com.czg.account.service.ShopPagePathService;
|
||||||
import com.czg.account.service.ShopStaffService;
|
|
||||||
import com.czg.exception.ApiNotPrintException;
|
import com.czg.exception.ApiNotPrintException;
|
||||||
|
import com.czg.service.account.mapper.ShopStaffMapper;
|
||||||
import com.mybatisflex.core.query.QueryWrapper;
|
import com.mybatisflex.core.query.QueryWrapper;
|
||||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||||
import com.czg.account.entity.ShopStaffPagePermission;
|
import com.czg.account.entity.ShopStaffPagePermission;
|
||||||
@@ -28,12 +28,12 @@ public class ShopStaffPagePermissionServiceImpl extends ServiceImpl<ShopStaffPag
|
|||||||
@Resource
|
@Resource
|
||||||
private ShopPagePathService shopPagePathService;
|
private ShopPagePathService shopPagePathService;
|
||||||
@Resource
|
@Resource
|
||||||
private ShopStaffService shopStaffService;
|
private ShopStaffMapper shopStaffMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean add(Long shopId, PagePathPermissionAddDTO pagePathPermissionAddDTO) {
|
public Boolean add(Long shopId, PagePathPermissionAddDTO pagePathPermissionAddDTO) {
|
||||||
ShopStaff shopStaff = shopStaffService.getOne(new QueryWrapper().eq(ShopStaff::getId, pagePathPermissionAddDTO.getStaffId()).eq(ShopStaff::getShopId, shopId));
|
ShopStaff shopStaff = shopStaffMapper.selectOneByQuery(new QueryWrapper().eq(ShopStaff::getId, pagePathPermissionAddDTO.getStaffId()).eq(ShopStaff::getShopId, shopId));
|
||||||
if (shopStaff == null) {
|
if (shopStaff == null) {
|
||||||
throw new ApiNotPrintException("员工不存在");
|
throw new ApiNotPrintException("员工不存在");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user