diff --git a/cash-service/account-service/src/main/resources/mapper/UserInfoMapper.xml b/cash-service/account-service/src/main/resources/mapper/UserInfoMapper.xml index 4e7d900b..08627fd4 100644 --- a/cash-service/account-service/src/main/resources/mapper/UserInfoMapper.xml +++ b/cash-service/account-service/src/main/resources/mapper/UserInfoMapper.xml @@ -5,13 +5,18 @@ - update tb_user_info set distribution_amount = distribution_amount + #{amount} where id = #{userId} - - ,one_income = one_income + #{amount} - - - ,two_income = two_income + #{amount} - + update tb_user_info + + distribution_amount = distribution_amount + #{amount} + + , one_income = one_income + #{amount} + + + , two_income = two_income + #{amount} + + + where id = #{userId} and distribution_amount + #{amount} >= 0 +