id, user_id, login_time, order_num, amount, login_out_time, user_name, status, income_amount, shop_id, petty_cash, cash_amount, hand_amount, equipment,return_amount,token_id,trade_day,type delete from tb_shop_user_duty where id = #{id,jdbcType=INTEGER} insert into tb_shop_user_duty (id, user_id, login_time, order_num, amount, login_out_time, user_name, status, income_amount, shop_id, petty_cash, cash_amount, hand_amount, equipment,return_amount,token_id,trade_day,type) values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{loginTime,jdbcType=TIMESTAMP}, #{orderNum,jdbcType=INTEGER}, #{amount,jdbcType=VARCHAR}, #{loginOutTime,jdbcType=TIMESTAMP}, #{userName,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{incomeAmount,jdbcType=DECIMAL}, #{shopId,jdbcType=INTEGER}, #{pettyCash,jdbcType=DECIMAL}, #{cashAmount,jdbcType=DECIMAL}, #{handAmount,jdbcType=DECIMAL}, #{equipment,jdbcType=VARCHAR}, #{returnAmount,jdbcType=DECIMAL},#{tokenId,jdbcType=INTEGER},#{tradeDay,jdbcType=VARCHAR},#{type,jdbcType=VARCHAR}) insert into tb_shop_user_duty id, user_id, login_time, order_num, amount, login_out_time, user_name, status, income_amount, shop_id, petty_cash, cash_amount, hand_amount, equipment, #{id,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{loginTime,jdbcType=TIMESTAMP}, #{orderNum,jdbcType=INTEGER}, #{amount,jdbcType=VARCHAR}, #{loginOutTime,jdbcType=TIMESTAMP}, #{userName,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{incomeAmount,jdbcType=DECIMAL}, #{shopId,jdbcType=INTEGER}, #{pettyCash,jdbcType=DECIMAL}, #{cashAmount,jdbcType=DECIMAL}, #{handAmount,jdbcType=DECIMAL}, #{equipment,jdbcType=VARCHAR}, update tb_shop_user_duty user_id = #{userId,jdbcType=INTEGER}, login_time = #{loginTime,jdbcType=TIMESTAMP}, order_num = #{orderNum,jdbcType=INTEGER}, amount = #{amount,jdbcType=DECIMAL}, login_out_time = #{loginOutTime,jdbcType=TIMESTAMP}, user_name = #{userName,jdbcType=VARCHAR}, status = #{status,jdbcType=VARCHAR}, income_amount = #{incomeAmount,jdbcType=DECIMAL}, shop_id = #{shopId,jdbcType=INTEGER}, petty_cash = #{pettyCash,jdbcType=DECIMAL}, cash_amount = #{cashAmount,jdbcType=DECIMAL}, hand_amount = #{handAmount,jdbcType=DECIMAL}, equipment = #{equipment,jdbcType=VARCHAR}, return_amount = #{returnAmount,jdbcType=DECIMAL}, where id = #{id,jdbcType=INTEGER} update tb_shop_user_duty set user_id = #{userId,jdbcType=INTEGER}, login_time = #{loginTime,jdbcType=TIMESTAMP}, order_num = #{orderNum,jdbcType=INTEGER}, amount = #{amount,jdbcType=VARCHAR}, login_out_time = #{loginOutTime,jdbcType=TIMESTAMP}, user_name = #{userName,jdbcType=VARCHAR}, status = #{status,jdbcType=VARCHAR}, income_amount = #{incomeAmount,jdbcType=DECIMAL}, shop_id = #{shopId,jdbcType=INTEGER}, petty_cash = #{pettyCash,jdbcType=DECIMAL}, cash_amount = #{cashAmount,jdbcType=DECIMAL}, hand_amount = #{handAmount,jdbcType=DECIMAL}, equipment = #{equipment,jdbcType=VARCHAR} where id = #{id,jdbcType=INTEGER} update tb_shop_user_duty set status = '1' , login_out_time = now(),user_id = #{staffId} where shop_id = #{shopId} and trade_day = #{day} and status = '0' update tb_shop_user_duty set status = '1' , login_out_time = now(),user_id = #{staffId} where id = #{id}