页面权限

This commit is contained in:
张松
2025-04-02 15:59:14 +08:00
parent ee1661e20b
commit 2d80aa5b2f

View File

@@ -4,8 +4,8 @@ import com.czg.account.dto.pagepath.PagePathPermissionAddDTO;
import com.czg.account.entity.ShopPagePath;
import com.czg.account.entity.ShopStaff;
import com.czg.account.service.ShopPagePathService;
import com.czg.account.service.ShopStaffService;
import com.czg.exception.ApiNotPrintException;
import com.czg.service.account.mapper.ShopStaffMapper;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import com.czg.account.entity.ShopStaffPagePermission;
@@ -28,12 +28,12 @@ public class ShopStaffPagePermissionServiceImpl extends ServiceImpl<ShopStaffPag
@Resource
private ShopPagePathService shopPagePathService;
@Resource
private ShopStaffService shopStaffService;
private ShopStaffMapper shopStaffMapper;
@Override
@Transactional(rollbackFor = Exception.class)
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) {
throw new ApiNotPrintException("员工不存在");
}