Subversion Repositories SmartDukaan

Rev

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

Rev 4793 Rev 5168
Line 8... Line 8...
8
import in.shop2020.serving.auth.CRMAuthorizingRealm;
8
import in.shop2020.serving.auth.CRMAuthorizingRealm;
9
import in.shop2020.thrift.clients.CRMClient;
9
import in.shop2020.thrift.clients.CRMClient;
10
 
10
 
11
import org.apache.shiro.crypto.hash.Sha256Hash;
11
import org.apache.shiro.crypto.hash.Sha256Hash;
12
import org.apache.thrift.TException;
12
import org.apache.thrift.TException;
-
 
13
import org.apache.thrift.transport.TTransportException;
13
 
14
 
14
public class AgentController extends BaseController {
15
public class AgentController extends BaseController {
15
	
16
	
16
	private List<Agent>  agents = new ArrayList<Agent>();
17
	private List<Agent>  agents = new ArrayList<Agent>();
17
	private int id;
18
	private int id;
Line 87... Line 88...
87
			return EXCEPTION; 
88
			return EXCEPTION; 
88
		}
89
		}
89
		return index();
90
		return index();
90
	}
91
	}
91
	
92
	
-
 
93
	public String changeAgentRole(){
-
 
94
		try{
-
 
95
			log.info("Agent id : "+id +" role : " + role);
-
 
96
			crmServiceClient = new CRMClient().getClient();
-
 
97
			crmServiceClient.changeAgentRole(new Long((long)id),role);
-
 
98
		} catch (Exception e) {
-
 
99
			
-
 
100
		}
-
 
101
		return index();
-
 
102
	}
-
 
103
	
-
 
104
	public String getOpenTicketCount(long id) {
-
 
105
		try {
-
 
106
			log.info("Agent id : " + id);
-
 
107
			crmServiceClient = new CRMClient().getClient();
-
 
108
			return (new Integer(crmServiceClient.getOpenTicketCountForAgent(id))).toString();
-
 
109
		} catch (TTransportException e) {
-
 
110
			e.printStackTrace();
-
 
111
		} catch (TException e) {
-
 
112
			e.printStackTrace();
-
 
113
		}
-
 
114
		return "-1";
-
 
115
	}
-
 
116
	
92
	public String getName() {
117
	public String getName() {
93
		return name;
118
		return name;
94
	}
119
	}
95
 
120
 
96
	public void setName(String name) {
121
	public void setName(String name) {