/** * 创建成员 */ public void createUser() { String json = "{\"userid\": \"Javen205\"," + "\"name\": \"Javen205\"," + "\"department\": [3]," + "\"position\": \"产品经理\"," + "\"mobile\": \"\"," + "\"gender\": \"1\"," + "\"email\": \"\"," + "\"weixinid\": \"Javen205\"," // +"\"avatar_mediaid\": // \"2-G6nrLmr5EC3MNb_-zL1dDdzkd0p7cNliYu9V5w7o8K0\"," + "\"extattr\": {\"attrs\":[{\"name\":\"爱好\",\"value\":\"旅游\"},{\"name\":\"卡号\",\"value\":\"1234567234\"}]}}"; System.out.println(json); ApiResult apiResult = ConUserApi.createUser(json); renderText(apiResult.getJson()); }
上面是代码原本的,需要运行创建新成员。
public static void main(String[] args) { JFinal.start("src/main/webapp", 8080, "/", 5);//启动配置项 }
然后这个运行后出现了
Starting JFinal 3.1
Starting scanner at interval of 5 seconds.
Starting web server on port: 8080
Starting Complete. Welcome To The JFinal World :)
然后不知道第一段代码应该放到什么地方运行,然后在企业微信里面可以创建新成员,但是不知道放在那里运行。
也许是个特别简单的问题,刚刚做这个企业微信,求帮助,谢谢!
https://gitee.com/jfinal/jfinal-weixin/tree/master/src/main/java/com/jfinal/weixin/demo