ssm请求服务器,服务器报其中一条写Result Maps集合已经包含了com.duing.dao.PlayMapper.BaseResultMap的值,怀疑是mybatis generator工具生成文件的问题,有遇到过这种问题的吗
代码太多到达上限了,只能上传一部分
报错信息
package com.duing.controller;
import com.duing.service.FilmService;
import com.duing.vo.FilmDetailVo;
import com.duing.vo.FilmVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
@Controller
public class FilmController {
@Autowired
private FilmService filmService;
@RequestMapping("/filmList")
@ResponseBody
public List selectAll(){
List filmVos = filmService.selectAll();
return filmVos;
}
@RequestMapping("/home")
public String home(Model model){
System.out.println("接受首页请求");
List filmVoList = filmService.selectAll();
model.addAttribute("filmVoList",filmVoList);
return "home";
}
// 接受请求参数
@RequestMapping("/filmInfo")
public String filmInfo(@RequestParam String filmId, Model model){
FilmDetailVo detailVo=filmService.findFilmById(filmId);
model.addAttribute("detailVo",detailVo);
return "detail";
}
}
package com.duing.controller;
import com.duing.service.PlayService;
import com.duing.vo.PlayVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
@Controller
public class PlayController {
@Autowired
private PlayService playService;
@RequestMapping("play")
@ResponseBody
public List getplays(@RequestParam String filmId){
List result = playService.fndPlayById(filmId);
return result;
}
}
dao层
package com.duing.controller;
import com.duing.service.PlayService;
import com.duing.vo.PlayVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
@Controller
public class PlayController {
@Autowired
private PlayService playService;
@RequestMapping("play")
@ResponseBody
public List getplays(@RequestParam String filmId){
List result = playService.fndPlayById(filmId);
return result;
}
}
package com.duing.dao;
import com.duing.entity.Play;
import com.duing.entity.PlayExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface PlayMapper {
long countByExample(PlayExample example);
int deleteByExample(PlayExample example);
int deleteByPrimaryKey(Long id);
int insert(Play record);
int insertSelective(Play record);
List selectByExample(PlayExample example);
Play selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") Play record, @Param("example") PlayExample example);
int updateByExample(@Param("record") Play record, @Param("example") PlayExample example);
int updateByPrimaryKeySelective(Play record);
int updateByPrimaryKey(Play record);
List selectAll();
List selectByFilmId(String filmId);
}
package com.duing.dao;
import com.duing.entity.Room;
import com.duing.entity.RoomExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface RoomMapper {
long countByExample(RoomExample example);
int deleteByExample(RoomExample example);
int deleteByPrimaryKey(Long id);
int insert(Room record);
int insertSelective(Room record);
List selectByExample(RoomExample example);
Room selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") Room record, @Param("example") RoomExample example);
int updateByExample(@Param("record") Room record, @Param("example") RoomExample example);
int updateByPrimaryKeySelective(Room record);
int updateByPrimaryKey(Room record);
}
domain实体
package com.duing.entity;
import java.io.Serializable;
import java.util.Date;
// 实体类 跟数据库的表映射
public class Film implements Serializable {
private static final long serialVersionUID = -4427069375523038931L;
private long id;
private String film_id;
private String name;
private String director;
private String player;
private String type;
private String country;
private int length;
private String synopsis;
private Date play_time;
private String img_path;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getFilm_id() {
return film_id;
}
public void setFilm_id(String film_id) {
this.film_id = film_id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDirector() {
return director;
}
public void setDirector(String director) {
this.director = director;
}
public String getPlayer() {
return player;
}
public void setPlayer(String player) {
this.player = player;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public int getLength() {
return length;
}
public void setLength(int length) {
this.length = length;
}
public String getSynopsis() {
return synopsis;
}
public void setSynopsis(String synopsis) {
this.synopsis = synopsis;
}
public Date getPlay_time() {
return play_time;
}
public void setPlay_time(Date play_time) {
this.play_time = play_time;
}
public String getImg_path() {
return img_path;
}
public void setImg_path(String img_path) {
this.img_path = img_path;
}
}
package com.duing.entity;
import java.util.Date;
public class Play {
private Long id;
private String playId;
private Date playTime;
private String lanType;
private Long price;
private String roomId;
private String roomName;
private String filmId;
private String filmName;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getPlayId() {
return playId;
}
public void setPlayId(String playId) {
this.playId = playId;
}
public Date getPlayTime() {
return playTime;
}
public void setPlayTime(Date playTime) {
this.playTime = playTime;
}
public String getLanType() {
return lanType;
}
public void setLanType(String lanType) {
this.lanType = lanType;
}
public Long getPrice() {
return price;
}
public void setPrice(Long price) {
this.price = price;
}
public String getRoomId() {
return roomId;
}
public void setRoomId(String roomId) {
this.roomId = roomId;
}
public String getRoomName() {
return roomName;
}
public void setRoomName(String roomName) {
this.roomName = roomName;
}
public String getFilmId() {
return filmId;
}
public void setFilmId(String filmId) {
this.filmId = filmId;
}
public String getFilmName() {
return filmName;
}
public void setFilmName(String filmName) {
this.filmName = filmName;
}
}
service层
package com.duing.service;
import com.duing.vo.FilmDetailVo;
import com.duing.vo.FilmVo;
import java.util.List;
public interface FilmService {
List selectAll();
FilmDetailVo findFilmById(String filmId);
}
package com.duing.service;
import com.duing.entity.Film;
import com.duing.vo.PlayVo;
import java.util.List;
public interface PlayService {
List fndPlayById(String filmId);
}
service接口
package com.duing.service;
import com.duing.vo.FilmDetailVo;
import com.duing.vo.FilmVo;
import java.util.List;
public interface FilmService {
List selectAll();
FilmDetailVo findFilmById(String filmId);
}
package com.duing.service;
import com.duing.entity.Film;
import com.duing.vo.PlayVo;
import java.util.List;
public interface PlayService {
List fndPlayById(String filmId);
}
util工具
package com.duing.util;
import org.mybatis.generator.api.MyBatisGenerator;
import org.mybatis.generator.config.Configuration;
import org.mybatis.generator.config.xml.ConfigurationParser;
import org.mybatis.generator.internal.DefaultShellCallback;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
public class GeneratorUtil {
public static void main(String[] args) throws Exception{
// 执行过程中的报警信息
List warnings = new ArrayList();
// 当代码重复是否覆盖
boolean overwrite = true;
File configFile = new File("D:\\ssm-duing-ticket\\ssm-duing-ticket\\mybatis\\generatorConfig.xml");
ConfigurationParser cp = new ConfigurationParser(warnings);
Configuration config = cp.parseConfiguration(configFile);
DefaultShellCallback callback = new DefaultShellCallback(overwrite);
MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, callback, warnings);
myBatisGenerator.generate(null);
for (String warning : warnings) {
System.out.println(warning);
}
}
}
mybatis generator工具的配置
generatorConfiguration PUBLIC
"-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
<context id="simple" targetRuntime="MyBatis3">
<property name="javaFileEncoding" value="UTF-8"/>
<commentGenerator>
<property name="suppressDate" value="true"/>
<property name="suppressAllComments" value="true"/>
commentGenerator>
<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver"
connectionURL="jdbc:mysql://localhost:3306/ssm"
userId="root" password="root"/>
<javaModelGenerator targetPackage="com.duing.entity" targetProject="D:\ssm-duing-ticket\ssm-duing-ticket\src\main\java"/>
<sqlMapGenerator targetPackage="mappers" targetProject="D:\ssm-duing-ticket\ssm-duing-ticket\src\main\resources"/>
<javaClientGenerator type="XMLMAPPER" targetPackage="com.duing.dao" targetProject="D:\ssm-duing-ticket\ssm-duing-ticket\src\main\java"/>
<table tableName="play" />
context>
generatorConfiguration>
vo展示层
package com.duing.vo;
import java.util.Date;
public class FilmDetailVo {
private String filmId;
private String name;
private String director;
private String player;
private String type;
private String country;
private int length;
private String synopsis;
private Date playTime;
private String imgPath;
public String getFilmId() {
return filmId;
}
public void setFilmId(String filmId) {
this.filmId = filmId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDirector() {
return director;
}
public void setDirector(String director) {
this.director = director;
}
public String getPlayer() {
return player;
}
public void setPlayer(String player) {
this.player = player;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public int getLength() {
return length;
}
public void setLength(int length) {
this.length = length;
}
public String getSynopsis() {
return synopsis;
}
public void setSynopsis(String synopsis) {
this.synopsis = synopsis;
}
public Date getPlayTime() {
return playTime;
}
public void setPlayTime(Date playTime) {
this.playTime = playTime;
}
public String getImgPath() {
return imgPath;
}
public void setImgPath(String imgPath) {
this.imgPath = imgPath;
}
}
package com.duing.vo;
// 视图层对象 用来展示给用户使用
public class FilmVo {
private String filmId;
private String name;
private String director;
private String imgPath;
public String getFilmId() {
return filmId;
}
public void setFilmId(String filmId) {
this.filmId = filmId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDirector() {
return director;
}
public void setDirector(String director) {
this.director = director;
}
public String getImgPath() {
return imgPath;
}
public void setImgPath(String imgpath) {
this.imgPath = imgpath;
}
}
package com.duing.vo;
import java.util.Date;
public class PlayVo {
private Long id;
private String playId;
private Date playTime;
private String lanType;
private Long price;
private String roomId;
private String roomName;
private String filmId;
private String filmName;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getPlayId() {
return playId;
}
public void setPlayId(String playId) {
this.playId = playId;
}
public Date getPlayTime() {
return playTime;
}
public void setPlayTime(Date playTime) {
this.playTime = playTime;
}
public String getLanType() {
return lanType;
}
public void setLanType(String lanType) {
this.lanType = lanType;
}
public Long getPrice() {
return price;
}
public void setPrice(Long price) {
this.price = price;
}
public String getRoomId() {
return roomId;
}
public void setRoomId(String roomId) {
this.roomId = roomId;
}
public String getRoomName() {
return roomName;
}
public void setRoomName(String roomName) {
this.roomName = roomName;
}
public String getFilmId() {
return filmId;
}
public void setFilmId(String filmId) {
this.filmId = filmId;
}
public String getFilmName() {
return filmName;
}
public void setFilmName(String filmName) {
this.filmName = filmName;
}
}
mapper文件
mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.duing.dao.FilmMapper">
<select id="getList" resultType="com.duing.entity.Film">
select id , film_id,`name`,director,player,`type`,country,`length`,synopsis,play_time,img_path
from film;
select>
<select id="getFilmById" resultType="com.duing.entity.Film">
select id , film_id,`name`,director,player,`type`,country,`length`,synopsis,play_time,img_path
from film
where film_id = #{filmId};
select>
1、当同一个xml映射文件内存在两个相同的id(即两个sql语句的id相同)时会报此错
解决:查询sql语句的id值修改
2、在mybatis的配置文件mybatis.xml内使用了标签加载xxxMapper.xml的映射文件报错,因为如果xxxMapper.xml与namespace的接口在同一路径下,就不需要在mybaits.xml中再进行配置了。
解决:将mybatis文件中标签中的内容删除
3、parameterType中的问题。这里的类名如果找不到也会报这个错,比如你之前是将该类名写死在这里,之后由于重构将该类转移到其他包中,如果这里不修改也会报这个错
解决:检查。。
4、还是parameterType中的问题,这次是关于自定义类的,当你使用基本类型的时候,比如int、string等,千万不要写错,比如写成strnig,咋一看看不出来,结果该问题就很难找
解决:检查。。
5、resultType的值与resultMap的id值相同的话会报错,可能是冲突了
解决:修改resultMap的id属性,因为resultType的值即为bean类别名或者全路径名
6、这一点和上一点差不多,如果是自定义resultMap,如果返回类型写成resultType,也会报这个错(今天就载在这。)
解决:将返回类型改为resultMap,且不要出现第5点的问题
你playmapper.xml发出来
这是我的一部分playMapper
<?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.duing.dao.PlayMapper">
<resultMap id="BaseResultMap" type="com.duing.entity.Play">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="play_id" jdbcType="VARCHAR" property="playId" />
<result column="play_time" jdbcType="TIMESTAMP" property="playTime" />
<result column="lan_type" jdbcType="VARCHAR" property="lanType" />
<result column="price" jdbcType="DECIMAL" property="price" />
<result column="room_id" jdbcType="VARCHAR" property="roomId" />
<result column="room_name" jdbcType="VARCHAR" property="roomName" />
<result column="film_id" jdbcType="VARCHAR" property="filmId" />
<result column="film_name" jdbcType="VARCHAR" property="filmName" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, play_id, play_time, lan_type, price, room_id, room_name, film_id, film_name
</sql>
<select id="selectByExample" parameterType="com.duing.entity.PlayExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from play
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from play
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from play
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.duing.entity.PlayExample">
delete from play
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.duing.entity.Play">
insert into play (id, play_id, play_time,
lan_type, price, room_id,
room_name, film_id, film_name
)
values (#{id,jdbcType=BIGINT}, #{playId,jdbcType=VARCHAR}, #{playTime,jdbcType=TIMESTAMP},
#{lanType,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL}, #{roomId,jdbcType=VARCHAR},
#{roomName,jdbcType=VARCHAR}, #{filmId,jdbcType=VARCHAR}, #{filmName,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.duing.entity.Play">
insert into play
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="playId != null">
play_id,
</if>
<if test="playTime != null">
play_time,
</if>
<if test="lanType != null">
lan_type,
</if>
<if test="price != null">
price,
</if>
<if test="roomId != null">
room_id,
</if>
<if test="roomName != null">
room_name,
</if>
<if test="filmId != null">
film_id,
</if>
<if test="filmName != null">
film_name,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="playId != null">
#{playId,jdbcType=VARCHAR},
</if>
<if test="playTime != null">
#{playTime,jdbcType=TIMESTAMP},
</if>
<if test="lanType != null">
#{lanType,jdbcType=VARCHAR},
</if>
<if test="price != null">
#{price,jdbcType=DECIMAL},
</if>
<if test="roomId != null">
#{roomId,jdbcType=VARCHAR},
</if>
<if test="roomName != null">
#{roomName,jdbcType=VARCHAR},
</if>
<if test="filmId != null">
#{filmId,jdbcType=VARCHAR},
</if>
<if test="filmName != null">
#{filmName,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.duing.entity.PlayExample" resultType="java.lang.Long">
select count(*) from play
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update play
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.playId != null">
play_id = #{record.playId,jdbcType=VARCHAR},
</if>
<if test="record.playTime != null">
play_time = #{record.playTime,jdbcType=TIMESTAMP},
</if>
<if test="record.lanType != null">
lan_type = #{record.lanType,jdbcType=VARCHAR},
</if>
<if test="record.price != null">
price = #{record.price,jdbcType=DECIMAL},
</if>
<if test="record.roomId != null">
room_id = #{record.roomId,jdbcType=VARCHAR},
</if>
<if test="record.roomName != null">
room_name = #{record.roomName,jdbcType=VARCHAR},
</if>
<if test="record.filmId != null">
film_id = #{record.filmId,jdbcType=VARCHAR},
</if>
<if test="record.filmName != null">
film_name = #{record.filmName,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update play
set id = #{record.id,jdbcType=BIGINT},
play_id = #{record.playId,jdbcType=VARCHAR},
play_time = #{record.playTime,jdbcType=TIMESTAMP},
lan_type = #{record.lanType,jdbcType=VARCHAR},
price = #{record.price,jdbcType=DECIMAL},
room_id = #{record.roomId,jdbcType=VARCHAR},
room_name = #{record.roomName,jdbcType=VARCHAR},
film_id = #{record.filmId,jdbcType=VARCHAR},
film_name = #{record.filmName,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.duing.entity.Play">
update play
<set>
<if test="playId != null">
play_id = #{playId,jdbcType=VARCHAR},
</if>
<if test="playTime != null">
play_time = #{playTime,jdbcType=TIMESTAMP},
</if>
<if test="lanType != null">
lan_type = #{lanType,jdbcType=VARCHAR},
</if>
<if test="price != null">
price = #{price,jdbcType=DECIMAL},
</if>
<if test="roomId != null">
room_id = #{roomId,jdbcType=VARCHAR},
</if>
<if test="roomName != null">
room_name = #{roomName,jdbcType=VARCHAR},
</if>
<if test="filmId != null">
film_id = #{filmId,jdbcType=VARCHAR},
</if>
<if test="filmName != null">
film_name = #{filmName,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.duing.entity.Play">
update play
set play_id = #{playId,jdbcType=VARCHAR},
play_time = #{playTime,jdbcType=TIMESTAMP},
lan_type = #{lanType,jdbcType=VARCHAR},
price = #{price,jdbcType=DECIMAL},
room_id = #{roomId,jdbcType=VARCHAR},
room_name = #{roomName,jdbcType=VARCHAR},
film_id = #{filmId,jdbcType=VARCHAR},
film_name = #{filmName,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<resultMap id="BaseResultMap" type="com.duing.entity.Play">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="play_id" jdbcType="VARCHAR" property="playId" />
<result column="play_time" jdbcType="DATE" property="playTime" />
<result column="lan_type" jdbcType="VARCHAR" property="lanType" />
<result column="price" jdbcType="DECIMAL" property="price" />
<result column="room_id" jdbcType="VARCHAR" property="roomId" />
<result column="room_name" jdbcType="VARCHAR" property="roomName" />
<result column="film_id" jdbcType="VARCHAR" property="filmId" />
<result column="film_name" jdbcType="VARCHAR" property="filmName" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, play_id, play_time, lan_type, price, room_id, room_name, film_id, film_name
</sql>
检查一下playMapper.xml中是否存在BaseResultMap多次被调用的情况.