|
|
@@ -703,6 +703,47 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public R getWxaCodePackageOrderUnLimitNew(Long collectionId, String appId) {
|
|
|
+ logger.info("生成用户信息采集二维码,请求参数:{},{}",collectionId,appId);
|
|
|
+ FsSysConfig sysConfig = configUtil.getSysConfig();
|
|
|
+//
|
|
|
+// final WxMaService wxMaService = WxMaConfiguration.getMaService(sysConfig.getAppid());
|
|
|
+ final WxMaService wxMaService = WxMaConfiguration.getMaService(appId);
|
|
|
+
|
|
|
+ String scene="collectionId="+ collectionId ;
|
|
|
+ byte[] file;
|
|
|
+ try {
|
|
|
+ file = wxMaService.getQrcodeService().createWxaCodeUnlimitBytes(
|
|
|
+ scene,
|
|
|
+ "pages_order/confirmUserinfoNew",
|
|
|
+ true,
|
|
|
+ "trial",//release trial
|
|
|
+ 430,
|
|
|
+ true,
|
|
|
+ null,
|
|
|
+ false);
|
|
|
+
|
|
|
+ // 上传图片到存储桶
|
|
|
+ String suffix = ".png";
|
|
|
+ CloudStorageService storage = OSSFactory.build();
|
|
|
+ String url;
|
|
|
+ try {
|
|
|
+ url = storage.uploadSuffix(file, suffix);
|
|
|
+ } catch (Exception e) {
|
|
|
+ // 记录错误日志
|
|
|
+ logger.error("生成图片失败:{}",e.getMessage(),e);
|
|
|
+ return R.error("生成图片失败");
|
|
|
+ }
|
|
|
+ // 返回成功信息
|
|
|
+ return R.ok().put("url",url);
|
|
|
+
|
|
|
+ } catch (WxErrorException e) {
|
|
|
+ logger.error(e.getMessage(), e);
|
|
|
+ return R.error("微信接口调用失败: " + e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
@Transactional
|
|
|
public R doctorConfirm(FsUserInformationCollection collection) {
|