package cc.mrbird.febs.mall.service.impl; import cc.mrbird.febs.mall.entity.MallMoneyFlow; import cc.mrbird.febs.mall.mapper.MallMoneyFlowMapper; import cc.mrbird.febs.mall.service.IMallMoneyFlowService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import java.math.BigDecimal; /** * @author wzy * @date 2022-05-05 **/ @Slf4j @Service @RequiredArgsConstructor public class MallMoneyFlowServiceImpl extends ServiceImpl implements IMallMoneyFlowService { @Override public void addMoneyFlow(Long memberId, BigDecimal amount, Integer type, String orderNo, String description, String remark, Long rtMemberId, Integer status, Integer flowType, Integer isReturn) { MallMoneyFlow flow = new MallMoneyFlow(); flow.setMemberId(memberId); flow.setAmount(amount); flow.setType(type); flow.setOrderNo(orderNo); flow.setDescription(description); flow.setRemark(remark); flow.setRtMemberId(rtMemberId); flow.setStatus(status); flow.setFlowType(flowType); flow.setIsReturn(isReturn); this.baseMapper.insert(flow); } @Override public void addMoneyFlow(Long memberId, BigDecimal amount, Integer type, String orderNo, Integer flowType) { this.addMoneyFlow(memberId, amount, type, orderNo, null, null, null, null, flowType, null); } @Override public void addMoneyFlow(Long memberId, BigDecimal amount, Integer type, String orderNo, Integer flowType, Integer isReturn) { this.addMoneyFlow(memberId, amount, type, orderNo, null, null, null, null, flowType, isReturn); } @Override public void addMoneyFlow(Long memberId, BigDecimal amount, Integer type, String orderNo, Long rtMemberId, Integer flowType) { this.addMoneyFlow(memberId, amount, type, orderNo, null, null, rtMemberId, null, flowType, null); } }