You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
877 B
33 lines
877 B
package user
|
|
|
|
import (
|
|
"yunyan/comm"
|
|
"yunyan/lego/sys/mysql"
|
|
"yunyan/pb"
|
|
)
|
|
|
|
// @Summary 获取渠道包信息
|
|
// @Description 获取渠道包信息
|
|
// @Tags User
|
|
// @Accept json
|
|
// @Produce json
|
|
// @Param user body pb.UserGetChannelAppReq true "获取渠道包信息"
|
|
// @Success 200 {object} comm.HttpResult{data=pb.UserGetChannelAppResp} "成功返回"
|
|
// @Router /api/home/user_getchannelapp [post]
|
|
func (this *apiComp) GetChannelApp(session comm.IUserSession, req *pb.UserGetChannelAppReq) (resp *pb.UserGetChannelAppResp, errdata *pb.ErrorData) {
|
|
var (
|
|
model *pb.DBChannelApp
|
|
err error
|
|
)
|
|
if model, err = this.module.model.getChannelApp(req.Channel); err != nil && err != mysql.ErrNoDocuments {
|
|
errdata = &pb.ErrorData{
|
|
Code: pb.ErrorCode_DBError,
|
|
Message: err.Error(),
|
|
}
|
|
return
|
|
}
|
|
resp = &pb.UserGetChannelAppResp{
|
|
App: model,
|
|
}
|
|
return
|
|
}
|
|
|