智慧保安后台管理-外网-验收版本
Administrator
2021-08-06 5f030a19bec827fdabb8731f43c2785f48968942
培训公司信息查询接口新增
6 files modified
81 ■■■■■ changed files
src/main/java/org/springblade/modules/information/controller/InformationController.java 11 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/mapper/InformationMapper.java 9 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml 35 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/service/IInformationService.java 8 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/service/impl/InformationServiceImpl.java 10 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/vo/InformationVO.java 8 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/controller/InformationController.java
@@ -287,4 +287,15 @@
    }
    /**
     * 查询培训单位信息(可以报名)
     */
    @GetMapping("/security-page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入information")
    public R<IPage<InformationVO>> securityPage(InformationVO information, Query query) {
        IPage<InformationVO> pages = informationService.securityPage(Condition.getPage(query), information);
        return R.data(pages);
    }
}
src/main/java/org/springblade/modules/information/mapper/InformationMapper.java
@@ -18,6 +18,7 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.springblade.modules.information.entity.Information;
import org.springblade.modules.information.vo.InformationVO;
@@ -51,4 +52,12 @@
    List<Map<Object,Object>> selectDis(String deptid);
    List<Map<Object,Object>> selectDisp(String deptid);
    List<Map<Object,Object>> selectSoil(String deptid);
    /**
     * 查询培训单位信息(可以报名)
     * @param page
     * @param information 保安单位信息对象
     * @return
     */
    List<InformationVO> securityPage(IPage<InformationVO> page, @Param("information") InformationVO information);
}
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
@@ -161,4 +161,39 @@
                 LEFT JOIN (SELECT COUNT(*) AS numz, dept_id FROM blade_user GROUP BY dept_id) B ON A.deptid = B.dept_id
        WHERE A.deptid = #{deptid}
    </select>
    <!--查询培训单位信息(可以报名)-->
    <select id="securityPage" resultType="org.springblade.modules.information.vo.InformationVO">
        select
            si.*,bd.dept_name deptName
        from
           sys_information si
        left join
            blade_dept bd
        on
            si.departmentid = bd.id
        left join
            sys_train_exam ste
        on
            ste.dept_id = bd.id
        where 1=1
        and ste.audit_status = 1
        <if test="information.deptName!=null and information.deptName!=''">
            and bd.dept_name like concat(concat('%', #{information.deptName}),'%')
        </if>
        <if test="information.representative!=null and information.representative!=''">
            and representative like concat(concat('%', #{information.representative}),'%')
        </if>
        <if test="information.stats!=null and information.stats!=''">
            and stats=#{stats}
        </if>
        <if test="information.jurisdiction!=null and information.jurisdiction!=''">
            and si.jurisdiction=#{jurisdiction}
        </if>
        <if test="information.departmentid!=null and information.departmentid!=''">
            and departmentid=#{departmentid}
        </if>
    </select>
</mapper>
src/main/java/org/springblade/modules/information/service/IInformationService.java
@@ -51,4 +51,12 @@
    List<Map<Object,Object>> selectDis(String deptid);
    List<Map<Object,Object>> selectDisp(String deptid);
    List<Map<Object,Object>> selectSoil(String deptid);
    /**
     * 查询培训单位信息(可以报名)
     * @param page
     * @param information 保安单位信息对象
     * @return
     */
    IPage<InformationVO> securityPage(IPage<InformationVO> page, InformationVO information);
}
src/main/java/org/springblade/modules/information/service/impl/InformationServiceImpl.java
@@ -96,4 +96,14 @@
        return baseMapper.selectSoil(deptid);
    }
    /**
     * 查询培训单位信息(可以报名)
     * @param page
     * @param information 保安单位信息对象
     * @return
     */
    @Override
    public IPage<InformationVO> securityPage(IPage<InformationVO> page, InformationVO information) {
        return page.setRecords(baseMapper.securityPage(page, information));
    }
}
src/main/java/org/springblade/modules/information/vo/InformationVO.java
@@ -31,6 +31,14 @@
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "InformationVO对象", description = "InformationVO对象")
public class InformationVO extends Information {
    private static final long serialVersionUID = 1L;
    /**
     * 单位名称
     */
    private String deptName;
}