作者 陈志颖

fix:调整日志

... ... @@ -748,6 +748,7 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncent
var countDividendsEstimate int64
for _, orderGood := range orderGoods {
log.Logger.Info("hello 1")
dividendsEstimate := &domain.DividendsEstimate{}
if orderGood.DividendsOrderNumber != "" { // 查询分红订单
orderGoodsToConfirm := make([]*domain.OrderGood, 0)
... ... @@ -757,6 +758,7 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncent
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
} else {
for _, dividendsEstimateDetail := range dividendsEstimateDetails {
log.Logger.Info("hello 2")
if dividendsEstimateDetail.IsSuccessfully {
// 生成分红预算单号
dividendsEstimateOrderNumber, err := dividendsEstimateDetail.GenerateSpecificDividendsEstimateNumber(int64(count), countDividendsEstimate)
... ... @@ -806,6 +808,7 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncent
}
}
} else if orderGood.DividendsReturnedOrderNumber != "" { // 查询分红退货单
log.Logger.Info("hello 3")
orderGoodsToConfirm := make([]*domain.OrderGood, 0)
orderGoodsToConfirm = append(orderGoodsToConfirm, orderGood)
// 分红退货单产品预算
... ...
... ... @@ -5,8 +5,8 @@ import "os"
const SERVICE_NAME = "allied-creation-cooperation"
// LOG_TYPE 日志相关设置
var LOG_TYPE = "console" // file, console, es
var LOG_FRAMEWORK = "beego" // beego logrus
var LOG_TYPE = "console" // file, console, es
var LOG_FRAMEWORK = "logrus" // beego logrus
var LOG_LEVEL = "debug"
var LOG_FILE = "app.log"
var LOG_PREFIX = "[allied-creation-cooperation]"
... ... @@ -17,7 +17,6 @@ var USER_MODULE_HOST = "http://127.0.0.1:8081"
// BASIC_MODULE_HOST 基础服务模块
var BASIC_MODULE_HOST = "http://127.0.0.1:8080"
// ENABLE_HTTPS 是否开启https访问
var ENABLE_HTTPS = "false"
... ...
... ... @@ -8,8 +8,6 @@ import (
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/constant"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/infrastructure/pg/models"
_ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/infrastructure/pg/models"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/log"
rawlog "log"
)
... ... @@ -70,9 +68,10 @@ func (hook SqlGeneratePrintHook) AfterQuery(c context.Context, q *pg.QueryEvent)
}
if constant.LOG_FRAMEWORK == "logrus" {
rawlog.Println(string(sqlStr))
} else {
log.Logger.Debug(string(sqlStr))
}
//else {
// log.Logger.Debug(string(sqlStr))
//}
return nil
}
... ...