Commit 3814c6d8 authored by m1991's avatar m1991

后台接口——用户与资讯后台接口

parent 71ad3ddd
......@@ -181,7 +181,6 @@ public class UploadServiceImpl implements UploadService {
//过滤传入的邀请码带有“”的符号
inviteCode = inviteCode.replace("\"", "").replace("\"", "");
//获取上传图片数量,打印在控制台
if(null!=files&&!"".equals(files)){
System.out.println("上传图片数量" + files.length);
//创建集合
List<Map<String, Object>> root = new ArrayList<Map<String, Object>>();
......@@ -192,11 +191,11 @@ public class UploadServiceImpl implements UploadService {
Map<String, Object> result = new HashMap<String, Object>();//一个文件上传的结果
String msg = "";//上传结果信息
//上传图片不为空时
long sa = 0;
Integer sa = 0;
for (MultipartFile file : files) {
sa = file.getSize();
sa = Math.toIntExact(file.getSize());
}
if (sa > 0) {
if (sa > 0&&sa!=null&&!"".equals(sa)) {
//遍历图片数据
for (MultipartFile file : files) {
......@@ -253,7 +252,7 @@ public class UploadServiceImpl implements UploadService {
shopZxMapper.zxadd(zxUrl, zxField, inviteCode, zxDate);
return result;
//用户只上传文字时
}
} else if (null != zxField && files == null) {
......
This diff is collapsed.
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