Browse Source

Merge pull request '合并' (#259) from feature_synv into develop

Reviewed-on: http://101.201.121.115:3000/leo/LAPP_GAAS_GFrame_BACKEND/pulls/259
Reviewed-by: zhangxin <xin.zhang@le-it.com.cn>
pull/261/head
zhangxin 3 years ago
parent
commit
6274d358e2
4 changed files with 16 additions and 13 deletions
  1. +2
    -2
      conf/config.yaml
  2. +4
    -4
      task/scheduler.go
  3. +6
    -2
      web/controllers/log/ArtDemandLst.rest.go
  4. +4
    -5
      web/middleware/middleware.go

+ 2
- 2
conf/config.yaml View File

@ -26,5 +26,5 @@ inbox: D:\Go\gopath\src\leit.com\lapp_-gaas_-gframe\doc\Inbox
outbox: D:\Go\gopath\src\leit.com\lapp_-gaas_-gframe\doc\Outbox
# mes andon url
andontouchoff: http://10.84.128.80:4000/Features/API/Andon/api/WebCmd/AndonRequest
portalgettimeurl: http://101.201.121.115:8097/admin/om/workorder/selectlastmodify
portalpostfileurl: http://101.201.121.115:8097/admin/om/workorder/synchronous
portalgettimeurl: http://101.201.121.115:8097/admin/log/artdemandlst/selectlastmodify
portalpostfileurl: http://101.201.121.115:8097/admin/log/artdemandlst/synchronous

+ 4
- 4
task/scheduler.go View File

@ -19,10 +19,10 @@ import (
func Start() error {
c := cron.New()
var err error
//err = c.AddFunc("*/5 * * * * ?", TransferArtDemandToPortal)
//if err != nil {
// return err
//}
err = c.AddFunc("*/5 * * * * ?", TransferArtDemandToPortal)
if err != nil {
return err
}
err = c.AddFunc("*/5 * * * * ?", CreateParseFromDBTask)
if err != nil {
return err


+ 6
- 2
web/controllers/log/ArtDemandLst.rest.go View File

@ -3,6 +3,7 @@
package log
import (
common "LAPP_GAAS_GFrame_BACKEND/models/base"
model "LAPP_GAAS_GFrame_BACKEND/models/log"
"LAPP_GAAS_GFrame_BACKEND/utils"
"LAPP_GAAS_GFrame_BACKEND/web/middleware/jwts"
@ -586,8 +587,11 @@ func RegisterSelectLastModify(party router.Party, path string, method func(int)
func RegisterSyncHronousData(party router.Party, httpMethod string, path string, method func(int, string) error) {
party.Handle(httpMethod, path, func(ctx iris.Context) {
plantNr, _ := ctx.URLParamInt("plantNr")
plant := ctx.FormValue("plantNr")
plantNr := utils.ValueToInt(plant,0)
if utils.ValueIsEmpty(plantNr){
plantNr = common.PlantNr
}
var err error = nil
//获取通过iris.WithPostMaxMemory获取的最大上传值大小。
maxSize := ctx.Application().ConfigurationReadOnly().GetPostMaxMemory()


+ 4
- 5
web/middleware/middleware.go View File

@ -3,7 +3,6 @@ package middleware
import (
"LAPP_GAAS_GFrame_BACKEND/conf"
"LAPP_GAAS_GFrame_BACKEND/utils"
"LAPP_GAAS_GFrame_BACKEND/web/middleware/casbins"
"LAPP_GAAS_GFrame_BACKEND/web/middleware/jwts"
"github.com/kataras/iris/v12"
"strings"
@ -29,10 +28,10 @@ func ServeHTTP(ctx iris.Context) {
res := utils.IsContain(publicRutes,path)
if !res {
// casbin权限拦截
ok := casbins.CheckPermissions(ctx)
if !ok {
return
}
//ok := casbins.CheckPermissions(ctx)
//if !ok {
// return
//}
}
//if !strings.Contains(path, "/sysMenu") {
// // casbin权限拦截


Loading…
Cancel
Save