|
|
@ -1,8 +1,10 @@ |
|
|
|
package com.bweb.controller; |
|
|
|
package com.bweb.controller; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.excel.EasyExcel; |
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.bweb.config.SysConst; |
|
|
|
import com.bweb.config.SysConst; |
|
|
|
|
|
|
|
import com.bweb.model.ExportHighOrderModel; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.hai.common.Base64Util; |
|
|
|
import com.hai.common.Base64Util; |
|
|
@ -19,6 +21,7 @@ import com.hai.common.utils.ResponseMsgUtil; |
|
|
|
import com.hai.config.CommonSysConst; |
|
|
|
import com.hai.config.CommonSysConst; |
|
|
|
import com.hai.entity.*; |
|
|
|
import com.hai.entity.*; |
|
|
|
import com.hai.enum_type.QrCodeType; |
|
|
|
import com.hai.enum_type.QrCodeType; |
|
|
|
|
|
|
|
import com.hai.model.HighOrderModel; |
|
|
|
import com.hai.model.ResponseData; |
|
|
|
import com.hai.model.ResponseData; |
|
|
|
import com.hai.model.UserInfoModel; |
|
|
|
import com.hai.model.UserInfoModel; |
|
|
|
import com.hai.service.*; |
|
|
|
import com.hai.service.*; |
|
|
@ -32,9 +35,11 @@ import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import javax.annotation.Resource; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
|
|
|
|
import java.io.File; |
|
|
|
import java.net.URLEncoder; |
|
|
|
import java.net.URLEncoder; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.HashMap; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -159,6 +164,31 @@ public class HighDiscountAgentRelController { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/exportReceive",method = RequestMethod.GET) |
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
|
|
|
|
@ApiOperation(value = "导出领取记录") |
|
|
|
|
|
|
|
public ResponseData exportReceive(@RequestParam(name = "id", required = true) Long id) { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
HighDiscountAgentRel rel = highDiscountAgentRelService.getRelById(id); |
|
|
|
|
|
|
|
if (rel == null) { |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "数据不存在"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String fileUrl = SysConst.getSysConfig().getFileUrl() + "/temporary/"; |
|
|
|
|
|
|
|
String pathName = System.currentTimeMillis()+".xlsx"; |
|
|
|
|
|
|
|
File file = new File(fileUrl); |
|
|
|
|
|
|
|
if (!file.exists()) { |
|
|
|
|
|
|
|
file.mkdirs(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// EasyExcel.write(fileUrl+pathName).sheet("sheet1").doWrite(dataList);
|
|
|
|
|
|
|
|
return ResponseMsgUtil.success(pathName); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
log.error("HighDiscountController -> getReceiveLink() error!",e); |
|
|
|
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/getDiscountAgentList",method = RequestMethod.GET) |
|
|
|
@RequestMapping(value="/getDiscountAgentList",method = RequestMethod.GET) |
|
|
|
@ResponseBody |
|
|
|
@ResponseBody |
|
|
|
@ApiOperation(value = "查询列表") |
|
|
|
@ApiOperation(value = "查询列表") |
|
|
|