Commit 58c74275 authored by machengbo's avatar machengbo

提现 详情 和 显现审核

parent 32cfec23
...@@ -5,17 +5,15 @@ import com.jz.common.bean.PageInfoResponse; ...@@ -5,17 +5,15 @@ import com.jz.common.bean.PageInfoResponse;
import com.jz.common.constant.Constants; import com.jz.common.constant.Constants;
import com.jz.common.utils.Result; import com.jz.common.utils.Result;
import com.jz.manage.moduls.controller.BaseController; import com.jz.manage.moduls.controller.BaseController;
import com.jz.manage.moduls.controller.finance.platForm.OrderCountInfoDto; import com.jz.manage.moduls.controller.finance.platForm.*;
import com.jz.manage.moduls.controller.finance.platForm.PlatFormMoneyAndDepartDto;
import com.jz.manage.moduls.controller.finance.platForm.TradeDetilDto;
import com.jz.manage.moduls.controller.finance.platForm.TradeDetilRequest;
import com.jz.manage.moduls.service.PlatformTradeFlowInfoService; import com.jz.manage.moduls.service.PlatformTradeFlowInfoService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.HashMap; import java.util.HashMap;
...@@ -31,6 +29,8 @@ import java.util.Map; ...@@ -31,6 +29,8 @@ import java.util.Map;
@RequestMapping("platformTradeFlowInfo") @RequestMapping("platformTradeFlowInfo")
@Api(tags = "平台--利润中心") @Api(tags = "平台--利润中心")
public class PlatformTradeFlowInfoController extends BaseController { public class PlatformTradeFlowInfoController extends BaseController {
private static final Logger logger = LoggerFactory.getLogger(PlatformTradeFlowInfoController.class);
/** /**
* 服务对象 * 服务对象
*/ */
...@@ -65,16 +65,16 @@ public class PlatformTradeFlowInfoController extends BaseController { ...@@ -65,16 +65,16 @@ public class PlatformTradeFlowInfoController extends BaseController {
* @author Bellamy * @author Bellamy
* @since 2020-12-03 * @since 2020-12-03
*/ */
@GetMapping(value = "/orderCountList") @PostMapping(value = "/orderCountList")
@ApiOperation(value = "财务管理---我的订单", notes = "我的订单") @ApiOperation(value = "财务管理---我的订单", notes = "我的订单")
public PageInfoResponse<OrderCountInfoDto> findList(BasePageBean pageBean, HttpServletRequest httpRequest) throws Exception { public PageInfoResponse<OrderCountInfoDto> findList(@RequestBody BasePageBean pageBean, HttpServletRequest httpRequest) throws Exception {
PageInfoResponse<OrderCountInfoDto> pageInfo = new PageInfoResponse<OrderCountInfoDto>(); PageInfoResponse<OrderCountInfoDto> pageInfo = new PageInfoResponse<OrderCountInfoDto>();
Map map = new HashMap(); Map map = new HashMap();
//从session中获取平台用户id //从session中获取平台用户id
//SysUserDto user = (SysUserDto) SessionUtils.getUserCurrent(requset,"sysUser"); //SysUserDto user = (SysUserDto) SessionUtils.getUserCurrent(requset,"sysUser");
//map.put("userId", user.getUserId()); //map.put("userId", user.getUserId());
try { try {
pageInfo = platformTradeFlowInfoService.findListOrderCount(pageBean,httpRequest); pageInfo = platformTradeFlowInfoService.findListOrderCount(pageBean, httpRequest);
} catch (Exception e) { } catch (Exception e) {
pageInfo.setMessage("查询失败"); pageInfo.setMessage("查询失败");
pageInfo.setCode(Constants.FAILURE_CODE); pageInfo.setCode(Constants.FAILURE_CODE);
...@@ -91,16 +91,41 @@ public class PlatformTradeFlowInfoController extends BaseController { ...@@ -91,16 +91,41 @@ public class PlatformTradeFlowInfoController extends BaseController {
* @author Bellamy * @author Bellamy
* @since 2020-12-03 * @since 2020-12-03
*/ */
@GetMapping(value = "/tradeDetilList") @PostMapping(value = "/tradeDetilList")
@ApiOperation(value = "财务管理--交易明细", notes = "交易明细") @ApiOperation(value = "财务管理--交易明细", notes = "交易明细")
public PageInfoResponse<TradeDetilDto> getFinanceTradeDetil(TradeDetilRequest tradeDetilRequest, HttpServletRequest httpRequest) throws Exception { public PageInfoResponse<TradeDetilDto> getFinanceTradeDetil(@RequestBody TradeDetilRequest tradeDetilRequest, HttpServletRequest httpRequest) throws Exception {
PageInfoResponse<TradeDetilDto> pageInfo = new PageInfoResponse<TradeDetilDto>(); PageInfoResponse<TradeDetilDto> pageInfo = new PageInfoResponse<TradeDetilDto>();
Map map = new HashMap(); Map map = new HashMap();
//从session中获取平台用户id //从session中获取平台用户id
//SysUserDto user = (SysUserDto) SessionUtils.getUserCurrent(requset,"sysUser"); //SysUserDto user = (SysUserDto) SessionUtils.getUserCurrent(requset,"sysUser");
//map.put("userId", user.getUserId()); //map.put("userId", user.getUserId());
try { try {
pageInfo = platformTradeFlowInfoService.findListFinanceTradeDetil(tradeDetilRequest,httpRequest); pageInfo = platformTradeFlowInfoService.findListFinanceTradeDetil(tradeDetilRequest, httpRequest);
} catch (Exception e) {
pageInfo.setMessage("查询失败");
pageInfo.setCode(Constants.FAILURE_CODE);
e.printStackTrace();
}
return pageInfo;
}
/**
* 提现管理--分页列表
*
* @return
* @author Bellamy
* @since 2020-12-03
*/
@PostMapping(value = "/cashOutList")
@ApiOperation(value = "提现管理--分页列表", notes = "分页列表")
public PageInfoResponse<CashOutListDto> getFinanceCashOutList(@RequestBody CashOutListRequest cashOutListRequest, HttpServletRequest httpRequest) throws Exception {
PageInfoResponse<CashOutListDto> pageInfo = new PageInfoResponse<CashOutListDto>();
Map map = new HashMap();
//从session中获取平台用户id
//SysUserDto user = (SysUserDto) SessionUtils.getUserCurrent(requset,"sysUser");
//map.put("userId", user.getUserId());
try {
pageInfo = platformTradeFlowInfoService.findListFinanceCashOut(cashOutListRequest, httpRequest);
} catch (Exception e) { } catch (Exception e) {
pageInfo.setMessage("查询失败"); pageInfo.setMessage("查询失败");
pageInfo.setCode(Constants.FAILURE_CODE); pageInfo.setCode(Constants.FAILURE_CODE);
...@@ -109,4 +134,41 @@ public class PlatformTradeFlowInfoController extends BaseController { ...@@ -109,4 +134,41 @@ public class PlatformTradeFlowInfoController extends BaseController {
return pageInfo; return pageInfo;
} }
/**
* 提现管理--提现详情
*
* @return
* @author Bellamy
* @since 2020-12-06
*/
@PostMapping(value = "/cashOutInfoById")
@ApiOperation(value = "提现管理--提现详情", notes = "提现详情")
public Result<Object> getFinanceCashOutInfoById(@RequestParam(value = "cashOutId") String cashOutId, HttpServletRequest httpRequest) throws Exception {
Result<Object> result = new Result<>();
if (StringUtils.isEmpty(cashOutId)) {
return Result.error("参数不能为空!");
}
CashOutInfoDto dto = platformTradeFlowInfoService.queryCashOutByid(cashOutId);
result.setData(dto);
return result;
}
/**
* 提现管理--提现审核
*
* @return
* @author Bellamy
* @since 2020-12-06
*/
@PostMapping(value = "/cashOutInfoAudit")
@ApiOperation(value = "提现管理--提现审核", notes = "提现审核")
public Result<Object> getCashOutInfoAudit(@RequestBody CashOutAuditRequest cashOutAuditRequest, HttpServletRequest httpRequest) throws Exception {
Result<Object> result = new Result<>();
if (StringUtils.isEmpty(cashOutAuditRequest.getCashOutId())) {
return Result.error("参数不能为空!");
}
Result<Object> dto = platformTradeFlowInfoService.uptCashOutInfoAuditByid(cashOutAuditRequest);
return dto;
}
} }
\ No newline at end of file
package com.jz.manage.moduls.controller.finance.platForm;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
/**
* 平台利润中心--提现详情返回参数对象
*
* @author Bellamy
* @since 2020-12-05 10:41:43
*/
@ApiModel(value = "提现管理--提现详情返回参数对象", description = "提现详情返回参数对象")
public class CashOutInfoDto {
/**
* 企业名
*/
@ApiModelProperty(value = "企业名")
private String departmentName;
/**
* 提现描述
*/
@ApiModelProperty(value = "提现描述")
private String remark;
/**
* 提现金额
*/
@ApiModelProperty(value = "提现金额")
private BigDecimal cashOutMoney;
/**
* 审核意见
*/
@ApiModelProperty(value = "审核意见")
private String rejectReason;
/**
* 提现状态:01待审核,02审核通过,03未通过
*/
@ApiModelProperty(value = "提现状态")
private String auditStatus;
/**
* 提现id
*/
@ApiModelProperty(value = "提现id")
private Long cashOutId;
public String getDepartmentName() {
return departmentName;
}
public void setDepartmentName(String departmentName) {
this.departmentName = departmentName;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getAuditStatus() {
return auditStatus;
}
public void setAuditStatus(String auditStatus) {
this.auditStatus = auditStatus;
}
public BigDecimal getCashOutMoney() {
return cashOutMoney;
}
public void setCashOutMoney(BigDecimal cashOutMoney) {
this.cashOutMoney = cashOutMoney;
}
public Long getCashOutId() {
return cashOutId;
}
public void setCashOutId(Long cashOutId) {
this.cashOutId = cashOutId;
}
public String getRejectReason() {
return rejectReason;
}
public void setRejectReason(String rejectReason) {
this.rejectReason = rejectReason;
}
}
\ No newline at end of file
package com.jz.manage.moduls.controller.finance.platForm;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.Date;
/**
* 平台利润中心--提现管理--分页列表返回参数对象
*
* @author Bellamy
* @since 2020-12-05 10:41:43
*/
@ApiModel(value = "提现管理--分页列表返回参数对象", description = "分页列表返回参数对象")
public class CashOutListDto {
/**
* 企业名
*/
@ApiModelProperty(value = "企业名")
private String departmentName;
/**
* 提现描述
*/
@ApiModelProperty(value = "提现描述")
private String remark;
/**
* 提现金额
*/
@ApiModelProperty(value = "提现金额")
private BigDecimal cashOutMoney;
/**
* 提现时间
*/
@ApiModelProperty(value = "提现时间")
private Date casOutTime;
/**
* 提现状态:01待审核,02审核通过,03未通过
*/
@ApiModelProperty(value = "提现状态")
private String auditStatus;
/**
* 提现id
*/
@ApiModelProperty(value = "提现id")
private Long cashOutId;
public String getDepartmentName() {
return departmentName;
}
public void setDepartmentName(String departmentName) {
this.departmentName = departmentName;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getAuditStatus() {
return auditStatus;
}
public void setAuditStatus(String auditStatus) {
this.auditStatus = auditStatus;
}
public Date getCasOutTime() {
return casOutTime;
}
public void setCasOutTime(Date casOutTime) {
this.casOutTime = casOutTime;
}
public BigDecimal getCashOutMoney() {
return cashOutMoney;
}
public void setCashOutMoney(BigDecimal cashOutMoney) {
this.cashOutMoney = cashOutMoney;
}
public Long getCashOutId() {
return cashOutId;
}
public void setCashOutId(Long cashOutId) {
this.cashOutId = cashOutId;
}
}
\ No newline at end of file
package com.jz.manage.moduls.controller.finance.platForm;
import com.jz.common.bean.BasePageBean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* 平台利润中心--提现管理--分页列表参数对象
*
* @author Bellamy
* @since 2020-12-05 10:41:43
*/
@ApiModel(value = "提现管理--分页列表参数对象", description = "分页列表参数对象")
public class CashOutListRequest extends BasePageBean {
/**
* 企业名
*/
@ApiModelProperty(value = "企业名")
private String departmentName;
/**
* 提现描述
*/
@ApiModelProperty(value = "提现描述")
private String remark;
/**
* 提现状态:01待审核,02审核通过,03未通过
*/
@ApiModelProperty(value = "提现状态")
private String auditStatus;
/**
* 提现时间
*/
@ApiModelProperty(value = "提现时间")
private String casOutTime;
public String getDepartmentName() {
return departmentName;
}
public void setDepartmentName(String departmentName) {
this.departmentName = departmentName;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getAuditStatus() {
return auditStatus;
}
public void setAuditStatus(String auditStatus) {
this.auditStatus = auditStatus;
}
public String getCasOutTime() {
return casOutTime;
}
public void setCasOutTime(String casOutTime) {
this.casOutTime = casOutTime;
}
}
\ No newline at end of file
package com.jz.manage.moduls.controller.finance.platForm; package com.jz.manage.moduls.controller.finance.platForm;
import com.jz.common.bean.BasePageBean; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.Date;
/** /**
* 平台利润中心--财务管理交易明细返回对象 * 平台利润中心--财务管理交易明细返回对象
* *
...@@ -11,13 +14,13 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -11,13 +14,13 @@ import io.swagger.annotations.ApiModelProperty;
* @since 2020-12-01 10:41:43 * @since 2020-12-01 10:41:43
*/ */
@ApiModel(value = "财务管理--交易明细返回对象", description = "交易明细返回对象") @ApiModel(value = "财务管理--交易明细返回对象", description = "交易明细返回对象")
public class TradeDetilDto extends BasePageBean { public class TradeDetilDto {
/** /**
* 企业名 * 订单编号
*/ */
@ApiModelProperty(value = "企业名") @ApiModelProperty(value = "订单编号")
private String departmentName; private String orderNumber;
/** /**
* 数据名称 * 数据名称
*/ */
...@@ -25,17 +28,39 @@ public class TradeDetilDto extends BasePageBean { ...@@ -25,17 +28,39 @@ public class TradeDetilDto extends BasePageBean {
private String dataName; private String dataName;
/** /**
* 数据行业 * 时间
*/ */
@ApiModelProperty(value = "数据行业") @ApiModelProperty(value = "时间")
private String categoryId; @JsonFormat(pattern="HH:mm:ss")
private Date orderTime;
/**
* 金额
*/
@ApiModelProperty(value = "金额")
private BigDecimal orderMoney;
/**
* 支付方式
*/
@ApiModelProperty(value = "支付方式")
private String paymentMethod;
/** /**
* 订单方式 * 订单方式
*/ */
@ApiModelProperty(value = "订单方式") @ApiModelProperty(value = "订单方式")
private String orderMethod; private String purchaseMethod;
/**
* 行业
*/
@ApiModelProperty(value = "行业")
private String categoryId;
/**
* 企业名称
*/
@ApiModelProperty(value = "企业名称")
private String departmentName;
public String getDepartmentName() { public String getDepartmentName() {
return departmentName; return departmentName;
} }
...@@ -60,11 +85,42 @@ public class TradeDetilDto extends BasePageBean { ...@@ -60,11 +85,42 @@ public class TradeDetilDto extends BasePageBean {
this.categoryId = categoryId; this.categoryId = categoryId;
} }
public String getOrderMethod() { public String getOrderNumber() { return orderNumber;
return orderMethod; }
public void setOrderNumber(String orderNumber) {
this.orderNumber = orderNumber;
}
public Date getOrderTime() {
return orderTime;
}
public void setOrderTime(Date orderTime) {
this.orderTime = orderTime;
}
public BigDecimal getOrderMoney() {
return orderMoney;
}
public void setOrderMoney(BigDecimal orderMoney) {
this.orderMoney = orderMoney;
}
public String getPaymentMethod() {
return paymentMethod;
}
public void setPaymentMethod(String paymentMethod) {
this.paymentMethod = paymentMethod;
}
public String getPurchaseMethod() {
return purchaseMethod;
} }
public void setOrderMethod(String orderMethod) { public void setPurchaseMethod(String purchaseMethod) {
this.orderMethod = orderMethod; this.purchaseMethod = purchaseMethod;
} }
} }
\ No newline at end of file
package com.jz.manage.moduls.entity; package com.jz.manage.moduls.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
...@@ -20,6 +22,7 @@ public class FinanceCashOut implements Serializable { ...@@ -20,6 +22,7 @@ public class FinanceCashOut implements Serializable {
/** /**
* 提现id * 提现id
*/ */
@TableId(value = "cash_out_id",type = IdType.AUTO)
private Long cashOutId; private Long cashOutId;
/** /**
* 资产id * 资产id
......
package com.jz.manage.moduls.mapper; package com.jz.manage.moduls.mapper;
import com.jz.common.base.BaseMapper; import com.jz.common.base.BaseMapper;
import com.jz.common.entity.FinanceCashOut; import com.jz.manage.moduls.entity.FinanceCashOut;
/** /**
* 提现申请(TFinanceCashOut)表数据库访问层 * 提现申请(TFinanceCashOut)表数据库访问层
......
...@@ -2,9 +2,8 @@ package com.jz.manage.moduls.mapper; ...@@ -2,9 +2,8 @@ package com.jz.manage.moduls.mapper;
import com.jz.common.base.BaseMapper; import com.jz.common.base.BaseMapper;
import com.jz.common.entity.PlatformTradeFlowInfo; import com.jz.common.entity.PlatformTradeFlowInfo;
import com.jz.manage.moduls.controller.finance.platForm.OrderCountInfoDto; import com.jz.manage.moduls.controller.finance.platForm.*;
import com.jz.manage.moduls.controller.finance.platForm.PlatFormMoneyAndDepartDto; import org.apache.ibatis.annotations.Param;
import com.jz.manage.moduls.controller.finance.platForm.TradeDetilDto;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -22,4 +21,8 @@ public interface PlatformTradeFlowInfoDao extends BaseMapper<PlatformTradeFlowIn ...@@ -22,4 +21,8 @@ public interface PlatformTradeFlowInfoDao extends BaseMapper<PlatformTradeFlowIn
List<OrderCountInfoDto> findListOrderCount(Map param) throws Exception; List<OrderCountInfoDto> findListOrderCount(Map param) throws Exception;
List<TradeDetilDto> findListFinanceTradeDetil(Map param) throws Exception; List<TradeDetilDto> findListFinanceTradeDetil(Map param) throws Exception;
List<CashOutListDto> findListFinanceCashOut(Map param) throws Exception;
CashOutInfoDto queryCashOutByid(@Param("cashOutId") String cashOutId) throws Exception;
} }
\ No newline at end of file
...@@ -2,10 +2,8 @@ package com.jz.manage.moduls.service; ...@@ -2,10 +2,8 @@ package com.jz.manage.moduls.service;
import com.jz.common.bean.BasePageBean; import com.jz.common.bean.BasePageBean;
import com.jz.common.bean.PageInfoResponse; import com.jz.common.bean.PageInfoResponse;
import com.jz.manage.moduls.controller.finance.platForm.OrderCountInfoDto; import com.jz.common.utils.Result;
import com.jz.manage.moduls.controller.finance.platForm.PlatFormMoneyAndDepartDto; import com.jz.manage.moduls.controller.finance.platForm.*;
import com.jz.manage.moduls.controller.finance.platForm.TradeDetilDto;
import com.jz.manage.moduls.controller.finance.platForm.TradeDetilRequest;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.Map; import java.util.Map;
...@@ -19,9 +17,15 @@ import java.util.Map; ...@@ -19,9 +17,15 @@ import java.util.Map;
public interface PlatformTradeFlowInfoService { public interface PlatformTradeFlowInfoService {
PlatFormMoneyAndDepartDto queryPlatFormMoneyAndDepart(Map map) throws Exception ; PlatFormMoneyAndDepartDto queryPlatFormMoneyAndDepart(Map map) throws Exception;
PageInfoResponse<OrderCountInfoDto> findListOrderCount(BasePageBean pageBean, HttpServletRequest httpRequest) throws Exception ; PageInfoResponse<OrderCountInfoDto> findListOrderCount(BasePageBean pageBean, HttpServletRequest httpRequest) throws Exception;
PageInfoResponse<TradeDetilDto> findListFinanceTradeDetil(TradeDetilRequest tradeDetilRequest, HttpServletRequest httpRequest) throws Exception ; PageInfoResponse<TradeDetilDto> findListFinanceTradeDetil(TradeDetilRequest tradeDetilRequest, HttpServletRequest httpRequest) throws Exception;
PageInfoResponse<CashOutListDto> findListFinanceCashOut(CashOutListRequest cashOutListRequest, HttpServletRequest httpRequest) throws Exception;
CashOutInfoDto queryCashOutByid(String cashOutId) throws Exception;
Result<Object> uptCashOutInfoAuditByid(CashOutAuditRequest cashOutAuditRequest) throws Exception;
} }
\ No newline at end of file
...@@ -5,10 +5,10 @@ import com.github.pagehelper.PageInfo; ...@@ -5,10 +5,10 @@ import com.github.pagehelper.PageInfo;
import com.jz.common.bean.BasePageBean; import com.jz.common.bean.BasePageBean;
import com.jz.common.bean.PageInfoResponse; import com.jz.common.bean.PageInfoResponse;
import com.jz.common.constant.Constants; import com.jz.common.constant.Constants;
import com.jz.manage.moduls.controller.finance.platForm.OrderCountInfoDto; import com.jz.common.utils.Result;
import com.jz.manage.moduls.controller.finance.platForm.PlatFormMoneyAndDepartDto; import com.jz.manage.moduls.controller.finance.platForm.*;
import com.jz.manage.moduls.controller.finance.platForm.TradeDetilDto; import com.jz.manage.moduls.entity.FinanceCashOut;
import com.jz.manage.moduls.controller.finance.platForm.TradeDetilRequest; import com.jz.manage.moduls.mapper.FinanceCashOutDao;
import com.jz.manage.moduls.mapper.PlatformTradeFlowInfoDao; import com.jz.manage.moduls.mapper.PlatformTradeFlowInfoDao;
import com.jz.manage.moduls.service.PlatformTradeFlowInfoService; import com.jz.manage.moduls.service.PlatformTradeFlowInfoService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
...@@ -17,6 +17,7 @@ import org.springframework.stereotype.Service; ...@@ -17,6 +17,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -34,6 +35,9 @@ public class PlatformTradeFlowInfoServiceImpl implements PlatformTradeFlowInfoSe ...@@ -34,6 +35,9 @@ public class PlatformTradeFlowInfoServiceImpl implements PlatformTradeFlowInfoSe
@Autowired @Autowired
private PlatformTradeFlowInfoDao platformTradeFlowInfoDao; private PlatformTradeFlowInfoDao platformTradeFlowInfoDao;
@Autowired
private FinanceCashOutDao financeCashOutDao;
@Override @Override
public PlatFormMoneyAndDepartDto queryPlatFormMoneyAndDepart(Map map) throws Exception { public PlatFormMoneyAndDepartDto queryPlatFormMoneyAndDepart(Map map) throws Exception {
return platformTradeFlowInfoDao.queryPlatFormMoneyAndDepart(map); return platformTradeFlowInfoDao.queryPlatFormMoneyAndDepart(map);
...@@ -99,4 +103,66 @@ public class PlatformTradeFlowInfoServiceImpl implements PlatformTradeFlowInfoSe ...@@ -99,4 +103,66 @@ public class PlatformTradeFlowInfoServiceImpl implements PlatformTradeFlowInfoSe
pageInfoResponse.setData(pageInfo); pageInfoResponse.setData(pageInfo);
return pageInfoResponse; return pageInfoResponse;
} }
@Override
public PageInfoResponse<CashOutListDto> findListFinanceCashOut(CashOutListRequest cashOutListRequest, HttpServletRequest httpRequest) throws Exception {
PageInfoResponse<CashOutListDto> pageInfoResponse = new PageInfoResponse<>();
Map param = new HashMap();
//从session中获取平台用户id
//SysUserDto user = (SysUserDto) SessionUtils.getUserCurrent(requset,"sysUser");
//param.put("userId", user.getUserId());
//提现描述
if (StringUtils.isNotEmpty(cashOutListRequest.getCasOutTime())) {
param.put("casOutTime", cashOutListRequest.getCasOutTime());
}
//企业名
if (StringUtils.isNotEmpty(cashOutListRequest.getDepartmentName())) {
param.put("departmentName", cashOutListRequest.getDepartmentName());
}
//提现状态
if (StringUtils.isNotEmpty(cashOutListRequest.getAuditStatus())) {
param.put("auditStatus", cashOutListRequest.getAuditStatus());
}
//提现时间
if (StringUtils.isNotEmpty(cashOutListRequest.getCasOutTime())) {
String casOutTime = cashOutListRequest.getCasOutTime();
String[] times = casOutTime.split("-");
param.put("casOutTimeStart", times[0] + "00:00:00");
param.put("casOutTimeEnd", times[1] + "23:59:59");
}
PageHelper.startPage(cashOutListRequest.getPageNum(), cashOutListRequest.getPageSize());
List<CashOutListDto> list = platformTradeFlowInfoDao.findListFinanceCashOut(param);
PageInfo<CashOutListDto> pageInfo = new PageInfo<>(list);
pageInfoResponse.setCode(Constants.SUCCESS_CODE);
pageInfoResponse.setMessage("查询成功");
pageInfoResponse.setData(pageInfo);
return pageInfoResponse;
}
@Override
public CashOutInfoDto queryCashOutByid(String cashOutId) throws Exception {
return platformTradeFlowInfoDao.queryCashOutByid(cashOutId);
}
@Override
public Result<Object> uptCashOutInfoAuditByid(CashOutAuditRequest cashOutAuditRequest) throws Exception {
FinanceCashOut cashOut = new FinanceCashOut();
if (StringUtils.isNotEmpty(cashOutAuditRequest.getCashOutId())) {
cashOut.setCashOutId(Long.valueOf(cashOutAuditRequest.getCashOutId()));
}
if (StringUtils.isNotEmpty(cashOutAuditRequest.getRejectReason())) {
cashOut.setRejectReason(cashOutAuditRequest.getRejectReason());
}
cashOut.setAuditStatus(cashOutAuditRequest.getAuditStatus());
cashOut.setAuditTime(new Date());
//cashOut.setAuditPerson();
int len = financeCashOutDao.updateById(cashOut);
if (len > 0) {
return Result.ok();
} else {
return Result.error("提交失败");
}
}
} }
\ No newline at end of file
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
<!--平台利润中心,订单交易明细--> <!--平台利润中心,订单交易明细-->
<select id="findListFinanceTradeDetil" resultType="com.jz.manage.moduls.controller.finance.platForm.TradeDetilDto" parameterType="map"> <select id="findListFinanceTradeDetil" resultType="com.jz.manage.moduls.controller.finance.platForm.TradeDetilDto" parameterType="map">
select select
t1.order_id, t1.order_id as orderId,
t1.order_number as orderNumber, t1.order_number as orderNumber,
t1.order_time as orderTime, t1.order_time as orderTime,
t1.order_money as orderMoney, t1.order_money as orderMoney,
...@@ -182,4 +182,40 @@ ...@@ -182,4 +182,40 @@
<if test="orderMethod != null">and t1.purchase_method = #{orderMethod}</if> <if test="orderMethod != null">and t1.purchase_method = #{orderMethod}</if>
</select> </select>
<select id="findListFinanceCashOut" resultType="com.jz.manage.moduls.controller.finance.platForm.CashOutListDto" parameterType="map">
select
t2.cash_out_id as cashOutId,
t2.cash_out_money as cashOutMoney,
t2.cash_out_time as casOutTime,
(case when t2.audit_status='01' then '待审核' when t2.audit_status='02' then '已审核'
when t2.audit_status='03' then '未通过' end) as auditStatus,
t2.remark,
t3.department_name as departmentName
from t_finance_customer_assets t1
inner join t_department t3 on t3.department_id=t1.department_id
left join t_finance_cash_out t2 on t2.assets_id=t1.assets_id and t2.del_flag='N'
where 1=1 and t1.del_flag='N'
<if test="departmentName != null">and t3.department_name like concat('%',#{departmentName},'%')</if>
<if test="remark != null">and t2.remark like concat('%',#{remark},'%')</if>
<if test="auditStatus != null">and t2.audit_status = #{auditStatus}</if>
<if test="casOutTimeStart != null">and t2.cash_out_time >= #{casOutTimeStart}</if>
<if test="casOutTimeEnd != null">and #{casOutTimeEnd} >= t2.cash_out_time</if>
</select>
<!--根据主键查询 提现详情-->
<select id="queryCashOutByid" resultType="com.jz.manage.moduls.controller.finance.platForm.CashOutInfoDto" parameterType="map">
select
t2.cash_out_id as cashOutId,
t2.cash_out_money as cashOutMoney,
(case when t2.audit_status='01' then '待审核' when t2.audit_status='02' then '已审核'
when t2.audit_status='03' then '未通过' end) as auditStatus,
t2.reject_reason as rejectReason,
t2.remark,
t3.department_name as departmentName
from t_finance_customer_assets t1
inner join t_department t3 on t3.department_id=t1.department_id and t3.del_flag='N'
left join t_finance_cash_out t2 on t2.assets_id=t1.assets_id and t2.del_flag='N'
where 1=1 and t1.del_flag='N' and t2.cash_out_id = #{cashOutId}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -73,11 +73,11 @@ ...@@ -73,11 +73,11 @@
</dependency> </dependency>
<!-- spring boot 和mybatis --> <!-- spring boot 和mybatis -->
<!--<dependency> <dependency>
<groupId>org.mybatis.spring.boot</groupId> <groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId> <artifactId>mybatis-spring-boot-starter</artifactId>
<version>${mybatis-spring.version}</version> <version>${mybatis-spring.version}</version>
</dependency>--> </dependency>
<!-- mybatis plus --> <!-- mybatis plus -->
<dependency> <dependency>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment