|
|
@@ -16,6 +16,7 @@
|
|
|
*/
|
|
|
package org.springblade.mocha.controller;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
@@ -25,8 +26,11 @@ import javax.validation.Valid;
|
|
|
|
|
|
import org.springblade.core.mp.support.Condition;
|
|
|
import org.springblade.core.mp.support.Query;
|
|
|
+import org.springblade.core.secure.utils.SecureUtil;
|
|
|
import org.springblade.core.tool.api.R;
|
|
|
import org.springblade.core.tool.utils.Func;
|
|
|
+import org.springblade.system.user.entity.User;
|
|
|
+import org.springblade.system.user.feign.IUserClient;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import org.springblade.mocha.entity.BusinessOverpaymentItem;
|
|
|
@@ -45,6 +49,7 @@ import org.springblade.core.boot.ctrl.BladeController;
|
|
|
@RequestMapping("/businessoverpaymentitem")
|
|
|
@Api(value = "溢付款明细表", tags = "溢付款明细表接口")
|
|
|
public class BusinessOverpaymentItemController extends BladeController {
|
|
|
+ private final IUserClient userClient;
|
|
|
|
|
|
private final IBusinessOverpaymentItemService businessOverpaymentItemService;
|
|
|
|
|
|
@@ -66,7 +71,16 @@ public class BusinessOverpaymentItemController extends BladeController {
|
|
|
@ApiOperationSupport(order = 2)
|
|
|
@ApiOperation(value = "分页", notes = "传入businessOverpaymentItem")
|
|
|
public R<IPage<BusinessOverpaymentItem>> list(BusinessOverpaymentItem businessOverpaymentItem, Query query) {
|
|
|
+ businessOverpaymentItem.setTenantId(SecureUtil.getTenantId());
|
|
|
IPage<BusinessOverpaymentItem> pages = businessOverpaymentItemService.page(Condition.getPage(query), Condition.getQueryWrapper(businessOverpaymentItem));
|
|
|
+ if (CollectionUtils.isNotEmpty(pages.getRecords())){
|
|
|
+ pages.getRecords().stream().forEach(item ->{
|
|
|
+ R<User> user = userClient.userInfoById(item.getCreateUser());
|
|
|
+ if (user.isSuccess() && user.getData() != null){
|
|
|
+ item.setCreateUserName(user.getData().getName());
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
return R.data(pages);
|
|
|
}
|
|
|
|
|
|
@@ -111,7 +125,7 @@ public class BusinessOverpaymentItemController extends BladeController {
|
|
|
return R.status(businessOverpaymentItemService.saveOrUpdate(businessOverpaymentItem));
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 删除 溢付款明细表
|
|
|
*/
|
|
|
@@ -122,5 +136,5 @@ public class BusinessOverpaymentItemController extends BladeController {
|
|
|
return R.status(businessOverpaymentItemService.removeByIds(Func.toLongList(ids)));
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
}
|