dateDiff(..) 추가

master
mjkhan21 6 months ago
parent 2f3339c263
commit 65fe60fe57

@ -1,5 +1,6 @@
package cokr.xit.foundation; package cokr.xit.foundation;
import java.util.Date;
import java.util.function.Supplier; import java.util.function.Supplier;
import javax.annotation.Resource; import javax.annotation.Resource;
@ -202,6 +203,15 @@ public class AbstractComponent {
return isEmpty(logName) ? log(getClass()) : Log.get(logName); return isEmpty(logName) ? log(getClass()) : Log.get(logName);
} }
/** Date Date .
* @param date
* @param days
* @return Date
*/
protected static Date dateDiff(Date date, int days) {
return new Date(date.getTime() + (1000L * 60L * 60L * 24L * days));
}
/** . /** .
* @param <T> AbstractComponent * @param <T> AbstractComponent
* @return * @return

@ -142,7 +142,6 @@ public abstract class AbstractController extends AbstractComponent {
* @return ModelAndView * @return ModelAndView
*/ */
protected ModelAndView setCollectionInfo(ModelAndView mav, Collection<?> collection, String prefixKey, String prefix) { protected ModelAndView setCollectionInfo(ModelAndView mav, Collection<?> collection, String prefixKey, String prefix) {
boolean toJson = !"jsonView".equals(mav.getViewName());
mav.addObject(prefixKey, prefix) mav.addObject(prefixKey, prefix)
.addObject(prefix + "List", collection) .addObject(prefix + "List", collection)
.addObject(prefix + "Start", 0) .addObject(prefix + "Start", 0)

Loading…
Cancel
Save