Browse Source

Merge pull request '金蝶更新' (#264) from feature_jindie into develop

Reviewed-on: http://101.201.121.115:3000/leo/LAPP_CHEERSSON_BACKEND/pulls/264
pull/265/head
zhangxin 3 years ago
parent
commit
2b822c804b
2 changed files with 8 additions and 4 deletions
  1. +2
    -2
      services/ap/implments/PlanOrderVersion.service.impl.go
  2. +6
    -2
      utils/log/log.go

+ 2
- 2
services/ap/implments/PlanOrderVersion.service.impl.go View File

@ -175,7 +175,7 @@ func (impl *PlanOrderVersionServiceImplement) Publish(info utils.ChannelsInfo) (
message["info"] = "版本:" + v.VersionNr + " 物料:" + v.ArtId + " 计划周:" + utils.ValueToString(v.PlanYear, "") + "-" + utils.ValueToString(v.PlanWeek, "")
message["request"] = req
message["response"] = res
logUtils.Write("plan", message)
logUtils.Write("plan", message, v.VersionNr)
} else {
if ids != "" {
ids += ","
@ -542,4 +542,4 @@ func (impl *PlanOrderVersionServiceImplement) RelPublish(user *global.User, plan
Info: planOrderVersion,
})
return nil
}
}

+ 6
- 2
utils/log/log.go View File

@ -42,9 +42,13 @@ func folder(model outputDriver) error {
/**
写入文件
*/
func Write(model string, info map[string]string) {
func Write(model string, info map[string]string, _fileName string) {
year, month, day := time.Now().Date()
path := loggerConfig.Config[model].Filename + "/" + utils.ValueToString(year, "") + utils.ValueToString(month, "") + utils.ValueToString(day, "") + "." + loggerConfig.Config[model].Filetype
fileName := utils.ValueToString(year, "") + utils.ValueToString(month, "") + utils.ValueToString(day, "") + "." + loggerConfig.Config[model].Filetype
if _fileName != "" {
fileName = _fileName + "." + loggerConfig.Config[model].Filetype
}
path := loggerConfig.Config[model].Filename + "/" + fileName
var file *os.File
message := loggerConfig.Config[model].Info
for _, v := range loggerConfig.Config[model].Replace {


Loading…
Cancel
Save