id, term, title, red_answer, blue_answer, red_pic, blue_pic, red_polls, blue_polls,
lottery_time, carve_up_mcoin_num, pk_status, create_time, update_time
insert into mcoin_pk_info (id, term, title,
red_answer, blue_answer, red_pic,
blue_pic, red_polls, blue_polls,
lottery_time, carve_up_mcoin_num, pk_status,
create_time, update_time)
values ((select AUTO_INCREMENT from information_schema.tables where table_name='mcoin_pk_info'),id, #{title,jdbcType=VARCHAR},
#{redAnswer,jdbcType=VARCHAR}, #{blueAnswer,jdbcType=VARCHAR}, #{redPic,jdbcType=VARCHAR},
#{bluePic,jdbcType=VARCHAR}, #{redPolls,jdbcType=INTEGER}, #{bluePolls,jdbcType=INTEGER},
#{lotteryTime,jdbcType=TIMESTAMP}, #{carveUpMcoinNum,jdbcType=INTEGER}, #{pkStatus,jdbcType=BIT},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
update mcoin_pk_info
set
title = #{title,jdbcType=VARCHAR},
red_answer = #{redAnswer,jdbcType=VARCHAR},
blue_answer = #{blueAnswer,jdbcType=VARCHAR},
red_pic = #{redPic,jdbcType=VARCHAR},
blue_pic = #{bluePic,jdbcType=VARCHAR},
lottery_time = #{lotteryTime,jdbcType=TIMESTAMP},
pk_status = #{pkStatus,jdbcType=BIT},
update_time = now()
where id = #{id,jdbcType=BIGINT}