分销修改

This commit is contained in:
张松
2025-11-06 10:46:15 +08:00
parent 94f46b8894
commit d96d692b61
7 changed files with 23 additions and 21 deletions

View File

@@ -72,6 +72,6 @@ public interface ShopUserMapper extends BaseMapper<ShopUser> {
*/
List<InviteUserVO> getInviteUser(Long distributionUserId, Long shopUserId, Long distributionLevelId);
void updateOneOrTwoAmount(Long userId, Long mainShopId, BigDecimal amount, Integer isOne);
void updateOneOrTwoAmount(Long shopUserId, Long shopId, BigDecimal amount, Integer isOne);
}

View File

@@ -171,7 +171,7 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
}
@Override
public void updateOneOrTwoAmount(Long userId, Long mainShopId, BigDecimal bigDecimal, Integer isOne) {
mapper.updateOneOrTwoAmount(userId, mainShopId, bigDecimal, isOne);
public void updateOneOrTwoAmount(Long shopUserId, Long shopId, BigDecimal bigDecimal, Integer isOne) {
mapper.updateOneOrTwoAmount(shopUserId, shopId, bigDecimal, isOne);
}
}

View File

@@ -18,7 +18,7 @@
and amount - #{money} >= 0
</update>
<update id="updateOneOrTwoAmount">
update tb_shop_user
update tb_shop_user_invite
<set>
<if test="isOne != null and isOne == 1">
one_income = one_income + #{amount}
@@ -27,8 +27,8 @@
two_income = two_income + #{amount}
</if>
</set>
where user_id = #{userId}
and main_shop_id = #{mainShopId}
where shop_user_id = #{shopUserId}
and shop_id = #{shopId}
</update>