Administrator 2 rokov pred
rodič
commit
4c02c01805

+ 6 - 6
fast-boot.iml

@@ -1,12 +1,17 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
   <component name="FacetManager">
+    <facet type="web" name="Web">
+      <configuration>
+        <webroots />
+      </configuration>
+    </facet>
     <facet type="jpa" name="JPA">
       <configuration>
         <setting name="validation-enabled" value="true" />
         <setting name="provider-name" value="Hibernate" />
         <datasource-mapping>
-          <factory-entry name="Entities" />
+          <factory-entry name="fast-boot" />
         </datasource-mapping>
         <naming-strategy-map />
       </configuration>
@@ -14,11 +19,6 @@
     <facet type="Spring" name="Spring">
       <configuration />
     </facet>
-    <facet type="web" name="Web">
-      <configuration>
-        <webroots />
-      </configuration>
-    </facet>
   </component>
   <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
     <output url="file://$MODULE_DIR$/target/classes" />

+ 1 - 1
pom.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+		 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 	<modelVersion>4.0.0</modelVersion>
 	<!-- 不解释 -->
 	<groupId>com.xiesx.fast</groupId>

+ 17 - 0
src/main/java/com/xiesx/fastboot/utils/DateUtils.java

@@ -404,6 +404,23 @@ public class DateUtils {
      * @param offset
      * @return
      */
+    public static Date addMonths(Date date, int offset) {
+        DateTime dt1;
+        if (date == null) {
+            dt1 = new DateTime().plusMonths(offset);
+            return dt1.toDate();
+        }
+        dt1 = new DateTime(date).plusMonths(offset);
+        return dt1.toDate();
+    }
+
+    /**
+     * xx周之后
+     *
+     * @param date
+     * @param offset
+     * @return
+     */
     public static Date addWeeks(Date date, int offset) {
         DateTime dt1;
         if (date == null) {