Commit cdb3f28d authored by chenweijian's avatar chenweijian

加入家族审核

parent c2492d28
......@@ -80,3 +80,11 @@ func OptGroupPowerApplyList(model *domain.Model, familyId uint64, pageSize, page
nextIdx, hasNext := common.PageNext(count, pageIndex, pageSize)
return rows, nextIdx, hasNext, nil
}
func DelGroupPowerApplyJoinNoDeal(model *domain.Model, userId uint64) error {
err := model.Db.Exec("delete from group_power_apply_join where user_id=? and is_accept = 0", userId).Error
if err != nil {
return myerr.WrapErr(err)
}
return nil
}
......@@ -1095,6 +1095,12 @@ func GroupPowerApplyPass(c *gin.Context) (*mycontext.MyContext, error) {
if err != nil {
return err
}
// 删除他在其他家族未处理的申请
err = groupPower_m.DelGroupPowerApplyJoinNoDeal(model, userId)
if err != nil {
return err
}
return nil
})
if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment