Sfoglia il codice sorgente

列表角标all~真心累

Ethan 2 mesi fa
parent
commit
93ad8d4d0d

+ 28 - 0
app/controller/cooperation_controller.go

@@ -95,6 +95,20 @@ func (o CooperationController) GetSupplierConfirmingList(c *gin.Context) {
 	returnSuccess(c, 20000, result)
 }
 
+// 服务商管理-角标
+func (o CooperationController) GetSupplierCount(c *gin.Context) {
+	param := &vo.SupplierConfirmingParam{}
+	err := c.BindJSON(param)
+	if err != nil || "" == param.EnterpriseId {
+		logrus.Errorf("Request bind err:%+v\n", err)
+		returnError(c, 40000, "Parameter Error: "+err.Error())
+		return
+	}
+	result := service.CooperationService{}.GetSupplierCount(param)
+
+	returnSuccess(c, 20000, result)
+}
+
 // 门店详情
 func (o CooperationController) GetStoreDetail(c *gin.Context) {
 	param := &vo.StoreSearchParam{}
@@ -268,3 +282,17 @@ func (o CooperationController) DeleteProduct(c *gin.Context) {
 	resultMap["productId"] = productId
 	returnSuccess(c, 20000, resultMap)
 }
+
+// 商品列表角标
+func (o CooperationController) CountProduct(c *gin.Context) {
+	param := &vo.GetAllProductParam{}
+	err := c.BindJSON(param)
+	if err != nil {
+		logrus.Errorf("Request bind err:%+v\n", err)
+		returnError(c, 40000, "Parameter Error: "+err.Error())
+		return
+	}
+	resMap := service.ProductService{}.CountProduct(param)
+
+	returnSuccess(c, 20000, resMap)
+}

+ 28 - 0
app/controller/finance_controller.go

@@ -110,6 +110,20 @@ func (f FinanceController) FrozenInfoList(c *gin.Context) {
 	returnSuccess(c, 20000, result)
 }
 
+// 余额管理——冻结记录-角标
+func (f FinanceController) FrozenInfoCount(c *gin.Context) {
+	param := &vo.BalanceParam{}
+	err := c.BindJSON(param)
+	if err != nil {
+		logrus.Errorf("Request bind err:%+v\n", err)
+		returnError(c, 40000, "Parameter Error: "+err.Error())
+		return
+	}
+	result := service.RechargeService{}.FrozenInfoCount(param)
+
+	returnSuccess(c, 20000, result)
+}
+
 // 充值管理——累计充值金额、确认中金额
 func (f FinanceController) ShowRecharge(c *gin.Context) {
 	param := &vo.RechargeParam{}
@@ -146,6 +160,20 @@ func (f FinanceController) RechargeInfoList(c *gin.Context) {
 	returnSuccess(c, 20000, result)
 }
 
+// 充值管理——充值记录-角标
+func (f FinanceController) RechargeInfoCount(c *gin.Context) {
+	param := &vo.RechargeParam{}
+	err := c.BindJSON(param)
+	if err != nil {
+		logrus.Errorf("Request bind err:%+v\n", err)
+		returnError(c, 40000, "Parameter Error: "+err.Error())
+		return
+	}
+	result := service.RechargeService{}.RechargeInfoCount(param)
+
+	returnSuccess(c, 20000, result)
+}
+
 // 设置默认开票抬头
 func (f FinanceController) UpdateInvoiceDefault(c *gin.Context) {
 	param := &vo.InvoiceDefaultParam{}

+ 14 - 0
app/controller/task_controller.go

@@ -537,6 +537,20 @@ func (t TaskController) GetPublicDefaultTalentList(c *gin.Context) {
 	returnSuccess(c, 20000, res)
 }
 
+// 违约管理——公开任务-违约达人列表角标
+func (t TaskController) GetPublicDefaultTalentCount(c *gin.Context) {
+	param := &vo.DefaultSearchParam{}
+	err := c.BindJSON(param)
+	if err != nil {
+		logrus.Errorf("Request bind err:%+v\n", err)
+		returnError(c, 40000, "Parameter Error: "+err.Error())
+		return
+	}
+	res, _ := service.DefaultService{}.GetPublicDefaultTalentCount(param)
+
+	returnSuccess(c, 20000, res)
+}
+
 // 违约管理——定向任务-违约达人列表
 func (t TaskController) GetTargetDefaultTalentList(c *gin.Context) {
 	param := &vo.DefaultSearchParam{}

+ 2 - 2
app/dao/enterprise_supplier_cooperate_dao.go

@@ -28,7 +28,7 @@ func (d EnterpriseSupplierCooperateDao) GetSupplierByEnterprise(enterpriseId str
 	var enterpriseSupplierCooperates []*entity.EnterpriseSupplierCooperate
 	var total int64
 	offset := (page - 1) * pageSize
-	query := Db.Debug().Model(&entity.EnterpriseSupplierCooperate{}).Where("enterprise_id = ? AND cooperate_status = 2", enterpriseId)
+	query := Db.Model(&entity.EnterpriseSupplierCooperate{}).Where("enterprise_id = ? AND cooperate_status = 2", enterpriseId)
 	query.Count(&total)
 	query = query.Select("supplier_id, cooperate_num, upload_talent_num, cooperate_talent_num, b_operator, b_operator_type, agree_time")
 	err := query.Order("agree_time desc").Offset(offset).Limit(pageSize).Find(&enterpriseSupplierCooperates).Error
@@ -56,7 +56,7 @@ func (d EnterpriseSupplierCooperateDao) GetSupplierConfirmingList(enterpriseId s
 	var enterpriseSupplierCooperates []*entity.EnterpriseSupplierCooperate
 	var total int64
 	offset := (page - 1) * pageSize
-	query := Db.Debug().Model(&entity.EnterpriseSupplierCooperate{}).Where("enterprise_id = ? AND cooperate_status = 1", enterpriseId)
+	query := Db.Model(&entity.EnterpriseSupplierCooperate{}).Where("enterprise_id = ? AND cooperate_status = 1", enterpriseId)
 	query.Count(&total)
 	query = query.Select("supplier_id,  b_operator, b_operator_type, cooperate_status, create_time")
 	err := query.Order("create_time desc").Offset(offset).Limit(pageSize).Find(&enterpriseSupplierCooperates).Error

+ 5 - 5
app/dao/info_auto_default_dao.go

@@ -16,11 +16,11 @@ func (d InfoAutoDefaultDao) GetAutoDefaultLast(enterpriseId string) entity.InfoA
 	return autoDefaultInfo
 }
 
-// 获取指定 auto_default_id 的指定字段值
-func (d InfoAutoDefaultDao) GetValueByIdFieldName(autoDefaultId int64, fieldName string) int64 {
-	var value int64
-	Db.Model(&entity.InfoAutoDefault{}).Select(fieldName).Where("auto_default_id = ?", autoDefaultId).Find(&value)
-	return value
+// 获取指定 auto_default_id 的字段值
+func (d InfoAutoDefaultDao) GetValueById(autoDefaultId int64) (entity.InfoAutoDefault, error) {
+	var infoAutoDefault entity.InfoAutoDefault
+	err := Db.Model(&entity.InfoAutoDefault{}).Where("auto_default_id = ?", autoDefaultId).Find(&infoAutoDefault).Error
+	return infoAutoDefault, err
 }
 
 // 为当前 enterpriseId 插入新的策略配置

+ 45 - 1
app/dao/local_life_dao.go

@@ -204,7 +204,7 @@ func (d LocalLifeDao) GetLocalDraftList(param *vo.LocalDraftParam) ([]vo.ReLocal
 	return reLocalTaskPreviews, total, nil
 }
 
-// 获取公开种草中全部指定状态值的项目
+// 获取公开本地生活中全部指定状态值的项目
 func (d LocalLifeDao) GetLocalLifeList(value int64, fieldName string) ([]*entity.LocalLifeInfo, error) {
 	var localLifeInfos []*entity.LocalLifeInfo
 	err := Db.Model(entity.LocalLifeInfo{}).Where(fmt.Sprintf("local_type = ? AND %s = ? ", fieldName), 1, value).Find(&localLifeInfos).Error
@@ -214,6 +214,50 @@ func (d LocalLifeDao) GetLocalLifeList(value int64, fieldName string) ([]*entity
 	return localLifeInfos, nil
 }
 
+// 违约管理——违约公开本地生活任务列表
+func (d LocalLifeDao) GetLocalPublicList(param *vo.DefaultSearchParam) ([]vo.ReTaskDefaultPublic, int64, error) {
+	var reTaskDefaultPublics []vo.ReTaskDefaultPublic
+	var localLifeInfos []entity.LocalLifeInfo
+	var total int64
+	query := Db.Model(&entity.LocalLifeInfo{}).Where("local_type = ?", 1)
+	// 动态添加查询条件
+	if param.SubAccountId == 0 {
+		if param.EnterpriseId == "" {
+			return reTaskDefaultPublics, 0, errors.New("enterpriseId is empty")
+		}
+		query = query.Where("enterprise_id = ?", param.EnterpriseId)
+	} else {
+		query = query.Where("sub_account_id = ?", param.SubAccountId)
+	}
+	if param.Platform != 0 {
+		query = query.Where("local_platform = ?", param.Platform)
+	}
+	if param.Others != "" {
+		query = query.Where("enterprise_id = ? or local_id = ? or local_name LIKE ?", param.Others, param.Others, "%"+param.Others+"%")
+	}
+	query.Count(&total)
+	query = query.Select("enterprise_id, sub_account_id, local_id, local_platform, task_form, content_type, store_id")
+	offset := (param.Page - 1) * param.PageSize
+	if err := query.Order("created_at asc").Offset(offset).Limit(param.PageSize).Find(&localLifeInfos).Error; err != nil {
+		return nil, 0, err
+	}
+	for _, localLife := range localLifeInfos {
+		reTaskDefaultPublic := vo.ReTaskDefaultPublic{
+			EnterpriseId: localLife.EnterpriseID,
+			SubAccountId: localLife.SubAccountID,
+			TaskId:       localLife.LocalID,
+			Platform:     localLife.LocalPlatform,
+			TaskForm:     localLife.TaskForm,
+			ContentType:  localLife.ContentType,
+			TaskType:     1,
+			StoreId:      localLife.StoreID,
+		}
+		reTaskDefaultPublics = append(reTaskDefaultPublics, reTaskDefaultPublic)
+	}
+
+	return reTaskDefaultPublics, total, nil
+}
+
 // 探店本地生活列表
 func (d LocalLifeDao) GetLocalStoreExplorePreviews(param *vo.LocalSearchParam) ([]vo.ReLocalStoreExplorePreview, int64, error) {
 	var reLocalStoreExplorePreviews []vo.ReLocalStoreExplorePreview

+ 9 - 9
app/entity/local_life_task_info.go

@@ -12,13 +12,13 @@ type LocalLifeTaskInfo struct {
 	TalentPlatformInfoSnap string    `gorm:"column:talent_platform_info_snap;NOT NULL"`   // 达人平台信息快照
 	TalentPersonalInfoSnap string    `gorm:"column:talent_personal_info_snap;NOT NULL"`   // 达人个人信息快照
 	TalentPostAddrSnap     string    `gorm:"column:talent_post_addr_snap;NOT NULL"`       // 收货地址快照
-	TaskReward             string    `gorm:"column:task_reward;NOT NULL"`                 // 达人报酬(3.0未用)
-	SettleAmount           string    `gorm:"column:settle_amount;NOT NULL"`               // 达人实际所得(自动填充)(扣除违约扣款)
-	AllPayment             string    `gorm:"column:all_payment;NOT NULL"`                 // 企业支付(3.0未用)
-	RealPayment            string    `gorm:"column:real_payment;NOT NULL"`                // 企业实际支付(加上服务商的服务费)(扣除违约扣款)
+	TaskReward             float64   `gorm:"column:task_reward;NOT NULL"`                 // 达人报酬(3.0未用)
+	SettleAmount           float64   `gorm:"column:settle_amount;NOT NULL"`               // 达人实际所得(自动填充)(扣除违约扣款)
+	AllPayment             float64   `gorm:"column:all_payment;NOT NULL"`                 // 企业支付(3.0未用)
+	RealPayment            float64   `gorm:"column:real_payment;NOT NULL"`                // 企业实际支付(加上服务商的服务费)(扣除违约扣款)
 	ServiceRate            int64     `gorm:"column:service_rate"`                         // 服务费率,千分之
-	ServiceCharge          string    `gorm:"column:service_charge"`                       // 服务费
-	RealServiceCharge      string    `gorm:"column:real_service_charge"`                  // 服务商实际所得服务费(扣除违约)
+	ServiceCharge          float64   `gorm:"column:service_charge"`                       // 服务费
+	RealServiceCharge      float64   `gorm:"column:real_service_charge"`                  // 服务商实际所得服务费(扣除违约)
 	FeeForm                int64     `gorm:"column:fee_form"`                             // 稿费形式,1,2,3分别代表产品置换、一口价、自报价
 	ErrBreakRate           int64     `gorm:"column:err_break_rate;default:0;NOT NULL"`    // 未上传类型违约扣款比例,百分之
 	ScriptBreakRate        int64     `gorm:"column:script_break_rate;default:0;NOT NULL"` // 脚本上传超时违约扣款比例,百分之
@@ -44,12 +44,12 @@ type LocalLifeTaskInfo struct {
 	LeadTeamID             string    `gorm:"column:lead_team_id"`                         // 作为团长的young之团id,对应younggee_talent_team中的team_id字段
 	TeamID                 string    `gorm:"column:team_id"`                              // 作为团员的young之团id,对应younggee_talent_team中的team_id字段
 	SettleStatus           int64     `gorm:"column:settle_status;default:1"`              // 结算状态,1、2分别表示待结算、已结算
-	TeamIncome             string    `gorm:"column:team_income"`                          // young之团团长现金收益
+	TeamIncome             float64   `gorm:"column:team_income"`                          // young之团团长现金收益
 	TeamPoint              int64     `gorm:"column:team_point"`                           // young之团团长积分收益
 	CurBreakAt             time.Time `gorm:"column:cur_break_at"`                         // 当前阶段截止时间
 	SupplierID             int64     `gorm:"column:supplier_id;default:0"`                // 服务商ID
 	SupplierStatus         int64     `gorm:"column:supplier_status;default:0"`            // 服务商任务状态 0表示达人来源非服务商 1待选 2已选 3落选
-	DraftFee               string    `gorm:"column:draft_fee;default:0.00"`               // 达人稿费,达人所见的稿费金额
+	DraftFee               float64   `gorm:"column:draft_fee;default:0.00"`               // 达人稿费,达人所见的稿费金额
 	SignedTime             time.Time `gorm:"column:signed_time"`                          // 签收时间
 	FansNum                int64     `gorm:"column:fans_num"`                             // 粉丝数
 	VoteAvg                int64     `gorm:"column:vote_avg"`                             // 平均点赞数
@@ -60,7 +60,7 @@ type LocalLifeTaskInfo struct {
 	SOperatorType          int64     `gorm:"column:s_operator_type;default:0"`            // 服务商操作人类型,1服务商主账号,2服务商子账号,3管理后台
 	OpenID                 string    `gorm:"column:open_id"`                              // 达人报名的快手唯一标识
 	SProjectID             int64     `gorm:"column:s_project_id"`                         // 服务商种草任务ID
-	SupportFee             string    `gorm:"column:support_fee"`                          // 提报价格(达人自报价经过计算后,)
+	SupportFee             float64   `gorm:"column:support_fee"`                          // 提报价格(达人自报价经过计算后,)
 	SketchMissingTime      time.Time `gorm:"column:sketch_missing_time"`                  // 未传初稿违约时间
 	SketchMissingStatus    int64     `gorm:"column:sketch_missing_status;default:0"`      // 未传初稿违约状态,0无违约,1有违约
 	LinkMissingTime        time.Time `gorm:"column:link_missing_time"`                    // 未发作品违约时间

+ 1 - 0
app/entity/platform_kuaishou_user_info.go

@@ -24,6 +24,7 @@ type PlatformKuaishouUserInfo struct {
 	IsDelete     int64     `gorm:"column:is_delete;NOT NULL"`
 	LikeNum      int64     `gorm:"column:like_num;NOT NULL"`
 	VideoNum     int64     `gorm:"column:video_num;NOT NULL"`
+	City         string    `gorm:"column:city"`
 }
 
 func (m *PlatformKuaishouUserInfo) TableName() string {

+ 13 - 0
app/service/cooperation_service.go

@@ -192,6 +192,19 @@ func (s CooperationService) GetSupplierConfirmingList(param *vo.SupplierConfirmi
 	return result, nil
 }
 
+// 服务商管理-角标
+func (t CooperationService) GetSupplierCount(param *vo.SupplierConfirmingParam) map[string]int64 {
+	res := make(map[string]int64)
+	var inPoolNum int64     // 在库服务商
+	var confirmingNum int64 // 邀请待确认
+	dao.Db.Model(&entity.EnterpriseSupplierCooperate{}).Where("enterprise_id = ? AND cooperate_status = 2", param.EnterpriseId).Count(&inPoolNum)
+	dao.Db.Model(&entity.EnterpriseSupplierCooperate{}).Where("enterprise_id = ? AND cooperate_status = 1", param.EnterpriseId).Count(&confirmingNum)
+	res["inPoolNum"] = inPoolNum
+	res["confirmingNum"] = confirmingNum
+
+	return res
+}
+
 // 服务商合作-服务商列表
 func (s CooperationService) GetSupplierInTargetTaskList(param *vo.SupplierSearchInTargetTaskParam) (vo.ResultVO, error) {
 	if param.Page <= 0 {

+ 331 - 135
app/service/default_service.go

@@ -20,57 +20,116 @@ func (s DefaultService) GetPublicDefaultList(param *vo.DefaultSearchParam) (vo.R
 		param.PageSize = 10
 	}
 	var result vo.ResultVO
-	// 以下代码只考虑了种草
-	reTaskDefaultPublics, total, err := (&dao.ProjectDAO{}).GetProjectPublicList(param)
-	if err != nil {
-		return result, err
-	}
-	for i := range reTaskDefaultPublics {
-		// 获取商品详情字段
-		var creatorName string
-		var productName string
-		var productPrice float64
-		var mainImage string
-		if reTaskDefaultPublics[i].SubAccountId == 0 {
-			enterprise, err := dao.EnterpriseDao{}.GetEnterprise(reTaskDefaultPublics[i].EnterpriseId)
-			if err == nil && enterprise != nil {
-				creatorName = enterprise.BusinessName
+	// 种草
+	if param.TaskType == 1 {
+		reTaskDefaultPublics, total, err := (&dao.ProjectDAO{}).GetProjectPublicList(param)
+		if err != nil {
+			return result, err
+		}
+		for i := range reTaskDefaultPublics {
+			// 获取商品详情字段
+			var creatorName string
+			var productName string
+			var productPrice float64
+			var mainImage string
+			if reTaskDefaultPublics[i].SubAccountId == 0 {
+				enterprise, err := dao.EnterpriseDao{}.GetEnterprise(reTaskDefaultPublics[i].EnterpriseId)
+				if err == nil && enterprise != nil {
+					creatorName = enterprise.BusinessName
+				}
+			} else {
+				subAccount, err := dao.SubAccountDao{}.GetSubAccount(reTaskDefaultPublics[i].SubAccountId)
+				if err == nil && subAccount != nil {
+					creatorName = subAccount.SubAccountName
+				}
 			}
-		} else {
-			subAccount, err := dao.SubAccountDao{}.GetSubAccount(reTaskDefaultPublics[i].SubAccountId)
-			if err == nil && subAccount != nil {
-				creatorName = subAccount.SubAccountName
+			product, err := dao.ProductDAO{}.GetProductByID(reTaskDefaultPublics[i].ProductId)
+			if err == nil && product != nil {
+				productName = product.ProductName
+				productPrice = product.ProductPrice
 			}
+			mainImage, err = dao.ProductPhotoDAO{}.GetMainPhotoByProductID(reTaskDefaultPublics[i].ProductId)
+			reTaskDefaultPublics[i].CreatorName = creatorName
+			reTaskDefaultPublics[i].ProductName = productName
+			reTaskDefaultPublics[i].ProductPrice = productPrice
+			reTaskDefaultPublics[i].MainImage = mainImage
+			// 获取未传数量字段	0-10分别表示未违约、脚本超时违约、脚本未上传违约、初稿超时违约、初稿未上传违约、链接超时违约、链接未上传违约、数据超时违约、数据未上传违约、解约待处理、解约
+			projectId := reTaskDefaultPublics[i].TaskId
+			noSketchNum := dao.ProjectTaskInfoDao{}.CountByDefaultType(projectId, 4)
+			noLinkNum := dao.ProjectTaskInfoDao{}.CountByDefaultType(projectId, 6)
+			noDataNum := dao.ProjectTaskInfoDao{}.CountByDefaultType(projectId, 8)
+			// 终止合作还是解约字段待确认
+			endCooperationNum := dao.ProjectTaskInfoDao{}.CountByTaskStage(projectId, 16)
+			reTaskDefaultPublics[i].NoSketchNum = noSketchNum
+			reTaskDefaultPublics[i].NoLinkNum = noLinkNum
+			reTaskDefaultPublics[i].NoDataNum = noDataNum
+			reTaskDefaultPublics[i].EndCooperationNum = endCooperationNum
 		}
-		product, err := dao.ProductDAO{}.GetProductByID(reTaskDefaultPublics[i].ProductId)
-		if err == nil && product != nil {
-			productName = product.ProductName
-			productPrice = product.ProductPrice
+		result = vo.ResultVO{
+			Page:     param.Page,
+			PageSize: param.PageSize,
+			Total:    total,
+			Data:     reTaskDefaultPublics,
 		}
-		mainImage, err = dao.ProductPhotoDAO{}.GetMainPhotoByProductID(reTaskDefaultPublics[i].ProductId)
-		reTaskDefaultPublics[i].CreatorName = creatorName
-		reTaskDefaultPublics[i].ProductName = productName
-		reTaskDefaultPublics[i].ProductPrice = productPrice
-		reTaskDefaultPublics[i].MainImage = mainImage
-		// 获取未传数量字段	0-10分别表示未违约、脚本超时违约、脚本未上传违约、初稿超时违约、初稿未上传违约、链接超时违约、链接未上传违约、数据超时违约、数据未上传违约、解约待处理、解约
-		projectId := reTaskDefaultPublics[i].TaskId
-		noSketchNum := dao.ProjectTaskInfoDao{}.CountByDefaultType(projectId, 4)
-		noLinkNum := dao.ProjectTaskInfoDao{}.CountByDefaultType(projectId, 6)
-		noDataNum := dao.ProjectTaskInfoDao{}.CountByDefaultType(projectId, 8)
-		// 终止合作还是解约字段待确认
-		endCooperationNum := dao.ProjectTaskInfoDao{}.CountByTaskStage(projectId, 16)
-		reTaskDefaultPublics[i].NoSketchNum = noSketchNum
-		reTaskDefaultPublics[i].NoLinkNum = noLinkNum
-		reTaskDefaultPublics[i].NoDataNum = noDataNum
-		reTaskDefaultPublics[i].EndCooperationNum = endCooperationNum
-	}
-	result = vo.ResultVO{
-		Page:     param.Page,
-		PageSize: param.PageSize,
-		Total:    total,
-		Data:     reTaskDefaultPublics,
+		return result, nil
+		// 本地生活
+	} else if param.TaskType == 2 {
+		reTaskDefaultPublics, total, err := (&dao.ProjectDAO{}).GetProjectPublicList(param)
+		if err != nil {
+			return result, err
+		}
+		for i := range reTaskDefaultPublics {
+			// 获取商品详情字段
+			var creatorName string
+			var storeName string
+			var storeLocation string
+			//var productPrice float64
+			var mainImage string
+			if reTaskDefaultPublics[i].SubAccountId == 0 {
+				enterprise, err := dao.EnterpriseDao{}.GetEnterprise(reTaskDefaultPublics[i].EnterpriseId)
+				if err == nil && enterprise != nil {
+					creatorName = enterprise.BusinessName
+				}
+			} else {
+				subAccount, err := dao.SubAccountDao{}.GetSubAccount(reTaskDefaultPublics[i].SubAccountId)
+				if err == nil && subAccount != nil {
+					creatorName = subAccount.SubAccountName
+				}
+			}
+			store, err := dao.StoreDao{}.GetStoreByID(reTaskDefaultPublics[i].StoreId)
+			if err == nil && store != nil {
+				storeName = store.StoreName
+				storeLocation = store.StoreLocation
+			}
+			mainImage, err = dao.ProductPhotoDAO{}.GetMainPhotoByStoreID(reTaskDefaultPublics[i].StoreId)
+			reTaskDefaultPublics[i].CreatorName = creatorName
+			reTaskDefaultPublics[i].StoreName = storeName
+			reTaskDefaultPublics[i].StoreLocation = storeLocation
+			reTaskDefaultPublics[i].MainImage = mainImage
+			// 获取未传数量字段	0-10分别表示未违约、脚本超时违约、脚本未上传违约、初稿超时违约、初稿未上传违约、链接超时违约、链接未上传违约、数据超时违约、数据未上传违约、解约待处理、解约
+			localId := reTaskDefaultPublics[i].TaskId
+			noSketchNum := dao.LocalLifeTaskInfoDao{}.CountByDefaultType(localId, 4)
+			noLinkNum := dao.LocalLifeTaskInfoDao{}.CountByDefaultType(localId, 6)
+			noDataNum := dao.LocalLifeTaskInfoDao{}.CountByDefaultType(localId, 8)
+			// 终止合作还是解约字段待确认
+			endCooperationNum := dao.LocalLifeTaskInfoDao{}.CountByTaskStage(localId, 16)
+			reTaskDefaultPublics[i].NoSketchNum = noSketchNum
+			reTaskDefaultPublics[i].NoLinkNum = noLinkNum
+			reTaskDefaultPublics[i].NoDataNum = noDataNum
+			reTaskDefaultPublics[i].EndCooperationNum = endCooperationNum
+		}
+		result = vo.ResultVO{
+			Page:     param.Page,
+			PageSize: param.PageSize,
+			Total:    total,
+			Data:     reTaskDefaultPublics,
+		}
+		return result, nil
+
+	} else {
+		return result, nil
 	}
-	return result, nil
+
 }
 
 // 违约管理——违约定向任务列表
@@ -137,101 +196,238 @@ func (s DefaultService) GetPublicDefaultTalentList(param *vo.DefaultSearchParam)
 	}
 	var result vo.ResultVO
 	var reTalentDefaults []*vo.ReTalentDefault
-	// 以下代码只考虑了种草
-	var projectTaskInfos []entity.ProjectTaskInfo
-	var total int64
-	var err error
-	var cutRate int64
-	defaultType := param.DefaultType
-	if defaultType == 1 { // 未传初稿
-		projectTaskInfos, total, err = dao.ProjectTaskInfoDao{}.GetListBySketchDefault(param)
-		autoDefaultId, _ := dao.ProjectDAO{}.GetAutoDefaultId(param.TaskId)
-		cutRate = dao.InfoAutoDefaultDao{}.GetValueByIdFieldName(*autoDefaultId, "sketch_replace_not_upload")
-	} else if defaultType == 2 { // 未发作品
-		projectTaskInfos, total, err = dao.ProjectTaskInfoDao{}.GetListByLinkDefault(param)
-		autoDefaultId, _ := dao.ProjectDAO{}.GetAutoDefaultId(param.TaskId)
-		cutRate = dao.InfoAutoDefaultDao{}.GetValueByIdFieldName(*autoDefaultId, "link_replace_not_upload")
-	} else if defaultType == 3 { // 未传数据
-		projectTaskInfos, total, err = dao.ProjectTaskInfoDao{}.GetListByDataDefault(param)
-		autoDefaultId, _ := dao.ProjectDAO{}.GetAutoDefaultId(param.TaskId)
-		cutRate = dao.InfoAutoDefaultDao{}.GetValueByIdFieldName(*autoDefaultId, "data_replace_not_upload")
-	} else if defaultType == 4 { // 终止合作
-		projectTaskInfos, total, err = dao.ProjectTaskInfoDao{}.GetListByTerminateDefault(param)
-	} else if defaultType == 5 { // 已解约
-		projectTaskInfos, total, err = dao.ProjectTaskInfoDao{}.GetListByCancelDefault(param)
-	}
-	if err != nil {
-		return result, err
-	}
-	for _, projectTaskInfo := range projectTaskInfos {
-		talentId := projectTaskInfo.TalentID
-		talentPhone, _ := dao.TalentInfoDao{}.SelectTalentPhone(talentId)
-		platformKuaishouUserInfo, _ := dao.PlatformKuaishouUserInfoDao{}.SelectUserInfo(talentId)
-		reTalentDefault := &vo.ReTalentDefault{
-			TalentId:    talentId,
-			TalentPhone: *talentPhone,
-			TaskId:      projectTaskInfo.TaskID,
-			DraftFee:    projectTaskInfo.DraftFee,
-			OpenId:      platformKuaishouUserInfo.OpenId,
-			NickName:    platformKuaishouUserInfo.NickName,
-			HeadUri:     platformKuaishouUserInfo.HeadUri,
-			City:        "-",
+	// 种草
+	if param.TaskType == 1 {
+		var projectTaskInfos []entity.ProjectTaskInfo
+		var total int64
+		var err error
+		var cutRate int64 // 违约扣款比例
+		defaultType := param.DefaultType
+		if defaultType == 1 { // 未传初稿
+			projectTaskInfos, total, err = dao.ProjectTaskInfoDao{}.GetListBySketchDefault(param)
+			autoDefaultId, _ := dao.ProjectDAO{}.GetAutoDefaultId(param.TaskId)
+			infoAutoDefault, _ := dao.InfoAutoDefaultDao{}.GetValueById(*autoDefaultId)
+			cutRate = infoAutoDefault.SketchOtherNotUpload
+		} else if defaultType == 2 { // 未发作品
+			projectTaskInfos, total, err = dao.ProjectTaskInfoDao{}.GetListByLinkDefault(param)
+			autoDefaultId, _ := dao.ProjectDAO{}.GetAutoDefaultId(param.TaskId)
+			infoAutoDefault, _ := dao.InfoAutoDefaultDao{}.GetValueById(*autoDefaultId)
+			cutRate = infoAutoDefault.LinkReplaceNotUpload
+		} else if defaultType == 3 { // 未传数据
+			projectTaskInfos, total, err = dao.ProjectTaskInfoDao{}.GetListByDataDefault(param)
+			autoDefaultId, _ := dao.ProjectDAO{}.GetAutoDefaultId(param.TaskId)
+			infoAutoDefault, _ := dao.InfoAutoDefaultDao{}.GetValueById(*autoDefaultId)
+			cutRate = infoAutoDefault.DataReplaceNotUpload
+		} else if defaultType == 4 { // 终止合作
+			projectTaskInfos, total, err = dao.ProjectTaskInfoDao{}.GetListByTerminateDefault(param)
+		} else if defaultType == 5 { // 已解约
+			projectTaskInfos, total, err = dao.ProjectTaskInfoDao{}.GetListByCancelDefault(param)
 		}
-		if defaultType == 1 {
-			reTalentDefault.DefaultTime = projectTaskInfo.SketchMissingTime.Format("2006-01-02 15:04:05")
-			reTalentDefault.SettleAmount = projectTaskInfo.SettleAmount
-		} else if defaultType == 2 {
-			reTalentDefault.DefaultTime = projectTaskInfo.LinkMissingTime.Format("2006-01-02 15:04:05")
-			reTalentDefault.SettleAmount = projectTaskInfo.SettleAmount
-		} else if defaultType == 3 {
-			reTalentDefault.DefaultTime = projectTaskInfo.DataMissingTime.Format("2006-01-02 15:04:05")
-			reTalentDefault.SettleAmount = projectTaskInfo.SettleAmount
-		} else if defaultType == 4 {
-			reTalentDefault.DefaultTime = projectTaskInfo.TerminateTime.Format("2006-01-02 15:04:05")
-			reTalentDefault.Reason = projectTaskInfo.TerminateReason
-			terminateOperatorType := projectTaskInfo.TerminateOperatorType
-			if terminateOperatorType == 1 {
-				enterprise, _ := dao.EnterpriseDao{}.GetEnterprise(projectTaskInfo.TerminateOperator)
-				reTalentDefault.OperatorName = enterprise.BusinessName
-			} else if terminateOperatorType == 2 {
-				operatorId, _ := strconv.ParseInt(projectTaskInfo.TerminateOperator, 10, 64)
-				subAccount, _ := dao.SubAccountDao{}.GetSubAccount(operatorId)
-				reTalentDefault.OperatorName = subAccount.SubAccountName
-			} else if terminateOperatorType == 3 {
-				operatorId, _ := strconv.ParseInt(projectTaskInfo.TerminateOperator, 10, 64)
-				userName, _ := dao.UserDao{}.GetNameByUserId(operatorId)
-				reTalentDefault.OperatorName = userName
+		if err != nil {
+			return result, err
+		}
+		for _, projectTaskInfo := range projectTaskInfos {
+			talentId := projectTaskInfo.TalentID
+			talentInfo, _ := dao.TalentInfoDao{}.SelectTalentInfo(talentId)
+			platformKuaishouUserInfo, _ := dao.PlatformKuaishouUserInfoDao{}.SelectUserInfo(talentId)
+			reTalentDefault := &vo.ReTalentDefault{
+				TalentId:    talentId,
+				TalentPhone: talentInfo.TalentPhoneNumber,
+				TaskId:      projectTaskInfo.TaskID,
+				DraftFee:    projectTaskInfo.DraftFee,
+				OpenId:      platformKuaishouUserInfo.OpenId,
+				NickName:    platformKuaishouUserInfo.NickName,
+				HeadUri:     platformKuaishouUserInfo.HeadUri,
+				City:        platformKuaishouUserInfo.City,
+				Gender:      talentInfo.Sex,
 			}
-		} else if defaultType == 5 {
-			reTalentDefault.DefaultTime = projectTaskInfo.CancelTime.Format("2006-01-02 15:04:05")
-			reTalentDefault.SettleAmount = projectTaskInfo.SettleAmount
-			reTalentDefault.Reason = projectTaskInfo.CancelReason
-			cancelOperatorType := projectTaskInfo.CancelOperatorType
-			if cancelOperatorType == 1 {
-				enterprise, _ := dao.EnterpriseDao{}.GetEnterprise(projectTaskInfo.CancelOperator)
-				reTalentDefault.OperatorName = enterprise.BusinessName
-			} else if cancelOperatorType == 2 {
-				operatorId, _ := strconv.ParseInt(projectTaskInfo.CancelOperator, 10, 64)
-				subAccount, _ := dao.SubAccountDao{}.GetSubAccount(operatorId)
-				reTalentDefault.OperatorName = subAccount.SubAccountName
-			} else if cancelOperatorType == 3 {
-				operatorId, _ := strconv.ParseInt(projectTaskInfo.CancelOperator, 10, 64)
-				userName, _ := dao.UserDao{}.GetNameByUserId(operatorId)
-				reTalentDefault.OperatorName = userName
+			if defaultType == 1 {
+				reTalentDefault.DefaultTime = projectTaskInfo.SketchMissingTime.Format("2006-01-02 15:04:05")
+				reTalentDefault.SettleAmount = projectTaskInfo.SettleAmount
+			} else if defaultType == 2 {
+				reTalentDefault.DefaultTime = projectTaskInfo.LinkMissingTime.Format("2006-01-02 15:04:05")
+				reTalentDefault.SettleAmount = projectTaskInfo.SettleAmount
+			} else if defaultType == 3 {
+				reTalentDefault.DefaultTime = projectTaskInfo.DataMissingTime.Format("2006-01-02 15:04:05")
+				reTalentDefault.SettleAmount = projectTaskInfo.SettleAmount
+			} else if defaultType == 4 {
+				reTalentDefault.DefaultTime = projectTaskInfo.TerminateTime.Format("2006-01-02 15:04:05")
+				reTalentDefault.Reason = projectTaskInfo.TerminateReason
+				terminateOperatorType := projectTaskInfo.TerminateOperatorType
+				if terminateOperatorType == 1 {
+					enterprise, _ := dao.EnterpriseDao{}.GetEnterprise(projectTaskInfo.TerminateOperator)
+					reTalentDefault.OperatorName = enterprise.BusinessName
+				} else if terminateOperatorType == 2 {
+					operatorId, _ := strconv.ParseInt(projectTaskInfo.TerminateOperator, 10, 64)
+					subAccount, _ := dao.SubAccountDao{}.GetSubAccount(operatorId)
+					reTalentDefault.OperatorName = subAccount.SubAccountName
+				} else if terminateOperatorType == 3 {
+					operatorId, _ := strconv.ParseInt(projectTaskInfo.TerminateOperator, 10, 64)
+					userName, _ := dao.UserDao{}.GetNameByUserId(operatorId)
+					reTalentDefault.OperatorName = userName
+				}
+			} else if defaultType == 5 {
+				reTalentDefault.DefaultTime = projectTaskInfo.CancelTime.Format("2006-01-02 15:04:05")
+				reTalentDefault.SettleAmount = projectTaskInfo.SettleAmount
+				reTalentDefault.Reason = projectTaskInfo.CancelReason
+				cancelOperatorType := projectTaskInfo.CancelOperatorType
+				if cancelOperatorType == 1 {
+					enterprise, _ := dao.EnterpriseDao{}.GetEnterprise(projectTaskInfo.CancelOperator)
+					reTalentDefault.OperatorName = enterprise.BusinessName
+				} else if cancelOperatorType == 2 {
+					operatorId, _ := strconv.ParseInt(projectTaskInfo.CancelOperator, 10, 64)
+					subAccount, _ := dao.SubAccountDao{}.GetSubAccount(operatorId)
+					reTalentDefault.OperatorName = subAccount.SubAccountName
+				} else if cancelOperatorType == 3 {
+					operatorId, _ := strconv.ParseInt(projectTaskInfo.CancelOperator, 10, 64)
+					userName, _ := dao.UserDao{}.GetNameByUserId(operatorId)
+					reTalentDefault.OperatorName = userName
+				}
 			}
+			reTalentDefaults = append(reTalentDefaults, reTalentDefault)
 		}
-		reTalentDefaults = append(reTalentDefaults, reTalentDefault)
+		resultMap := make(map[string]interface{})
+		resultMap["cutRate"] = cutRate
+		resultMap["reTalentDefaults"] = reTalentDefaults
+		result = vo.ResultVO{
+			Page:     param.Page,
+			PageSize: param.PageSize,
+			Total:    total,
+			Data:     resultMap,
+		}
+		return result, nil
+		// 本地生活
+	} else if param.TaskType == 2 {
+		var localLifeTaskInfos []entity.LocalLifeTaskInfo
+		var total int64
+		var err error
+		var cutRate int64 // 违约扣款比例
+		defaultType := param.DefaultType
+		if defaultType == 1 { // 未传初稿
+			localLifeTaskInfos, total, err = dao.LocalLifeTaskInfoDao{}.GetListBySketchDefault(param)
+			autoDefaultId, _ := dao.ProjectDAO{}.GetAutoDefaultId(param.TaskId)
+			infoAutoDefault, _ := dao.InfoAutoDefaultDao{}.GetValueById(*autoDefaultId)
+			cutRate = infoAutoDefault.SketchOtherNotUpload
+		} else if defaultType == 2 { // 未发作品
+			localLifeTaskInfos, total, err = dao.LocalLifeTaskInfoDao{}.GetListByLinkDefault(param)
+			autoDefaultId, _ := dao.ProjectDAO{}.GetAutoDefaultId(param.TaskId)
+			infoAutoDefault, _ := dao.InfoAutoDefaultDao{}.GetValueById(*autoDefaultId)
+			cutRate = infoAutoDefault.LinkReplaceNotUpload
+		} else if defaultType == 3 { // 未传数据
+			localLifeTaskInfos, total, err = dao.LocalLifeTaskInfoDao{}.GetListByDataDefault(param)
+			autoDefaultId, _ := dao.ProjectDAO{}.GetAutoDefaultId(param.TaskId)
+			infoAutoDefault, _ := dao.InfoAutoDefaultDao{}.GetValueById(*autoDefaultId)
+			cutRate = infoAutoDefault.DataReplaceNotUpload
+		} else if defaultType == 4 { // 终止合作
+			localLifeTaskInfos, total, err = dao.LocalLifeTaskInfoDao{}.GetListByTerminateDefault(param)
+		} else if defaultType == 5 { // 已解约
+			localLifeTaskInfos, total, err = dao.LocalLifeTaskInfoDao{}.GetListByCancelDefault(param)
+		}
+		if err != nil {
+			return result, err
+		}
+		for _, localLifeTaskInfo := range localLifeTaskInfos {
+			talentId := localLifeTaskInfo.TalentID
+			talentInfo, _ := dao.TalentInfoDao{}.SelectTalentInfo(talentId)
+			platformKuaishouUserInfo, _ := dao.PlatformKuaishouUserInfoDao{}.SelectUserInfo(talentId)
+			reTalentDefault := &vo.ReTalentDefault{
+				TalentId:    talentId,
+				TalentPhone: talentInfo.TalentPhoneNumber,
+				TaskId:      localLifeTaskInfo.TaskID,
+				DraftFee:    localLifeTaskInfo.DraftFee,
+				OpenId:      platformKuaishouUserInfo.OpenId,
+				NickName:    platformKuaishouUserInfo.NickName,
+				HeadUri:     platformKuaishouUserInfo.HeadUri,
+				City:        platformKuaishouUserInfo.City,
+				Gender:      talentInfo.Sex,
+			}
+			if defaultType == 1 {
+				reTalentDefault.DefaultTime = localLifeTaskInfo.SketchMissingTime.Format("2006-01-02 15:04:05")
+				reTalentDefault.SettleAmount = localLifeTaskInfo.SettleAmount
+			} else if defaultType == 2 {
+				reTalentDefault.DefaultTime = localLifeTaskInfo.LinkMissingTime.Format("2006-01-02 15:04:05")
+				reTalentDefault.SettleAmount = localLifeTaskInfo.SettleAmount
+			} else if defaultType == 3 {
+				reTalentDefault.DefaultTime = localLifeTaskInfo.DataMissingTime.Format("2006-01-02 15:04:05")
+				reTalentDefault.SettleAmount = localLifeTaskInfo.SettleAmount
+			} else if defaultType == 4 {
+				reTalentDefault.DefaultTime = localLifeTaskInfo.TerminateTime.Format("2006-01-02 15:04:05")
+				reTalentDefault.Reason = localLifeTaskInfo.TerminateReason
+				terminateOperatorType := localLifeTaskInfo.TerminateOperatorType
+				if terminateOperatorType == 1 {
+					enterprise, _ := dao.EnterpriseDao{}.GetEnterprise(localLifeTaskInfo.TerminateOperator)
+					reTalentDefault.OperatorName = enterprise.BusinessName
+				} else if terminateOperatorType == 2 {
+					operatorId, _ := strconv.ParseInt(localLifeTaskInfo.TerminateOperator, 10, 64)
+					subAccount, _ := dao.SubAccountDao{}.GetSubAccount(operatorId)
+					reTalentDefault.OperatorName = subAccount.SubAccountName
+				} else if terminateOperatorType == 3 {
+					operatorId, _ := strconv.ParseInt(localLifeTaskInfo.TerminateOperator, 10, 64)
+					userName, _ := dao.UserDao{}.GetNameByUserId(operatorId)
+					reTalentDefault.OperatorName = userName
+				}
+			} else if defaultType == 5 {
+				reTalentDefault.DefaultTime = localLifeTaskInfo.CancelTime.Format("2006-01-02 15:04:05")
+				reTalentDefault.SettleAmount = localLifeTaskInfo.SettleAmount
+				reTalentDefault.Reason = localLifeTaskInfo.CancelReason
+				cancelOperatorType := localLifeTaskInfo.CancelOperatorType
+				if cancelOperatorType == 1 {
+					enterprise, _ := dao.EnterpriseDao{}.GetEnterprise(localLifeTaskInfo.CancelOperator)
+					reTalentDefault.OperatorName = enterprise.BusinessName
+				} else if cancelOperatorType == 2 {
+					operatorId, _ := strconv.ParseInt(localLifeTaskInfo.CancelOperator, 10, 64)
+					subAccount, _ := dao.SubAccountDao{}.GetSubAccount(operatorId)
+					reTalentDefault.OperatorName = subAccount.SubAccountName
+				} else if cancelOperatorType == 3 {
+					operatorId, _ := strconv.ParseInt(localLifeTaskInfo.CancelOperator, 10, 64)
+					userName, _ := dao.UserDao{}.GetNameByUserId(operatorId)
+					reTalentDefault.OperatorName = userName
+				}
+			}
+			reTalentDefaults = append(reTalentDefaults, reTalentDefault)
+		}
+		resultMap := make(map[string]interface{})
+		resultMap["cutRate"] = cutRate
+		resultMap["reTalentDefaults"] = reTalentDefaults
+		result = vo.ResultVO{
+			Page:     param.Page,
+			PageSize: param.PageSize,
+			Total:    total,
+			Data:     resultMap,
+		}
+		return result, nil
+
+	} else {
+		return result, nil
 	}
-	resultMap := make(map[string]interface{})
-	resultMap["cutRate"] = cutRate
-	resultMap["reTalentDefaults"] = reTalentDefaults
-	result = vo.ResultVO{
-		Page:     param.Page,
-		PageSize: param.PageSize,
-		Total:    total,
-		Data:     resultMap,
+}
+
+// 违约管理——公开任务-违约达人列表角标
+func (s DefaultService) GetPublicDefaultTalentCount(param *vo.DefaultSearchParam) (map[string]int64, error) {
+	res := make(map[string]int64)
+	var noSketchNum int64
+	var noLinkNum int64
+	var noDataNum int64
+	var endCooperationNum int64
+	if param.TaskType == 1 {
+		noSketchNum = dao.ProjectTaskInfoDao{}.CountByDefaultType(param.TaskId, 4)
+		noLinkNum = dao.ProjectTaskInfoDao{}.CountByDefaultType(param.TaskId, 6)
+		noDataNum = dao.ProjectTaskInfoDao{}.CountByDefaultType(param.TaskId, 8)
+		// 终止合作还是解约字段待确认
+		endCooperationNum = dao.ProjectTaskInfoDao{}.CountByTaskStage(param.TaskId, 16)
+	} else {
+		noSketchNum = dao.LocalLifeTaskInfoDao{}.CountByDefaultType(param.TaskId, 4)
+		noLinkNum = dao.LocalLifeTaskInfoDao{}.CountByDefaultType(param.TaskId, 6)
+		noDataNum = dao.LocalLifeTaskInfoDao{}.CountByDefaultType(param.TaskId, 8)
+		// 终止合作还是解约字段待确认
+		endCooperationNum = dao.LocalLifeTaskInfoDao{}.CountByTaskStage(param.TaskId, 16)
 	}
-	return result, nil
+	res["noSketchNum"] = noSketchNum
+	res["noLinkNum"] = noLinkNum
+	res["noDataNum"] = noDataNum
+	res["endCooperationNum"] = endCooperationNum
+
+	return res, nil
 }
 
 // 违约管理——定向任务-违约达人列表

+ 3 - 2
app/service/local_life_service.go

@@ -142,7 +142,7 @@ func (s LocalLifeService) CreateLocalLife(localCreateParam *vo.LocalCreateParam)
 				totalRecruitNum += strategy.RecruitNumber
 				if strategy.FeeForm == 2 {
 					recruitStrategy.Offer = strategy.Offer
-					recruitStrategy.ServiceCharge = strategy.Offer * localCreateParam.ServiceChargeRate
+					recruitStrategy.ServiceCharge = strategy.Offer * localCreateParam.ServiceChargeRate * 0.01
 					recruitStrategy.TOffer = strategy.Offer * (1 - localCreateParam.ServiceChargeRate*0.01)
 				}
 				recruits = append(recruits, recruitStrategy)
@@ -203,7 +203,7 @@ func (s LocalLifeService) UpdateLocal(localUpdateParam *vo.LocalUpdateParam) (*s
 				totalRecruitNum += strategy.RecruitNumber
 				if strategy.FeeForm == 2 {
 					recruitStrategy.Offer = strategy.Offer
-					recruitStrategy.ServiceCharge = strategy.Offer * localUpdateParam.ServiceChargeRate
+					recruitStrategy.ServiceCharge = strategy.Offer * localUpdateParam.ServiceChargeRate * 0.01
 					recruitStrategy.TOffer = strategy.Offer * (1 - localUpdateParam.ServiceChargeRate*0.01)
 				}
 				recruits = append(recruits, recruitStrategy)
@@ -1127,6 +1127,7 @@ func (s LocalLifeService) GetStoreExploreInfo(param *vo.StoreExploreParam) (*vo.
 			TalentName:  talentInfo.TalentWxNickname,
 			Account:     "",
 			Location:    regionName,
+			Gender:      talentInfo.Sex,
 		}
 		reStoreExploreTalent := &vo.ReStoreExploreTalent{
 			ReTalentPreview: talentPreview,

+ 20 - 0
app/service/product_service.go

@@ -209,6 +209,26 @@ func (p ProductService) DeleteProduct(param *vo.ProductUpdateParam) (int64, erro
 	return param.ProductId, nil
 }
 
+// 商品列表-角标
+func (t ProductService) CountProduct(param *vo.GetAllProductParam) map[string]int64 {
+	res := make(map[string]int64)
+	var commonProduct int64
+	var kuaishouProduct int64
+	if param.ProductTitle != "" {
+		dao.Db.Model(&entity.Product{}).Where("enterprise_id = ? sub_account_id = ? and product_type = ? AND is_deleted = 0 and product_name LIKE ?", param.EnterpriseId, param.SubAccountId, 0, "%"+param.ProductTitle+"%").Count(&commonProduct)
+		dao.Db.Model(&entity.Product{}).Where("enterprise_id = ? sub_account_id = ? and product_type = ? AND is_deleted = 0 and product_name LIKE ?", param.EnterpriseId, param.SubAccountId, 1, "%"+param.ProductTitle+"%").Count(&kuaishouProduct)
+
+	} else {
+		dao.Db.Model(&entity.Product{}).Where("enterprise_id = ? sub_account_id = ? and product_type = ? AND is_deleted = 0", param.EnterpriseId, param.SubAccountId, 0).Count(&commonProduct)
+		dao.Db.Model(&entity.Product{}).Where("enterprise_id = ? sub_account_id = ? and product_type = ? AND is_deleted = 0", param.EnterpriseId, param.SubAccountId, 1).Count(&kuaishouProduct)
+
+	}
+	res["commonProduct"] = commonProduct
+	res["kuaishouProduct"] = kuaishouProduct
+
+	return res
+}
+
 // 获取商品类目
 func (p ProductService) GetProductCategorys() ([]string, error) {
 	var categorys []string

+ 2 - 2
app/service/project_service.go

@@ -143,7 +143,7 @@ func (s ProjectService) CreateProject(projectCreateParam *vo.ProjectCreateParam)
 				totalRecruitNum += strategy.RecruitNumber
 				if strategy.FeeForm == 2 {
 					recruitStrategy.Offer = strategy.Offer
-					recruitStrategy.ServiceCharge = strategy.Offer * projectCreateParam.ServiceChargeRate
+					recruitStrategy.ServiceCharge = strategy.Offer * projectCreateParam.ServiceChargeRate * 0.01
 					recruitStrategy.TOffer = strategy.Offer * (1 - projectCreateParam.ServiceChargeRate*0.01)
 				}
 				recruits = append(recruits, recruitStrategy)
@@ -207,7 +207,7 @@ func (s ProjectService) UpdateProject(projectUpdateParam *vo.ProjectUpdateParam)
 				totalRecruitNum += strategy.RecruitNumber
 				if strategy.FeeForm == 2 {
 					recruitStrategy.Offer = strategy.Offer
-					recruitStrategy.ServiceCharge = strategy.Offer * projectUpdateParam.ServiceChargeRate
+					recruitStrategy.ServiceCharge = strategy.Offer * projectUpdateParam.ServiceChargeRate * 0.01
 					recruitStrategy.TOffer = strategy.Offer * (1 - projectUpdateParam.ServiceChargeRate*0.01)
 				}
 				recruits = append(recruits, recruitStrategy)

+ 42 - 6
app/service/recharge_service.go

@@ -339,6 +339,26 @@ func (s RechargeService) FrozenInfoList(param *vo.BalanceParam) (vo.ResultVO, er
 	return result, nil
 }
 
+// 余额管理——冻结记录-角标
+func (t RechargeService) FrozenInfoCount(param *vo.BalanceParam) map[string]int64 {
+	res := make(map[string]int64)
+	var blockNum1 int64
+	var blockNum2 int64
+	var blockReleaseNum1 int64
+	var blockReleaseNum2 int64
+	// 冻结中
+	dao.Db.Model(entity.SelectionInfo{}).Where(fmt.Sprintf("enterprise_id = ? AND (selection_status between 5 and 6) "), param.EnterpriseId).Count(&blockNum1)
+	dao.Db.Model(entity.Project{}).Where(fmt.Sprintf("enterprise_id = ? AND (project_status between 7 and 8) "), param.EnterpriseId).Count(&blockNum2)
+	// 冻结解除
+	dao.Db.Model(entity.SelectionInfo{}).Where(fmt.Sprintf("enterprise_id = ? AND (selection_status between 7 and 8) "), param.EnterpriseId).Count(&blockReleaseNum1)
+	dao.Db.Model(entity.Project{}).Where(fmt.Sprintf("enterprise_id = ? AND (project_status between 9 and 10) "), param.EnterpriseId).Count(&blockReleaseNum2)
+
+	res["blockNum"] = blockNum1 + blockNum2
+	res["blockReleaseNum"] = blockReleaseNum1 + blockReleaseNum2
+
+	return res
+}
+
 // 充值管理——累计充值金额、确认中金额
 func (s RechargeService) ShowRecharge(param *vo.RechargeParam) (*vo.ReRechargeShow, error) {
 	reRechargeShow := new(vo.ReRechargeShow)
@@ -393,13 +413,13 @@ func (s RechargeService) RechargeInfoList(param *vo.RechargeParam) (vo.ResultVO,
 		}
 		reRechargeInfos = append(reRechargeInfos, reRechargeInfo)
 	}
-	rechargingNum, _ := dao.RechargeRecordDao{}.RechargeStatusCount(param.EnterpriseId, 1)
-	rechargedNum, _ := dao.RechargeRecordDao{}.RechargeStatusCount(param.EnterpriseId, 2)
-	failNum, _ := dao.RechargeRecordDao{}.RechargeStatusCount(param.EnterpriseId, 3)
+	//rechargingNum, _ := dao.RechargeRecordDao{}.RechargeStatusCount(param.EnterpriseId, 1)
+	//rechargedNum, _ := dao.RechargeRecordDao{}.RechargeStatusCount(param.EnterpriseId, 2)
+	//failNum, _ := dao.RechargeRecordDao{}.RechargeStatusCount(param.EnterpriseId, 3)
 	resMap := make(map[string]interface{})
-	resMap["rechargingNum"] = rechargingNum
-	resMap["rechargedNum"] = rechargedNum
-	resMap["failNum"] = failNum
+	//resMap["rechargingNum"] = rechargingNum
+	//resMap["rechargedNum"] = rechargedNum
+	//resMap["failNum"] = failNum
 	resMap["reRechargeInfos"] = reRechargeInfos
 	result = vo.ResultVO{
 		Page:     param.Page,
@@ -410,6 +430,22 @@ func (s RechargeService) RechargeInfoList(param *vo.RechargeParam) (vo.ResultVO,
 	return result, nil
 }
 
+// 余额管理——冻结记录-角标
+func (t RechargeService) RechargeInfoCount(param *vo.RechargeParam) map[string]int64 {
+	res := make(map[string]int64)
+	var rechargeConfirming int64
+	var recharged int64
+	var rechargeFail int64
+	dao.Db.Model(&entity.RechargeRecord{}).Where("enterprise_id = ? AND status = ?", param.EnterpriseId, 1).Count(&rechargeConfirming)
+	dao.Db.Model(&entity.RechargeRecord{}).Where("enterprise_id = ? AND status = ?", param.EnterpriseId, 2).Count(&recharged)
+	dao.Db.Model(&entity.RechargeRecord{}).Where("enterprise_id = ? AND status = ?", param.EnterpriseId, 3).Count(&rechargeFail)
+	res["rechargeConfirming"] = rechargeConfirming
+	res["recharged"] = recharged
+	res["rechargeFail"] = rechargeFail
+
+	return res
+}
+
 // 财务待办——充值确认中金额
 func (s RechargeService) GetFinance(param *vo.CommonParam) (float64, error) {
 	confirmingRecharge, err := dao.RechargeRecordDao{}.GetRechargeAmount(param.EnterpriseId, 1)

+ 2 - 2
app/vo/default_search_param.go

@@ -6,10 +6,10 @@ type DefaultSearchParam struct {
 	Page         int    `json:"page"`
 	PageSize     int    `json:"page_size"`
 	Platform     int64  `json:"platform"`
-	ProjectType  int64  `json:"project_type"` // 任务类型,0全部 1品牌种草,2本地生活
+	TaskType     int64  `json:"task_type"`    // 任务类型,0全部 1品牌种草,2本地生活
 	DefaultType  int64  `json:"default_type"` // 违约类型 1未传初稿 2未发作品 3未传数据 4终止合作 5已解约
+	Others       string `json:"others"`       // 任务标题/任务ID/创建者
 
 	TaskId     string `json:"task_id"`     // 任务ID
-	Others     string `json:"others"`      // 任务标题/任务ID/创建者
 	TalentName string `json:"talent_name"` // 达人昵称
 }

+ 4 - 2
app/vo/re_talent_default.go

@@ -6,11 +6,13 @@ type ReTalentDefault struct {
 	NickName     string  `json:"nickName"`
 	HeadUri      string  `json:"headUri"`
 	City         string  `json:"city"`
+	Gender       int64   `json:"gender"`       // 0未知 1男 2女
 	TalentPhone  string  `json:"talentPhone"`  // 表youngee_talent_info
 	TaskId       string  `json:"taskId"`       // 任务id
 	DraftFee     float64 `json:"draftFee"`     // 稿费价格
 	SettleAmount float64 `json:"settleAmount"` // 结算金额
 	DefaultTime  string  `json:"defaultTime"`  // 违约时间
-	Reason       string  `json:"reason"`       // 终止理由或解约原因
-	OperatorName string  `json:"operatorName"` // 操作人
+
+	Reason       string `json:"reason"`       // 终止理由或解约原因
+	OperatorName string `json:"operatorName"` // 操作人
 }

+ 5 - 0
app/vo/re_task_default_public.go

@@ -6,6 +6,11 @@ type ReTaskDefaultPublic struct {
 	ProductName  string  `json:"productName"`
 	ProductPrice float64 `json:"productPrice"`
 
+	StoreName     string `json:"storeName"`
+	StoreLocation string `json:"storeLocation"`
+	StoreId       int64  `json:"storeId"`
+	TeamBuyingId  int64  `json:"teamBuyingId"`
+
 	EnterpriseId      string `json:"enterpriseId"`
 	SubAccountId      int64  `json:"subAccountId"`
 	TaskId            string `json:"taskId"`

+ 11 - 7
route/init.go

@@ -298,13 +298,13 @@ func InitRoute(r *gin.Engine) {
 		task.POST("/draft/localLife/list", controller.TaskController{}.GetLocalLifeDraftList) // 草稿箱——本地生活列表
 
 		// 违约管理
-		task.POST("/default/public/list", controller.TaskController{}.GetPublicDefaultList)              // 违约管理——公开任务列表
-		task.POST("/default/public/talent/list", controller.TaskController{}.GetPublicDefaultTalentList) // 违约管理——公开任务-违约达人列表
-		// 违约管理——公开任务-违约达人列表角标
-		task.POST("/default/target/list", controller.TaskController{}.GetTargetDefaultList)              // 违约管理——定向任务列表
-		task.POST("/default/target/talent/list", controller.TaskController{}.GetTargetDefaultTalentList) // 违约管理——定向任务-违约达人列表
-		task.POST("/default/talent/cancel", controller.TaskController{}.CancelTalent)                    // 违约管理——达人解约
-		task.POST("/default/talent/cancel/list", controller.TaskController{}.CancelTalentList)           // 违约管理——达人批量解约
+		task.POST("/default/public/list", controller.TaskController{}.GetPublicDefaultList)                // 违约管理——公开任务列表
+		task.POST("/default/public/talent/list", controller.TaskController{}.GetPublicDefaultTalentList)   // 违约管理——公开任务-违约达人列表
+		task.POST("/default/public/talent/count", controller.TaskController{}.GetPublicDefaultTalentCount) // 违约管理——公开任务-违约达人列表角标
+		task.POST("/default/target/list", controller.TaskController{}.GetTargetDefaultList)                // 违约管理——定向任务列表
+		task.POST("/default/target/talent/list", controller.TaskController{}.GetTargetDefaultTalentList)   // 违约管理——定向任务-违约达人列表
+		task.POST("/default/talent/cancel", controller.TaskController{}.CancelTalent)                      // 违约管理——达人解约
+		task.POST("/default/talent/cancel/list", controller.TaskController{}.CancelTalentList)             // 违约管理——达人批量解约
 
 		// 寄样管理
 		task.POST("/logistics/selection/talent/count", controller.TaskController{}.LogisticsSelectionTalentCount) // 带货待发货、待签收、已签收角标
@@ -332,8 +332,10 @@ func InitRoute(r *gin.Engine) {
 		finance.POST("/pay/queryOrderByTradeId", controller.FinanceController{}.QueryOrderByTradeId) // 根据交易id查询微信是否扫码付款
 		finance.POST("/balance/show", controller.FinanceController{}.ShowBalance)                    // 余额管理——总金额、可用余额、冻结金额
 		finance.POST("/balance/frozen/info", controller.FinanceController{}.FrozenInfoList)          // 余额管理——冻结记录
+		finance.POST("/balance/frozen/count", controller.FinanceController{}.FrozenInfoCount)        // 余额管理——冻结记录-角标
 		finance.POST("/recharge/show", controller.FinanceController{}.ShowRecharge)                  // 充值管理——累计充值金额、确认中金额
 		finance.POST("/recharge/info", controller.FinanceController{}.RechargeInfoList)              // 充值管理——充值记录
+		finance.POST("/recharge/count", controller.FinanceController{}.RechargeInfoCount)            // 充值管理——充值记录-角标
 		// YG官方汇款账号
 
 		finance.POST("/invoice/default/update", controller.FinanceController{}.UpdateInvoiceDefault) // 设置默认开票抬头
@@ -359,6 +361,7 @@ func InitRoute(r *gin.Engine) {
 		cooperation.POST("/invite", controller.CooperationController{}.InviteSupplier)                // 服务商入库批量邀请
 		cooperation.POST("/inPool", controller.CooperationController{}.GetEnterprisePoolList)         // 在库服务商列表
 		cooperation.POST("/confirming", controller.CooperationController{}.GetSupplierConfirmingList) // 邀请待确认服务商列表
+		cooperation.POST("/count", controller.CooperationController{}.GetSupplierCount)               // 服务商管理-角标
 	}
 	// 推广合作-商品管理相关接口
 	product := r.Group("/youngee/b/cooperation/product")
@@ -367,6 +370,7 @@ func InitRoute(r *gin.Engine) {
 		product.POST("/detail", controller.CooperationController{}.GetProductDetail) // 商品详情
 		product.POST("/update", controller.CooperationController{}.UpdateProduct)    // 更新商品
 		product.POST("/del", controller.CooperationController{}.DeleteProduct)       // 删除商品
+		product.POST("/count", controller.CooperationController{}.CountProduct)      // 商品列表-角标
 	}
 	// 推广合作-门店管理相关接口
 	store := r.Group("/youngee/b/cooperation/store")