协议新增分类
This commit is contained in:
parent
f3bcba15a6
commit
c2f7c35db9
|
@ -74,5 +74,4 @@ public interface AgreementMapper
|
|||
|
||||
public int selectDistinct(@Param("query") AgreementQuery agreement);
|
||||
|
||||
public AgreementVO selectLatest(AgreementQuery query);
|
||||
}
|
||||
|
|
|
@ -68,12 +68,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where bag.id = #{id}
|
||||
</select>
|
||||
|
||||
<!--查询最新的协议信息-->
|
||||
<select id="selectLatest" resultType="com.ruoyi.bst.agreement.domain.AgreementVO">
|
||||
<include refid="selectAgreementVo"></include>
|
||||
where bag.area_id = #{areaId} and bag.agreement_type = #{agreementType}
|
||||
order by create_time desc limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectDistinct" resultType="java.lang.Integer">
|
||||
select count(1) from <include refid="searchTables"/>
|
||||
|
|
|
@ -61,5 +61,4 @@ public interface AgreementService
|
|||
*/
|
||||
public int deleteAgreementById(Long id);
|
||||
|
||||
AgreementVO selectLatest(AgreementQuery query);
|
||||
}
|
||||
|
|
|
@ -157,13 +157,5 @@ public class AgreementServiceImpl implements AgreementService
|
|||
return agreementMapper.deleteAgreementById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询最新的协议信息
|
||||
* @param query
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AgreementVO selectLatest(AgreementQuery query) {
|
||||
return agreementMapper.selectLatest(query);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.ruoyi.web.app;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.ruoyi.bst.agreement.domain.AgreementQuery;
|
||||
import com.ruoyi.bst.agreement.service.AgreementService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
|
@ -18,7 +19,18 @@ public class AppAgreementController extends BaseController {
|
|||
@ApiOperation("查询最新协议")
|
||||
@GetMapping("/latest")
|
||||
public AjaxResult getAgreement(AgreementQuery query) {
|
||||
return success(agreementService.selectLatest(query));
|
||||
PageHelper.startPage(1, 1);
|
||||
PageHelper.orderBy("create_time desc");
|
||||
if (query.getContentType()==null) {
|
||||
return AjaxResult.error("内容类型不能为空");
|
||||
}
|
||||
if (query.getAgreementType()==null) {
|
||||
return AjaxResult.error("协议类型不能为空");
|
||||
}
|
||||
if (query.getAreaId()==null) {
|
||||
return AjaxResult.error("运营区不能为空");
|
||||
}
|
||||
return success(agreementService.selectAgreementList(query));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user