This commit is contained in:
suyl
2021-08-17 16:57:53 +08:00
parent 16315d5e83
commit ffd8030136

View File

@@ -451,7 +451,6 @@ func DisableUser(ctx *jxcontext.Context, userID string) (err error) {
func OnDingDingMsg(msg map[string]interface{}) (callbackResponse *dingdingapi.CallbackResponse) { func OnDingDingMsg(msg map[string]interface{}) (callbackResponse *dingdingapi.CallbackResponse) {
eventType := utils.Interface2String(msg[dingdingapi.KeyEventType]) eventType := utils.Interface2String(msg[dingdingapi.KeyEventType])
globals.SugarLogger.Debugf("dingding msg 2:%s", utils.Format4Output(msg, false))
if eventType == dingdingapi.CBTagUserLeaveOrg { if eventType == dingdingapi.CBTagUserLeaveOrg {
var ( var (
authBind *model.AuthBind authBind *model.AuthBind
@@ -1105,7 +1104,7 @@ func DeleteUserInfo(ctx *jxcontext.Context, userID string) (err error) {
SET t1.market_man_phone = '' SET t1.market_man_phone = ''
WHERE t2.id IS NULL WHERE t2.id IS NULL
` `
_, err = dao.ExecuteSQL(db, sql2, nil) _, err = dao.ExecuteSQL(db, sql2)
/* 删除离职人员门店运营人员 */ /* 删除离职人员门店运营人员 */
sql3 := ` sql3 := `
@@ -1114,7 +1113,7 @@ func DeleteUserInfo(ctx *jxcontext.Context, userID string) (err error) {
SET t1.operator_phone = '' SET t1.operator_phone = ''
WHERE t2.id IS NULL WHERE t2.id IS NULL
` `
_, err = dao.ExecuteSQL(db, sql3, nil) _, err = dao.ExecuteSQL(db, sql3)
/* 删除离职人员门店运营人员 */ /* 删除离职人员门店运营人员 */
sql4 := ` sql4 := `
@@ -1123,7 +1122,7 @@ func DeleteUserInfo(ctx *jxcontext.Context, userID string) (err error) {
SET t1.operator_phone2 = '' SET t1.operator_phone2 = ''
WHERE t2.id IS NULL WHERE t2.id IS NULL
` `
_, err = dao.ExecuteSQL(db, sql4, nil) _, err = dao.ExecuteSQL(db, sql4)
/*删除离职人员的角色信息*/ /*删除离职人员的角色信息*/
sql5 := ` sql5 := `
@@ -1132,7 +1131,7 @@ func DeleteUserInfo(ctx *jxcontext.Context, userID string) (err error) {
LEFT JOIN user t2 ON t2.user_id = t1.v0 AND t2.status <> 0 LEFT JOIN user t2 ON t2.user_id = t1.v0 AND t2.status <> 0
WHERE t2.id IS NULL WHERE t2.id IS NULL
` `
_, err = dao.ExecuteSQL(db, sql5, nil) _, err = dao.ExecuteSQL(db, sql5)
//删除token //删除token
tokens, err := api.Cacher.Keys("TOKEN.V2." + userID + "*") tokens, err := api.Cacher.Keys("TOKEN.V2." + userID + "*")