This commit is contained in:
liao
2021-11-16 14:27:54 +08:00
parent a5d0745aa0
commit 11baf7eda5
31 changed files with 235 additions and 210 deletions
@@ -1,13 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.adc.da.slrs.wgdCensusLeo.dao.WgdCgfyDao">
<sql id="pages">
<if test=" null != pageSize ">
LIMIT ${(page-1) * pageSize},${pageSize}
</if>
</sql>
<!-- 基础信息-->
<sql id="BaseInfo">
id,type,number,name,pages,cost
</sql>
<!-- 查询条件-->
<sql id="Conditions">
<where>
where 1=1
<if test="id != null and id != ''">
and id = #{id}
</if>
@@ -26,18 +31,19 @@
<if test="cost != null and cost != ''">
and cost = #{cost}
</if>
</where>
</sql>
<!-- 查询所有-->
<select id="getQueryTotal" parameterType="com.adc.da.slrs.wgdCensusLeo.entity.WgdCgfy" resultType="java.lang.Integer">
select count(*) from wgd_cgfy
<include refid="Conditions"></include>
</select>
<select id="selectAll" resultType="com.adc.da.slrs.wgdCensusLeo.entity.WgdCgfy">
select <include refid="BaseInfo"></include> from wgd_cgfy
</select>
<!-- 多条件查询-->
<select id="queryAll" parameterType="com.adc.da.slrs.wgdCensusLeo.entity.WgdCgfy" resultType="com.adc.da.slrs.wgdCensusLeo.entity.WgdCgfy">
select <include refid="BaseInfo"></include> from wgd_cgfy
<include refid="Conditions"></include>
<include refid="pages"></include>
</select>
<!-- 查询详情-->
<select id="selectOne" parameterType="java.lang.String" resultType="com.adc.da.slrs.wgdCensusLeo.entity.WgdCgfy">
select <include refid="BaseInfo"></include> from wgd_cgfy
where id = #{id}