更新
This commit is contained in:
parent
8921d0d0ab
commit
5029a6a7b2
@ -149,11 +149,15 @@ func SaveRegister(c *gin.Context) {
|
|||||||
func ExportRegister(c *gin.Context) {
|
func ExportRegister(c *gin.Context) {
|
||||||
var exportRecordReq exhibition.ExportRecordReq
|
var exportRecordReq exhibition.ExportRecordReq
|
||||||
|
|
||||||
|
fmt.Println("=======================进入导出============================")
|
||||||
|
|
||||||
resp, err := GrpcExhibitionClientImpl.ExportRegisterRecord(context.Background(), &exportRecordReq)
|
resp, err := GrpcExhibitionClientImpl.ExportRegisterRecord(context.Background(), &exportRecordReq)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
response.ResponseQuickMsg(c, msg.Fail, err.Error(), nil)
|
response.ResponseQuickMsg(c, msg.Fail, err.Error(), nil)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
fmt.Println("=======================查出列表============================")
|
||||||
|
fmt.Println(resp)
|
||||||
|
|
||||||
if len(resp.Data) == 0 {
|
if len(resp.Data) == 0 {
|
||||||
resp.Data = []*exhibition.ExportInfo{}
|
resp.Data = []*exhibition.ExportInfo{}
|
||||||
@ -181,6 +185,8 @@ func ExportRegister(c *gin.Context) {
|
|||||||
temp = append(temp, v.UpdatedAt)
|
temp = append(temp, v.UpdatedAt)
|
||||||
data = append(data, &temp)
|
data = append(data, &temp)
|
||||||
}
|
}
|
||||||
|
fmt.Println("=======================组装完数据============================")
|
||||||
|
fmt.Println(data)
|
||||||
_, _ = utils.ToExcelByType(columns, data, "slice", filePath)
|
_, _ = utils.ToExcelByType(columns, data, "slice", filePath)
|
||||||
//处理图片
|
//处理图片
|
||||||
err = logic.DealExcelImg(filePath)
|
err = logic.DealExcelImg(filePath)
|
||||||
|
Loading…
Reference in New Issue
Block a user