Edit D:\rfid\libsystem\WEB-INF\classes\com\jishen\libsystem\mapping\LibBibliographyMapper.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.LibBibliographyMapper"> <resultMap id="BaseResultMap" type="com.jishen.libsystem.entity.LibBibliography"> <id column="ID" jdbcType="DECIMAL" property="id" /> <result column="LIBCODE" jdbcType="VARCHAR" property="libcode" /> <result column="STATUS" jdbcType="CHAR" property="status" /> <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="CALLNO" jdbcType="VARCHAR" property="callno" /> <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="CREATEOPERID" jdbcType="DECIMAL" property="createoperid" /> <result column="CREATEDATE" jdbcType="DECIMAL" property="createdate" /> <result column="UPDATEOPERID" jdbcType="DECIMAL" property="updateoperid" /> <result column="UPDATEDATE" jdbcType="DECIMAL" property="updatedate" /> <result column="BIBSOURCES" jdbcType="CHAR" property="bibsources" /> <result column="ATTACHMENT" jdbcType="VARCHAR" property="attachment" /> </resultMap> <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.jishen.libsystem.entity.LibBibliography"> <result column="MARC" jdbcType="LONGVARCHAR" property="marc" /> </resultMap> <sql id="Base_Column_List"> ID, LIBCODE, STATUS, SYSID, CTRLNO, TITLE, AUTHOR, PUBLISH, PUBLISHADDRESS, PUBLISHDATE, PRICE, CALLNO, CLASSNO, ISBN, SUBJECT, BIBSIZE, LANGUAGE, PAGE, CONTENT, SERIESNAME, ORDERNO, UNIFIEDNO, CREATEOPERID, CREATEDATE, UPDATEOPERID, UPDATEDATE, BIBSOURCES, ATTACHMENT </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_BIBLIOGRAPHY where ID = #{id,jdbcType=DECIMAL} </select> <select id="selectWithoutBlobByPK" parameterType="java.lang.Long" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from LIB_BIBLIOGRAPHY where ID = #{id,jdbcType=DECIMAL} </select> <select id="selectBlobByPK" parameterType="java.lang.Long" resultMap="BaseResultMap"> select <include refid="Blob_Column_List" /> from LIB_BIBLIOGRAPHY where ID = #{id,jdbcType=DECIMAL} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> delete from LIB_BIBLIOGRAPHY where ID = #{id,jdbcType=DECIMAL} </delete> <insert id="insert" parameterType="com.jishen.libsystem.entity.LibBibliography"> insert into LIB_BIBLIOGRAPHY (ID, LIBCODE, STATUS, SYSID, CTRLNO, TITLE, AUTHOR, PUBLISH, PUBLISHADDRESS, PUBLISHDATE, PRICE, CALLNO, CLASSNO, ISBN, SUBJECT, BIBSIZE, LANGUAGE, PAGE, CONTENT, SERIESNAME, ORDERNO, UNIFIEDNO, CREATEOPERID, CREATEDATE, UPDATEOPERID, UPDATEDATE, BIBSOURCES, MARC) values (#{id,jdbcType=DECIMAL}, #{libcode,jdbcType=VARCHAR}, #{status,jdbcType=CHAR}, #{sysid,jdbcType=DECIMAL}, #{ctrlno,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR}, #{publish,jdbcType=VARCHAR}, #{publishaddress,jdbcType=VARCHAR}, #{publishdate,jdbcType=VARCHAR}, #{price,jdbcType=VARCHAR}, #{callno,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}, #{createoperid,jdbcType=DECIMAL}, #{createdate,jdbcType=DECIMAL}, #{updateoperid,jdbcType=DECIMAL}, #{updatedate,jdbcType=DECIMAL}, #{bibsources,jdbcType=CHAR}, #{marc,jdbcType=LONGVARCHAR}) </insert> <insert id="insertSelective" parameterType="com.jishen.libsystem.entity.LibBibliography"> <selectKey keyProperty="id" resultType="java.lang.Long" order="BEFORE"> select LIB_BIBLIOGRAPHY_SEQ.nextval a FROM dual </selectKey> insert into LIB_BIBLIOGRAPHY <trim prefix="(" suffix=")" suffixOverrides=","> ID, <if test="libcode != null"> LIBCODE, </if> <if test="status != null"> STATUS, </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="callno != null"> CALLNO, </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="createoperid != null"> CREATEOPERID, </if> <if test="createdate != null"> CREATEDATE, </if> <if test="updateoperid != null"> UPDATEOPERID, </if> <if test="updatedate != null"> UPDATEDATE, </if> <if test="bibsources != null"> BIBSOURCES, </if> <if test="attachment != null"> ATTACHMENT, </if> <if test="marc != null"> MARC, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> #{id,jdbcType=DECIMAL}, <if test="libcode != null"> #{libcode,jdbcType=VARCHAR}, </if> <if test="status != null"> #{status,jdbcType=CHAR}, </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="callno != null"> #{callno,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="createoperid != null"> #{createoperid,jdbcType=DECIMAL}, </if> <if test="createdate != null"> #{createdate,jdbcType=DECIMAL}, </if> <if test="updateoperid != null"> #{updateoperid,jdbcType=DECIMAL}, </if> <if test="updatedate != null"> #{updatedate,jdbcType=DECIMAL}, </if> <if test="bibsources != null"> #{bibsources,jdbcType=CHAR}, </if> <if test="attachment != null"> #{attachment,jdbcType=VARCHAR}, </if> <if test="marc != null"> #{marc,jdbcType=LONGVARCHAR}, </if> </trim> </insert> <update id="updateByPrimaryKeySelective" parameterType="com.jishen.libsystem.entity.LibBibliography"> update LIB_BIBLIOGRAPHY <set> <if test="libcode != null"> LIBCODE = #{libcode,jdbcType=VARCHAR}, </if> <if test="status != null"> STATUS = #{status,jdbcType=CHAR}, </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="callno != null"> CALLNO = #{callno,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="createoperid != null"> CREATEOPERID = #{createoperid,jdbcType=DECIMAL}, </if> <if test="createdate != null"> CREATEDATE = #{createdate,jdbcType=DECIMAL}, </if> <if test="updateoperid != null"> UPDATEOPERID = #{updateoperid,jdbcType=DECIMAL}, </if> <if test="updatedate != null"> UPDATEDATE = #{updatedate,jdbcType=DECIMAL}, </if> <if test="bibsources != null"> BIBSOURCES = #{bibsources,jdbcType=CHAR}, </if> <if test="attachment != null"> ATTACHMENT = #{attachment,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.LibBibliography"> update LIB_BIBLIOGRAPHY set LIBCODE = #{libcode,jdbcType=VARCHAR}, STATUS = #{status,jdbcType=CHAR}, 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}, CALLNO = #{callno,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}, CREATEOPERID = #{createoperid,jdbcType=DECIMAL}, CREATEDATE = #{createdate,jdbcType=DECIMAL}, UPDATEOPERID = #{updateoperid,jdbcType=DECIMAL}, UPDATEDATE = #{updatedate,jdbcType=DECIMAL}, BIBSOURCES = #{bibsources,jdbcType=CHAR}, MARC = #{marc,jdbcType=LONGVARCHAR} where ID = #{id,jdbcType=DECIMAL} </update> <update id="updateByPrimaryKey" parameterType="com.jishen.libsystem.entity.LibBibliography"> update LIB_BIBLIOGRAPHY set LIBCODE = #{libcode,jdbcType=VARCHAR}, STATUS = #{status,jdbcType=CHAR}, 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}, CALLNO = #{callno,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}, CREATEOPERID = #{createoperid,jdbcType=DECIMAL}, CREATEDATE = #{createdate,jdbcType=DECIMAL}, UPDATEOPERID = #{updateoperid,jdbcType=DECIMAL}, UPDATEDATE = #{updatedate,jdbcType=DECIMAL}, BIBSOURCES = #{bibsources,jdbcType=CHAR} where ID = #{id,jdbcType=DECIMAL} </update> <select id="listSelective" parameterType="com.jishen.libsystem.entity.LibBibliography" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from LIB_BIBLIOGRAPHY where 1=1 <if test="libcode != null"> and LIBCODE = #{libcode,jdbcType=VARCHAR} </if> <if test="id != null"> and ID = #{id,jdbcType=DECIMAL} </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" /> </otherwise> </choose> from LIB_BIBLIOGRAPHY where 1=1 <if test="idx != null"> <choose> <when test="idx.type == 'ID'"> AND ID = #{idx.value,jdbcType=VARCHAR} </when> <!-- ????? ????? ?????--> <when test="idx.type == 'BARCODE' or idx.type == 'CALLNO' or idx.type == 'ASSETNO'"> AND ID IN( select distinct bibid from LIB_HOLDINGS where 1=1 <if test="idx.libcode != null"> and LIBCODE = #{idx.libcode,jdbcType=VARCHAR} </if> <if test="idx.value != null"> and ${idx.type} like CONCAT(#{idx.value,jdbcType=VARCHAR},'%') </if> ) </when> <!-- ????????? --> <when test="idx.type == 'ORDBATCHNO'"> AND ID IN( select distinct bibid from LIB_ACQ_ORDER where 1=1 <if test="idx.libcode != null"> and LIBCODE = #{idx.libcode,jdbcType=VARCHAR} </if> <if test="idx.value != null"> and BATCHNO like CONCAT(#{idx.value,jdbcType=VARCHAR},'%') </if> ) </when> <!-- ????????? --> <when test="idx.type == 'CHKBATCHNO'"> AND ID IN( select distinct bibid from LIB_ACQ_CHECK where 1=1 <if test="idx.libcode != null"> and LIBCODE = #{idx.libcode,jdbcType=VARCHAR} </if> <if test="idx.value != null"> and BATCHNO like CONCAT(#{idx.value,jdbcType=VARCHAR},'%') </if> ) </when> <!-- ???????? --> <when test="idx.type == 'CHKBILLNO'"> AND ID IN( select distinct bibid from LIB_ACQ_CHECK where 1=1 <if test="idx.libcode != null"> and LIBCODE = #{idx.libcode,jdbcType=VARCHAR} </if> <if test="idx.value != null"> and BILLNO like CONCAT(#{idx.value,jdbcType=VARCHAR},'%') </if> ) </when> <otherwise> AND ID IN( select distinct bibid from LIB_BIBLIOS_INDEX 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> <update id="updateBibByBibWithAcqCheck" parameterType="com.jishen.common.HoldingWithBibEntity"> update lib_bibliography <set> STATUS = '1' </set> where lib_bibliography.id in ( select lib_bibliography.id from lib_holdings left join lib_bibliography on lib_holdings.bibid=lib_bibliography.id left join lib_acq_check on lib_holdings.checkid=lib_acq_check.id where 1 = 1 <include refid="common.condition"/>) </update> <update id="updateSendBibByBibWithAcqCheck" parameterType="com.jishen.common.HoldingWithBibEntity"> update lib_bibliography <set> STATUS = '1' </set> where lib_bibliography.id in ( select lib_bibliography.id from lib_holdings left join lib_bibliography on lib_holdings.bibid=lib_bibliography.id left join lib_acq_check on lib_holdings.checkid=lib_acq_check.id where 1 = 1 and (LIB_HOLDINGS.status = '0' or LIB_BIBLIOGRAPHY.status='0') <include refid="common.condition"/>) </update> <insert id="insertRecords"> begin <foreach collection="records" item="record" index="index" separator=";"> insert into LIB_BIBLIOGRAPHY ( <include refid="Base_Column_List" /> , <include refid="Blob_Column_List" /> ) values(#{record.id,jdbcType=DECIMAL}, #{record.libcode,jdbcType=VARCHAR}, #{record.status,jdbcType=CHAR}, #{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.callno,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.createoperid,jdbcType=DECIMAL}, #{record.createdate,jdbcType=DECIMAL}, #{record.updateoperid,jdbcType=DECIMAL}, #{record.updatedate,jdbcType=DECIMAL}, #{record.bibsources,jdbcType=CHAR}, #{record.attachment,jdbcType=VARCHAR}, #{record.marc,jdbcType=LONGVARCHAR}) </foreach> ;end; </insert> <update id="updateRecords"> begin <foreach collection="records" item="record" index="index" separator=";"> update LIB_BIBLIOGRAPHY <set> <if test="record.libcode != null"> LIBCODE = #{record.libcode,jdbcType=VARCHAR}, </if> <if test="record.status != null"> STATUS = #{record.status,jdbcType=CHAR}, </if> <if test="record.sysid != null"> SYSID = #{record.sysid,jdbcType=DECIMAL}, </if> <if test="record.ctrlno != null"> CTRLNO = #{record.ctrlno,jdbcType=VARCHAR}, </if> <if test="record.title != null"> TITLE = #{record.title,jdbcType=VARCHAR}, </if> <if test="record.author != null"> AUTHOR = #{record.author,jdbcType=VARCHAR}, </if> <if test="record.publish != null"> PUBLISH = #{record.publish,jdbcType=VARCHAR}, </if> <if test="record.publishaddress != null"> PUBLISHADDRESS = #{record.publishaddress,jdbcType=VARCHAR}, </if> <if test="record.publishdate != null"> PUBLISHDATE = #{record.publishdate,jdbcType=VARCHAR}, </if> <if test="record.price != null"> PRICE = #{record.price,jdbcType=VARCHAR}, </if> <if test="record.callno != null"> CALLNO = #{record.callno,jdbcType=VARCHAR}, </if> <if test="record.classno != null"> CLASSNO = #{record.classno,jdbcType=VARCHAR}, </if> <if test="record.isbn != null"> ISBN = #{record.isbn,jdbcType=VARCHAR}, </if> <if test="record.subject != null"> SUBJECT = #{record.subject,jdbcType=VARCHAR}, </if> <if test="record.bibsize != null"> BIBSIZE = #{record.bibsize,jdbcType=VARCHAR}, </if> <if test="record.language != null"> LANGUAGE = #{record.language,jdbcType=VARCHAR}, </if> <if test="record.page != null"> PAGE = #{record.page,jdbcType=VARCHAR}, </if> <if test="record.content != null"> CONTENT = #{record.content,jdbcType=VARCHAR}, </if> <if test="record.seriesname != null"> SERIESNAME = #{record.seriesname,jdbcType=VARCHAR}, </if> <if test="record.orderno != null"> ORDERNO = #{record.orderno,jdbcType=VARCHAR}, </if> <if test="record.unifiedno != null"> UNIFIEDNO = #{record.unifiedno,jdbcType=VARCHAR}, </if> <if test="record.createoperid != null"> CREATEOPERID = #{record.createoperid,jdbcType=DECIMAL}, </if> <if test="record.createdate != null"> CREATEDATE = #{record.createdate,jdbcType=DECIMAL}, </if> <if test="record.updateoperid != null"> UPDATEOPERID = #{record.updateoperid,jdbcType=DECIMAL}, </if> <if test="record.updatedate != null"> UPDATEDATE = #{record.updatedate,jdbcType=DECIMAL}, </if> <if test="record.bibsources != null"> BIBSOURCES = #{record.bibsources,jdbcType=CHAR}, </if> <if test="record.attachment != null"> ATTACHMENT = #{record.attachment,jdbcType=VARCHAR}, </if> <if test="record.marc != null"> MARC = #{record.marc,jdbcType=LONGVARCHAR}, </if> </set> where ID = #{record.id,jdbcType=DECIMAL} </foreach> ;end; </update> <select id="selectRepeatBibid" resultType="java.lang.Long"> select id from LIB_BIBLIOGRAPHY where id in( <foreach collection="list" item="item" index="index" separator="INTERSECT"> <if test="item != null"> select distinct bibid from LIB_BIBLIOS_INDEX 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> <delete id="deleteByCondition" parameterType="com.jishen.common.SrchLimitEntity"> begin delete from LIB_BIBLIOGRAPHY where id not in (select bibid from lib_holdings) and id not in (select bibid from lib_acq_order) and id not in (select bibid from lib_acq_check) and id not in (select bibid from lib_per_order) and id not in (select bibid from lib_per_detail_check) and id not in (select bibid from lib_per_bind) and id not in (select bibid from lib_cir_speloan) <include refid="common.condition"></include>; delete from LIB_BIBLIOS_INDEX where bibid in ( select id from LIB_BIBLIOGRAPHY where id not in (select bibid from lib_holdings) and id not in (select bibid from lib_acq_order) and id not in (select bibid from lib_acq_check) and id not in (select bibid from lib_per_order) and id not in (select bibid from lib_per_detail_check) and id not in (select bibid from lib_per_bind) and id not in (select bibid from lib_cir_speloan) <include refid="common.condition"></include> );end; </delete> <select id="selectByRepeatFields" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from lib_bibliography where (${fields}) in (select ${fields} from lib_bibliography group by ${fields} having count(*) > 1) and id in (select min(id) from lib_bibliography group by ${fields} having count(*)>1) <include refid="common.condition"></include> </select> <update id="combineBib"> begin update lib_holdings set bibid= #{id,jdbcType=DECIMAL} where bibid in (${ids}) and libcode in (${libcodes}); update lib_acq_order set bibid= #{id,jdbcType=DECIMAL} where bibid in (${ids}) and libcode in (${libcodes}); update lib_acq_check set bibid= #{id,jdbcType=DECIMAL} where bibid in (${ids}) and libcode in (${libcodes}); update lib_per_order set bibid= #{id,jdbcType=DECIMAL} where bibid in (${ids}) and libcode in (${libcodes}); update lib_per_check set bibid= #{id,jdbcType=DECIMAL} where bibid in (${ids}) and libcode in (${libcodes}); update lib_per_detail_check set bibid= #{id,jdbcType=DECIMAL} where bibid in (${ids}) and libcode in (${libcodes}); update lib_per_bind set bibid= #{id,jdbcType=DECIMAL} where bibid in (${ids}) and libcode in (${libcodes}); end; </update> <delete id="deleteByIds"> delete from lib_bibliography where id in (${ids}) </delete> </mapper>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de