package com.cyksj.service.distribute.impl;

import com.cyksj.mapper.UserDistributeReturnMoneyDetailMapper;
import com.cyksj.model.entity.UserDistributeReturnMoneyDetail;
import com.cyksj.service.distribute.UserDistributeReturnMoneyDetailService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

/**
 * 项目名: yhlxj
 * 文件名: UserDistributeReturnMoneyDetailServiceImpl
 * 创建者: JavaZou
 * 创建时间:2024/7/29 18:52
 */
@Service
@RequiredArgsConstructor
public class UserDistributeReturnMoneyDetailServiceImpl implements UserDistributeReturnMoneyDetailService {
	private final UserDistributeReturnMoneyDetailMapper userDistributeReturnMoneyDetailMapper;


	@Override
	public void recordDistributeReturnMoney(Long userId, BigDecimal money, String source) {
		UserDistributeReturnMoneyDetail userDistributeReturnMoneyDetail = new UserDistributeReturnMoneyDetail();
		userDistributeReturnMoneyDetail.setUserId(userId);
		userDistributeReturnMoneyDetail.setMoney(money);
		userDistributeReturnMoneyDetail.setSource(source);
		userDistributeReturnMoneyDetailMapper.insert(userDistributeReturnMoneyDetail);
	}
}
