|
@@ -22,8 +22,10 @@ import com.ylx.framework.manager.AsyncManager;
|
|
import com.ylx.framework.manager.factory.AsyncFactory;
|
|
import com.ylx.framework.manager.factory.AsyncFactory;
|
|
import com.ylx.framework.web.service.WxTokenService;
|
|
import com.ylx.framework.web.service.WxTokenService;
|
|
import com.ylx.massage.domain.CouponReceive;
|
|
import com.ylx.massage.domain.CouponReceive;
|
|
|
|
+import com.ylx.massage.domain.TJs;
|
|
import com.ylx.massage.domain.TWxUser;
|
|
import com.ylx.massage.domain.TWxUser;
|
|
import com.ylx.massage.service.CouponReceiveService;
|
|
import com.ylx.massage.service.CouponReceiveService;
|
|
|
|
+import com.ylx.massage.service.TJsService;
|
|
import com.ylx.massage.service.TWxUserService;
|
|
import com.ylx.massage.service.TWxUserService;
|
|
import com.ylx.massage.service.TbFileService;
|
|
import com.ylx.massage.service.TbFileService;
|
|
import com.ylx.massage.utils.DateTimeUtils;
|
|
import com.ylx.massage.utils.DateTimeUtils;
|
|
@@ -96,7 +98,8 @@ public class WeChatController extends BaseController {
|
|
@Autowired
|
|
@Autowired
|
|
private TbFileService tbFileService;
|
|
private TbFileService tbFileService;
|
|
|
|
|
|
-
|
|
|
|
|
|
+ @Resource
|
|
|
|
+ private TJsService jsService;
|
|
@Autowired
|
|
@Autowired
|
|
private RedisCache redisCache;
|
|
private RedisCache redisCache;
|
|
|
|
|
|
@@ -376,6 +379,25 @@ public class WeChatController extends BaseController {
|
|
return weChatUtil.getTicket(token, openId);
|
|
return weChatUtil.getTicket(token, openId);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @ApiOperation("获取JS公众号二维码")
|
|
|
|
+ @RequestMapping(value = "getJSwxQrCode", method = RequestMethod.GET)
|
|
|
|
+ public void getJSwxQrCode(@RequestParam String jsId) {
|
|
|
|
+ //获取access_token
|
|
|
|
+ String token = weChatUtil.getToken();
|
|
|
|
+ //获取的二维码ticket
|
|
|
|
+ Map<?, ?> jsTicket = weChatUtil.getJsTicket(token, jsId);
|
|
|
|
+
|
|
|
|
+ //获取的二维码ticket
|
|
|
|
+ //获取二维码图片
|
|
|
|
+ //String qrCodeUrl = "https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=" + ticket;
|
|
|
|
+ //获取二维码图片
|
|
|
|
+ //File file = QrCodeUtil.generate(qrCodeUrl, config, FileUtil.file(RuoYiConfig.getUploadPath() + "/code.png"));
|
|
|
|
+ TJs tjs = new TJs();
|
|
|
|
+ tjs.setTicket(jsTicket.get("ticket").toString());
|
|
|
|
+ jsService.updateById(tjs);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
@ApiOperation("获取公众号网页二维码")
|
|
@ApiOperation("获取公众号网页二维码")
|
|
@GetMapping("/getweQrCode")
|
|
@GetMapping("/getweQrCode")
|
|
public AjaxResult weiXinLogin1(String openId) {
|
|
public AjaxResult weiXinLogin1(String openId) {
|