Commit 4cee23c5 authored by wdy's avatar wdy

查看标准详情

parent bd5cf129
...@@ -3,6 +3,7 @@ package com.ruoyi.service; ...@@ -3,6 +3,7 @@ package com.ruoyi.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.domain.Standard; import com.ruoyi.domain.Standard;
import com.ruoyi.web.request.StandardEditRequest; import com.ruoyi.web.request.StandardEditRequest;
import com.ruoyi.web.request.StandardGetInfoRequest;
import com.ruoyi.web.request.StandardListRequest; import com.ruoyi.web.request.StandardListRequest;
import java.util.List; import java.util.List;
...@@ -19,4 +20,6 @@ public interface StandardService extends IService<Standard> { ...@@ -19,4 +20,6 @@ public interface StandardService extends IService<Standard> {
Standard findListById(Long id); Standard findListById(Long id);
void editStandard(StandardEditRequest request); void editStandard(StandardEditRequest request);
Standard getInfo(StandardGetInfoRequest request);
} }
...@@ -6,6 +6,7 @@ import com.ruoyi.domain.Standard; ...@@ -6,6 +6,7 @@ import com.ruoyi.domain.Standard;
import com.ruoyi.mapper.StandardMapper; import com.ruoyi.mapper.StandardMapper;
import com.ruoyi.service.StandardService; import com.ruoyi.service.StandardService;
import com.ruoyi.web.request.StandardEditRequest; import com.ruoyi.web.request.StandardEditRequest;
import com.ruoyi.web.request.StandardGetInfoRequest;
import com.ruoyi.web.request.StandardListRequest; import com.ruoyi.web.request.StandardListRequest;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -48,4 +49,9 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i ...@@ -48,4 +49,9 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
BeanUtils.copyBeanProp(standard, request); BeanUtils.copyBeanProp(standard, request);
standardService.updateById(standard); standardService.updateById(standard);
} }
@Override
public Standard getInfo(StandardGetInfoRequest request) {
return standardMapper.selectById(request.getId());
}
} }
...@@ -7,11 +7,9 @@ import com.ruoyi.common.core.page.TableDataInfo; ...@@ -7,11 +7,9 @@ import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.domain.Standard; import com.ruoyi.domain.Standard;
import com.ruoyi.service.StandardService; import com.ruoyi.service.StandardService;
import com.ruoyi.web.request.ReviewSceneChangeTaskFindPendingRequest; import com.ruoyi.web.request.*;
import com.ruoyi.web.request.StandardEditRequest;
import com.ruoyi.web.request.StandardListRequest;
import com.ruoyi.web.request.TaskEditRequest;
import com.ruoyi.web.response.ReviewSceneChangeTaskResponse; import com.ruoyi.web.response.ReviewSceneChangeTaskResponse;
import com.ruoyi.web.response.TaskGetInfoResponse;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.skywalking.apm.toolkit.trace.Tag; import org.apache.skywalking.apm.toolkit.trace.Tag;
...@@ -54,4 +52,14 @@ public class StandardController extends BaseController { ...@@ -54,4 +52,14 @@ public class StandardController extends BaseController {
standardService.editStandard(request); standardService.editStandard(request);
return R.ok(); return R.ok();
} }
@ApiOperation("查看标准详情")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/getInfo")
public R<Standard> getInfo(@Validated @RequestBody StandardGetInfoRequest request) {
Standard standard = standardService.getInfo(request);
return R.ok(standard);
}
} }
package com.ruoyi.web.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ApiModel(value = "StandardListRequest", description = "查询标准详情")
@Data
public class StandardGetInfoRequest {
@ApiModelProperty("ID")
private Long id;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment