|
|
@@ -1,6 +1,7 @@
|
|
|
package com.izouma.jiashanxia.web;
|
|
|
|
|
|
import com.izouma.jiashanxia.domain.UserPackageFlow;
|
|
|
+import com.izouma.jiashanxia.dto.UserPackageFlowVO;
|
|
|
import com.izouma.jiashanxia.dto.WriteOffRecordDTO;
|
|
|
import com.izouma.jiashanxia.dto.WriteOffSaveVO;
|
|
|
import com.izouma.jiashanxia.service.UserPackageFlowService;
|
|
|
@@ -31,7 +32,8 @@ public class UserPackageFlowController extends BaseController {
|
|
|
@PostMapping("/save")
|
|
|
public UserPackageFlow save(@RequestBody UserPackageFlow record) {
|
|
|
if (record.getId() != null) {
|
|
|
- UserPackageFlow orig = userPackageFlowRepo.findById(record.getId()).orElseThrow(new BusinessException("无记录"));
|
|
|
+ UserPackageFlow orig = userPackageFlowRepo.findById(record.getId())
|
|
|
+ .orElseThrow(new BusinessException("无记录"));
|
|
|
ObjUtils.merge(orig, record);
|
|
|
return userPackageFlowRepo.save(orig);
|
|
|
}
|
|
|
@@ -63,8 +65,8 @@ public class UserPackageFlowController extends BaseController {
|
|
|
}
|
|
|
|
|
|
@GetMapping("/my")
|
|
|
- public List<UserPackageFlow> my() {
|
|
|
- return userPackageFlowRepo.findAllByUserId(SecurityUtils.getAuthenticatedUser().getId());
|
|
|
+ public List<UserPackageFlowVO> my() {
|
|
|
+ return userPackageFlowService.my(SecurityUtils.getAuthenticatedUser().getId());
|
|
|
}
|
|
|
|
|
|
@GetMapping("/getDTO/{id}")
|