提现记录-关联订单-导出
This commit is contained in:
@@ -28,6 +28,7 @@ func (r *Export) DoctorWithdrawal(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
// 获取数据
|
||||
doctorWithdrawalDao := dao.DoctorWithdrawalDao{}
|
||||
doctorWithdrawals, err := doctorWithdrawalDao.GetDoctorWithdrawalExportListSearch(req)
|
||||
if err != nil {
|
||||
@@ -45,3 +46,37 @@ func (r *Export) DoctorWithdrawal(c *gin.Context) {
|
||||
|
||||
responses.OkWithData(ossAddress, c)
|
||||
}
|
||||
|
||||
// DoctorWithdrawalOrder 提现记录-关联订单
|
||||
func (r *Export) DoctorWithdrawalOrder(c *gin.Context) {
|
||||
doctorWithdrawalRequest := requests.DoctorWithdrawalRequest{}
|
||||
req := doctorWithdrawalRequest.DoctorWithdrawalOrderExportList
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
responses.FailWithMessage(err.Error(), c)
|
||||
return
|
||||
}
|
||||
|
||||
// 参数验证
|
||||
if err := global.Validate.Struct(req); err != nil {
|
||||
responses.FailWithMessage(utils.Translate(err), c)
|
||||
return
|
||||
}
|
||||
|
||||
// 获取数据
|
||||
doctorWithdrawalOrderDao := dao.DoctorWithdrawalOrderDao{}
|
||||
doctorWithdrawalOrders, err := doctorWithdrawalOrderDao.GetDoctorWithdrawalOrderExportListSearch(req)
|
||||
if err != nil {
|
||||
responses.FailWithMessage(err.Error(), c)
|
||||
return
|
||||
}
|
||||
|
||||
// 业务处理
|
||||
exportService := service.ExportService{}
|
||||
ossAddress, err := exportService.DoctorWithdrawalOrder(doctorWithdrawalOrders)
|
||||
if err != nil {
|
||||
responses.FailWithMessage(err.Error(), c)
|
||||
return
|
||||
}
|
||||
|
||||
responses.OkWithData(ossAddress, c)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user