src/com/mapper/BbsMapper.xml
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?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.dao.BbsMapper" >
<resultMap id="BaseResultMap" type="com.entity.Bbs" >
<id column="id" property="id" jdbcType="INTEGER" />
<id column="uid" property="uid" jdbcType="INTEGER" />
<id column="gid" property="gid" jdbcType="INTEGER" />
<result column="pubtime" property="pubtime" jdbcType="VARCHAR" />
<result column="etime" property="etime" jdbcType="VARCHAR" />
<result column="isdel" property="isdel" jdbcType="VARCHAR" />
<result column="btype" property="btype" jdbcType="VARCHAR" />
</resultMap>
<resultMap id="ResultMapWithBLOBs" type="com.entity.BbsWithBLOBs" extends="BaseResultMap" >
<result column="note" property="note" jdbcType="LONGVARCHAR" />
<result column="note2" property="note2" jdbcType="LONGVARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, pubtime, etime, isdel,uid,gid,btype
</sql>
<sql id="Blob_Column_List" >
note, note2
</sql>
<select id="getCount" resultType="int" parameterType="java.util.Map" >
select count(*) from bbs where isdel="1"
<if test="name!=null ">
and name like concat('%',#{name,jdbcType=VARCHAR},'%')
</if>
<if test="xueli!=null ">
and xueli like concat('%',#{xueli,jdbcType=VARCHAR},'%')
</if>
<if test="uid!=null ">
and uid =#{uid,jdbcType=INTEGER}
</if>
<if test="gid!=null ">
and gid =#{gid,jdbcType=INTEGER}
</if>
<if test="btype!=null ">
and btype =#{btype,jdbcType=VARCHAR}
</if>
<if test="ztype!=null ">
and ztype =#{ztype,jdbcType=VARCHAR}
</if>
<if test="experience!=null ">
and experience like concat('%',#{experience,jdbcType=VARCHAR},'%')
</if>
</select>
<select id="getAll" resultMap="ResultMapWithBLOBs" parameterType="java.util.Map" >
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from bbs where isdel="1"
<if test="name!=null ">
and name like concat('%',#{name,jdbcType=VARCHAR},'%')
</if>
<if test="gid!=null ">
and gid =#{gid,jdbcType=INTEGER}
</if>
<if test="btype!=null ">
后面还有 184 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
