Commit 09444e30 by 陶光胜

Merge branch 'developer' into 'master'

小程序二维码修改

See merge request !38
parents a9663af5 80a4b69c
package com.gic.enterprise.web;
public class Test {
public static void main(String[] args){
System.out.println("cooperate-detail?collaboratorId=1".split("[?]")[0]);
}
}
......@@ -32,6 +32,8 @@ import com.gic.wechat.business.api.service.fwh.WeixinBaseFunService;
import com.gic.wechat.business.api.service.wxa.WeixinWxaFunService;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -47,6 +49,7 @@ import java.util.zip.ZipOutputStream;
@RestController
public class QrcodeController {
private static Logger logger = LogManager.getLogger(QrcodeController.class)
@Autowired
private QrCodeApiService qrCodeApiService;
@Autowired
......@@ -275,7 +278,7 @@ public class QrcodeController {
try {
zipOutputStream = new ZipOutputStream(new FileOutputStream(file));
} catch (FileNotFoundException e) {
e.printStackTrace();
logger.warn("e", e);
}
for (QrcodeContent content : qrcodeQO.getContent()) {
QrcodeDTO dto = EntityUtil.changeEntityByJSON(QrcodeDTO.class, qrcodeQO);
......@@ -329,13 +332,13 @@ public class QrcodeController {
zipOutputStream.closeEntry();
zipOutputStream.close();
} catch (IOException e) {
e.printStackTrace();
logger.warn("e", e);
}
String url = FileOperateUtils.simpleUploadFileFromLocal(file, fileName+".zip", BucketNameEnum.COMPRESS_60000.getName());
downloadReportApiService.updateDownloadUrl(downLoadId, "https://"+url);
} catch (IOException e1) {
e1.printStackTrace();
logger.warn("e", e1);
}
}
}).start();
......
......@@ -1008,7 +1008,6 @@ public class WmStoreSyncController {
writer.flush();
} catch (Exception e) {
e.printStackTrace();
LOGGER.error("导出错误", e);
} finally {
if (writer != null) {
......@@ -1076,9 +1075,9 @@ public class WmStoreSyncController {
}
}
} catch (IOException e) {
e.printStackTrace();
LOGGER.warn("e", e);
} catch (InvalidFormatException e) {
e.printStackTrace();
LOGGER.warn("e", e);
}
return result;
}
......
......@@ -56,11 +56,11 @@ public class QrcodeUtils {
InputStream in = conn.getInputStream();
return IOUtils.toByteArray(in);
} catch (IOException e) {
e.printStackTrace();
log.warn("e", e);
return null;
}
} catch (MalformedURLException e) {
e.printStackTrace();
log.warn("e", e);
return null;
}
}
......@@ -134,8 +134,7 @@ public class QrcodeUtils {
logo.flush();
image.flush();
} catch (Exception e) {
e.printStackTrace();
log.error(e.getMessage());
log.warn("e",e);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment