Subversion Repositories SmartDukaan

Rev

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

Rev 21934 Rev 21935
Line 1... Line 1...
1
package in.shop2020.serving.controllers;
1
package in.shop2020.serving.controllers;
2
 
2
 
3
import in.shop2020.model.v1.user.Counter;
3
import in.shop2020.model.v1.user.Counter;
-
 
4
import in.shop2020.model.v1.user.CounterVerificationType;
4
import in.shop2020.thrift.clients.UserClient;
5
import in.shop2020.thrift.clients.UserClient;
5
 
6
 
-
 
7
import java.util.Date;
-
 
8
 
6
import com.google.gson.Gson;
9
import com.google.gson.Gson;
7
 
10
 
8
public class VerifyDocController extends BaseController {
11
public class VerifyDocController extends BaseController {
9
	
12
	
10
	String gstIn;
13
	String gstIn;
Line 14... Line 17...
14
 
17
 
15
	public String index() throws Exception {
18
	public String index() throws Exception {
16
		UserClient userServiceClient = new UserClient();
19
		UserClient userServiceClient = new UserClient();
17
        in.shop2020.model.v1.user.UserContextService.Client userClient = userServiceClient.getClient();
20
        in.shop2020.model.v1.user.UserContextService.Client userClient = userServiceClient.getClient();
18
        Counter counter = new Counter();
21
        Counter counter = new Counter();
-
 
22
        long currentTime = new Date().getTime();
19
        counter.setGstIn(gstIn);
23
        counter.setGstIn(gstIn);
-
 
24
        counter.setAddedOn(currentTime);
-
 
25
        counter.setVerifiedOn(currentTime);
-
 
26
        counter.setVerificationType(CounterVerificationType.OFFLINE);
-
 
27
        counter.setDocumentVerified(true);
20
        this.response = new Gson().toJson(userClient.registerCounter(counter, userId));
28
        this.response = new Gson().toJson(userClient.registerCounter(counter, userId));
21
        return "index";
29
        return "index";
22
	}
30
	}
23
 
31
 
24
	
32