Subversion Repositories SmartDukaan

Rev

Rev 7268 | Rev 7293 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7268 Rev 7272
Line 1... Line 1...
1
/**
1
/**
2
 * 
2
 * 
3
 */
3
 */
4
package in.shop2020.serving.controllers;
4
package in.shop2020.serving.controllers;
5
 
5
 
6
import java.text.SimpleDateFormat;
-
 
7
import java.util.Date;
-
 
8
import java.util.HashMap;
-
 
9
import java.util.Map;
-
 
10
import java.util.StringTokenizer;
-
 
11
 
-
 
12
import in.shop2020.datalogger.EventType;
6
import in.shop2020.logistics.DeliveryType;
13
import in.shop2020.logistics.LogisticsInfo;
7
import in.shop2020.logistics.LogisticsInfo;
14
import in.shop2020.logistics.LogisticsService.Client;
8
import in.shop2020.logistics.LogisticsService.Client;
15
import in.shop2020.logistics.DeliveryType;
-
 
16
import in.shop2020.logistics.LogisticsServiceException;
-
 
17
import in.shop2020.model.v1.catalog.StorePricing;
9
import in.shop2020.model.v1.catalog.StorePricing;
18
import in.shop2020.thrift.clients.CatalogClient;
10
import in.shop2020.thrift.clients.CatalogClient;
19
import in.shop2020.thrift.clients.LogisticsClient;
11
import in.shop2020.thrift.clients.LogisticsClient;
-
 
12
 
-
 
13
import java.text.SimpleDateFormat;
20
import in.shop2020.utils.DataLogger;
14
import java.util.Date;
-
 
15
import java.util.HashMap;
-
 
16
import java.util.Map;
-
 
17
import java.util.StringTokenizer;
21
 
18
 
22
import org.apache.log4j.Logger;
19
import org.apache.log4j.Logger;
23
import org.apache.struts2.rest.DefaultHttpHeaders;
-
 
24
import org.apache.struts2.rest.HttpHeaders;
-
 
25
import org.apache.thrift.TException;
-
 
26
 
20
 
27
import com.google.gson.Gson;
21
import com.google.gson.Gson;
28
 
22
 
29
/**
23
/**
30
 * @author rajveer
24
 * @author rajveer
Line 80... Line 74...
80
        response.put("min_advance_amount", Double.toString(minAdvanceAmount));
74
        response.put("min_advance_amount", Double.toString(minAdvanceAmount));
81
        
75
        
82
        
76
        
83
        return "index";
77
        return "index";
84
    }
78
    }
-
 
79
    
-
 
80
    public String show(){
-
 
81
        StringTokenizer tokenizer = new StringTokenizer(this.id, "_");
-
 
82
        this.pin = tokenizer.nextToken();
-
 
83
        this.itemId = Long.parseLong(tokenizer.nextToken());
-
 
84
    	return create();
-
 
85
    }
85
 
86
 
86
    public String getResponseJSONString() {
87
    public String getResponseJSONString() {
87
        Gson gson = new Gson();
88
        Gson gson = new Gson();
88
        return gson.toJson(response);
89
        return gson.toJson(response);
89
    }
90
    }
Line 101... Line 102...
101
    }
102
    }
102
 
103
 
103
    public void setPin(String pin) {
104
    public void setPin(String pin) {
104
        this.pin = pin;
105
        this.pin = pin;
105
    }
106
    }
-
 
107
    
-
 
108
    public void setId(String id){
-
 
109
    	this.id = id;
-
 
110
    }
106
}
111
}
107
112