|
|
@@ -0,0 +1,79 @@
|
|
|
+package com.gree.mall.manager.controller.member;
|
|
|
+
|
|
|
+import cn.hutool.core.lang.TypeReference;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.gree.mall.manager.annotation.ZfireList;
|
|
|
+import com.gree.mall.manager.bean.listvo.UserCustomerVO;
|
|
|
+import com.gree.mall.manager.bean.user.UserCompanyCreditBillItemVO;
|
|
|
+import com.gree.mall.manager.bean.user.UserCompanyCreditBillVO;
|
|
|
+import com.gree.mall.manager.helper.ResponseHelper;
|
|
|
+import com.gree.mall.manager.logic.user.UserCompanyCreditLogic;
|
|
|
+import com.gree.mall.manager.zfire.bean.ZfireParamBean;
|
|
|
+import com.gree.mall.manager.zfire.util.FieldUtils;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+
|
|
|
+@Slf4j
|
|
|
+@RestController
|
|
|
+@Api(value = "用户商户授信账单API", tags = {"用户商户授信账单API"})
|
|
|
+@RequestMapping(value = "/user/company/credit/bill", produces = "application/json; charset=utf-8")
|
|
|
+public class UserCompanyCreditController {
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ UserCompanyCreditLogic userCompanyCreditLogic;
|
|
|
+
|
|
|
+ @ZfireList
|
|
|
+ @PostMapping("/list")
|
|
|
+ @ApiOperation(value = "账单列表")
|
|
|
+ public ResponseHelper<IPage<UserCompanyCreditBillVO>> list(
|
|
|
+ @RequestBody ZfireParamBean zfireParamBean
|
|
|
+ ) {
|
|
|
+ IPage<UserCompanyCreditBillVO> page = userCompanyCreditLogic.list(zfireParamBean);
|
|
|
+ return ResponseHelper.success(page, new TypeReference<UserCompanyCreditBillVO>() {});
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/list/export")
|
|
|
+ @ApiOperation(value = "账单列表-导出")
|
|
|
+ public void listExport(
|
|
|
+ @RequestBody ZfireParamBean zfireParamBean,
|
|
|
+ HttpServletRequest request,
|
|
|
+ HttpServletResponse response
|
|
|
+ ) throws Exception {
|
|
|
+ //2.查询要导出的内容
|
|
|
+ IPage<UserCompanyCreditBillVO> page = userCompanyCreditLogic.list(zfireParamBean);
|
|
|
+ //3.导出
|
|
|
+ FieldUtils.exportData(page.getRecords(), zfireParamBean.getExportFields(), request, response);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ZfireList
|
|
|
+ @PostMapping("/acc/list")
|
|
|
+ @ApiOperation(value = "授信记录列表")
|
|
|
+ public ResponseHelper<IPage<UserCompanyCreditBillItemVO>> accList(
|
|
|
+ @RequestBody ZfireParamBean zfireParamBean
|
|
|
+ ) {
|
|
|
+ IPage<UserCompanyCreditBillItemVO> page = userCompanyCreditLogic.accList(zfireParamBean);
|
|
|
+ return ResponseHelper.success(page, new TypeReference<UserCompanyCreditBillItemVO>() {});
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/acc/list/export")
|
|
|
+ @ApiOperation(value = "授信记录列表-导出")
|
|
|
+ public void accListExport(
|
|
|
+ @RequestBody ZfireParamBean zfireParamBean,
|
|
|
+ HttpServletRequest request,
|
|
|
+ HttpServletResponse response
|
|
|
+ ) throws Exception {
|
|
|
+ //2.查询要导出的内容
|
|
|
+ IPage<UserCompanyCreditBillItemVO> page = userCompanyCreditLogic.accList(zfireParamBean);
|
|
|
+ //3.导出
|
|
|
+ FieldUtils.exportData(page.getRecords(), zfireParamBean.getExportFields(), request, response);
|
|
|
+ }
|
|
|
+}
|