| @@ -67,19 +67,17 @@ public class WxAppinfoController extends BaseController { | |||
| public void run() { | |||
| String param = merchant.getWeappScene(); | |||
| if(StringUtils.isBlank(merchant.getQrCode())){ | |||
| ResultData resultData = qrCodeService.uploadQrcode(merchant, 1, pageUrl, param, 0, "", "", "WX店铺"+merchant.getId().toString(),EnumAppPlat.WX); | |||
| Map<String, String> map = (Map) resultData.data; | |||
| if(map != null && map.get("url") != null) { | |||
| String url = map.get("url"); | |||
| merchant.setQrCode(url); | |||
| ResultData wxQrCode = qrCodeService.uploadQrcode(merchant, 1, pageUrl, param, 0, "", "", "WX店铺"+merchant.getId().toString(),EnumAppPlat.WX); | |||
| Map<String, String> wxMap = (Map) wxQrCode.data; | |||
| if(wxMap != null && wxMap.get("url") != null) { | |||
| merchant.setQrCode(wxMap.get("url")); | |||
| } | |||
| } | |||
| if(StringUtils.isBlank(merchant.getTtQrCode())){ | |||
| ResultData resultData = qrCodeService.uploadQrcode(merchant, 1, pageUrl, param, 0, "", "", "TT店铺"+merchant.getId().toString(),EnumAppPlat.TOUTIAO); | |||
| Map<String, String> map = (Map) resultData.data; | |||
| if(map != null && map.get("url") != null) { | |||
| String url = map.get("url"); | |||
| merchant.setTtQrCode(url); | |||
| ResultData ttQrCode = qrCodeService.uploadQrcode(merchant, 1, pageUrl, param, 0, "", "", "TT店铺"+merchant.getId().toString(),EnumAppPlat.TOUTIAO); | |||
| Map<String, String> ttMap = (Map) ttQrCode.data; | |||
| if(ttMap != null && ttMap.get("url") != null) { | |||
| merchant.setTtQrCode(ttMap.get("url")); | |||
| } | |||
| } | |||
| wxMerchantMapper.updateById(merchant); | |||
| @@ -108,19 +106,17 @@ public class WxAppinfoController extends BaseController { | |||
| String param = couponChannel.getWeappScene(); | |||
| if(StringUtils.isBlank(couponChannel.getQrCode())){ | |||
| ResultData resultData = qrCodeService.uploadQrcode(couponChannel, 1, pageUrl, param, 0, "", "", "WX券"+couponChannel.getId().toString(),EnumAppPlat.WX); | |||
| Map<String, String> map = (Map) resultData.data; | |||
| if(map != null && map.get("url") != null) { | |||
| String url = map.get("url"); | |||
| couponChannel.setQrCode(url); | |||
| ResultData wxQrCode = qrCodeService.uploadQrcode(couponChannel, 1, pageUrl, param, 0, "", "", "WX券"+couponChannel.getId().toString(),EnumAppPlat.WX); | |||
| Map<String, String> wxMap = (Map) wxQrCode.data; | |||
| if(wxMap != null && wxMap.get("url") != null) { | |||
| couponChannel.setQrCode(wxMap.get("url")); | |||
| } | |||
| } | |||
| if(StringUtils.isBlank(couponChannel.getTtQrCode())){ | |||
| ResultData resultData = qrCodeService.uploadQrcode(couponChannel, 1, pageUrl, param, 0, "", "", "TT券"+couponChannel.getId().toString(),EnumAppPlat.TOUTIAO); | |||
| Map<String, String> map = (Map) resultData.data; | |||
| if(map != null && map.get("url") != null) { | |||
| String url = map.get("url"); | |||
| couponChannel.setTtQrCode(url); | |||
| ResultData ttQrCode = qrCodeService.uploadQrcode(couponChannel, 1, pageUrl, param, 0, "", "", "TT券"+couponChannel.getId().toString(),EnumAppPlat.TOUTIAO); | |||
| Map<String, String> ttMap = (Map) ttQrCode.data; | |||
| if(ttMap != null && ttMap.get("url") != null) { | |||
| couponChannel.setTtQrCode(ttMap.get("url")); | |||
| } | |||
| } | |||
| wxCouponChannelMapper.updateById(couponChannel); | |||