mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-24 10:40:09 +08:00
修复群老婆闹离婚成功但实际没离问题 (#330)
This commit is contained in:
parent
4a1d4644ed
commit
31555cbf2f
@ -123,7 +123,7 @@ func (sql *婚姻登记) 离婚休夫(gid, husband int64) error {
|
||||
gidstr := strconv.FormatInt(gid, 10)
|
||||
husbandstr := strconv.FormatInt(husband, 10)
|
||||
// 先判断用户是否存在
|
||||
err := sql.db.Del(gidstr, "where target = "+husbandstr)
|
||||
err := sql.db.Del(gidstr, "where user = "+husbandstr)
|
||||
return err
|
||||
}
|
||||
|
||||
@ -135,10 +135,10 @@ func (sql *婚姻登记) 复婚(gid, uid, target int64, username, targetname str
|
||||
tagstr := strconv.FormatInt(target, 10)
|
||||
var info userinfo
|
||||
err := sql.db.Find(gidstr, &info, "where user = "+uidstr)
|
||||
if err == nil {
|
||||
if err != nil {
|
||||
err = sql.db.Find(gidstr, &info, "where user = "+tagstr)
|
||||
}
|
||||
if err == nil {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
updatetime := time.Now().Format("2006/01/02")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user