Commit 6b0c7a22 authored by yuanshuo's avatar yuanshuo

按照最新版原型增加接口

1./review/scene/change/task/getSceneListAll 获取所有场景
parent a3e21667
...@@ -5,6 +5,7 @@ import com.ruoyi.domain.ReviewDetails; ...@@ -5,6 +5,7 @@ import com.ruoyi.domain.ReviewDetails;
import com.ruoyi.domain.ReviewScene; import com.ruoyi.domain.ReviewScene;
import com.ruoyi.domain.ReviewStandard; import com.ruoyi.domain.ReviewStandard;
import com.ruoyi.web.request.ReviewSceneFindListRequest; import com.ruoyi.web.request.ReviewSceneFindListRequest;
import com.ruoyi.web.response.GetSceneListResponse;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
...@@ -19,4 +20,6 @@ public interface ReviewSceneMapper extends BaseMapper<ReviewScene> { ...@@ -19,4 +20,6 @@ public interface ReviewSceneMapper extends BaseMapper<ReviewScene> {
// 查询场景列表 // 查询场景列表
List<ReviewScene> findList(ReviewSceneFindListRequest request); List<ReviewScene> findList(ReviewSceneFindListRequest request);
List<GetSceneListResponse> getSceneListById(@Param("id") Long id);
} }
...@@ -5,6 +5,7 @@ import com.ruoyi.domain.ReviewDetails; ...@@ -5,6 +5,7 @@ import com.ruoyi.domain.ReviewDetails;
import com.ruoyi.domain.ReviewScene; import com.ruoyi.domain.ReviewScene;
import com.ruoyi.domain.ReviewSceneChangeTask; import com.ruoyi.domain.ReviewSceneChangeTask;
import com.ruoyi.web.request.ReviewSceneFindListRequest; import com.ruoyi.web.request.ReviewSceneFindListRequest;
import com.ruoyi.web.response.GetSceneListResponse;
import java.util.List; import java.util.List;
...@@ -30,4 +31,9 @@ public interface ReviewSceneService extends IService<ReviewScene> { ...@@ -30,4 +31,9 @@ public interface ReviewSceneService extends IService<ReviewScene> {
* @param reviewScene * @param reviewScene
*/ */
void addReviewScene(ReviewScene reviewScene); void addReviewScene(ReviewScene reviewScene);
/*
* 获取所有场景列表
* */
List<GetSceneListResponse> getSceneListById(Long id);
} }
...@@ -7,6 +7,7 @@ import com.ruoyi.domain.ReviewSceneChangeTask; ...@@ -7,6 +7,7 @@ import com.ruoyi.domain.ReviewSceneChangeTask;
import com.ruoyi.mapper.ReviewSceneMapper; import com.ruoyi.mapper.ReviewSceneMapper;
import com.ruoyi.service.ReviewSceneService; import com.ruoyi.service.ReviewSceneService;
import com.ruoyi.web.request.ReviewSceneFindListRequest; import com.ruoyi.web.request.ReviewSceneFindListRequest;
import com.ruoyi.web.response.GetSceneListResponse;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -48,4 +49,12 @@ public class ReviewSceneServiceImpl extends ServiceImpl<ReviewSceneMapper, Revie ...@@ -48,4 +49,12 @@ public class ReviewSceneServiceImpl extends ServiceImpl<ReviewSceneMapper, Revie
save(reviewScene); save(reviewScene);
} }
/*
* 获取所有场景列表
* */
@Override
public List<GetSceneListResponse> getSceneListById(Long id) {
return reviewSceneMapper.getSceneListById(id);
}
} }
...@@ -9,10 +9,7 @@ import com.ruoyi.common.enums.BusinessType; ...@@ -9,10 +9,7 @@ import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.bean.BeanUtils; import com.ruoyi.common.utils.bean.BeanUtils;
import com.ruoyi.domain.ReviewKeyPoint; import com.ruoyi.domain.ReviewKeyPoint;
import com.ruoyi.domain.ReviewSceneChangeTask; import com.ruoyi.domain.ReviewSceneChangeTask;
import com.ruoyi.service.ReviewDetailsService; import com.ruoyi.service.*;
import com.ruoyi.service.ReviewSceneChangeTaskService;
import com.ruoyi.service.ReviewStandardService;
import com.ruoyi.service.ReviewUsecaseService;
import com.ruoyi.web.request.ReviewSceneChangeTaskCreateRequest; import com.ruoyi.web.request.ReviewSceneChangeTaskCreateRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskPassRequest; import com.ruoyi.web.request.ReviewSceneChangeTaskPassRequest;
import com.ruoyi.web.response.*; import com.ruoyi.web.response.*;
...@@ -50,6 +47,9 @@ public class ReviewSceneChangeTaskController extends BaseController { ...@@ -50,6 +47,9 @@ public class ReviewSceneChangeTaskController extends BaseController {
@Autowired @Autowired
private ReviewDetailsService reviewDetailsService; private ReviewDetailsService reviewDetailsService;
@Autowired
private ReviewSceneService reviewSceneService;
@ApiOperation("新建场景变更任务") @ApiOperation("新建场景变更任务")
@Trace @Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")}) @Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
...@@ -269,4 +269,18 @@ public class ReviewSceneChangeTaskController extends BaseController { ...@@ -269,4 +269,18 @@ public class ReviewSceneChangeTaskController extends BaseController {
List<DeleteDetailsResponse> responseList = reviewDetailsService.getDeleteDetailsResponseList(deleteDetailsRequest); List<DeleteDetailsResponse> responseList = reviewDetailsService.getDeleteDetailsResponseList(deleteDetailsRequest);
return R.ok(responseList); return R.ok(responseList);
} }
/*
* 获取所有场景列表
* */
@ApiOperation("获取所有场景列表")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@Log(title = "获取所有场景列表", businessType = BusinessType.UPDATE)
@RequestMapping(method = RequestMethod.POST, value = "/getSceneListAll")
public R<List<GetSceneListResponse>> getSceneListAll(@RequestBody GetSceneListRequest getSceneListRequest){
Long id = Long.parseLong(getSceneListRequest.getDetailsId());
List<GetSceneListResponse> getSceneListResponses = reviewSceneService.getSceneListById(id);
return R.ok(getSceneListResponses);
}
} }
package com.ruoyi.web.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "GetSceneListRequest" ,description = "获取场景列表请求request")
public class GetSceneListRequest {
@ApiModelProperty("细则id")
private String detailsId;
}
package com.ruoyi.web.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ApiModel(value = "GetSceneListResponse", description = "查询场景")
@Data
public class GetSceneListResponse {
@ApiModelProperty("id")
private Long id;
@ApiModelProperty("文本内容")
private String text;
@ApiModelProperty("细则id")
private Long reviewDetailsId;
}
...@@ -26,4 +26,9 @@ ...@@ -26,4 +26,9 @@
</if> </if>
</where> </where>
</select> </select>
<select id="getSceneListById" resultType="com.ruoyi.web.response.GetSceneListResponse">
select id,text,review_details_id
from t_review_scene
where review_details_id = #{id}
</select>
</mapper> </mapper>
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