d711c899e42e8cacee3ed6408f4c57e91c962dc8..f5a35b86d6d66bcc7961626f1de1940c775d0bd9
9 天以前 zhubaomin
小程序获取轮灌组取消分页功能
f5a35b 对比 | 目录
9 天以前 zhubaomin
获取轮灌组接口排序方式
a744ee 对比 | 目录
3个文件已修改
23 ■■■■ 已修改文件
pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrIrrigateGroupMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigation/IrrigationCtrl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigation/IrrigationSv.java 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrIrrigateGroupMapper.xml
@@ -250,7 +250,7 @@
        grp.group_code AS groupCode,
        (SELECT COUNT(*) FROM ir_group_intake WHERE group_id = grp.id) AS intakeCount,
        grp.default_duration AS defaultDuration,
        0 as sort,
        pg.sort,
        grp.operate_time
    FROM ir_irrigate_group grp
        LEFT JOIN ir_project_group pg ON pg.group_id = grp.id
@@ -265,7 +265,7 @@
        AND grp.group_code LIKE CONCAT('%', #{groupCode}, '%')
      </if>
    </where>
    ORDER BY grp.operate_time DESC
    ORDER BY pg.sort
    <trim prefix="limit ">
      <if test="start != null and count != null">
        #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER}
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigation/IrrigationCtrl.java
@@ -46,14 +46,14 @@
    }
    @GetMapping(path = "/getSimpleGroups")
    public BaseResponse<QueryResultVo<List<VoGroupSimple>>> getSimpleGroups(QoGroup qo) {
    public BaseResponse<List<VoGroupSimple>> getSimpleGroups(QoGroup qo) {
        if(qo.getProjectId() == null) {
            return BaseResponseUtils.buildErrorMsg("请选择项目");
        }
        try {
            QueryResultVo<List<VoGroupSimple>> res = irrigationSv.getSimpleGroups(qo);
            return BaseResponseUtils.buildSuccess(res);
            //QueryResultVo<List<VoGroupSimple>> res = irrigationSv.getSimpleGroups(qo);
            return BaseResponseUtils.buildSuccess(irrigationSv.getSimpleGroups(qo));
        } catch (Exception e) {
            log.error("获取轮灌组记录异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigation/IrrigationSv.java
@@ -46,15 +46,16 @@
     * @param queryVo
     * @return
     */
    public QueryResultVo<List<VoGroupSimple>> getSimpleGroups(QoGroup queryVo) {
    public List<VoGroupSimple> getSimpleGroups(QoGroup queryVo) {
        Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo);
        Long itemTotal = irIrrigateGroupMapper.getSimpleGroupCount(params);
        //Long itemTotal = irIrrigateGroupMapper.getSimpleGroupCount(params);
        QueryResultVo<List<VoGroupSimple>> rsVo = new QueryResultVo<>();
        //QueryResultVo<List<VoGroupSimple>> rsVo = new QueryResultVo<>();
        rsVo.calculateAndSet(itemTotal, params);
        rsVo.obj = irIrrigateGroupMapper.getSimpleGroups(params);
        return rsVo;
        //rsVo.calculateAndSet(itemTotal, params);
        //rsVo.obj = irIrrigateGroupMapper.getSimpleGroups(params);
        //return rsVo;
        return irIrrigateGroupMapper.getSimpleGroups(params);
    }
}