|
|
|
@ -44,3 +44,24 @@ func DownloadOrders(c *gin.Context) {
|
|
|
|
|
f := service.OrderService.GenerateOrdersExcel(req)
|
|
|
|
|
excel.Download(f, "订单列表.xlsx", c)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func GetInfos(c *gin.Context) (result.Data, error) {
|
|
|
|
|
var req request.StudentInsureInfoQueryRequest
|
|
|
|
|
err := c.ShouldBindQuery(&req)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, e.NewError("参数错误")
|
|
|
|
|
}
|
|
|
|
|
records, total := service.StudentInsureService.GetInfos(req)
|
|
|
|
|
data := result.Data{
|
|
|
|
|
"records": records,
|
|
|
|
|
"total": total,
|
|
|
|
|
}
|
|
|
|
|
return data, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func DownloadInfos(c *gin.Context) {
|
|
|
|
|
var req request.StudentInsureInfoQueryRequest
|
|
|
|
|
_ = c.ShouldBindQuery(&req)
|
|
|
|
|
f := service.StudentInsureService.GenerateInfosExcel(req)
|
|
|
|
|
excel.Download(f, "学生投保信息.xlsx", c)
|
|
|
|
|
}
|
|
|
|
|