Commit f325a40c by 徐高华

下载

parent 30437faa
...@@ -13,11 +13,13 @@ import java.util.List; ...@@ -13,11 +13,13 @@ import java.util.List;
import java.util.zip.ZipEntry; import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream; import java.util.zip.ZipOutputStream;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.gic.api.base.commons.BasePageInfo; import com.gic.api.base.commons.BasePageInfo;
...@@ -176,7 +178,13 @@ public class GroupChatHmController { ...@@ -176,7 +178,13 @@ public class GroupChatHmController {
} }
@RequestMapping("download") @RequestMapping("download")
public RestResponse<Object> download(ChatHmSearchQDTO qdto) { public RestResponse<Object> download(ChatHmSearchQDTO qdto, @RequestParam(defaultValue = "0") int allFlag) {
if (allFlag == 0 && CollectionUtils.isEmpty(qdto.getChatHmIdList())) {
return RestResponse.failure("1", "请选择要下载的群活码");
}
if (allFlag == 1) {
qdto.setChatHmIdList(null);
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
String qrCodeName = "群活码"; String qrCodeName = "群活码";
final String fileName = qrCodeName + "_" + sdf.format(new Date()) + ".zip"; final String fileName = qrCodeName + "_" + sdf.format(new Date()) + ".zip";
......
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