Subversion Repositories SmartDukaan

Rev

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

Rev 37629 Rev 37937
Line 1... Line 1...
1
package com.spice.profitmandi.web.controller;
1
package com.spice.profitmandi.web.controller;
2
 
2
 
3
import com.eclipsesource.json.JsonObject;
3
import com.eclipsesource.json.JsonObject;
4
import com.google.gson.Gson;
4
import com.google.gson.Gson;
5
import com.google.gson.reflect.TypeToken;
5
import com.google.gson.reflect.TypeToken;
-
 
6
import com.spice.profitmandi.service.user.StoreStatusService;
6
import com.spice.profitmandi.common.enumuration.MessageType;
7
import com.spice.profitmandi.common.enumuration.MessageType;
7
import com.spice.profitmandi.common.enumuration.SchemeType;
8
import com.spice.profitmandi.common.enumuration.SchemeType;
8
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
9
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
9
import com.spice.profitmandi.common.model.*;
10
import com.spice.profitmandi.common.model.*;
10
import com.spice.profitmandi.dao.entity.affiliate.AffiliateEarnings;
11
import com.spice.profitmandi.dao.entity.affiliate.AffiliateEarnings;
Line 251... Line 252...
251
 
252
 
252
    @Autowired
253
    @Autowired
253
    WalletService walletService;
254
    WalletService walletService;
254
 
255
 
255
    @Autowired
256
    @Autowired
-
 
257
    private StoreStatusService storeStatusService;
-
 
258
 
-
 
259
    @Autowired
256
    AffiliateLinkRepository affiliateLinkRepository;
260
    AffiliateLinkRepository affiliateLinkRepository;
257
 
261
 
258
    @Autowired
262
    @Autowired
259
    AffiliateService affiliateService;
263
    AffiliateService affiliateService;
260
 
264
 
Line 1687... Line 1691...
1687
        bid.setItemName(biddingModel.getItemName());
1691
        bid.setItemName(biddingModel.getItemName());
1688
        bid.setQuantity(biddingModel.getBidQty());
1692
        bid.setQuantity(biddingModel.getBidQty());
1689
        bid.setStatus(ProfitMandiConstants.BID_ENUM.PENDING);
1693
        bid.setStatus(ProfitMandiConstants.BID_ENUM.PENDING);
1690
        bid.setCreatedAt(LocalDateTime.now());
1694
        bid.setCreatedAt(LocalDateTime.now());
1691
        if (biddingModel.getId() == null) {
1695
        if (biddingModel.getId() == null) {
-
 
1696
            storeStatusService.assertCanSpendWallet(bid.getFofoId());
1692
            bidRepository.persist(bid);
1697
            bidRepository.persist(bid);
1693
            //debit 500 from wallet
1698
            //debit 500 from wallet
1694
            try {
1699
            try {
1695
                String reason = "Advance security for "+bid.getItemName()+" bid";
1700
                String reason = "Advance security for "+bid.getItemName()+" bid";
1696
                String message = "Dear Partner, We have Debited Rs "+ProfitMandiConstants.BID_CHARGES+" as booking amount against your bidding of Model No. "+bid.getItemName()+". We will adjust this amount from your order amount if the bid gets approved.";
1701
                String message = "Dear Partner, We have Debited Rs "+ProfitMandiConstants.BID_CHARGES+" as booking amount against your bidding of Model No. "+bid.getItemName()+". We will adjust this amount from your order amount if the bid gets approved.";