You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: addDefauleApp.go
    path of file: ./repos/bk-cmdb/src/scene_server/admin_server/upgrader/history/v3.0.8
    
    the code of the file until where you have to start completion: /*
 * Tencent is pleased to support the open source community by making 蓝鲸 available.
 * Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
 * Licensed under the MIT License (the "License"); you may 
    
func addDefaultBiz(ctx context.Context, db dal.RDB, conf *upgrader.Config) error {

	if count, err := db.Table(common.BKTableNameBaseApp).Find(mapstr.MapStr{common.BKAppNameField: common.DefaultAppName}).Count(ctx); err != nil {
		return err
	} else if count >= 1 {
		return nil
	}

	// add default biz
	defaultBiz := map[string]interface{}{}
	defaultBiz[common.BKAppNameField] = common.DefaultAppName
	defaultBiz[common.BKMaintainersField] = admin
	defaultBiz[common.BKProductPMField] = admin
	defaultBiz[common.BKTimeZoneField] = "Asia/Shanghai"
	defaultBiz[common.BKLanguageField] = "1" // 中文
	defaultBiz[common.BKLifeCycleField] = common.DefaultAppLifeCycleNormal
	defaultBiz[common.BKOwnerIDField] = conf.OwnerID
	defaultBiz[common.BKDefaultField] = common.DefaultAppFlag
	defaultBiz[common.CreateTimeField] = time.Now()
	defaultBiz[common.LastTimeField] = time.Now()
	filled := fillEmptyFields(defaultBiz, AppRow())
	bizID, _, err := upgrader.Upsert(ctx, db, common.BKTableNameBaseApp, defaultBiz, common.BKAppIDField,
		[]string{common.BKOwnerIDField, common.BKAppNameField, common.BKDefaultField},
		append(filled, common.BKAppIDField))
	if err != nil {
		blog.Error("add defaultBiz error ", err.Error())
		return err
	}

	// add default set
	defaultSet := make(map[string]interface{})
	defaultSet[common.BKAppIDField] = bizID
	defaultSet[common.BKInstParentStr] = bizID
	defaultSet[common.BKSetNameField] = common.DefaultResSetName
	defaultSet[common.BKDefaultField] = common.DefaultResSetFlag
	defaultSet[common.BKOwnerIDField] = conf.OwnerID
	defaultSet[common.CreateTimeField] = time.Now()
	defaultSet[common.LastTimeField] = time.Now()
	filled = fillEmptyFields(defaultSet, SetRow())
	setID, _, err := upgrader.Upsert(ctx, db, common.BKTableNameBaseSet, defaultSet, common.BKSetIDField,
		[]string{common.BKOwnerIDField, common.BKSetNameField, common.BKAppIDField, common.BKDefaultField},
		append(filled, common.BKSetIDField))
	if err != nil {
		blog.Error("add defaultSet error ", err.Error())
		return err
	}

	// add default module
	defaultResModule := make(map[string]interface{})
	defaultResModule[common.BKSetIDField] = setID
	defaultResModule[common.BKInstParentStr] = setID
	defaultResModule[common.BKAppIDField] = bizID
	defaultResModule[common.BKModuleNameField] = common.DefaultResModuleName
	defaultResModule[common.BKDefaultField] = common.DefaultResModuleFlag
	defaultResModule[common.BKOwnerIDField] = conf.OwnerID
	defaultResModule[common.CreateTimeField] = time.Now()
	defaultResModule[common.LastTimeField] = time.Now()
	filled = fillEmptyFields(defaultResModule, ModuleRow())
	_, _, err = upgrader.Upsert(ctx, db, common.BKTableNameBaseModule, defaultResModule, common.BKModuleIDField,
		[]string{common.BKOwnerIDField, common.BKModuleNameField, common.BKAppIDField, common.BKSetIDField,
			common.BKDefaultField}, append(filled, common.BKModuleIDField))
	if err != nil {
		blog.Error("add defaultResModule error ", err.Error())
		return err
	}
	defaultFaultModule := make(map[string]interface{})
	defaultFaultModule[common.BKSetIDField] = setID
	defaultFaultModule[common.BKInstParentStr] = setID
	defaultFaultModule[common.BKAppIDField] = bizID
	defaultFaultModule[common.BKModuleNameField] = common.DefaultFaultModuleName
	defaultFaultModule[common.BKDefaultField] = common.DefaultFaultModuleFlag
	defaultFaultModule[common.BKOwnerIDField] = conf.OwnerID
	defaultFaultModule[common.CreateTimeField] = time.Now()
	defaultFaultModule[common.LastTimeField] = time.Now()
	filled = fillEmptyFields(defaultFaultModule, ModuleRow())
	_, _, err = upgrader.Upsert(ctx, db, common.BKTableNameBaseModule, defaultFaultModule, common.BKModuleIDField,
		[]string{common.BKOwnerIDField, common.BKModuleNameField, common.BKAppIDField, common.BKSetIDField,
			common.BKDefaultField}, append(filled, common.BKModuleIDField))
	if err != nil {
		blog.Error("add defaultFaultModule error ", err.Error())
		return err
	}

	return nil
}