chenhj
8 天以前 28cf22aaff7f092256db2ad6df699e17426f62ea
src/main/java/com/ruoyi/production/service/impl/SalesLedgerProductionAccountingServiceImpl.java
对比新文件
@@ -0,0 +1,24 @@
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;
    }
}