Subversion Repositories SmartDukaan

Rev

Rev 37136 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 37136 Rev 37160
Line 45... Line 45...
45
import in.shop2020.model.v1.order.WalletReferenceType;
45
import in.shop2020.model.v1.order.WalletReferenceType;
46
import org.apache.logging.log4j.LogManager;
46
import org.apache.logging.log4j.LogManager;
47
import org.apache.logging.log4j.Logger;
47
import org.apache.logging.log4j.Logger;
48
import org.hibernate.Session;
48
import org.hibernate.Session;
49
import org.hibernate.SessionFactory;
49
import org.hibernate.SessionFactory;
50
import org.hibernate.query.Query;
-
 
51
import org.springframework.beans.factory.annotation.Autowired;
50
import org.springframework.beans.factory.annotation.Autowired;
52
import org.springframework.beans.factory.annotation.Qualifier;
51
import org.springframework.beans.factory.annotation.Qualifier;
53
import org.springframework.cache.annotation.Cacheable;
52
import org.springframework.cache.annotation.Cacheable;
54
import org.springframework.stereotype.Component;
53
import org.springframework.stereotype.Component;
55
 
54
 
Line 1325... Line 1324...
1325
    public Scheme getStaticScheme(int fofoId) throws ProfitMandiBusinessException {
1324
    public Scheme getStaticScheme(int fofoId) throws ProfitMandiBusinessException {
1326
        FofoStore fofoStore = fofoStoreRepository.selectByRetailerId(fofoId);
1325
        FofoStore fofoStore = fofoStoreRepository.selectByRetailerId(fofoId);
1327
        Scheme scheme = null;
1326
        Scheme scheme = null;
1328
        if (fofoStore.getTarget() > 0) {
1327
        if (fofoStore.getTarget() > 0) {
1329
            scheme = new Scheme();
1328
            scheme = new Scheme();
1330
            scheme.setName("Super Retailer - Club 4");
1329
            scheme.setName("Super Retailer - Club 5");
1331
            scheme.setStartDateTime(LocalDate.of(2025, 8, 1).atStartOfDay());
1330
            scheme.setStartDateTime(LocalDate.of(2026, 7, 1).atStartOfDay());
1332
            scheme.setEndDateTime(LocalDate.of(2026, 01, 20).atTime(LocalTime.MAX));
1331
            scheme.setEndDateTime(LocalDate.of(2026, 12, 30).atTime(LocalTime.MAX));
1333
            scheme.setTarget(fofoStore.getTarget());
1332
            scheme.setTarget(fofoStore.getTarget());
1334
 
1333
 
1335
            if (scheme.getEndDateTime().plusDays(5).isBefore(LocalDateTime.now())) return null;
1334
            if (scheme.getEndDateTime().plusDays(5).isBefore(LocalDateTime.now())) return null;
1336
        }
1335
        }
1337
        return scheme;
1336
        return scheme;