mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-01-05 03:19:01 +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)
|
gidstr := strconv.FormatInt(gid, 10)
|
||||||
husbandstr := strconv.FormatInt(husband, 10)
|
husbandstr := strconv.FormatInt(husband, 10)
|
||||||
// 先判断用户是否存在
|
// 先判断用户是否存在
|
||||||
err := sql.db.Del(gidstr, "where target = "+husbandstr)
|
err := sql.db.Del(gidstr, "where user = "+husbandstr)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,10 +135,10 @@ func (sql *婚姻登记) 复婚(gid, uid, target int64, username, targetname str
|
|||||||
tagstr := strconv.FormatInt(target, 10)
|
tagstr := strconv.FormatInt(target, 10)
|
||||||
var info userinfo
|
var info userinfo
|
||||||
err := sql.db.Find(gidstr, &info, "where user = "+uidstr)
|
err := sql.db.Find(gidstr, &info, "where user = "+uidstr)
|
||||||
if err == nil {
|
if err != nil {
|
||||||
err = sql.db.Find(gidstr, &info, "where user = "+tagstr)
|
err = sql.db.Find(gidstr, &info, "where user = "+tagstr)
|
||||||
}
|
}
|
||||||
if err == nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
updatetime := time.Now().Format("2006/01/02")
|
updatetime := time.Now().Format("2006/01/02")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user