aa
This commit is contained in:
@@ -245,3 +245,7 @@ func UpdateConfig(ctx *jxcontext.Context, key, configType, value string) (hint s
|
|||||||
func QueryConfigs(key, configType, keyword string) (configList []*model.NewConfig, err error) {
|
func QueryConfigs(key, configType, keyword string) (configList []*model.NewConfig, err error) {
|
||||||
return dao.QueryConfigs(dao.GetDB(), key, configType, keyword)
|
return dao.QueryConfigs(dao.GetDB(), key, configType, keyword)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func InitStation(ctx *jxcontext.Context) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|||||||
@@ -278,6 +278,8 @@ func GetMessageGroupByUser(ctx *jxcontext.Context, userID string) (messageGroupR
|
|||||||
if user3, err := dao.GetUserByID(db, "user_id", imMessageRecord.UserID); err == nil {
|
if user3, err := dao.GetUserByID(db, "user_id", imMessageRecord.UserID); err == nil {
|
||||||
v.LastUserName = user3.Name
|
v.LastUserName = user3.Name
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
err = nil
|
||||||
}
|
}
|
||||||
//该用户各组的未读消息数
|
//该用户各组的未读消息数
|
||||||
var unReadCount int
|
var unReadCount int
|
||||||
|
|||||||
@@ -181,3 +181,37 @@ func (v *MtMember) TableIndex() [][]string {
|
|||||||
[]string{"DeletedAt"},
|
[]string{"DeletedAt"},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type StationInfo struct {
|
||||||
|
ModelIDCUL
|
||||||
|
|
||||||
|
StationID string `orm:"column(station_id)" json:"stationID"`
|
||||||
|
StationName string `json:"stationName"`
|
||||||
|
ProvinceName string `json:"provinceName"`
|
||||||
|
ProvinceID int `orm:"column(province_id)" json:"provinceID"`
|
||||||
|
CityName string `json:"cityName"`
|
||||||
|
Latitude string `json:"latitude"`
|
||||||
|
Longitude string `json:"longitude"`
|
||||||
|
Location string `json:"location"`
|
||||||
|
StarNum string `json:"starNum"`
|
||||||
|
Phone string `json:"phone"`
|
||||||
|
StationPic string `json:"stationPic"`
|
||||||
|
StationBannerPic string `json:"stationBannerPic"`
|
||||||
|
Prices string `orm:"type(text)" json:"prices"`
|
||||||
|
Adverts string `orm:"type(text)" json:"adverts"`
|
||||||
|
District string `json:"district"`
|
||||||
|
CityID int `orm:"column(city_id)" json:"cityID"`
|
||||||
|
StationType int `json:"stationType"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *StationInfo) TableUnique() [][]string {
|
||||||
|
return [][]string{
|
||||||
|
[]string{"StationID"},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *StationInfo) TableIndex() [][]string {
|
||||||
|
return [][]string{
|
||||||
|
[]string{"CityID", "ProvinceID"},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -145,3 +145,16 @@ func (c *CmsController) UpdatePlace() {
|
|||||||
return retVal, "", err
|
return retVal, "", err
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Title init station
|
||||||
|
// @Description init station
|
||||||
|
// @Param token header string true "认证token"
|
||||||
|
// @Success 200 {object} controllers.CallResult
|
||||||
|
// @Failure 200 {object} controllers.CallResult
|
||||||
|
// @router /InitStation [post]
|
||||||
|
func (c *CmsController) InitStation() {
|
||||||
|
c.callInitStation(func(params *tCmsInitStationParams) (retVal interface{}, errCode string, err error) {
|
||||||
|
err = cms.InitStation(params.Ctx)
|
||||||
|
return retVal, "", err
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -169,6 +169,15 @@ func init() {
|
|||||||
Filters: nil,
|
Filters: nil,
|
||||||
Params: nil})
|
Params: nil})
|
||||||
|
|
||||||
|
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:CmsController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:CmsController"],
|
||||||
|
beego.ControllerComments{
|
||||||
|
Method: "InitStation",
|
||||||
|
Router: `/InitStation`,
|
||||||
|
AllowHTTPMethods: []string{"post"},
|
||||||
|
MethodParams: param.Make(),
|
||||||
|
Filters: nil,
|
||||||
|
Params: nil})
|
||||||
|
|
||||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:CmsController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:CmsController"],
|
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:CmsController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:CmsController"],
|
||||||
beego.ControllerComments{
|
beego.ControllerComments{
|
||||||
Method: "NewConfig",
|
Method: "NewConfig",
|
||||||
|
|||||||
Reference in New Issue
Block a user