| | |
| | | import com.xiaopeng.api.model.maintenance.XpCheckLocation; |
| | | import com.xiaopeng.common.core.domain.R; |
| | | import com.xiaopeng.common.core.enums.DisabledEnum; |
| | | import com.xiaopeng.common.security.service.TokenService; |
| | | import com.xiaopeng.maintenance.service.IXpCheckLocationService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | @RequiredArgsConstructor(onConstructor_ = @Lazy) |
| | | public class XpCheckLocationController { |
| | | private final IXpCheckLocationService xpCheckLocationService; |
| | | private final TokenService tokenService; |
| | | |
| | | @GetMapping("/api/v1/check-location/list") |
| | | @ApiOperation(value = "获取打卡地址列表", tags = {"管理后台-车队管理"}) |
| | |
| | | public R<XpCheckLocation> queryById(@RequestParam Long id) { |
| | | return R.ok(xpCheckLocationService.getById(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据ID查询打卡地址", tags = {"运维APP-排班与考勤"}) |
| | | @GetMapping("/api/v1/check-location/queryByUserId") |
| | | public R<XpCheckLocation> queryByUserId() { |
| | | Long id = tokenService.getLoginOperationUser().getId(); |
| | | return R.ok(xpCheckLocationService.queryByUserId(id)); |
| | | } |
| | | |
| | | } |