|
@@ -3,7 +3,9 @@ package manage
|
|
|
import (
|
|
|
"github.com/go-xweb/xweb"
|
|
|
"gopkg.in/mgo.v2/bson"
|
|
|
+ "qfw/coreconfig"
|
|
|
mgo "qfw/util/mongodb"
|
|
|
+ "qfw/util/redis"
|
|
|
"time"
|
|
|
)
|
|
|
|
|
@@ -25,6 +27,7 @@ type LoanAction struct {
|
|
|
show_classification xweb.Mapper `xweb:"/manage/jy_loan/showclassification"` //查看分类
|
|
|
save_classification xweb.Mapper `xweb:"/manage/jy_loan/saveclassification"` //保存分类
|
|
|
updata_classification xweb.Mapper `xweb:"/manage/jy_loan/updataclassification"` //更新分类
|
|
|
+ get_ad_count xweb.Mapper `xweb:"/manage/jy_loan/getadcount"` //获取广告统计
|
|
|
}
|
|
|
|
|
|
type Front struct {
|
|
@@ -32,13 +35,14 @@ type Front struct {
|
|
|
login xweb.Mapper `xweb:"/manage/jyloan/list"`
|
|
|
visitList xweb.Mapper `xweb:"/manage/loan/visitlist"`
|
|
|
evaluationlist xweb.Mapper `xweb:"/manage/loan/evaluationlist"` //评估列表页面
|
|
|
- evaluationdetail xweb.Mapper `xweb:"/manage/jy_loan/evaluationdetail"` //评估详情页面
|
|
|
+ evaluationdetail xweb.Mapper `xweb:"/manage/jy_loan/evaluationdetail"` //评估详情页面
|
|
|
clasifylist xweb.Mapper `xweb:"/manage/loan/clasifylist"`
|
|
|
setting xweb.Mapper `xweb:"/manage/loan/setting"`
|
|
|
classset xweb.Mapper `xweb:"/manage/loan/classSet.html"`
|
|
|
passwordchange xweb.Mapper `xweb:"/loan/passwordChange.html"`
|
|
|
clue xweb.Mapper `xweb:"/manage/loan/cluelist"`
|
|
|
show_clue xweb.Mapper `xweb:"/manage/jy_loan/show_clue"`
|
|
|
+ ad_count xweb.Mapper `xweb:"/manage/loan/adcount"`
|
|
|
}
|
|
|
|
|
|
|
|
@@ -68,6 +72,10 @@ func (this *Front)Setting()error{
|
|
|
return this.Render("/manage/loan/classSet.html")
|
|
|
}
|
|
|
|
|
|
+func (this *Front)Ad_count()error{
|
|
|
+ return this.Render("/manage/loan/loanAd.html")
|
|
|
+}
|
|
|
+
|
|
|
//func (this *Front)Classset()error{
|
|
|
// return this.Render("./classSet.html")
|
|
|
//}
|
|
@@ -631,5 +639,20 @@ func valida(uid,pwd,mtype string)bool{
|
|
|
}
|
|
|
|
|
|
|
|
|
+func (this *LoanAction)Get_ad_count(){
|
|
|
+ userId := this.GetSession("userId")
|
|
|
+ if userId != nil{
|
|
|
+ origin := coreconfig.LoanAdOrigin["origin"].(map[string]interface{})
|
|
|
+ data := make(map[string]interface{})
|
|
|
+ for k,v := range origin{
|
|
|
+ count :=redis.GetInt("other",k)
|
|
|
+ data[v.(string)] = count
|
|
|
+
|
|
|
+ }
|
|
|
+ this.ServeJson(map[string]interface{}{
|
|
|
+ "data":data,
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
|