Browse Source

upgrade

master
LinskRuis.32G 4 years ago
parent
commit
d7b591705d
  1. 0
      core/cloud/api.go
  2. 2
      core/cloud/commCloud/api.go
  3. 0
      core/cloud/commCloud/comm.go
  4. 2
      core/cloud/userCloud/api.go
  5. 0
      core/cloud/userCloud/user.go
  6. 2
      core/comms/const.go
  7. 2
      core/comms/db.go
  8. 4
      core/utils/code.go
  9. 2
      go.mod
  10. 4
      go.sum
  11. 6
      service/dao.go
  12. 2
      service/mgoService/info.go
  13. 2
      service/mgoService/param.go
  14. 8
      service/sysService/role.go
  15. 20
      service/userService/role.go
  16. 6
      service/userService/user.go
  17. 2
      service/utilService/mids.go
  18. 10
      webs/sys/main.go
  19. 15
      webs/sys/routehb/user.go

0
cloud/api.go → core/cloud/api.go

2
cloud/commCloud/api.go → core/cloud/commCloud/api.go

@ -1,7 +1,7 @@
package commCloud package commCloud
import ( import (
"GoClouds/cloud"
"GoClouds/core/cloud"
hbtp "github.com/mgr9525/HyperByte-Transfer-Protocol" hbtp "github.com/mgr9525/HyperByte-Transfer-Protocol"
) )

0
cloud/commCloud/comm.go → core/cloud/commCloud/comm.go

2
cloud/userCloud/api.go → core/cloud/userCloud/api.go

@ -1,7 +1,7 @@
package userCloud package userCloud
import ( import (
"GoClouds/cloud"
"GoClouds/core/cloud"
hbtp "github.com/mgr9525/HyperByte-Transfer-Protocol" hbtp "github.com/mgr9525/HyperByte-Transfer-Protocol"
) )

0
cloud/userCloud/user.go → core/cloud/userCloud/user.go

2
core/comm/const.go → core/comms/const.go

@ -1,4 +1,4 @@
package comm
package comms
import "regexp" import "regexp"

2
core/comm/db.go → core/comms/db.go

@ -1,4 +1,4 @@
package comm
package comms
import ( import (
"context" "context"

4
core/utils/code.go

@ -1,7 +1,7 @@
package utils package utils
import ( import (
"GoClouds/core/comm"
"GoClouds/core/comms"
"fmt" "fmt"
"math/rand" "math/rand"
"strings" "strings"
@ -20,7 +20,7 @@ func GenValidateCode(width int) string {
return sb.String() return sb.String()
} }
func HideUserName(name string) string { func HideUserName(name string) string {
if comm.REG_Phone.MatchString(name) {
if comms.REG_Phone.MatchString(name) {
return name[:3] + "****" + name[7:] return name[:3] + "****" + name[7:]
} }
return name return name

2
go.mod

@ -7,7 +7,7 @@ require (
github.com/gin-gonic/gin v1.7.1 github.com/gin-gonic/gin v1.7.1
github.com/go-sql-driver/mysql v1.5.0 github.com/go-sql-driver/mysql v1.5.0
github.com/mgr9525/HyperByte-Transfer-Protocol v0.0.0-20210422034730-0b85fcf3afe0 github.com/mgr9525/HyperByte-Transfer-Protocol v0.0.0-20210422034730-0b85fcf3afe0
github.com/mgr9525/go-cloud v1.0.6-0.20210423015030-36e66c1af5ed
github.com/mgr9525/go-cloud v1.0.6-0.20210423020002-1f8b2e313a5a
github.com/mgr9525/go-ruisutil v1.0.8-0.20210317093428-f69295935056 github.com/mgr9525/go-ruisutil v1.0.8-0.20210317093428-f69295935056
github.com/qiniu/qmgo v0.9.2 github.com/qiniu/qmgo v0.9.2
github.com/sirupsen/logrus v1.8.1 github.com/sirupsen/logrus v1.8.1

4
go.sum

@ -99,8 +99,8 @@ github.com/mattn/go-sqlite3 v1.14.0 h1:mLyGNKR8+Vv9CAU7PphKa2hkEqxxhn8i32J6FPj1/
github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus= github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus=
github.com/mgr9525/HyperByte-Transfer-Protocol v0.0.0-20210422034730-0b85fcf3afe0 h1:pnIfNO1DHHY5QSTZZD6bIJa2yDoI+saVY4YaQd8EdA8= github.com/mgr9525/HyperByte-Transfer-Protocol v0.0.0-20210422034730-0b85fcf3afe0 h1:pnIfNO1DHHY5QSTZZD6bIJa2yDoI+saVY4YaQd8EdA8=
github.com/mgr9525/HyperByte-Transfer-Protocol v0.0.0-20210422034730-0b85fcf3afe0/go.mod h1:U2OZ06VD1PHu3ZLZ8tuEHooaOZnoke/4ZKAZfL44bUQ= github.com/mgr9525/HyperByte-Transfer-Protocol v0.0.0-20210422034730-0b85fcf3afe0/go.mod h1:U2OZ06VD1PHu3ZLZ8tuEHooaOZnoke/4ZKAZfL44bUQ=
github.com/mgr9525/go-cloud v1.0.6-0.20210423015030-36e66c1af5ed h1:xKrlH7FB5iVaWlOhk8Pyfb2KalXDWc3oYHxh9RgnQKQ=
github.com/mgr9525/go-cloud v1.0.6-0.20210423015030-36e66c1af5ed/go.mod h1:VkCKgivVD2OX75Zwh+AO3zuJyxGCsuo0zdy+UXCYy9I=
github.com/mgr9525/go-cloud v1.0.6-0.20210423020002-1f8b2e313a5a h1:7vvaTEyYxLI864HvDEdqHFHYIn/m6k4sxGwUe4wj4Pw=
github.com/mgr9525/go-cloud v1.0.6-0.20210423020002-1f8b2e313a5a/go.mod h1:VkCKgivVD2OX75Zwh+AO3zuJyxGCsuo0zdy+UXCYy9I=
github.com/mgr9525/go-ruisutil v1.0.8-0.20210317093428-f69295935056 h1:JhXsFUB3mFWwiDc8c//E/6cUazJUX1lIiLgiM0asNjA= github.com/mgr9525/go-ruisutil v1.0.8-0.20210317093428-f69295935056 h1:JhXsFUB3mFWwiDc8c//E/6cUazJUX1lIiLgiM0asNjA=
github.com/mgr9525/go-ruisutil v1.0.8-0.20210317093428-f69295935056/go.mod h1:qXUWVKpHdwoxR0KERCkvL1JH2DETY6b5TMG9t6g9Pls= github.com/mgr9525/go-ruisutil v1.0.8-0.20210317093428-f69295935056/go.mod h1:qXUWVKpHdwoxR0KERCkvL1JH2DETY6b5TMG9t6g9Pls=
github.com/mgr9525/logrus-file-hook v0.0.0-20210315103109-42681d084c3b h1:sGrxWDbhC2XpDKOLdNrYVo3Ga9YIFMr0AfjnP2gli0o= github.com/mgr9525/logrus-file-hook v0.0.0-20210315103109-42681d084c3b h1:sGrxWDbhC2XpDKOLdNrYVo3Ga9YIFMr0AfjnP2gli0o=

6
service/dao.go

@ -1,9 +1,9 @@
package service package service
import ( import (
"GoClouds/core/comm"
"GoClouds/core/comms"
gocloud "github.com/mgr9525/go-cloud" gocloud "github.com/mgr9525/go-cloud"
) )
var MgoParamDao = gocloud.NewDaoMgo(&comm.DbMongo, "Data", "param")
var MgoUserInfoDao = gocloud.NewDaoMgo(&comm.DbMongo, "Data", "userInfo")
var MgoParamDao = gocloud.NewDaoMgo(&comms.DbMongo, "Data", "param")
var MgoUserInfoDao = gocloud.NewDaoMgo(&comms.DbMongo, "Data", "userInfo")

2
service/mgoService/info.go

@ -30,7 +30,7 @@ func GetUserInfoUid(uid string) *models.MgoUserInfo {
} else { } else {
e.Nick = utils.HideUserName(usr.Name) e.Nick = utils.HideUserName(usr.Name)
} }
_, err = ses.C().InsertOne(context.Background(), e)
_, err = ses.C().InsertOne(nil, e)
if err != nil { if err != nil {
return nil return nil
} }

2
service/mgoService/param.go

@ -56,7 +56,7 @@ func SetParam(key string, val map[string]interface{}, tits ...string) bool {
var err error var err error
ses := service.MgoParamDao.GetSession() ses := service.MgoParamDao.GetSession()
if isup { if isup {
err = ses.C().UpdateId(nil, e.Id, bson.M{"$set": bson.M{"value": e.Value, "title": e.Title}})
err = ses.UpdateId(nil, e.Id, bson.M{"value": e.Value, "title": e.Title})
} else { } else {
_, err = ses.C().InsertOne(nil, e) _, err = ses.C().InsertOne(nil, e)
} }

8
service/sysService/role.go

@ -1,7 +1,7 @@
package sysService package sysService
import ( import (
"GoClouds/core/comm"
"GoClouds/core/comms"
"GoClouds/models" "GoClouds/models"
"strings" "strings"
"xorm.io/builder" "xorm.io/builder"
@ -9,7 +9,7 @@ import (
func FindRole(xid string) *models.SysRole { func FindRole(xid string) *models.SysRole {
e := new(models.SysRole) e := new(models.SysRole)
ok, err := comm.DbSysHelper.GetDB().Where("xid=?", xid).Get(e)
ok, err := comms.DbSysHelper.GetDB().Where("xid=?", xid).Get(e)
if err != nil { if err != nil {
return nil return nil
} }
@ -20,7 +20,7 @@ func FindRole(xid string) *models.SysRole {
} }
func FindPermission(xid string) *models.SysPermssion { func FindPermission(xid string) *models.SysPermssion {
e := new(models.SysPermssion) e := new(models.SysPermssion)
ok, err := comm.DbSysHelper.GetDB().Where("xid=?", xid).Get(e)
ok, err := comms.DbSysHelper.GetDB().Where("xid=?", xid).Get(e)
if err != nil { if err != nil {
return nil return nil
} }
@ -36,7 +36,7 @@ func FindPermissions(xids string) string {
rets := "" rets := ""
permssions := make([]*models.SysPermssion, 0) permssions := make([]*models.SysPermssion, 0)
err := comm.DbSysHelper.GetDB().Where(builder.In("xid", strings.Split(xids, ","))).Find(&permssions)
err := comms.DbSysHelper.GetDB().Where(builder.In("xid", strings.Split(xids, ","))).Find(&permssions)
if err == nil { if err == nil {
ln := len(permssions) ln := len(permssions)
for i, o := range permssions { for i, o := range permssions {

20
service/userService/role.go

@ -1,7 +1,7 @@
package userService package userService
import ( import (
"GoClouds/core/comm"
"GoClouds/core/comms"
"GoClouds/models" "GoClouds/models"
"GoClouds/modeluis" "GoClouds/modeluis"
"GoClouds/service/sysService" "GoClouds/service/sysService"
@ -13,7 +13,7 @@ import (
func FindTreePermission() []*modeluis.TreePermssion { func FindTreePermission() []*modeluis.TreePermssion {
rets := make([]*modeluis.TreePermssion, 0) rets := make([]*modeluis.TreePermssion, 0)
err := comm.DbSysHelper.GetDB().Where("parent is null or parent=''").OrderBy("sort ASC,id ASC").Find(&rets)
err := comms.DbSysHelper.GetDB().Where("parent is null or parent=''").OrderBy("sort ASC,id ASC").Find(&rets)
if err != nil { if err != nil {
println("findPermChilds err:" + err.Error()) println("findPermChilds err:" + err.Error())
return nil return nil
@ -30,7 +30,7 @@ func findPermChilds(parent *modeluis.TreePermssion, upms map[string]bool) {
return return
} }
childs := make([]*modeluis.TreePermssion, 0) childs := make([]*modeluis.TreePermssion, 0)
err := comm.DbSysHelper.GetDB().Where("parent=?", parent.Xid).OrderBy("sort ASC,id ASC").Find(&childs)
err := comms.DbSysHelper.GetDB().Where("parent=?", parent.Xid).OrderBy("sort ASC,id ASC").Find(&childs)
if err != nil { if err != nil {
println("findPermChilds err:" + err.Error()) println("findPermChilds err:" + err.Error())
return return
@ -56,7 +56,7 @@ func FindUPermissions(uid string) []*modeluis.SysPermssion {
userRole := FindUserRole(uid) userRole := FindUserRole(uid)
//comm.DbSysHelper.GetDB().SqlTemplateClient("role.stpl") //comm.DbSysHelper.GetDB().SqlTemplateClient("role.stpl")
//rids:=strings.Split(userRole.RoleCodes,",") //rids:=strings.Split(userRole.RoleCodes,",")
ses := comm.DbSysHelper.GetDB().Where("xid='common'")
ses := comms.DbSysHelper.GetDB().Where("xid='common'")
if len(userRole.RoleCodes) > 0 { if len(userRole.RoleCodes) > 0 {
rcds := strings.Split(userRole.RoleCodes, ",") rcds := strings.Split(userRole.RoleCodes, ",")
ses.Or(builder.In("xid", rcds)) ses.Or(builder.In("xid", rcds))
@ -72,7 +72,7 @@ func FindUPermissions(uid string) []*modeluis.SysPermssion {
continue continue
} }
permssions := make([]*modeluis.SysPermssion, 0) permssions := make([]*modeluis.SysPermssion, 0)
ses := comm.DbSysHelper.GetDB().Where(builder.In("xid", strings.Split(role.Perms, ",")))
ses := comms.DbSysHelper.GetDB().Where(builder.In("xid", strings.Split(role.Perms, ",")))
err := ses.Find(&permssions) err := ses.Find(&permssions)
if err != nil { if err != nil {
println("FindUserPermission err:" + err.Error()) println("FindUserPermission err:" + err.Error())
@ -106,12 +106,12 @@ func FindUPermissions(uid string) []*modeluis.SysPermssion {
} }
func FindUserRole(uid string) *models.SysUserRole { func FindUserRole(uid string) *models.SysUserRole {
userRole := new(models.SysUserRole) userRole := new(models.SysUserRole)
ok, err := comm.DbSysHelper.GetDB().Where("user_code=?", uid).Get(userRole)
ok, err := comms.DbSysHelper.GetDB().Where("user_code=?", uid).Get(userRole)
if err != nil { if err != nil {
println("FindUserPermission err:" + err.Error()) println("FindUserPermission err:" + err.Error())
} else if !ok { } else if !ok {
userRole.UserCode = uid userRole.UserCode = uid
comm.DbSysHelper.GetDB().Insert(userRole)
comms.DbSysHelper.GetDB().Insert(userRole)
} }
return userRole return userRole
} }
@ -125,7 +125,7 @@ func FindUserRoles(uid string) []*modeluis.SysURole {
} }
} }
roles := make([]*modeluis.SysURole, 0) roles := make([]*modeluis.SysURole, 0)
err := comm.DbSysHelper.GetDB().Where("xid!='common'").Find(&roles)
err := comms.DbSysHelper.GetDB().Where("xid!='common'").Find(&roles)
if err != nil { if err != nil {
println("FindUserRoles:" + err.Error()) println("FindUserRoles:" + err.Error())
} }
@ -140,7 +140,7 @@ func FindUserPermission(uid string) map[string]bool {
userRole := FindUserRole(uid) userRole := FindUserRole(uid)
//comm.DbSysHelper.GetDB().SqlTemplateClient("role.stpl") //comm.DbSysHelper.GetDB().SqlTemplateClient("role.stpl")
//rids:=strings.Split(userRole.RoleCodes,",") //rids:=strings.Split(userRole.RoleCodes,",")
ses := comm.DbSysHelper.GetDB().Where("xid='common'")
ses := comms.DbSysHelper.GetDB().Where("xid='common'")
if len(userRole.RoleCodes) > 0 { if len(userRole.RoleCodes) > 0 {
rcds := strings.Split(userRole.RoleCodes, ",") rcds := strings.Split(userRole.RoleCodes, ",")
ses.Or(builder.In("xid", rcds)) ses.Or(builder.In("xid", rcds))
@ -156,7 +156,7 @@ func FindUserPermission(uid string) map[string]bool {
continue continue
} }
permssions := make([]*models.SysPermssion, 0) permssions := make([]*models.SysPermssion, 0)
ses := comm.DbSysHelper.GetDB().Where(builder.In("xid", strings.Split(role.Perms, ",")))
ses := comms.DbSysHelper.GetDB().Where(builder.In("xid", strings.Split(role.Perms, ",")))
if len(userRole.Limits) > 0 { if len(userRole.Limits) > 0 {
rcds := strings.Split(userRole.Limits, ",") rcds := strings.Split(userRole.Limits, ",")
ses.And(builder.NotIn("xid", rcds)) ses.And(builder.NotIn("xid", rcds))

6
service/userService/user.go

@ -1,7 +1,7 @@
package userService package userService
import ( import (
"GoClouds/core/comm"
"GoClouds/core/comms"
"GoClouds/models" "GoClouds/models"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
) )
@ -11,7 +11,7 @@ func FindXid(id string) *models.SysUser {
return nil return nil
} }
e := new(models.SysUser) e := new(models.SysUser)
ok, err := comm.DbSysHelper.GetDB().Where("xid=?", id).Get(e)
ok, err := comms.DbSysHelper.GetDB().Where("xid=?", id).Get(e)
if err != nil { if err != nil {
logrus.Info("FindUserXid err:", err.Error()) logrus.Info("FindUserXid err:", err.Error())
return nil return nil
@ -23,7 +23,7 @@ func FindXid(id string) *models.SysUser {
} }
func FindName(name string) *models.SysUser { func FindName(name string) *models.SysUser {
e := new(models.SysUser) e := new(models.SysUser)
ok, err := comm.DbSysHelper.GetDB().Where("name=?", name).Get(e)
ok, err := comms.DbSysHelper.GetDB().Where("name=?", name).Get(e)
if err != nil { if err != nil {
logrus.Info("FindName err:", err.Error()) logrus.Info("FindName err:", err.Error())
return nil return nil

2
service/utilService/mids.go

@ -1,7 +1,7 @@
package utilService package utilService
import ( import (
"GoClouds/cloud/userCloud"
"GoClouds/core/cloud/userCloud"
"GoClouds/models" "GoClouds/models"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

10
webs/sys/main.go

@ -1,7 +1,7 @@
package main package main
import ( import (
"GoClouds/core/comm"
"GoClouds/core/comms"
"GoClouds/models" "GoClouds/models"
"GoClouds/webs/sys/route" "GoClouds/webs/sys/route"
"GoClouds/webs/sys/routehb" "GoClouds/webs/sys/routehb"
@ -34,7 +34,7 @@ func main() {
} }
func initFuns() error { func initFuns() error {
err := comm.InitDb()
err := comms.InitDb()
if err != nil { if err != nil {
return err return err
} }
@ -55,12 +55,12 @@ func initFuns() error {
return nil return nil
} }
func SyncTable() error { func SyncTable() error {
if comm.DbSysHelper.GetDB() == nil {
if comms.DbSysHelper.GetDB() == nil {
return nil return nil
} }
isext, err := comm.DbSysHelper.GetDB().IsTableExist(models.SysUser{})
isext, err := comms.DbSysHelper.GetDB().IsTableExist(models.SysUser{})
if err == nil && !isext { if err == nil && !isext {
comm.DbSysHelper.GetDB().ImportFile("my.sql")
comms.DbSysHelper.GetDB().ImportFile("my.sql")
} }
return nil return nil
} }

15
webs/sys/routehb/user.go

@ -2,12 +2,11 @@ package routehb
import ( import (
"GoClouds/core/bean/sysBean" "GoClouds/core/bean/sysBean"
"GoClouds/core/comm"
"GoClouds/core/comms"
"GoClouds/core/utils" "GoClouds/core/utils"
"GoClouds/models" "GoClouds/models"
"GoClouds/service" "GoClouds/service"
"GoClouds/service/userService" "GoClouds/service/userService"
"context"
"fmt" "fmt"
hbtp "github.com/mgr9525/HyperByte-Transfer-Protocol" hbtp "github.com/mgr9525/HyperByte-Transfer-Protocol"
gocloud "github.com/mgr9525/go-cloud" gocloud "github.com/mgr9525/go-cloud"
@ -60,7 +59,7 @@ func (UserRPC) Login(c *hbtp.Context, m *sysBean.LoginReq) {
} }
if len(usr.Xid) <= 0 { if len(usr.Xid) <= 0 {
usr.Xid = fmt.Sprintf("%d", usr.Id) usr.Xid = fmt.Sprintf("%d", usr.Id)
comm.DbSysHelper.GetDB().Cols("xid").Where("id=?", usr.Id).Update(usr)
comms.DbSysHelper.GetDB().Cols("xid").Where("id=?", usr.Id).Update(usr)
} }
if usr.Pass != strings.ToUpper(ruisUtil.Md5String(m.Pass)) { if usr.Pass != strings.ToUpper(ruisUtil.Md5String(m.Pass)) {
ret.Errs = "密码错误" ret.Errs = "密码错误"
@ -73,7 +72,7 @@ func (UserRPC) Login(c *hbtp.Context, m *sysBean.LoginReq) {
}*/ }*/
usr.Logintm = time.Now() usr.Logintm = time.Now()
comm.DbSysHelper.GetDB().Cols("logintm").Where("xid=?", usr.Xid).Update(usr)
comms.DbSysHelper.GetDB().Cols("logintm").Where("xid=?", usr.Xid).Update(usr)
ret.Stat = 1 ret.Stat = 1
ret.Uid = usr.Id ret.Uid = usr.Id
@ -103,7 +102,7 @@ func (UserRPC) Reg(c *hbtp.Context, m *sysBean.RegReq) {
} }
ne.Times = time.Now() ne.Times = time.Now()
ne.Logintm = time.Now() ne.Logintm = time.Now()
_, err := comm.DbSysHelper.GetDB().Insert(ne)
_, err := comms.DbSysHelper.GetDB().Insert(ne)
if err != nil { if err != nil {
logrus.Debug("nes SysUser insert err:" + err.Error()) logrus.Debug("nes SysUser insert err:" + err.Error())
c.ResString(hbtp.ResStatusErr, "插入用户错误!!") c.ResString(hbtp.ResStatusErr, "插入用户错误!!")
@ -118,7 +117,7 @@ func (UserRPC) Reg(c *hbtp.Context, m *sysBean.RegReq) {
} else { } else {
info.Nick = fmt.Sprintf("U%s", utils.GenValidateCode(7)) info.Nick = fmt.Sprintf("U%s", utils.GenValidateCode(7))
} }
_, err = service.MgoUserInfoDao.GetSession().C().InsertOne(context.Background(), info)
_, err = service.MgoUserInfoDao.GetSession().C().InsertOne(nil, info)
if err != nil { if err != nil {
c.ResString(hbtp.ResStatusErr, "qmgo err:"+err.Error()) c.ResString(hbtp.ResStatusErr, "qmgo err:"+err.Error())
return return
@ -149,7 +148,7 @@ func (UserRPC) Forgot(c *hbtp.Context, m *sysBean.LoginReq) {
} }
ne.Pass = strings.ToUpper(ruisUtil.Md5String(m.Pass)) ne.Pass = strings.ToUpper(ruisUtil.Md5String(m.Pass))
_, err := comm.DbSysHelper.GetDB().Cols("pass").Where("id=?", ne.Id).Update(ne)
_, err := comms.DbSysHelper.GetDB().Cols("pass").Where("id=?", ne.Id).Update(ne)
if err != nil || ne.Id <= 0 { if err != nil || ne.Id <= 0 {
ret.Errs = "修改用户错误" ret.Errs = "修改用户错误"
c.ResJson(hbtp.ResStatusOk, ret) c.ResJson(hbtp.ResStatusOk, ret)
@ -192,7 +191,7 @@ func (UserRPC) Uppass(c *hbtp.Context, m *sysBean.UppassReq) {
} }
ne.Pass = strings.ToUpper(ruisUtil.Md5String(m.NPass)) ne.Pass = strings.ToUpper(ruisUtil.Md5String(m.NPass))
_, err := comm.DbSysHelper.GetDB().Cols("pass").Where("id=?", ne.Id).Update(ne)
_, err := comms.DbSysHelper.GetDB().Cols("pass").Where("id=?", ne.Id).Update(ne)
if err != nil || ne.Id <= 0 { if err != nil || ne.Id <= 0 {
ret.Errs = "修改用户错误" ret.Errs = "修改用户错误"
c.ResJson(hbtp.ResStatusOk, ret) c.ResJson(hbtp.ResStatusOk, ret)

Loading…
Cancel
Save