BOOK_FUND_ID, BOOK_ID, FUND_NAME, PURCHASE_MONEY, START_TIME, END_TIME, CREATED_USER,CONTRACT_NO,BATCH_NUMBER,PROXY_MODE,TRANSFEROR,IS_TRANSFEROR, CREATED_DATE, LAST_MODIFIED_USER, LAST_MODIFIED_DATE, VERSION
insert into book_fund (BOOK_ID, FUND_NAME, PURCHASE_MONEY, START_TIME, END_TIME, CREATED_USER, CREATED_DATE, LAST_MODIFIED_USER, LAST_MODIFIED_DATE, VERSION,CONTRACT_NO,BATCH_NUMBER,PROXY_MODE,TRANSFEROR,IS_TRANSFEROR) values (#{bookId,jdbcType=BIGINT}, #{fundName,jdbcType=VARCHAR}, #{purchaseMoney,jdbcType=DECIMAL}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},#{createdUser,jdbcType=BIGINT}, now(), #{createdUser,jdbcType=BIGINT},now(),1, #{contractNo,jdbcType=VARCHAR},#{batchNumber,jdbcType=VARCHAR}, #{proxyMode,jdbcType=BIT},#{transferor,jdbcType=VARCHAR},#{isTransferor,jdbcType=BIT})
insert into book_fund (BOOK_ID, FUND_NAME, PURCHASE_MONEY, START_TIME, END_TIME, CREATED_USER, CREATED_DATE, LAST_MODIFIED_USER, LAST_MODIFIED_DATE, VERSION,CONTRACT_NO,BATCH_NUMBER,PROXY_MODE,TRANSFEROR,IS_TRANSFEROR) values (#{item.bookId,jdbcType=BIGINT}, #{item.fundName,jdbcType=VARCHAR}, #{item.purchaseMoney,jdbcType=DECIMAL}, #{item.startTime,jdbcType=TIMESTAMP}, #{item.endTime,jdbcType=TIMESTAMP},#{item.createdUser,jdbcType=BIGINT}, now(), #{item.createdUser,jdbcType=BIGINT},now(),1, #{item.contractNo,jdbcType=VARCHAR},#{item.batchNumber,jdbcType=VARCHAR}, #{item.proxyMode,jdbcType=BIT},#{item.transferor,jdbcType=VARCHAR},#{item.isTransferor,jdbcType=BIT})
UPDATE book_fund SET END_TIME = #{endTime, jdbcType=TIMESTAMP}, PURCHASE_MONEY = #{purchaseMoney, jdbcType=DECIMAL}, CONTRACT_NO = #{contractNo,jdbcType=VARCHAR} BATCH_NUMBER = #{batchNumber,jdbcType=VARCHAR} IS_TRANSFEROR =#{isTransferor,jdbcType=BIT} LAST_MODIFIED_DATE = NOW(), LAST_MODIFIED_USER = #{lastModifiedUser,jdbcType=BIGINT}, VERSION = VERSION + 1 WHERE BOOK_FUND_ID = #{bookFundId, jdbcType=BIGINT} AND VERSION = #{version, jdbcType=BIGINT}
SELECT BOOK_FUND_ID, BOOK_ID, FUND_NAME, PURCHASE_MONEY, START_TIME, END_TIME, LAST_MODIFIED_USER, LAST_MODIFIED_DATE, VERSION, CONTRACT_NO,BATCH_NUMBER,PROXY_MODE,TRANSFEROR,IS_TRANSFEROR FROM BOOK_FUND WHERE BOOK_ID = #{bookId,jdbcType=BIGINT} ORDER BY START_TIME DESC
SELECT BOOK_FUND_ID, BOOK_ID, FUND_NAME, PURCHASE_MONEY, START_TIME, END_TIME, LAST_MODIFIED_USER, LAST_MODIFIED_DATE, VERSION, CONTRACT_NO,BATCH_NUMBER,PROXY_MODE,TRANSFEROR,IS_TRANSFEROR FROM BOOK_FUND WHERE BOOK_ID = #{bookId,jdbcType=BIGINT} AND BOOK_FUND_ID != #{bookFundId,jdbcType=BIGINT} ORDER BY START_TIME DESC
SELECT BOOK_FUND_ID, BOOK_ID, FUND_NAME, PURCHASE_MONEY, START_TIME, END_TIME, VERSION,CONTRACT_NO,BATCH_NUMBER,PROXY_MODE,TRANSFEROR,IS_TRANSFEROR FROM BOOK_FUND WHERE BOOK_FUND_ID = #{bookFundId,jdbcType=BIGINT}
SELECT BOOK_FUND_ID, BOOK_ID, FUND_NAME, PURCHASE_MONEY, START_TIME, END_TIME,VERSION,CONTRACT_NO,BATCH_NUMBER,PROXY_MODE,TRANSFEROR,IS_TRANSFEROR FROM BOOK_FUND WHERE BOOK_ID = #{bookId,jdbcType=BIGINT} ORDER BY START_TIME DESC
select from book_fund WHERE BOOK_ID IN ${item} AND END_TIME > NOW()
select BOOK_FUND_ID, BOOK_ID, FUND_NAME, PURCHASE_MONEY, START_TIME, END_TIME,VERSION,CONTRACT_NO,BATCH_NUMBER,PROXY_MODE,TRANSFEROR,IS_TRANSFEROR from book_fund where 1=1 and BOOK_ID = #{bookId,jdbcType=BIGINT} and #{date} BETWEEN START_TIME AND END_TIME
select BOOK_ID,SUM(PURCHASE_MONEY) FUND_MONEY_SUM from book_fund WHERE BOOK_ID IN ${item} GROUP BY BOOK_ID
select from book_fund where BOOK_ID = #{bookId,jdbcType=BIGINT} AND NOW() BETWEEN START_TIME AND END_TIME
SELECT FUND_NAME FROM BOOK_FUND WHERE BOOK_ID = #{bookId,jdbcType=BIGINT} AND #{useDate} BETWEEN START_TIME AND END_TIME
SELECT FUND_NAME,CONTRACT_NO,BATCH_NUMBER,PROXY_MODE,BOOK_FUND_ID,IS_TRANSFEROR, TRANSFEROR, PURCHASE_MONEY, START_TIME, END_TIME FROM BOOK_FUND WHERE BOOK_ID = #{bookId,jdbcType=BIGINT} AND #{useDate} BETWEEN START_TIME AND END_TIME
SELECT BOOK_ID FROM BOOK_FUND WHERE BOOK_ID IN ${item} AND NOW() BETWEEN START_TIME AND END_TIME LIMIT 1;
DELETE FROM BOOK_FUND WHERE BOOK_FUND_ID = #{id, jdbcType=BIGINT}
SELECT FROM book_fund WHERE BOOK_ID = #{bookId,jdbcType=BIGINT} AND #{endTime} BETWEEN START_TIME AND END_TIME LIMIT 1
SELECT BOOK_ID FROM BOOK_FUND WHERE BOOK_ID IN ${item} AND NOW() BETWEEN START_TIME AND END_TIME
SELECT BOOK_ID FROM BOOK_FUND WHERE NOW() BETWEEN START_TIME AND END_TIME
SELECT count(1) FROM BOOK_FUND WHERE BOOK_ID = #{_parameter} AND START_TIME < now()
SELECT COUNT(DISTINCT b.BOOK_ID) FROM BOOK B LEFT JOIN ( SELECT BOOK_FUND_ID, BOOK_ID FROM book_fund GROUP BY BOOK_ID ) bf ON B.BOOK_ID = bf.BOOK_ID WHERE IS_DELETE = 0 AND bf.BOOK_FUND_ID IS NOT NULL
select from book_fund WHERE BOOK_ID IN ${item}
SELECT BOOK_FUND_ID, BOOK_ID, FUND_NAME, PURCHASE_MONEY, START_TIME, END_TIME,VERSION,CONTRACT_NO,BATCH_NUMBER,PROXY_MODE,TRANSFEROR,IS_TRANSFEROR FROM BOOK_FUND WHERE BOOK_ID = #{bookId,jdbcType=BIGINT} ORDER BY END_TIME DESC limit 1
select ifnull(count(1),0) from BOOK_FUND where BATCH_NUMBER=#{batchNumber}