|
@@ -1,5 +1,6 @@
|
|
|
package com.lemon.lifecenter.controller;
|
|
|
|
|
|
+import java.text.ParseException;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
@@ -12,6 +13,7 @@ import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
import com.lemon.lifecenter.common.LifeCenterConfigVO;
|
|
|
import com.lemon.lifecenter.common.LifeCenterController;
|
|
|
+import com.lemon.lifecenter.common.LifeCenterFunction;
|
|
|
import com.lemon.lifecenter.common.LifeCenterPaging;
|
|
|
import com.lemon.lifecenter.dto.RoleDTO;
|
|
|
import com.lemon.lifecenter.service.RoleService;
|
|
@@ -29,6 +31,16 @@ public class MenuAccessController extends LifeCenterController {
|
|
|
public ModelAndView list( @ModelAttribute("dto") final RoleDTO dto,
|
|
|
@RequestParam(value="page", required=false, defaultValue="1") int page ) {
|
|
|
|
|
|
+ if( dto.getStartDate().equals( dto.getEndDate() ) && dto.getStartDate().equals( "" ) ) {
|
|
|
+ try {
|
|
|
+ dto.setStartDate( LifeCenterFunction.getPrevNextDate( LifeCenterFunction.getNow( "yyyy-MM-dd" ), -7 ) );
|
|
|
+ dto.setEndDate( LifeCenterFunction.getNow( "yyyy-MM-dd" ) );
|
|
|
+ } catch (ParseException e) {
|
|
|
+ // TODO Auto-generated catch block
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
dto.setLimit( ( Integer.valueOf( page ) - 1 ) * config.pageDataSize );
|
|
|
dto.setLimitMax( config.pageDataSize );
|
|
|
|