|
@@ -1,19 +1,24 @@
|
|
package com.iamberry.rst.controllers.wechat;
|
|
package com.iamberry.rst.controllers.wechat;
|
|
|
|
|
|
|
|
+import com.iamberry.wechat.core.entity.WechatUtils;
|
|
import com.iamberry.wechat.tools.ResponseJson;
|
|
import com.iamberry.wechat.tools.ResponseJson;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
|
+
|
|
@Controller
|
|
@Controller
|
|
@RequestMapping("/wechat/getTest")
|
|
@RequestMapping("/wechat/getTest")
|
|
public class TestController {
|
|
public class TestController {
|
|
|
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
@RequestMapping(value = "/test")
|
|
@RequestMapping(value = "/test")
|
|
- public ResponseJson updateApplyPick(
|
|
|
|
|
|
+ public ResponseJson updateApplyPick(HttpServletRequest request
|
|
) throws Exception {
|
|
) throws Exception {
|
|
- ResponseJson rj =new ResponseJson(200, "修改成功", 200);
|
|
|
|
|
|
+
|
|
|
|
+ String openId = WechatUtils.getUserBySession(request).getUserOpenid();
|
|
|
|
+ ResponseJson rj =new ResponseJson(200, "测试成功+"+openId, 200);
|
|
return rj;
|
|
return rj;
|
|
}
|
|
}
|
|
|
|
|