Browse Source

gengyiban

“liushuai” 1 year ago
parent
commit
ec841a0b5b

+ 45 - 0
consts/project.go

@@ -31,6 +31,51 @@ var ProjectPlatformMap = map[int64]string{
 	7: "知乎",
 }
 
+var TaskTypeMap = map[int64]string{
+	1: "实体商品寄拍",
+	2: "虚拟产品测评",
+	3: "线下探店打卡",
+	4: "悬赏任务",
+	5: "纯佣带货",
+}
+
+var ContentTypeMap = map[int]string{
+	1: "图文",
+	2: "视频",
+	3: "直播",
+}
+
+var ReasonMap = map[int]string{
+	1: "成团-新用户",
+	2: "成团-老用户",
+	3: "成单-申请成功",
+	4: "成单-结案完毕",
+}
+
+func GetReason(status int) string {
+	toast, contain := ReasonMap[status]
+	if contain {
+		return toast
+	}
+	return "未知"
+}
+
+func GetContentType(status int) string {
+	toast, contain := ContentTypeMap[status]
+	if contain {
+		return toast
+	}
+	return "未知"
+}
+
+func GetTaskType(status int64) string {
+	toast, contain := TaskTypeMap[status]
+	if contain {
+		return toast
+	}
+	return "未知"
+}
+
 func GetProjectPlatform(status int64) string {
 	toast, contain := ProjectPlatformMap[status]
 	if contain {

+ 86 - 0
db/operate.go

@@ -84,6 +84,59 @@ func CreatePricingStrategy(ctx context.Context, req *http_model.AddPricingReques
 	return "创建成功", monthAndDay + numString, nil
 }
 
+func CreateYoungeeStrategy(ctx context.Context, req *http_model.AddYoungeeRequest) (string, string, error) {
+	db := GetReadDB(ctx)
+	project_type, task_type, platform, content_type, reason, cash := req.ProjectType, req.TaskType, req.Platform, req.ContentType, req.Reason, req.Cash
+	var IsExclusive gorm_model.InfoYoungeeStrategy
+	err := db.Where(" platform = ? ").First(&IsExclusive).Error
+	if err == nil {
+		return "该策略与已经运行的策略互斥,请修改相关字段后重新创建", "", nil
+	}
+	var newStrategy gorm_model.InfoYoungeeStrategy
+	var strategyInfo gorm_model.InfoYoungeeStrategy
+	getMonth := time.Now().Format("01") //获取月
+	getDay := time.Now().Day()          //获取日
+	dayString := ""
+	if getDay < 10 {
+		dayString = conv.MustString(getDay, "")
+		dayString = "0" + dayString
+	} else {
+		dayString = conv.MustString(getDay, "")
+	}
+	monthAndDay := conv.MustString(getMonth, "") + dayString
+	err = db.Where(fmt.Sprintf(" strategyId like '%s%%'", monthAndDay)).Last(&strategyInfo).Error
+
+	num := 1
+	if strategyInfo.StrategyId != "" {
+		num = conv.MustInt(strategyInfo.StrategyId[4:6], 0)
+		num = num + 1 //获取日
+	} else {
+		num = 1
+	}
+	numString := ""
+	if num < 10 {
+		numString = conv.MustString(num, "")
+		numString = "0" + numString
+	} else {
+		numString = conv.MustString(num, "")
+	}
+	newStrategy.StrategyId = monthAndDay + numString
+	newStrategy.Status = 0
+	newStrategy.ProjectType = conv.MustInt64(project_type, 0)
+	newStrategy.TaskType = conv.MustInt64(task_type, 0)
+	newStrategy.Platform = conv.MustInt64(platform, 0)
+	newStrategy.ContentType = conv.MustInt(content_type, 0)
+	newStrategy.Reason = conv.MustInt(reason, 0)
+	//newStrategy.Points = conv.MustFloat64(points, 0)
+	newStrategy.Cash = conv.MustFloat64(cash, 0)
+	newStrategy.CreateAt = time.Now()
+	err = db.Create(&newStrategy).Error
+	if err != nil {
+		return "创建失败", "", err
+	}
+	return "创建成功", monthAndDay + numString, nil
+}
+
 func SearchPricing(ctx context.Context, pageSize, pageNum int32, conditions *common_model.PricingConditions) ([]*gorm_model.InfoPricingStrategy, int64, error) {
 	db := GetReadDB(ctx)
 	db = db.Model(gorm_model.InfoPricingStrategy{})
@@ -118,6 +171,39 @@ func SearchPricing(ctx context.Context, pageSize, pageNum int32, conditions *com
 	return PricingDatas, total, nil
 }
 
+func SearchYoungee(ctx context.Context, pageSize, pageNum int32, conditions *common_model.YoungeeConditions) ([]*gorm_model.InfoYoungeeStrategy, int64, error) {
+	db := GetReadDB(ctx)
+	db = db.Model(gorm_model.InfoYoungeeStrategy{})
+	// 根据 查询条件过滤
+	conditionType := reflect.TypeOf(conditions).Elem()
+	conditionValue := reflect.ValueOf(conditions).Elem()
+	for i := 0; i < conditionType.NumField(); i++ {
+		field := conditionType.Field(i)
+		tag := field.Tag.Get("condition")
+		value := conditionValue.FieldByName(field.Name)
+		if !util.IsBlank(value) {
+			fmt.Println("tag:", tag)
+			db = db.Debug().Where(fmt.Sprintf("%s = ?", tag), value.Interface())
+		}
+	}
+	// 查询总数
+	var total int64
+	var YoungeeDatas []*gorm_model.InfoYoungeeStrategy
+	if err := db.Count(&total).Error; err != nil {
+		logrus.WithContext(ctx).Errorf("[SearchYoungee] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+	// 查询该页数据
+	limit := pageSize
+	offset := pageSize * pageNum // assert pageNum start with 0
+	err := db.Order("content_type desc").Limit(int(limit)).Offset(int(offset)).Find(&YoungeeDatas).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[SearchYoungee] error query mysql find, err:%+v", err)
+		return nil, 0, err
+	}
+	return YoungeeDatas, total, nil
+}
+
 func ModifyPricing(ctx context.Context, req *http_model.ModifyPricingRequest) (int, error) {
 	db := GetReadDB(ctx)
 	strategyId := req.StrategyId

+ 1 - 0
db/user.go

@@ -332,6 +332,7 @@ func AccountInfo(ctx context.Context, pageSize, pageNum int32, conditions *commo
 		accountInfo.BindDate = conv.MustString(PlatformAccountInfo.BindDate, "")[0:19]
 		accountInfo.Platform = consts.GetProjectPlatform(PlatformAccountInfo.PlatformID)
 		accountInfo.PlatformNickname = PlatformAccountInfo.PlatformNickname
+		accountInfo.PlatformType = PlatformAccountInfo.PlatformType
 		accountInfo.TalentId = PlatformAccountInfo.TalentID
 		accountInfo.Phone = phoneMap[PlatformAccountInfo.TalentID]
 		accountInfo.Fans = util.GetNumString(PlatformAccountInfo.FansCount)

+ 81 - 0
handler/operate/add_youngee.go

@@ -0,0 +1,81 @@
+package operate
+
+import (
+	"fmt"
+	"github.com/caixw/lib.go/conv"
+	"github.com/gin-gonic/gin"
+	"github.com/sirupsen/logrus"
+	"youngee_m_api/consts"
+	"youngee_m_api/db"
+	"youngee_m_api/model/http_model"
+	"youngee_m_api/util"
+)
+
+func WrapAddYoungeeHandler(ctx *gin.Context) {
+	handler := newYoungeeHandler(ctx)
+	BaseRun(handler)
+}
+
+type YoungeeHandler struct {
+	req  *http_model.AddYoungeeRequest
+	resp *http_model.CommonResponse
+	ctx  *gin.Context
+}
+
+func newYoungeeHandler(ctx *gin.Context) *YoungeeHandler {
+	return &YoungeeHandler{
+		req:  http_model.NewAddYoungeeRequest(),
+		resp: http_model.NewAddYoungeeResponse(),
+		ctx:  ctx,
+	}
+}
+
+func (p YoungeeHandler) getContext() *gin.Context {
+	return p.ctx
+}
+
+func (p YoungeeHandler) getResponse() interface{} {
+	return p.resp
+}
+
+func (p YoungeeHandler) getRequest() interface{} {
+	return p.req
+}
+
+func (p YoungeeHandler) run() {
+	toast, strategyId, err := db.CreateYoungeeStrategy(p.ctx, p.req)
+	if err != nil {
+		// 数据库查询失败,返回5001
+		logrus.Errorf("[YoungeeHandler] call AddYoungee err:%+v\n", err)
+		util.HandlerPackErrorResp(p.resp, consts.ErrorInternal, "")
+		logrus.Info("YoungeeHandler fail,req:%+v", p.req)
+		return
+	}
+	if toast == "创建成功" {
+		p.resp.Message = "编号为" + strategyId + "的策略添加成功"
+	} else if toast == "该策略与已经运行的策略互斥,请修改相关字段后重新创建" {
+		p.resp.Status = 1
+	} else {
+		p.resp.Status = 2
+	}
+}
+
+func (p YoungeeHandler) checkParam() error {
+	var errs []error
+	p.req.ProjectType = util.IsNull(p.req.ProjectType)
+	if _, err := conv.Int64(p.req.ProjectType); err != nil {
+		errs = append(errs, err)
+	}
+	p.req.Platform = util.IsNull(p.req.Platform)
+	if _, err := conv.Int64(p.req.Platform); err != nil {
+		errs = append(errs, err)
+	}
+	p.req.TaskType = util.IsNull(p.req.TaskType)
+	if _, err := conv.Int64(p.req.TaskType); err != nil {
+		errs = append(errs, err)
+	}
+	if len(errs) != 0 {
+		return fmt.Errorf("check param errs:%+v", errs)
+	}
+	return nil
+}

+ 81 - 0
handler/operate/search_youngee.go

@@ -0,0 +1,81 @@
+package operate
+
+import (
+	"errors"
+	"fmt"
+	"github.com/caixw/lib.go/conv"
+	"github.com/gin-gonic/gin"
+	"github.com/sirupsen/logrus"
+	"youngee_m_api/consts"
+	"youngee_m_api/model/http_model"
+	"youngee_m_api/pack"
+	"youngee_m_api/service"
+	"youngee_m_api/util"
+)
+
+func WrapSearchYoungeeHandler(ctx *gin.Context) {
+	handler := newSearchYoungee(ctx)
+	BaseRun(handler)
+}
+
+type SearchYoungeeHandler struct {
+	req  *http_model.SearchYoungeeRequest
+	resp *http_model.CommonResponse
+	ctx  *gin.Context
+}
+
+func newSearchYoungee(ctx *gin.Context) *SearchYoungeeHandler {
+	return &SearchYoungeeHandler{
+		req:  http_model.NewSearchYoungeeRequest(),
+		resp: http_model.NewSearchYoungeeResponse(),
+		ctx:  ctx,
+	}
+}
+
+func (s SearchYoungeeHandler) getContext() *gin.Context {
+	return s.ctx
+}
+
+func (s SearchYoungeeHandler) getResponse() interface{} {
+	return s.resp
+}
+
+func (s SearchYoungeeHandler) getRequest() interface{} {
+	return s.req
+}
+
+func (s SearchYoungeeHandler) run() {
+	conditions := pack.HttpYoungeeRequestToConditions(s.req)
+	fmt.Println(conditions)
+	data, err := service.Operate.SearchYoungee(s.ctx, s.req.PageSize, s.req.PageNum, conditions)
+	if err != nil {
+		logrus.WithContext(s.ctx).Errorf("[SearchYoungeeHandler] error SearchYoungee , err:%+v", err)
+		util.HandlerPackErrorResp(s.resp, consts.ErrorInternal, consts.DefaultToast)
+		return
+	}
+	s.resp.Data = data
+}
+
+func (s SearchYoungeeHandler) checkParam() error {
+	var errs []error
+	if s.req.PageNum < 0 || s.req.PageSize <= 0 {
+		errs = append(errs, errors.New("page param error"))
+	}
+	s.req.PageNum--
+	s.req.Platform = util.IsNull(s.req.Platform)
+	if _, err := conv.Int64(s.req.Platform); err != nil {
+		errs = append(errs, err)
+	}
+	s.req.TaskType = util.IsNull(s.req.TaskType)
+	if _, err := conv.Int64(s.req.TaskType); err != nil {
+		errs = append(errs, err)
+	}
+	s.req.ProjectType = util.IsNull(s.req.ProjectType)
+	if _, err := conv.Int64(s.req.ProjectType); err != nil {
+		errs = append(errs, err)
+	}
+	if len(errs) != 0 {
+		return fmt.Errorf("check param errs:%+v", errs)
+	}
+	return nil
+}

+ 8 - 0
model/common_model/youngee_conditions.go

@@ -0,0 +1,8 @@
+package common_model
+
+type YoungeeConditions struct {
+	ProjectType int64 `condition:"project_type"` // 项目类型
+	TaskType    int64 `condition:"task_type"`    // 任务形式
+	Platform    int64 `condition:"platform"`     // 社媒平台
+	ContentType int64 `condition:"content_type"` // 内容形式
+}

+ 25 - 0
model/gorm_model/info_youngee_strategy.go

@@ -0,0 +1,25 @@
+package gorm_model
+
+import (
+	"time"
+)
+
+type InfoYoungeeStrategy struct {
+	ID          int     `gorm:"column:id;primary_key;AUTO_INCREMENT"` //  id
+	ProjectType int64   `gorm:"column:project_type;NOT NULL"`         // 项目类型,0表示不限,1为全流程项目,2为选品项目
+	StrategyId  string  `gorm:"column:strategyId;NOT NULL"`           // 定价策略编号
+	Platform    int64   `gorm:"column:platform;NOT NULL"`             // 项目平台,1-7分别代表小红书、抖音、微博、快手、b站、大众点评、知乎
+	TaskType    int64   `gorm:"column:task_type;NOT NULL"`            // 任务形式,实体商品寄拍、虚拟产品测评、线下探店打卡、悬赏任务、纯佣带货
+	ContentType int     `gorm:"column:content_type;NOT NULL"`         // 内容形式 图文、视频、直播
+	Reason      int     `gorm:"column:reason"`                        // 奖励原因,成团-新用户、成团-老用户、成单-申请成功、成单-结案完毕;
+	Points      float64 `gorm:"column:points;NOT NULL"`               // 积分奖励
+
+	Cash float64 `gorm:"column:cash"` // 现金奖励
+
+	Status   int       `gorm:"column:status"`             // '定价策略当前状态,0表示正常,1表示禁用',
+	CreateAt time.Time `gorm:"column:create_at;NOT NULL"` // 创建时间
+}
+
+func (m *InfoYoungeeStrategy) TableName() string {
+	return "info_youngee_strategy"
+}

+ 1 - 0
model/gorm_model/platform_account_info.go

@@ -10,6 +10,7 @@ type YoungeePlatformAccountInfo struct {
 	TalentID           string    `gorm:"column:talent_id;NOT NULL"`             // 达人账号id(youngee_talent_info表id值)
 	PlatformID         int64     `gorm:"column:platform_id;NOT NULL"`           // 平台id,与third_platform_info中的id相同
 	PlatformNickname   string    `gorm:"column:platform_nickname;NOT NULL"`     // 在平台上的昵称
+	PlatformType       string    `gorm:"column:platform_type"`                  // 标签及类型
 	HomePageUrl        string    `gorm:"column:home_page_url;NOT NULL"`         // 主页链接
 	FansCount          int64     `gorm:"column:fans_count;NOT NULL"`            // 粉丝数
 	HomePageCaptureUrl string    `gorm:"column:home_page_capture_url;NOT NULL"` // 主页截图链接

+ 1 - 1
model/http_model/GetSelectionInfoRequest.go

@@ -3,7 +3,7 @@ package http_model
 type GetSelectionInfoRequest struct {
 	PageSize     int32  `json:"page_size"`
 	PageNum      int32  `json:"page_num"`
-	EnterpriseId string `json:"enterprise_id"`
+	EnterpriseId int32  `json:"enterprise_id"`
 	UpdateAt     string `json:"updated_at"`
 }
 

+ 1 - 0
model/http_model/account_info.go

@@ -20,6 +20,7 @@ type AccountInfoData struct {
 	BindDate           string `json:"bind_date"`             // 绑定时间
 	HomePageCaptureUrl string `json:"home_page_capture_url"` //主页截图链接
 	HomePageUrl        string `json:"home_page_url"`         //主页链接
+	PlatformType       string `json:"platform_type"`         //标签及类型
 }
 
 type AccountInfoPreView struct {

+ 23 - 0
model/http_model/add_youngee.go

@@ -0,0 +1,23 @@
+package http_model
+
+type AddYoungeeRequest struct {
+	ProjectType string `json:"project_type"` //项目类型
+	TaskType    string `json:"task_type"`    //任务形式
+	Platform    string `json:"platform"`     //社媒平台
+	ContentType string `json:"content_type"` //内容形式
+	Reason      string `json:"reason"`       //奖励原因
+	//Points      float32 `json:"points"`       //积分奖励
+	Cash int64 `json:"cash"` //现金奖励
+}
+
+type AddYoungeeResponse struct {
+}
+
+func NewAddYoungeeRequest() *AddYoungeeRequest {
+	return new(AddYoungeeRequest)
+}
+
+func NewAddYoungeeResponse() *CommonResponse {
+	resp := new(CommonResponse)
+	return resp
+}

+ 38 - 0
model/http_model/seach_youngee.go

@@ -0,0 +1,38 @@
+package http_model
+
+type SearchYoungeeRequest struct {
+	PageSize    int32  `json:"page_size"`
+	PageNum     int32  `json:"page_num"`
+	ProjectType string `json:"project_type"` // 项目类型
+	TaskType    string `json:"task_type"`    // 任务形式
+	Platform    string `json:"platform"`     // 社媒平台
+	ContentType string `json:"content_type"` // 内容形式
+}
+
+type SearchYoungeePreview struct {
+	ID          string `json:"id"`           // 编号
+	StrategyId  string `json:"strategyId"`   // 定价策略编号
+	ProjectType string `json:"project_type"` // 项目类型
+	Platform    string `json:"platform"`     // 社媒平台
+	TaskType    string `json:"task_type"`    // 任务形式
+	ContentType string `json:"content_type"` // 内容形式
+	Reason      string `json:"reason"`       // 奖励原因
+	Points      string `json:"points"`       // 积分奖励
+	Cash        string `json:"cash"`         // 现金奖励
+	Createat    string `json:"create_at"`    // 更新时间
+}
+
+type SearchYoungeeData struct {
+	SearchYoungeePreview []*SearchYoungeePreview `json:"search_Youngee_preview"`
+	Total                string                  `json:"total"`
+}
+
+func NewSearchYoungeeRequest() *SearchYoungeeRequest {
+	return new(SearchYoungeeRequest)
+}
+
+func NewSearchYoungeeResponse() *CommonResponse {
+	resp := new(CommonResponse)
+	resp.Data = new(SearchYoungeePreview)
+	return resp
+}

+ 44 - 0
pack/operate.go

@@ -19,6 +19,15 @@ func HttpPricingRequestToConditions(req *http_model.SearchPricingRequest) *commo
 	}
 }
 
+func HttpYoungeeRequestToConditions(req *http_model.SearchYoungeeRequest) *common_model.YoungeeConditions {
+	return &common_model.YoungeeConditions{
+		ProjectType: conv.MustInt64(req.ProjectType, 0),
+		TaskType:    conv.MustInt64(req.TaskType, 0),
+		Platform:    conv.MustInt64(req.Platform, 0),
+		ContentType: conv.MustInt64(req.ContentType, 0),
+	}
+}
+
 func GormSearchPricingDataToHttpData(gormPricings []*gorm_model.InfoPricingStrategy) []*http_model.SearchPricingPreview {
 	var httpPricingPreviews []*http_model.SearchPricingPreview
 	for _, gormPricing := range gormPricings {
@@ -28,6 +37,41 @@ func GormSearchPricingDataToHttpData(gormPricings []*gorm_model.InfoPricingStrat
 	return httpPricingPreviews
 }
 
+func GormSearchYoungeeDataToHttpData(gormYoungees []*gorm_model.InfoYoungeeStrategy) []*http_model.SearchYoungeePreview {
+	var httpYoungeePreviews []*http_model.SearchYoungeePreview
+	for _, gormYoungee := range gormYoungees {
+		httpYoungeePreview := MGromSearchYoungeeDataToHttpData(gormYoungee)
+		httpYoungeePreviews = append(httpYoungeePreviews, httpYoungeePreview)
+	}
+	return httpYoungeePreviews
+}
+
+func MGromSearchYoungeeDataToHttpData(gormYoungee *gorm_model.InfoYoungeeStrategy) *http_model.SearchYoungeePreview {
+	updatedTime := conv.MustString(gormYoungee.CreateAt, "")
+	updatedTime = updatedTime[0:19]
+	//if gormYoungee.FansLow == 0 && gormYoungee.FansUp == 0 {
+	//	fans = "不限"
+	//} else if gormYoungee.FansLow == 0 && gormYoungee.FansUp != 0 {
+	//	fans = util.GetNumString(gormYoungee.FansUp) + "以下"
+	//} else if gormYoungee.FansLow != 0 && gormYoungee.FansUp != 0 {
+	//	fans = util.GetNumString(gormYoungee.FansLow) + "-" + util.GetNumString(gormYoungee.FansUp)
+	//} else if gormYoungee.FansLow != 0 && gormYoungee.FansUp == 0 {
+	//	fans = util.GetNumString(gormYoungee.FansLow) + "以上"
+	//}
+	return &http_model.SearchYoungeePreview{
+		ID:          conv.MustString(gormYoungee.ID, ""),
+		StrategyId:  gormYoungee.StrategyId,
+		ProjectType: consts.GetProjectType(gormYoungee.ProjectType),
+		Platform:    consts.GetProjectPlatform(gormYoungee.Platform),
+		TaskType:    consts.GetTaskType(gormYoungee.TaskType),
+		ContentType: consts.GetContentType(gormYoungee.ContentType),
+		Reason:      consts.GetReason(gormYoungee.Reason),
+		Points:      conv.MustString(gormYoungee.Points, ""),
+		Cash:        conv.MustString(gormYoungee.Cash/1, "") + "%",
+		Createat:    updatedTime,
+	}
+}
+
 func MGromSearchPricingDataToHttpData(gormPricing *gorm_model.InfoPricingStrategy) *http_model.SearchPricingPreview {
 	updatedTime := conv.MustString(gormPricing.UpdateAt, "")
 	updatedTime = updatedTime[0:19]

+ 8 - 5
route/init.go

@@ -118,20 +118,23 @@ func InitRoute(r *gin.Engine) {
 		u.POST("/creatorList", handler.WrapCreatorListHandler)            // 查找创作者信息
 		u.POST("/platformAccInfo", handler.WrapPlatformAccInfoHandler)    // 平台信息
 		u.POST("/talentInfo", handler.WrapTalentInfoHandler)              // 达人信息
-		u.POST("/accountInfo", handler.WrapAccountInfoHandler)            // 达人端账号信息
+		u.POST("/accountInfo", handler.WrapAccountInfoHandler)            // 账号仓库-达人端账号信息
 		u.POST("/deleteAccount", handler.WrapDeleteAccountHandler)        // 解绑达人端账号
 		u.POST("/getTaskRecord", handler.WrapGetTaskRecordHandler)        // 创作者详细-任务记录
 		u.POST("/getYoungeeRecord", handler.WrapGetYoungeeRecordsHandler) // 创作者详细-youngee记录
 		u.POST("/modifyAccInfo", handler.WrapModifyAccInfoHandler)        // 更新用户账号信息
 		u.POST("/block", handler.WrapBlockHandler)                        // 创作者用户拉黑与还原
-		u.POST("/getSelectionInfo", handler.WrapGetSelectionInfoHandler)  // 用户管理选品记录
+		u.POST("/getSelectionInfo", handler.WrapGetSelectionInfoHandler)  // 商家用户管理-选品记录
 	}
 	o := r.Group("/youngee/m/operate")
 	{
 		o.Use(middleware.LoginAuthMiddleware)
-		o.POST("/addPricing", operate.WrapAddPricingHandler)
-		o.POST("/searchPricing", operate.WrapSearchPricingHandler)
-		o.POST("/modifyPricing", operate.WrapModifyPricingHandler)
+		o.POST("/addPricing", operate.WrapAddPricingHandler)       //生成定价策略
+		o.POST("/addYoungee", operate.WrapAddYoungeeHandler)       //生成youngee策略
+		o.POST("/searchPricing", operate.WrapSearchPricingHandler) //查询定价管理列表
+		o.POST("/searchYoungee", operate.WrapSearchYoungeeHandler) //查询youngee管理列表
+		o.POST("/modifyPricing", operate.WrapModifyPricingHandler) //修改定价策略
+		//o.POST("/modifyYoungee", operate.WrapModifyYoungeeHandler) //修改样之团策略
 		o.POST("/signInOffline", operate.WrapSignInOfflineHandler)
 		o.POST("/signInVirtual", operate.WrapSignInVirtualHandler)
 		o.POST("/autoReview", operate.WrapAutoReviewHandler)

+ 12 - 0
service/operate.go

@@ -26,3 +26,15 @@ func (*operate) SearchPricing(ctx context.Context, pagesize, pagenum int32, cond
 	searchPricingData.Total = conv.MustString(total, "")
 	return searchPricingData, nil
 }
+
+func (*operate) SearchYoungee(ctx context.Context, pagesize, pagenum int32, conditions *common_model.YoungeeConditions) (*http_model.SearchYoungeeData, error) {
+	searchYoungees, total, err := db.SearchYoungee(ctx, pagesize, pagenum, conditions)
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[operate service] call SearchYoungee error,err:%+v", err)
+		return nil, err
+	}
+	searchYoungeeData := new(http_model.SearchYoungeeData)
+	searchYoungeeData.SearchYoungeePreview = pack.GormSearchYoungeeDataToHttpData(searchYoungees)
+	searchYoungeeData.Total = conv.MustString(total, "")
+	return searchYoungeeData, nil
+}