创建聊天组
This commit is contained in:
@@ -251,7 +251,7 @@ func CreateUser(user *model.User, creatorName string) (err error) {
|
||||
dao.WrapAddIDCULDEntity(user, creatorName)
|
||||
user.UserID = utils.GetUUID()
|
||||
user.Status = model.UserStatusNormal
|
||||
user.DividePercentage = 1
|
||||
// user.DividePercentage = 1
|
||||
return dao.CreateEntity(nil, user)
|
||||
}
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ func GetOperateEvents(ctx *jxcontext.Context, name string, apiFunctions []string
|
||||
return pageInfo, err
|
||||
}
|
||||
|
||||
func CreateMessageGroup(ctx *jxcontext.Context, userID, userID2, groupName string, dividePercentage int) (messageGroupResult *dao.GetMessageGroupsResult, err error) {
|
||||
func CreateMessageGroup(ctx *jxcontext.Context, userID, userID2, groupName string, dividePercentage, quitPrice int) (messageGroupResult *dao.GetMessageGroupsResult, err error) {
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
groupID int
|
||||
@@ -190,6 +190,11 @@ func CreateMessageGroup(ctx *jxcontext.Context, userID, userID2, groupName strin
|
||||
Type: model.GroupTypeMulit,
|
||||
MaxCount: 50,
|
||||
DividePercentage: dividePercentage,
|
||||
QuitPrice: quitPrice,
|
||||
}
|
||||
user, err := dao.GetUserByID(db, "user_id", userID)
|
||||
if groupName == "" {
|
||||
messageGroup.Name = user.Name + "的集团"
|
||||
}
|
||||
dao.WrapAddIDCULDEntity(messageGroup, ctx.GetUserName())
|
||||
dao.CreateEntity(db, messageGroup)
|
||||
|
||||
Reference in New Issue
Block a user