Commit c0b4402b by 胡懿

修改二维码生成

parent 4f545015
...@@ -174,7 +174,12 @@ public class GoodsService extends CrudService<GoodsMapper, Goods> { ...@@ -174,7 +174,12 @@ public class GoodsService extends CrudService<GoodsMapper, Goods> {
String url = qrCode.getUrl(); String url = qrCode.getUrl();
if (null != url && url.contains("image")) { if (null != url && url.contains("image")) {
String photo = url.split("image/")[1]; String photo = url.split("image/")[1];
FileUtil.deleteFile(new File(Global.getAttachmentDir() + "image/" + photo)); File file = new File(Global.getAttachmentDir() + "image/" + photo);
if (file.exists()) {
FileUtil.deleteFile(new File(Global.getAttachmentDir() + "image/" + photo));
} else {
logger.info("二维码路径不存在,执行删除");
}
} }
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
......
...@@ -50,7 +50,7 @@ public class IKSegmenterTest { ...@@ -50,7 +50,7 @@ public class IKSegmenterTest {
return strs; return strs;
} }
public static void main(String[] args) { public static void main(String[] args) {
String text = "185的绿军鞋15双"; String text = "185的绿军鞋15双";
System.out.println("使用智能分词结果:"+splitStr(text, true)); System.out.println("使用智能分词结果:"+splitStr(text, true));
System.out.println("最细粒度分词结果:"+splitStr(text, false)); System.out.println("最细粒度分词结果:"+splitStr(text, false));
} }
......
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