Edit D:\rfid\libsystem\WEB-INF\classes\com\jishen\libsystem\mapping\LibAcqCollectbibMapper.xml
<?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.jishen.libsystem.dao.LibAcqCollectbibMapper"> <resultMap id="BaseResultMap" type="com.jishen.libsystem.entity.LibAcqCollectbib"> <id column="ID" jdbcType="DECIMAL" property="id" /> <result column="LIBCODE" jdbcType="VARCHAR" property="libcode" /> <result column="LINKID" jdbcType="DECIMAL" property="linkid" /> <result column="SYSID" jdbcType="DECIMAL" property="sysid" /> <result column="CTRLNO" jdbcType="VARCHAR" property="ctrlno" /> <result column="TITLE" jdbcType="VARCHAR" property="title" /> <result column="AUTHOR" jdbcType="VARCHAR" property="author" /> <result column="PUBLISH" jdbcType="VARCHAR" property="publish" /> <result column="PUBLISHADDRESS" jdbcType="VARCHAR" property="publishaddress" /> <result column="PUBLISHDATE" jdbcType="VARCHAR" property="publishdate" /> <result column="PRICE" jdbcType="VARCHAR" property="price" /> <result column="CLASSNO" jdbcType="VARCHAR" property="classno" /> <result column="ISBN" jdbcType="VARCHAR" property="isbn" /> <result column="SUBJECT" jdbcType="VARCHAR" property="subject" /> <result column="BIBSIZE" jdbcType="VARCHAR" property="bibsize" /> <result column="LANGUAGE" jdbcType="VARCHAR" property="language" /> <result column="PAGE" jdbcType="VARCHAR" property="page" /> <result column="CONTENT" jdbcType="VARCHAR" property="content" /> <result column="SERIESNAME" jdbcType="VARCHAR" property="seriesname" /> <result column="ORDERNO" jdbcType="VARCHAR" property="orderno" /> <result column="UNIFIEDNO" jdbcType="VARCHAR" property="unifiedno" /> <result column="ATTACHMENT" jdbcType="VARCHAR" property="attachment" /> <result column="CATACODE" jdbcType="VARCHAR" property="catacode" /> <result column="CMDNUM" jdbcType="VARCHAR" property="cmdnum" /> </resultMap> <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.jishen.libsystem.entity.LibAcqCollectbib"> <result column="MARC" jdbcType="LONGVARCHAR" property="marc" /> </resultMap> <sql id="Base_Column_List"> ID, LIBCODE, LINKID, SYSID, CTRLNO, TITLE, AUTHOR, PUBLISH, PUBLISHADDRESS, PUBLISHDATE, PRICE, CLASSNO, ISBN, SUBJECT, BIBSIZE, LANGUAGE, PAGE, CONTENT, SERIESNAME, ORDERNO, UNIFIEDNO, ATTACHMENT, CATACODE </sql> <sql id="Blob_Column_List"> MARC </sql> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> , <include refid="Blob_Column_List" /> from LIB_ACQ_COLLECTBIB where ID = #{id,jdbcType=DECIMAL} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> delete from LIB_ACQ_COLLECTBIB where ID = #{id,jdbcType=DECIMAL} </delete> <insert id="insert" parameterType="com.jishen.libsystem.entity.LibAcqCollectbib"> insert into LIB_ACQ_COLLECTBIB (ID, LIBCODE, LINKID, SYSID, CTRLNO, TITLE, AUTHOR, PUBLISH, PUBLISHADDRESS, PUBLISHDATE, PRICE, CLASSNO, ISBN, SUBJECT, BIBSIZE, LANGUAGE, PAGE, CONTENT, SERIESNAME, ORDERNO, UNIFIEDNO, ATTACHMENT, CATACODE, MARC ) values (#{id,jdbcType=DECIMAL}, #{libcode,jdbcType=VARCHAR}, #{linkid,jdbcType=DECIMAL}, #{sysid,jdbcType=DECIMAL}, #{ctrlno,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR}, #{publish,jdbcType=VARCHAR}, #{publishaddress,jdbcType=VARCHAR}, #{publishdate,jdbcType=VARCHAR}, #{price,jdbcType=VARCHAR}, #{classno,jdbcType=VARCHAR}, #{isbn,jdbcType=VARCHAR}, #{subject,jdbcType=VARCHAR}, #{bibsize,jdbcType=VARCHAR}, #{language,jdbcType=VARCHAR}, #{page,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{seriesname,jdbcType=VARCHAR}, #{orderno,jdbcType=VARCHAR}, #{unifiedno,jdbcType=VARCHAR}, #{attachment,jdbcType=VARCHAR}, #{catacode,jdbcType=VARCHAR}, #{marc,jdbcType=LONGVARCHAR} ) </insert> <insert id="insertSelective" parameterType="com.jishen.libsystem.entity.LibAcqCollectbib"> <selectKey keyProperty="id" resultType="java.lang.Long" order="BEFORE"> select LIB_ACQ_COLLECTBIB_SEQ.nextval a FROM dual </selectKey> insert into LIB_ACQ_COLLECTBIB <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null"> ID, </if> <if test="libcode != null"> LIBCODE, </if> <if test="linkid != null"> LINKID, </if> <if test="sysid != null"> SYSID, </if> <if test="ctrlno != null"> CTRLNO, </if> <if test="title != null"> TITLE, </if> <if test="author != null"> AUTHOR, </if> <if test="publish != null"> PUBLISH, </if> <if test="publishaddress != null"> PUBLISHADDRESS, </if> <if test="publishdate != null"> PUBLISHDATE, </if> <if test="price != null"> PRICE, </if> <if test="classno != null"> CLASSNO, </if> <if test="isbn != null"> ISBN, </if> <if test="subject != null"> SUBJECT, </if> <if test="bibsize != null"> BIBSIZE, </if> <if test="language != null"> LANGUAGE, </if> <if test="page != null"> PAGE, </if> <if test="content != null"> CONTENT, </if> <if test="seriesname != null"> SERIESNAME, </if> <if test="orderno != null"> ORDERNO, </if> <if test="unifiedno != null"> UNIFIEDNO, </if> <if test="attachment != null"> ATTACHMENT, </if> <if test="catacode != null"> CATACODE, </if> <if test="marc != null"> MARC, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null"> #{id,jdbcType=DECIMAL}, </if> <if test="libcode != null"> #{libcode,jdbcType=VARCHAR}, </if> <if test="linkid != null"> #{linkid,jdbcType=DECIMAL}, </if> <if test="sysid != null"> #{sysid,jdbcType=DECIMAL}, </if> <if test="ctrlno != null"> #{ctrlno,jdbcType=VARCHAR}, </if> <if test="title != null"> #{title,jdbcType=VARCHAR}, </if> <if test="author != null"> #{author,jdbcType=VARCHAR}, </if> <if test="publish != null"> #{publish,jdbcType=VARCHAR}, </if> <if test="publishaddress != null"> #{publishaddress,jdbcType=VARCHAR}, </if> <if test="publishdate != null"> #{publishdate,jdbcType=VARCHAR}, </if> <if test="price != null"> #{price,jdbcType=VARCHAR}, </if> <if test="classno != null"> #{classno,jdbcType=VARCHAR}, </if> <if test="isbn != null"> #{isbn,jdbcType=VARCHAR}, </if> <if test="subject != null"> #{subject,jdbcType=VARCHAR}, </if> <if test="bibsize != null"> #{bibsize,jdbcType=VARCHAR}, </if> <if test="language != null"> #{language,jdbcType=VARCHAR}, </if> <if test="page != null"> #{page,jdbcType=VARCHAR}, </if> <if test="content != null"> #{content,jdbcType=VARCHAR}, </if> <if test="seriesname != null"> #{seriesname,jdbcType=VARCHAR}, </if> <if test="orderno != null"> #{orderno,jdbcType=VARCHAR}, </if> <if test="unifiedno != null"> #{unifiedno,jdbcType=VARCHAR}, </if> <if test="attachment != null"> #{attachment,jdbcType=VARCHAR}, </if> <if test="catacode != null"> #{catacode,jdbcType=VARCHAR}, </if> <if test="marc != null"> #{marc,jdbcType=LONGVARCHAR}, </if> </trim> </insert> <update id="updateByPrimaryKeySelective" parameterType="com.jishen.libsystem.entity.LibAcqCollectbib"> update LIB_ACQ_COLLECTBIB <set> <if test="libcode != null"> LIBCODE = #{libcode,jdbcType=VARCHAR}, </if> <if test="linkid != null"> LINKID = #{linkid,jdbcType=DECIMAL}, </if> <if test="sysid != null"> SYSID = #{sysid,jdbcType=DECIMAL}, </if> <if test="ctrlno != null"> CTRLNO = #{ctrlno,jdbcType=VARCHAR}, </if> <if test="title != null"> TITLE = #{title,jdbcType=VARCHAR}, </if> <if test="author != null"> AUTHOR = #{author,jdbcType=VARCHAR}, </if> <if test="publish != null"> PUBLISH = #{publish,jdbcType=VARCHAR}, </if> <if test="publishaddress != null"> PUBLISHADDRESS = #{publishaddress,jdbcType=VARCHAR}, </if> <if test="publishdate != null"> PUBLISHDATE = #{publishdate,jdbcType=VARCHAR}, </if> <if test="price != null"> PRICE = #{price,jdbcType=VARCHAR}, </if> <if test="classno != null"> CLASSNO = #{classno,jdbcType=VARCHAR}, </if> <if test="isbn != null"> ISBN = #{isbn,jdbcType=VARCHAR}, </if> <if test="subject != null"> SUBJECT = #{subject,jdbcType=VARCHAR}, </if> <if test="bibsize != null"> BIBSIZE = #{bibsize,jdbcType=VARCHAR}, </if> <if test="language != null"> LANGUAGE = #{language,jdbcType=VARCHAR}, </if> <if test="page != null"> PAGE = #{page,jdbcType=VARCHAR}, </if> <if test="content != null"> CONTENT = #{content,jdbcType=VARCHAR}, </if> <if test="seriesname != null"> SERIESNAME = #{seriesname,jdbcType=VARCHAR}, </if> <if test="orderno != null"> ORDERNO = #{orderno,jdbcType=VARCHAR}, </if> <if test="unifiedno != null"> UNIFIEDNO = #{unifiedno,jdbcType=VARCHAR}, </if> <if test="attachment != null"> ATTACHMENT = #{attachment,jdbcType=VARCHAR}, </if> <if test="catacode != null"> CATACODE = #{catacode,jdbcType=VARCHAR}, </if> <if test="marc != null"> MARC = #{marc,jdbcType=LONGVARCHAR}, </if> </set> where ID = #{id,jdbcType=DECIMAL} </update> <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.jishen.libsystem.entity.LibAcqCollectbib"> update LIB_ACQ_COLLECTBIB set LIBCODE = #{libcode,jdbcType=VARCHAR}, LINKID = #{linkid,jdbcType=DECIMAL}, SYSID = #{sysid,jdbcType=DECIMAL}, CTRLNO = #{ctrlno,jdbcType=VARCHAR}, TITLE = #{title,jdbcType=VARCHAR}, AUTHOR = #{author,jdbcType=VARCHAR}, PUBLISH = #{publish,jdbcType=VARCHAR}, PUBLISHADDRESS = #{publishaddress,jdbcType=VARCHAR}, PUBLISHDATE = #{publishdate,jdbcType=VARCHAR}, PRICE = #{price,jdbcType=VARCHAR}, CLASSNO = #{classno,jdbcType=VARCHAR}, ISBN = #{isbn,jdbcType=VARCHAR}, SUBJECT = #{subject,jdbcType=VARCHAR}, BIBSIZE = #{bibsize,jdbcType=VARCHAR}, LANGUAGE = #{language,jdbcType=VARCHAR}, PAGE = #{page,jdbcType=VARCHAR}, CONTENT = #{content,jdbcType=VARCHAR}, SERIESNAME = #{seriesname,jdbcType=VARCHAR}, ORDERNO = #{orderno,jdbcType=VARCHAR}, UNIFIEDNO = #{unifiedno,jdbcType=VARCHAR}, ATTACHMENT = #{attachment,jdbcType=VARCHAR}, CATACODE = #{catacode,jdbcType=VARCHAR}, MARC = #{marc,jdbcType=LONGVARCHAR} where ID = #{id,jdbcType=DECIMAL} </update> <update id="updateByPrimaryKey" parameterType="com.jishen.libsystem.entity.LibAcqCollectbib"> update LIB_ACQ_COLLECTBIB set LIBCODE = #{libcode,jdbcType=VARCHAR}, LINKID = #{linkid,jdbcType=DECIMAL}, SYSID = #{sysid,jdbcType=DECIMAL}, CTRLNO = #{ctrlno,jdbcType=VARCHAR}, TITLE = #{title,jdbcType=VARCHAR}, AUTHOR = #{author,jdbcType=VARCHAR}, PUBLISH = #{publish,jdbcType=VARCHAR}, PUBLISHADDRESS = #{publishaddress,jdbcType=VARCHAR}, PUBLISHDATE = #{publishdate,jdbcType=VARCHAR}, PRICE = #{price,jdbcType=VARCHAR}, CLASSNO = #{classno,jdbcType=VARCHAR}, ISBN = #{isbn,jdbcType=VARCHAR}, SUBJECT = #{subject,jdbcType=VARCHAR}, BIBSIZE = #{bibsize,jdbcType=VARCHAR}, LANGUAGE = #{language,jdbcType=VARCHAR}, PAGE = #{page,jdbcType=VARCHAR}, CONTENT = #{content,jdbcType=VARCHAR}, SERIESNAME = #{seriesname,jdbcType=VARCHAR}, ORDERNO = #{orderno,jdbcType=VARCHAR}, UNIFIEDNO = #{unifiedno,jdbcType=VARCHAR}, ATTACHMENT = #{attachment,jdbcType=VARCHAR}, CATACODE = #{catacode,jdbcType=VARCHAR} where ID = #{id,jdbcType=DECIMAL} </update> <select id="listSelective" parameterType="com.jishen.libsystem.entity.LibAcqCollectbib" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from LIB_ACQ_COLLECTBIB where 1=1 <if test="libcode != null"> and LIBCODE = #{libcode,jdbcType=VARCHAR} </if> <if test="id != null"> and ID = #{id,jdbcType=DECIMAL} </if> <if test="catacode != null"> and CATACODE = #{catacode,jdbcType=VARCHAR} </if> </select> <select id="selectByIndex" resultMap="BaseResultMap"> select <choose> <when test="fldtype !=null and fldtype == 'onlymarc'"> <!-- ?????arc --> <include refid="Blob_Column_List" />,id </when> <when test="fldtype !=null and fldtype == 'marcandflds'"> <!-- ???marc+??? --> <include refid="Base_Column_List" />, <include refid="Blob_Column_List" /> </when> <otherwise> <!-- ???????? --> <include refid="Base_Column_List" />, (select count(*) from LIB_ACQ_RECOMMEND where COLID = LIB_ACQ_COLLECTBIB.ID) cmdnum </otherwise> </choose> from LIB_ACQ_COLLECTBIB where 1=1 <if test="idx != null"> <choose> <when test="idx.type == 'ID'"> AND ID = #{idx.value,jdbcType=VARCHAR} </when> <otherwise> AND ID IN( select distinct bibid from LIB_ACQ_COLLECTBIB_IDX where 1=1 <if test="idx.libcode != null"> and LIBCODE = #{idx.libcode,jdbcType=VARCHAR} </if> <if test="idx.type != null"> and TYPE = #{idx.type,jdbcType=VARCHAR} </if> <if test="idx.sysid != null"> and SYSID = #{idx.sysid,jdbcType=DECIMAL} </if> <if test="idx.value != null"> and VALUE like CONCAT(#{idx.value,jdbcType=VARCHAR},'%') </if> ) </otherwise></choose> </if> <include refid="common.condition"/> <!-- <if test="limit != null"> <foreach collection="limit" item="item" index="index"> <if test="item.type != null and item.value != null "> and ${item.type}= #{item.value} </if> </foreach> </if> --> </select> <insert id="insertRecords"> begin <foreach collection="records" item="record" index="index" separator=";"> insert into LIB_ACQ_COLLECTBIB ( <include refid="Base_Column_List" /> , <include refid="Blob_Column_List" /> ) values(#{record.id,jdbcType=DECIMAL}, #{record.libcode,jdbcType=VARCHAR}, #{record.linkid,jdbcType=DECIMAL}, #{record.sysid,jdbcType=DECIMAL}, #{record.ctrlno,jdbcType=VARCHAR}, #{record.title,jdbcType=VARCHAR}, #{record.author,jdbcType=VARCHAR}, #{record.publish,jdbcType=VARCHAR}, #{record.publishaddress,jdbcType=VARCHAR}, #{record.publishdate,jdbcType=VARCHAR}, #{record.price,jdbcType=VARCHAR}, #{record.classno,jdbcType=VARCHAR}, #{record.isbn,jdbcType=VARCHAR}, #{record.subject,jdbcType=VARCHAR}, #{record.bibsize,jdbcType=VARCHAR}, #{record.language,jdbcType=VARCHAR}, #{record.page,jdbcType=VARCHAR}, #{record.content,jdbcType=VARCHAR}, #{record.seriesname,jdbcType=VARCHAR}, #{record.orderno,jdbcType=VARCHAR}, #{record.unifiedno,jdbcType=VARCHAR}, #{record.attachment,jdbcType=VARCHAR}, #{record.catacode,jdbcType=VARCHAR}, #{record.marc,jdbcType=LONGVARCHAR}) </foreach> ;end; </insert> <select id="selectRepeatBibid" resultType="java.lang.Long"> select id from LIB_ACQ_COLLECTBIB where id in( <foreach collection="list" item="item" index="index" separator="INTERSECT"> <if test="item != null"> select distinct bibid from LIB_ACQ_COLLECTBIB_IDX where 1=1 <if test="item.libcode != null"> and LIBCODE = #{item.libcode,jdbcType=VARCHAR} </if> and TYPE = #{item.type,jdbcType=VARCHAR} <if test="item.sysid != null"> and SYSID = #{item.sysid,jdbcType=DECIMAL} </if> and VALUE =#{item.value,jdbcType=VARCHAR} </if> </foreach>) <include refid="common.condition"/> </select> <update id="updateRecords"> begin <foreach collection="records" item="record" index="index" separator=";"> update LIB_ACQ_COLLECTBIB <set> <if test="record.linkid != null"> LINKID = #{record.linkid,jdbcType=DECIMAL}, </if> </set> where ID = #{record.id,jdbcType=DECIMAL} </foreach> ;end; </update> <select id="listOrderRecords" resultMap="BaseResultMap"> select <include refid="Base_Column_List" />, <include refid="Blob_Column_List" /> from LIB_ACQ_COLLECTBIB where 1=1 <if test="catacode != null"> and catacode = #{catacode,jdbcType=VARCHAR} </if> <if test="ids != null and ids !=''"> and ID in (${ids}) </if> <if test='type=="1"'> <!-- ???????? --> and linkid not in (select bibid from LIB_ACQ_ORDER) </if> <if test='type=="2"'> <!-- ???????? --> and linkid is null </if> </select> <delete id="deleteByIds"> delete from LIB_ACQ_COLLECTBIB where id in (${ids}) </delete> </mapper>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de