Subversion Repositories SmartDukaan

Rev

Rev 21934 | Blame | Last modification | View Log | RSS feed

package in.shop2020.serving.controllers;

import in.shop2020.model.v1.user.Counter;
import in.shop2020.model.v1.user.CounterVerificationType;
import in.shop2020.thrift.clients.UserClient;

import java.util.Date;

import com.google.gson.Gson;

public class VerifyDocController extends BaseController {
        
        String gstIn;
        long userId;
        private String response;
        

        public String index() throws Exception {
                UserClient userServiceClient = new UserClient();
        in.shop2020.model.v1.user.UserContextService.Client userClient = userServiceClient.getClient();
        Counter counter = new Counter();
        long currentTime = new Date().getTime();
        counter.setGstIn(gstIn);
        counter.setAddedOn(currentTime);
        counter.setVerifiedOn(currentTime);
        counter.setVerificationType(CounterVerificationType.OFFLINE);
        counter.setDocumentVerified(true);
        this.response = new Gson().toJson(userClient.registerCounter(counter, userId));
        return "index";
        }

        
        public String getResponse() {
                return response;
        }

        public String getGstIn() {
                return gstIn;
        }

        public void setGstIn(String gstIn) {
                this.gstIn = gstIn;
        }



        public long getUserId() {
                return userId;
        }


        public void setUserId(long userId) {
                this.userId = userId;
        }
        
        
        
        


}