package com.ruoyi.production.service.impl; import com.ruoyi.production.bean.dto.UserAccountDto; import com.ruoyi.production.bean.dto.UserProductionAccountingDto; import com.ruoyi.production.mapper.ProductionAccountMapper; import com.ruoyi.production.service.SalesLedgerProductionAccountingService; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; @Service @RequiredArgsConstructor public class SalesLedgerProductionAccountingServiceImpl implements SalesLedgerProductionAccountingService { private final ProductionAccountMapper productionAccountMapper; @Override public UserAccountDto getByUserId(UserProductionAccountingDto dto) { if (dto == null || dto.getUserId() == null || dto.getDate() == null || dto.getDate().trim().isEmpty()) { return new UserAccountDto(); } UserAccountDto result = productionAccountMapper.selectUserAccount(dto.getUserId(), dto.getDate()); return result == null ? new UserAccountDto() : result; } }