瀏覽代碼

update

tmp
DengBiao 7 月之前
父節點
當前提交
400e2ce594
共有 1 個檔案被更改,包括 7 行新增1 行删除
  1. +7
    -1
      app/admin/svc/svc_data_statisstics.go

+ 7
- 1
app/admin/svc/svc_data_statisstics.go 查看文件

@@ -391,7 +391,8 @@ func SelfSupportForSchoolDataStatisticsExport(req md.SelfSupportForSchoolDataSta
}

var m []*db.SelfSupportForSchoolOrdWithUserIdentityV2
sess := db.Db.Desc("self_support_for_school_ord.id").Where("self_support_for_school_ord.order_status =?", enum.SelfSupportForSchoolOrdOrderStatusForSuccess)
eg := db.Db
sess := eg.Desc("self_support_for_school_ord.id").Where("self_support_for_school_ord.order_status =?", enum.SelfSupportForSchoolOrdOrderStatusForSuccess)
if req.EnterpriseId != 0 {
sess.And("self_support_for_school_ord.enterprise_id =?", req.EnterpriseId)
}
@@ -417,7 +418,12 @@ func SelfSupportForSchoolDataStatisticsExport(req md.SelfSupportForSchoolDataSta
var data = map[string]map[string]map[string]map[string]map[string]float64{}
for _, vv := range m {
device := deviceListMapping[vv.SelfSupportForSchoolOrd.DeviceSn]
ordCreateAt, _ := time.ParseInLocation("2006-01-02 15:04:05", vv.SelfSupportForSchoolOrd.CreateAt, time.Local)
merchantCreateAt, _ := time.ParseInLocation("2006-01-02 15:04:05", merchantListMapping[device.MerchantId].CreateAt, time.Local)
shopName := merchantListMapping[device.MerchantId].Name
if ordCreateAt.Before(merchantCreateAt) {
shopName = "设备已更换商户"
}
deviceName := device.Name
if data[vv.Enterprise.Name] == nil {
data[vv.Enterprise.Name] = make(map[string]map[string]map[string]map[string]float64)


Loading…
取消
儲存