import org.apache.log4j.Logger;import net.sf.json.JSONObject;public class GetResultByTransCode {private final static Logger log4j = Logger.getLogger(GetResultByTransCode.class);/*** 功能描述:通过交易码查询服务名及方法名* @param transCode* @return JSONObject* */public static JSONObject getResult(String transCode){JSONObject jsonObject = new JSONObject();String serviceName = ""; //服务名String methodName = ""; //方法名if(TransCode.LOGIN.equals(transCode)){//登录log4j.info("登录"+transCode);serviceName = "UserService";methodName = "login";}else if(TransCode.REGISTER.equals(transCode)){//注册log4j.info("注册"+transCode);serviceName = "UserService";methodName = "reg";}jsonObject.put("serviceName", serviceName);jsonObject.put("methodName", methodName);return jsonObject;} }