|
@@ -3,6 +3,7 @@ package apis
|
|
|
import (
|
|
|
"duoduo/models/bizhi"
|
|
|
"duoduo/models/mysqlBz"
|
|
|
+ "duoduo/tools"
|
|
|
"duoduo/tools/app"
|
|
|
"fmt"
|
|
|
"github.com/gin-gonic/gin"
|
|
@@ -96,6 +97,7 @@ func Search(c *gin.Context) {
|
|
|
inData := bizhi.SearchRequest{}
|
|
|
sqlData := mysqlBz.BiZhi{}
|
|
|
outData := []bizhi.RoundPictureResponse{}
|
|
|
+ search := bizhi.Search{}
|
|
|
err := c.ShouldBindJSON(&inData)
|
|
|
if err != nil {
|
|
|
app.Error(c, 400, err, err.Error())
|
|
@@ -111,6 +113,11 @@ func Search(c *gin.Context) {
|
|
|
if inData.PageIndex != 0 {
|
|
|
pageIndex = inData.PageIndex
|
|
|
}
|
|
|
+
|
|
|
+ search.CreateTime = tools.GetCurrntTimeStr()
|
|
|
+ search.Label = inData.Label
|
|
|
+ search.Insert()
|
|
|
+
|
|
|
sqlData.Label = inData.Label
|
|
|
list, count, err := sqlData.GetLabelList(pageSize, pageIndex)
|
|
|
if err != nil {
|