|
|
@@ -5,6 +5,7 @@ import com.uas.platform.b2b.manage.model.Invite;
|
|
|
import com.uas.platform.b2b.manage.model.UseType;
|
|
|
import com.uas.platform.b2b.manage.service.InviteService;
|
|
|
import com.uas.platform.b2b.manage.service.UseLogService;
|
|
|
+import com.uas.platform.b2b.manage.support.DateFormatUtils;
|
|
|
import com.uas.platform.b2b.manage.support.JxlsExcelView;
|
|
|
import com.uas.platform.b2b.manage.support.MyException;
|
|
|
import com.uas.platform.b2b.manage.web.BaseController;
|
|
|
@@ -24,7 +25,6 @@ import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import java.text.ParseException;
|
|
|
-import java.text.SimpleDateFormat;
|
|
|
import java.util.Date;
|
|
|
|
|
|
/**
|
|
|
@@ -68,22 +68,21 @@ public class InviteController extends BaseController {
|
|
|
*
|
|
|
* @param keyword 关键字
|
|
|
* @param request request
|
|
|
- * @return
|
|
|
+ * @return ModelAndView
|
|
|
*/
|
|
|
@RequestMapping(value = "/xls", method = RequestMethod.GET )
|
|
|
public ModelAndView exportInvites(String keyword, HttpServletRequest request, String fromDate, String endDate) throws ParseException {
|
|
|
PageParams params = new PageParams();
|
|
|
params.setPage(1);
|
|
|
params.setCount(JxlsExcelView.MAX_SIZE);
|
|
|
- SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日 HH时mm分");
|
|
|
ModelAndView modelAndView = new ModelAndView();
|
|
|
Page<Invite> invites = findByPageInfo(params, keyword, request, fromDate, endDate);
|
|
|
- modelAndView.addObject("time", dateFormat.format(new Date(System.currentTimeMillis())));
|
|
|
+ modelAndView.addObject("time", DateFormatUtils.EXPORT_FORMAT.format(new Date(System.currentTimeMillis())));
|
|
|
modelAndView.addObject("user", SystemSession.getUser().getFullName());
|
|
|
modelAndView.addObject("count",
|
|
|
invites.getTotalElements() > JxlsExcelView.MAX_SIZE ? JxlsExcelView.MAX_SIZE : invites.getTotalElements());
|
|
|
modelAndView.addObject("data", invites.getContent());
|
|
|
- modelAndView.addObject("dateFormat", dateFormat);
|
|
|
+ modelAndView.addObject("dateFormat", DateFormatUtils.EXPORT_FORMAT);
|
|
|
modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/Invite", "邀请注册记录"));
|
|
|
useLogService.appendLog(UseType.EXPROT_INVITE_DATA.code(), keyword, AgentUtils.getIp(request));
|
|
|
return modelAndView;
|
|
|
@@ -98,7 +97,7 @@ public class InviteController extends BaseController {
|
|
|
* @param userUU 邀请用户UU
|
|
|
* @param enterName 邀请企业名
|
|
|
* @param enterUU 邀请企业UU
|
|
|
- * @return
|
|
|
+ * @return ModelMap
|
|
|
* @throws MyException
|
|
|
*/
|
|
|
@RequestMapping(value = "/edit", method = RequestMethod.POST)
|