Commit 9c6bb8a8 authored by wdy's avatar wdy

查询标准列表

parent 5f675328
......@@ -61,4 +61,7 @@ public class Standard {
@JsonFormat(pattern = "yyyy-MM-dd")
private Date implementationDate;
@ApiModelProperty("展示状态")
private Long status;
}
......@@ -19,4 +19,11 @@ public interface StandardMapper extends BaseMapper<Standard> {
//查询全部
List<Standard> selectListAll();
/**
* 标准库分页查询(可选用标准列表)
* @param request
* @return
*/
List<Standard> findStandardList(StandardListRequest request);
}
......@@ -23,4 +23,11 @@ public interface StandardService extends IService<Standard> {
void editStandard(StandardEditRequest request);
StandardResponse getInfo(StandardGetInfoRequest request);
/**
* 标准库分页查询(可选用标准列表)
* @param request
* @return
*/
List<Standard> findStandardList(StandardListRequest request);
}
......@@ -91,4 +91,14 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
response.setDictList(list);
return response;
}
/**
* 标准库分页查询(可选用标准列表)
* @param request
* @return
*/
@Override
public List<Standard> findStandardList(StandardListRequest request) {
return standardMapper.findStandardList(request);
}
}
......@@ -39,10 +39,19 @@ public class StandardController extends BaseController {
* 分页查询
* @return
*/
@ApiOperation("标准库分页查询")
@ApiOperation("标准库分页查询(可选用标准列表)")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/findStandardList")
public TableDataInfo<Standard> findStandardList(@Validated @RequestBody StandardListRequest request) {
startPage(request);
return getDataTable(standardService.findStandardList(request));
}
@ApiOperation("标准库分页查询(仅做展示列表)")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/findList")
public TableDataInfo<Standard> findList(@Validated @RequestBody StandardListRequest request) {
startPage(request);
return getDataTable(standardService.findList(request));
......
......@@ -13,10 +13,11 @@
<result property="standardStatus" column="standard_status" jdbcType="VARCHAR"/>
<result property="releaseDate" column="release_date" jdbcType="TIMESTAMP"/>
<result property="implementationDate" column="implementation_date" jdbcType="TIMESTAMP"/>
<result property="status" column="status" jdbcType="BIGINT"/>
</resultMap>
<select id="findList" parameterType="com.ruoyi.web.request.StandardListRequest" resultMap="BaseResultMap">
SELECT id, name, standard_no, file,standard_type,standard_status,release_date,implementation_date
SELECT id, name, standard_no, file,standard_type,standard_status,release_date,implementation_date,status
FROM t_standard
<where>
<if test="standardType != null and standardType != ''">
......@@ -40,6 +41,25 @@
</select>
<select id="selectListAll" resultMap="BaseResultMap">
SELECT id, name, standard_no, file,standard_type,standard_status,release_date,implementation_date FROM t_standard
SELECT id, name, standard_no, file,standard_type,standard_status,release_date,implementation_date,status FROM t_standard
</select>
<select id="findStandardList" resultType="com.ruoyi.domain.Standard">
SELECT id, name, standard_no, file,standard_type,standard_status,release_date,implementation_date,status
FROM t_standard
<where>
and status = 1
<if test="standardType != null and standardType != ''">
and standard_type = #{standardType}
</if>
<if test="standardNo != null and standardNo != ''">
and standard_no like concat('%', #{standardNo}, '%')
</if>
<if test="name != null and name != ''">
and name like concat('%', #{name}, '%')
</if>
<if test="standardStatus != null and standardStatus != ''">
and standard_status = #{standardStatus}
</if>
</where>
</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