|
|
|
@@ -9,8 +9,10 @@ import com.iformall.common.ResultData; |
|
|
|
import com.iformall.controller.base.BaseController; |
|
|
|
import com.iformall.controller.sys.UploadController; |
|
|
|
import com.iformall.domain.po.WxAppinfo; |
|
|
|
import com.iformall.domain.po.WxCouponChannel; |
|
|
|
import com.iformall.domain.po.WxMerchant; |
|
|
|
import com.iformall.exception.MallinkException; |
|
|
|
import com.iformall.mapper.WxCouponChannelMapper; |
|
|
|
import com.iformall.mapper.WxMerchantMapper; |
|
|
|
import com.iformall.service.WxAppinfoService; |
|
|
|
import com.iformall.service.wechat.FmOpenService; |
|
|
|
@@ -58,6 +60,9 @@ public class WxAppinfoController extends BaseController { |
|
|
|
@Autowired |
|
|
|
private AsyncTaskExecutor asyncTaskExecutor; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private WxCouponChannelMapper wxCouponChannelMapper; |
|
|
|
|
|
|
|
@ApiOperation("加载老数据二维码") |
|
|
|
@GetMapping("/updateQrCode") |
|
|
|
public void updateQrCode(String p)throws ServletException, IOException { |
|
|
|
@@ -81,6 +86,29 @@ public class WxAppinfoController extends BaseController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("加载卷二维码") |
|
|
|
@GetMapping("/updateCouponQrCode") |
|
|
|
public void updateCouponQrCode(String p)throws ServletException, IOException { |
|
|
|
if("xlldxx".equals(p)){ |
|
|
|
String pageUrl = "pages/index/index"; |
|
|
|
|
|
|
|
List<WxCouponChannel> list = wxCouponChannelMapper.findQrcodeEmptyList(); |
|
|
|
for (WxCouponChannel couponChannel:list) { |
|
|
|
asyncTaskExecutor.execute(new Runnable() { |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
String param = couponChannel.getWeappScene(); |
|
|
|
ResultData resultData = exportQrcode(null,null,couponChannel.getTenantId(),1,pageUrl,param,0,"","","店铺详情",true); |
|
|
|
Map<String,String> map = (Map)resultData.data; |
|
|
|
String url = map.get("url"); |
|
|
|
couponChannel.setQrCode(url); |
|
|
|
wxCouponChannelMapper.updateByPrimaryKeySelective(couponChannel); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation(value = "下载二维码", produces="application/json;charset=UTF-8", notes = "参数{\"name\":\"String\",\"pageUrl\":\"String\", \"sceneParam\":\"二维码参数\", \"type\":0:有限二维码,1:无限二维码,\"withText\":int(0:不带字, 1:加一行字,2:加两行字),\"text1\":\"String\",\"text2\":\"String\"}") |
|
|
|
@PostMapping("/downQrCode") |
|
|
|
public void downQrCode(HttpServletRequest request, HttpServletResponse response, @RequestBody Map<String, Object> params) throws MallinkException { |
|
|
|
|