jiaojiao7 4 years ago
parent
commit
c7579ce53c

+ 2 - 0
model/user.go

@@ -21,6 +21,8 @@ type UserAccount struct {
 	ID    int    `json:"id" gorm:"primaryKey"`
 	ID    int    `json:"id" gorm:"primaryKey"`
 	AppID string `json:"app_id"`
 	AppID string `json:"app_id"`
 	Money int    `json:"money"`
 	Money int    `json:"money"`
+	CreateAt  time.Time      `json:"-" gorm:"autoCreateTime"` //标签autoCreateTime设置如果字段名字不为CreatAt时候自动插入当前时间
+	UpdateAt  time.Time      `json:"-" gorm:"autoUpdateTime"`
 }
 }
 
 
 func (p *UserAccount) TableName() string {
 func (p *UserAccount) TableName() string {

+ 2 - 4
service/projects.go

@@ -5,16 +5,14 @@ import (
 	"fmt"
 	"fmt"
 	"sfbase/core"
 	"sfbase/core"
 	"sfbase/elastic"
 	"sfbase/elastic"
-	"sfbase/global"
 	"sfbase/utils"
 	"sfbase/utils"
 	"sfis/db"
 	"sfis/db"
 	"sfis/model"
 	"sfis/model"
 
 
+	"log"
 	"strconv"
 	"strconv"
 	"strings"
 	"strings"
 	"time"
 	"time"
-
-	"go.uber.org/zap"
 )
 )
 
 
 var (
 var (
@@ -186,7 +184,7 @@ func GetAllByNgram(Es *elastic.Elastic, index, itype, qstr, findfields, order, f
 		if start > -1 {
 		if start > -1 {
 			qstr = qstr[:len(qstr)-1] + `,"from":` + strconv.Itoa(start) + `,"size":` + strconv.Itoa(limit) + "}"
 			qstr = qstr[:len(qstr)-1] + `,"from":` + strconv.Itoa(start) + `,"size":` + strconv.Itoa(limit) + "}"
 		}
 		}
-		global.Logger.Info("GetAllByNgram方法es查询", zap.Any("es语句", qstr))
+		log.Println("es语句", qstr)
 		return Es.Get(index, itype, qstr)
 		return Es.Get(index, itype, qstr)
 	} else {
 	} else {
 		return nil, nil
 		return nil, nil

+ 1 - 1
static/templates/login.html

@@ -111,7 +111,7 @@
                                 str += '<td style="width: 100px">' + item.secret_key + '</td>';
                                 str += '<td style="width: 100px">' + item.secret_key + '</td>';
                                 str += '<td style="width: 100px">' + item.phone + '</td>';
                                 str += '<td style="width: 100px">' + item.phone + '</td>';
                                 str += '<td style="width: 100px">' + item.money + '</td>';
                                 str += '<td style="width: 100px">' + item.money + '</td>';
-                                str += '<td class="handle" style="width: 100px"><a href="/page/userRecharge">充值</a><a href="/page/chooseProductPage">购买产品</a></td>';
+                                str += '<td class="handle" style="width: 100px"><a href="/page/userRecharge?appId='+ item.app_id +'">充值</a><a href="/page/chooseProductPage">购买产品</a></td>';
 
 
                                 str += '</tr>';
                                 str += '</tr>';
                             }
                             }

+ 0 - 3
static/templates/projectList.html

@@ -42,7 +42,6 @@
     </style>
     </style>
     <script>
     <script>
         var LocString = String(window.document.location.href);
         var LocString = String(window.document.location.href);
-
         // 获取页面跳转传过来的参数
         // 获取页面跳转传过来的参数
         function GetQueryString(name) {
         function GetQueryString(name) {
             var rs = new RegExp("(^|)" + name + "=([^&]*)(&|$)", "gi").exec(LocString);
             var rs = new RegExp("(^|)" + name + "=([^&]*)(&|$)", "gi").exec(LocString);
@@ -52,10 +51,8 @@
             }
             }
             return "";
             return "";
         }
         }
-
         var appid = GetQueryString("appId");
         var appid = GetQueryString("appId");
         var key = GetQueryString("key");
         var key = GetQueryString("key");
-
         function submit(param, rType, url, hearders, str) {
         function submit(param, rType, url, hearders, str) {
             $.ajax({
             $.ajax({
                 url: url,
                 url: url,

+ 4 - 4
static/templates/projectListDetail.html

@@ -18,7 +18,7 @@
             <th style="width: 5%">项目标识</th>
             <th style="width: 5%">项目标识</th>
             <th style="width: 4%">项目名称</th>
             <th style="width: 4%">项目名称</th>
             <th style="width: 5%">项目代码</th>
             <th style="width: 5%">项目代码</th>
-            <th style="width: 15%">中标单位</th>
+            <th style="width: 5%">中标单位</th>
             <th style="width: 5%">采购单位</th>
             <th style="width: 5%">采购单位</th>
             <th style="width: 5%">采购单位电话</th>
             <th style="width: 5%">采购单位电话</th>
             <th style="width: 5%">采购单位联系人</th>
             <th style="width: 5%">采购单位联系人</th>
@@ -29,9 +29,9 @@
             <th style="width: 5%">预算金额(元)</th>
             <th style="width: 5%">预算金额(元)</th>
             <th style="width: 5%">省份</th>
             <th style="width: 5%">省份</th>
             <th style="width: 5%">城市</th>
             <th style="width: 5%">城市</th>
-            <th style="width: 15%">中标信息列表</th>
-            <th style="width: 15%">原链接</th>
-            <th style="width: 15%">剑鱼标讯链接</th>
+            <th style="width: 5%">中标信息列表</th>
+            <th style="width: 5%">原链接</th>
+            <th style="width: 5%">剑鱼标讯链接</th>
         </tr>
         </tr>
         <tbody class="box">
         <tbody class="box">
 
 

+ 1 - 1
static/templates/userRecharge.html

@@ -32,7 +32,7 @@
         </div>
         </div>
         <div id="resultContent"></div>
         <div id="resultContent"></div>
         <script>
         <script>
-            var appid = getParam("id");
+            var appid = getParam("appId");
             if (appid !== "") {
             if (appid !== "") {
                 $.ajax({
                 $.ajax({
                     url: "/manage/user/userProductList",
                     url: "/manage/user/userProductList",