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;
import com.ruoyi.domain.ReviewScene;
import com.ruoyi.domain.ReviewStandard;
import com.ruoyi.web.request.ReviewSceneFindListRequest;
import com.ruoyi.web.response.GetSceneListResponse;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
......@@ -19,4 +20,6 @@ public interface ReviewSceneMapper extends BaseMapper<ReviewScene> {
// 查询场景列表
List<ReviewScene> findList(ReviewSceneFindListRequest request);
List<GetSceneListResponse> getSceneListById(@Param("id") Long id);
}
......@@ -5,6 +5,7 @@ import com.ruoyi.domain.ReviewDetails;
import com.ruoyi.domain.ReviewScene;
import com.ruoyi.domain.ReviewSceneChangeTask;
import com.ruoyi.web.request.ReviewSceneFindListRequest;
import com.ruoyi.web.response.GetSceneListResponse;
import java.util.List;
......@@ -30,4 +31,9 @@ public interface ReviewSceneService extends IService<ReviewScene> {
* @param reviewScene
*/
void addReviewScene(ReviewScene reviewScene);
/*
* 获取所有场景列表
* */
List<GetSceneListResponse> getSceneListById(Long id);
}
......@@ -7,6 +7,7 @@ import com.ruoyi.domain.ReviewSceneChangeTask;
import com.ruoyi.mapper.ReviewSceneMapper;
import com.ruoyi.service.ReviewSceneService;
import com.ruoyi.web.request.ReviewSceneFindListRequest;
import com.ruoyi.web.response.GetSceneListResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -48,4 +49,12 @@ public class ReviewSceneServiceImpl extends ServiceImpl<ReviewSceneMapper, Revie
save(reviewScene);
}
/*
* 获取所有场景列表
* */
@Override
public List<GetSceneListResponse> getSceneListById(Long id) {
return reviewSceneMapper.getSceneListById(id);
}
}
......@@ -9,10 +9,7 @@ import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.bean.BeanUtils;
import com.ruoyi.domain.ReviewKeyPoint;
import com.ruoyi.domain.ReviewSceneChangeTask;
import com.ruoyi.service.ReviewDetailsService;
import com.ruoyi.service.ReviewSceneChangeTaskService;
import com.ruoyi.service.ReviewStandardService;
import com.ruoyi.service.ReviewUsecaseService;
import com.ruoyi.service.*;
import com.ruoyi.web.request.ReviewSceneChangeTaskCreateRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskPassRequest;
import com.ruoyi.web.response.*;
......@@ -50,6 +47,9 @@ public class ReviewSceneChangeTaskController extends BaseController {
@Autowired
private ReviewDetailsService reviewDetailsService;
@Autowired
private ReviewSceneService reviewSceneService;
@ApiOperation("新建场景变更任务")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
......@@ -269,4 +269,18 @@ public class ReviewSceneChangeTaskController extends BaseController {
List<DeleteDetailsResponse> responseList = reviewDetailsService.getDeleteDetailsResponseList(deleteDetailsRequest);
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 @@
</if>
</where>
</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>
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