wangchuanjin 6 месяцев назад
Родитель
Сommit
abf7dea84a
2 измененных файлов с 9 добавлено и 2 удалено
  1. 2 0
      entity/detailed.go
  2. 7 2
      service/exportChargeService.go

+ 2 - 0
entity/detailed.go

@@ -19,4 +19,6 @@ type Detailed struct {
 	Name          string    `xorm:"name" form:"name" json:"name"`                            //资源名称
 	AccountType   int       `xorm:"accountType" form:"accountType" json:"accountType"`
 	EntId         int64     `xorm:"entId" form:"entId" json:"entId"`
+	EntUserId     int64     `xorm:"entId" form:"entUserId" json:"entUserId"`
+	Operator      string    `xorm:"entId" form:"operator" json:"operator"`
 }

+ 7 - 2
service/exportChargeService.go

@@ -1,11 +1,12 @@
 package service
 
 import (
+	"strings"
+	"time"
+
 	"app.yhyue.com/moapp/jyResourcesCenter/entity"
 	"app.yhyue.com/moapp/jyResourcesCenter/rpc/resourcesCenter"
 	"app.yhyue.com/moapp/jybase/common"
-	"strings"
-	"time"
 )
 
 // @Author jianghan
@@ -197,6 +198,10 @@ func entCharge(data *resourcesCenter.ChargeReq) (resp *resourcesCenter.ChargeRes
 		UserId:        data.UserId,
 		AccountType:   1,
 		EntId:         data.EntId,
+		EntUserId:     data.EntUserId,
+	}
+	if data.EntUserId > 0 {
+		jyOrm.Table("entniche_user").Select("CONCAT(NAME,'(',phone,')')").Where("id=?", data.EntUserId).Get(&detailed.Operator)
 	}
 	updateNum, err = souceOrm.Table(ConsumeRecord).Insert(&detailed)
 	if err != nil || updateNum <= 0 {