瀏覽代碼

fix:修复提交时间

zhangxinlei1996 3 年之前
父節點
當前提交
a6c06c22f5
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      entity/ent.go

+ 6 - 1
entity/ent.go

@@ -553,6 +553,11 @@ func (this *CheckEnt) Info() *EntInfoData {
 		if !strings.Contains(license, "http") {
 			license = this.Url + license
 		}
+		submitTime := common.ObjToString(data["craetetime"])
+		auth_data := this.Mysql.SelectBySql(`select authTime from auth_record where entId = ? and authStatus=1 order by id desc limit 1`, this.EntId)
+		if auth_data != nil && len(*auth_data) > 0 {
+			submitTime = common.ObjToString((*auth_data)[0]["authTime"])
+		}
 		info.OrganizationType = common.ObjToString(data["organization_type"])
 		info.CreditCode = common.ObjToString(data["code"])
 		info.Name = common.ObjToString(data["name"])
@@ -568,7 +573,7 @@ func (this *CheckEnt) Info() *EntInfoData {
 		info.ContactPhone = common.ObjToString(data["linkman_phone"])
 		info.AuthType = common.Int64All(data["audit_status"])
 		info.AreaNumber = GetArea(info.AreaNumber, this.Mysql)
-		info.CreateTime = common.ObjToString(data["createtime"])
+		info.CreateTime = submitTime
 		info.AuthReason = common.ObjToString(data["auth_reason"])
 	}
 	return &info