新增员工详情接口

This commit is contained in:
张松 2025-02-14 15:54:36 +08:00
parent 45b0a9fd37
commit a4f89151f4
1 changed files with 13 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import com.czg.account.entity.ShopStaff;
import com.czg.account.service.ShopStaffService;
import com.czg.annotation.SaAdminCheckPermission;
import com.czg.resp.CzgResult;
import com.czg.sa.StpKit;
import com.mybatisflex.core.paginate.Page;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
@ -37,6 +38,18 @@ public class ShopStaffController {
return CzgResult.success(shopStaffService.get(name, code));
}
/**
* 员工详情
* 权限标识: shopStaff:detail
* @param id shopStaff id
* @return 详细信息
*/
@SaAdminCheckPermission("shopStaff:detail")
@GetMapping("/detail")
public CzgResult<ShopStaff> detail(@RequestParam Long id) {
return CzgResult.success(shopStaffService.queryChain().eq(ShopStaff::getId, id).eq(ShopStaff::getShopId, StpKit.USER.getShopId()).one());
}
/**
* 员工添加
* 权限标识: shopStaff:add