交班修改业务逻辑 ,跨天统计

This commit is contained in:
19991905653
2024-04-11 15:21:52 +08:00
parent 49ed813f63
commit c3c169d2b5
3 changed files with 16 additions and 6 deletions

View File

@@ -41,7 +41,7 @@
select ifnull(sum(amount),0) from tb_shop_user_duty where shop_id = #{shopId}
</select>
<select id="selectByTokenIdAndTradeDay"
resultType="com.chaozhanggui.system.cashierservice.entity.ShopUserDuty">
resultMap="BaseResultMap">
select * from tb_shop_user_duty where shop_id = #{shopId} and trade_day = #{day} and token_id = #{tokenId};
</select>
<select id="selectByShopIdAndTrade"
@@ -169,7 +169,7 @@
order_num = #{orderNum,jdbcType=INTEGER},
</if>
<if test="amount != null">
amount = #{amount,jdbcType=VARCHAR},
amount = #{amount,jdbcType=DECIMAL},
</if>
<if test="loginOutTime != null">
login_out_time = #{loginOutTime,jdbcType=TIMESTAMP},
@@ -199,7 +199,7 @@
equipment = #{equipment,jdbcType=VARCHAR},
</if>
<if test="returnAmount != null">
return_amount = #{returnAmount,jdbcType=VARCHAR},
return_amount = #{returnAmount,jdbcType=DECIMAL},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
@@ -228,4 +228,9 @@
<select id="selectByShopIdAndDay" resultMap="BaseResultMap">
select * from tb_shop_user_duty where trade_day = #{day} and shop_id = #{shopId} order by id desc limit 1
</select>
<select id="selectByShopIdAndStatus"
resultType="com.chaozhanggui.system.cashierservice.entity.ShopUserDuty">
select * from tb_shop_user_duty where status = #{status} and shop_id = #{shopId} order by id desc limit 1
</select>
</mapper>