mirror of
https://github.com/ZSCNetSupportDept/WechatTicketSystem.git
synced 2025-11-01 10:56:17 +08:00
Using wechat web brower to register.
This commit is contained in:
@@ -29,7 +29,7 @@ public class CommandMatcher implements WxMpMessageMatcher {
|
||||
if (inCmdUsers.containsKey(fromUser)) {
|
||||
return command == inCmdUsers.get(fromUser);
|
||||
} else {
|
||||
return message.getContent().matches(command.getRegex());
|
||||
return message.getContent().matches(command.regex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package love.sola.netsupport.wechat.matcher;
|
||||
|
||||
import love.sola.netsupport.pojo.User;
|
||||
import love.sola.netsupport.sql.TableUser;
|
||||
import me.chanjar.weixin.mp.api.WxMpMessageMatcher;
|
||||
import me.chanjar.weixin.mp.bean.WxMpXmlMessage;
|
||||
|
||||
/**
|
||||
* ***********************************************
|
||||
* Created by Sola on 2015/11/26.
|
||||
* Don't modify this source without my agreement
|
||||
* ***********************************************
|
||||
*/
|
||||
public class RegisterMatcher implements WxMpMessageMatcher {
|
||||
|
||||
@Override
|
||||
public boolean match(WxMpXmlMessage message) {
|
||||
String fromUser = message.getFromUserName();
|
||||
User u = TableUser.getUserByWechat(fromUser);
|
||||
return u == null;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user