|
@@ -114,6 +114,11 @@ public class WxMessageEvenServiceImpl implements IWxMessageEvenService {
|
|
JSONObject jsonStr = JSONObject.parseObject(wxTicketResult);
|
|
JSONObject jsonStr = JSONObject.parseObject(wxTicketResult);
|
|
log.info("---------ticket-------" + jsonStr);
|
|
log.info("---------ticket-------" + jsonStr);
|
|
|
|
|
|
|
|
+ //获取用户信息
|
|
|
|
+ String userInfoResult = wxSendService.userInfo(token, fromUserName, "zh_CN");
|
|
|
|
+ JSONObject userInfo = JSONObject.parseObject(userInfoResult);
|
|
|
|
+ log.info("---------userInfo-------" + userInfo);
|
|
|
|
+
|
|
//根据ticket生成二维码图片存储
|
|
//根据ticket生成二维码图片存储
|
|
File ticketFile = QrCodeUtil.generate(
|
|
File ticketFile = QrCodeUtil.generate(
|
|
jsonStr.getString("url"), //二维码内容
|
|
jsonStr.getString("url"), //二维码内容
|
|
@@ -133,7 +138,7 @@ public class WxMessageEvenServiceImpl implements IWxMessageEvenService {
|
|
ImgUtil.pressText(
|
|
ImgUtil.pressText(
|
|
FileUtil.file(ticketPath+fromUserName+"_img.jpg"),
|
|
FileUtil.file(ticketPath+fromUserName+"_img.jpg"),
|
|
FileUtil.file(ticketPath+fromUserName+"_text.jpg"),
|
|
FileUtil.file(ticketPath+fromUserName+"_text.jpg"),
|
|
- "金牌车教", Color.red, //文字
|
|
|
|
|
|
+ userInfo.getString("nickname"), Color.red, //文字
|
|
new Font("黑体", Font.BOLD, 50), //字体
|
|
new Font("黑体", Font.BOLD, 50), //字体
|
|
0, //x坐标修正值。 默认在中间,偏移量相对于中间偏移
|
|
0, //x坐标修正值。 默认在中间,偏移量相对于中间偏移
|
|
400, //y坐标修正值。 默认在中间,偏移量相对于中间偏移
|
|
400, //y坐标修正值。 默认在中间,偏移量相对于中间偏移
|