|
@@ -47,6 +47,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Calendar;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
@@ -259,6 +260,19 @@ public class LantoneProductFacade extends LantoneProductServiceImpl {
|
|
|
String[] accessTypeArray = new String[accessType.length];
|
|
|
String[] chargeTypeArray = new String[chargeType.length];
|
|
|
|
|
|
+ // 仅线上模式
|
|
|
+ if (accessType.length == 1 && accessType[0].equals(AccessTypeEnum.Online.getKey())) {
|
|
|
+ product.setOnlyOnline(true);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 产品是否在有效期内 该产品未在有效服务期内,无法使用
|
|
|
+ Calendar calendar = Calendar.getInstance();
|
|
|
+ if (calendar.after(product.getEndTime())) {
|
|
|
+ product.setIsExpired(true);
|
|
|
+ } else if (calendar.before(product.getStartTime())) {
|
|
|
+ product.setIsStarted(true);
|
|
|
+ }
|
|
|
+
|
|
|
for (int i = 0; i < accessType.length; i++) {
|
|
|
accessTypeArray[i] = AccessTypeEnum.getName(Integer.parseInt(accessType[i]));
|
|
|
}
|