Using wechat web brower to register.

This commit is contained in:
Sola
2015-12-02 04:18:49 +08:00
parent 21d7c44e7e
commit 8d9b8da42f
22 changed files with 1049 additions and 236 deletions

View File

@@ -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);
}
}

View File

@@ -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;
}
}