!4 类转换赋值bug更新

Merge pull request !4 from haoran1009/auto-9270061-master-17482f94-1
pull/184/head
ethan 2025-04-14 01:17:14 +00:00 committed by Gitee
commit 5be41793ed
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 3 additions and 4 deletions

View File

@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.security.PermitAll;
import javax.validation.Valid;
import java.util.List;
@ -46,7 +47,7 @@ public class FinanceController {
* @param param
* @return
*/
@PermitAll
@GetMapping("/getIncomeAndTax")
public CommonResult<List<FinanceVO>> getIncomeAndTax(@Valid @RequestBody IncomeAndTaxParam param) {
return CommonResult.success(financeService.getIncomeAndTax(param));

View File

@ -35,8 +35,6 @@ public class FinanceServiceImpl implements FinanceService {
public List<FinanceVO> getIncomeAndTax(IncomeAndTaxParam param) {
String[] split = param.getCreditCodes().split(",");
List<FinanceBO> financeBOList = financeMapper.getIncomeAndTax(Arrays.asList(split), param.getYear());
List<FinanceVO> financeVOList = new ArrayList<>();
BeanUtils.copyProperties(financeBOList, financeVOList);
return financeVOList;
return BeanUtils.toBean(financeBOList, FinanceVO.class);
}
}