医生账户-导出
This commit is contained in:
@@ -151,3 +151,37 @@ func (r *Export) UserDoctorBankCard(c *gin.Context) {
|
||||
|
||||
responses.OkWithData(ossAddress, c)
|
||||
}
|
||||
|
||||
// DoctorAccount 医生账户
|
||||
func (r *Export) DoctorAccount(c *gin.Context) {
|
||||
doctorAccountRequest := requests.DoctorAccountRequest{}
|
||||
req := doctorAccountRequest.DoctorAccountExportList
|
||||
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
|
||||
}
|
||||
|
||||
// 获取数据
|
||||
doctorAccountDao := dao.DoctorAccountDao{}
|
||||
doctorAccounts, err := doctorAccountDao.GetDoctorAccountExportListSearch(req)
|
||||
if err != nil {
|
||||
responses.FailWithMessage(err.Error(), c)
|
||||
return
|
||||
}
|
||||
|
||||
// 业务处理
|
||||
exportService := service.ExportService{}
|
||||
ossAddress, err := exportService.DoctorAccount(doctorAccounts)
|
||||
if err != nil {
|
||||
responses.FailWithMessage(err.Error(), c)
|
||||
return
|
||||
}
|
||||
|
||||
responses.OkWithData(ossAddress, c)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user