Java Code Examples for net.sf.json.JSONObject#put()

The following examples show how to use net.sf.json.JSONObject#put() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BlueI18n.java    From blueocean-plugin with MIT License 6 votes vote down vote up
@CheckForNull
private JSONObject getBundle(BundleParams bundleParams, Locale locale) {
    PluginWrapper plugin = bundleParams.getPlugin();
    if (plugin == null) {
        return null;
    }

    try {
        ResourceBundle resourceBundle = ResourceBundle.getBundle(bundleParams.bundleName, locale, plugin.classLoader);
        JSONObject bundleJSON = new JSONObject();
        for (String key : resourceBundle.keySet()) {
            bundleJSON.put(key, resourceBundle.getString(key));
        }
        return bundleJSON;
    } catch (MissingResourceException e) {
        // fall through and return null.
    }

    return null;
}
 
Example 2
Source File: JwSendTemplateMsgAPI.java    From jeewx-api with Apache License 2.0 6 votes vote down vote up
/**
 * 设置行业信息
 * @param accessToken
 * @param industry_id1
 * @param industry_id2
 * @return
 * @throws WexinReqException
 */
public static String setIndustry(String accessToken,String industry_id1,String industry_id2) throws WexinReqException{
	String msg = "";
	if (accessToken != null) {
		String requestUrl = set_industry.replace("ACCESS_TOKEN", accessToken);
		JSONObject obj = new JSONObject();
		obj.put("industry_id1", industry_id1);
		obj.put("industry_id2", industry_id2);
		logger.info("设置行业信息方法执行前json参数 obj: "+obj.toString());
		JSONObject result = WxstoreUtils.httpRequest(requestUrl, "POST", obj.toString());
		Object error = result.get(WeiXinConstant.RETURN_ERROR_INFO_CODE);
		if(error == null){
			msg = result.getString(WeiXinConstant.RETURN_ERROR_INFO_MSG);
		}else{
			msg = result.toString();
		}
		logger.info("设置行业信息方法执行后json参数 : "+result.toString());
	}
	return msg;
}
 
Example 3
Source File: QueryParamUtil.java    From jeewx with Apache License 2.0 6 votes vote down vote up
/**
 * 将结果集转化为列表json格式
 * @param result 结果集
 * @param size 总大小
 * @return 处理好的json格式
 */
@SuppressWarnings("unchecked")
public static String getJson(List<Map<String, Object>> result,Long size){
	JSONObject main = new JSONObject();
	JSONArray rows = new JSONArray();
	main.put("total",size );
	for(Map m:result){
		JSONObject item = new JSONObject();
		Iterator  it =m.keySet().iterator();
		while(it.hasNext()){
			String key = (String) it.next();
			String value =String.valueOf(m.get(key));
			key = key.toLowerCase();
			if(key.contains("time")||key.contains("date")){
				value = datatimeFormat(value);
			}
			item.put(key,value );
		}
		rows.add(item);
	}
	main.put("rows", rows);
	return main.toString();
}
 
Example 4
Source File: ChangeTest.java    From gerrit-events with MIT License 6 votes vote down vote up
/**
 * Tests {@link Change#fromJson(net.sf.json.JSONObject)}.
 * @throws Exception if so.
 */
@Test
public void testFromJson() throws Exception {
    JSONObject json = new JSONObject();
    json.put(PROJECT, "project");
    json.put(BRANCH, "branch");
    json.put(ID, "I2343434344");
    json.put(NUMBER, "100");
    json.put(SUBJECT, "subject");
    json.put(OWNER, jsonAccount);
    json.put(URL, "http://localhost:8080");
    Change change = new Change();
    change.fromJson(json);

    assertEquals(change.getProject(), "project");
    assertEquals(change.getBranch(), "branch");
    assertEquals(change.getId(), "I2343434344");
    assertEquals(change.getNumber(), "100");
    assertEquals(change.getSubject(), "subject");
    assertTrue(change.getOwner().equals(account));
    assertEquals(change.getUrl(), "http://localhost:8080");
    assertNull(change.getComments());
}
 
Example 5
Source File: Engine.java    From acunetix-plugin with MIT License 6 votes vote down vote up
public String startScan(String scanningProfileId, String targetId, Boolean waitFinish) throws IOException {
    JSONObject jso = new JSONObject();
    jso.put("target_id", targetId);
    jso.put("profile_id", scanningProfileId);
    jso.put("user_authorized_to_scan", "yes");
    JSONObject jsoChild = new JSONObject();
    jsoChild.put("disable", false);
    jsoChild.put("start_date", JSONNull.getInstance());
    jsoChild.put("time_sensitive", false);
    jso.put("schedule", jsoChild);
    String scanId = doPostLoc(apiUrl + "/scans", jso.toString()).respStr;
    if (waitFinish) {
        while (!getScanStatus(scanId).equals("completed")) {
            try {
                Thread.sleep(10000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
    return scanId;
}
 
Example 6
Source File: UserController.java    From ssm-demo with Apache License 2.0 6 votes vote down vote up
/**
 * 修改密码
 *
 * @param user
 * @param response
 * @return
 * @throws Exception
 */
@RequestMapping("/modifyPassword")
public String modifyPassword(User user, HttpServletResponse response) throws Exception {
    String MD5pwd = MD5Util.MD5Encode(user.getPassword(), "UTF-8");
    user.setPassword(MD5pwd);
    int resultTotal = userService.updateUser(user);
    JSONObject result = new JSONObject();
    if (resultTotal > 0) {
        result.put("success", true);
    } else {
        result.put("success", false);
    }
    log.info("request: user/modifyPassword , user: " + user.toString());
    ResponseUtil.write(response, result);
    return null;
}
 
Example 7
Source File: JwMediaAPI.java    From jeewx-api with Apache License 2.0 6 votes vote down vote up
/**
 * 获取永久素材  
 * 
 * @param accesstoken
 * @param wxArticles
 *            图文集合,数量不大于10
 * @return WxArticlesResponse 上传图文消息素材返回结果
 * @throws WexinReqException
 */
public static List<WxNewsArticle> getArticlesByMaterialNews(String accesstoken,String mediaId) throws WexinReqException {
	List<WxNewsArticle> wxArticleList = null;
		if (accesstoken != null) {
			String requestUrl = material_get_material_url.replace("ACCESS_TOKEN", accesstoken);
			JSONObject obj = new JSONObject();
			obj.put("media_id", mediaId);
			JSONObject result = WxstoreUtils.httpRequest(requestUrl, "POST", obj.toString());
			if (result.has("errcode")) {
				logger.error("获取永久素材 失败!errcode=" + result.getString("errcode") + ",errmsg = " + result.getString("errmsg"));
				throw new WexinReqException(result.getString("errcode"));
			} else {
				logger.info("====获取永久素材成功====result:"+result.toString());
				JSONArray newsItemJsonArr = result.getJSONArray("news_item");
				wxArticleList = JSONArray.toList(newsItemJsonArr, WxNewsArticle.class);
			}
	}
	return wxArticleList;
}
 
Example 8
Source File: ModuleController.java    From JavaWeb with Apache License 2.0 5 votes vote down vote up
@PostMapping(value="/modifyModule",produces=MediaType.APPLICATION_JSON_UTF8_VALUE)
@ResponseBody
public String modifyModule(HttpServletRequest request, 
		  			       HttpServletResponse response,
		  			       @RequestBody Module module) {
	JSONObject jo = new JSONObject();
	try{
		moduleService.modifyModule(module);
		jo.put("message", "修改模块成功");
	}catch(Exception e){
		jo.put("message", "修改模块失败");
	}
	return jo.toString();
}
 
Example 9
Source File: JwSendMessageAPI.java    From jeewx-api with Apache License 2.0 5 votes vote down vote up
/**
 * 群发文本消息到指定的微信分组或所有人
 * 
 * @param accesstoken
 * @param is_to_all
 *            是否发送给所有人 ,ture 发送给所有人,false 按组发送
 * @param group
 *           微信的用户组,如果is_to_all=false,则字段必须填写
 * @param content
 *            文本内容
 * @return
 * @throws WexinReqException
 */
public static SendMessageResponse sendMessageToGroupOrAllWithText(String accesstoken, boolean is_to_all, Group group, String content) throws WexinReqException {
	SendMessageResponse response = null;
	if (accesstoken != null) {
		String requestUrl = message_group_url.replace("ACCESS_TOKEN", accesstoken);
		try {

			JSONObject obj = new JSONObject();
			JSONObject filter = new JSONObject();
			JSONObject text = new JSONObject();

			filter.put("is_to_all", is_to_all);
			if (!is_to_all) {
				filter.put("group_id", group.getId());

			}
			obj.put("filter", filter);

			text.put("content", content);
			obj.put("text", text);

			obj.put("msgtype", "text");

			JSONObject result = WxstoreUtils.httpRequest(requestUrl, "POST", obj.toString());
			//System.out.println("微信返回的结果:" + result.toString());
			response = (SendMessageResponse) JSONObject.toBean(result, SendMessageResponse.class);
		} catch (Exception e) {

			throw new WexinReqException(e);
		}
	} else {
		throw new WexinReqException("accesstoken 为空,请检查!");
	}
	return response;
}
 
Example 10
Source File: QuestionAction.java    From onlineSystem with Apache License 2.0 5 votes vote down vote up
/**
 * 通过id删除试卷
 * @return
 * @throws Exception
 */
public String questionDelete() throws Exception{
    question = questionService.getQuestionById(Integer.parseInt(questionId));
    questionService.deleteQuestion(question);
    JSONObject resultJson=new JSONObject();
    resultJson.put("success",true);
    ResponseUtil.write(resultJson,ServletActionContext.getResponse());
    return SUCCESS;
}
 
Example 11
Source File: PaperAction.java    From onlineSystem with Apache License 2.0 5 votes vote down vote up
/**
 * 删除试卷
 * @return
 * @throws Exception
 */
public String paperDelete() throws Exception{
    paper = paperService.getPaperById(Integer.valueOf(paperId));
    JSONObject resultJson=new JSONObject();
    paperService.deletePaper(paper);
    resultJson.put("success", true);
    ResponseUtil.write(resultJson, ServletActionContext.getResponse());
    return SUCCESS;
}
 
Example 12
Source File: CommonUtil.java    From SSM-CONSUMER with GNU General Public License v2.0 5 votes vote down vote up
public static JSONObject parseJson(String code, String msg, Object data){
    JSONObject jo = new JSONObject();
    //返回码,1表示成功,2表示失败
    jo.put("result", code);
    //中文提示
    jo.put("msg", msg);
    //返回数据
    jo.put("data", data);
    return jo;
}
 
Example 13
Source File: JwSendMessageAPI.java    From jeewx-api with Apache License 2.0 5 votes vote down vote up
/**
 * 群发图文消息到指定的微信openid数组
 * 
 * @param accesstoken
 * @param wxusers
 *            接受消息的微信用户数组
 * @param wxArticles
 *            图文素材集合
 * @return
 * @throws WexinReqException
 */
public static SendMessageResponse sendMessageToOpenidsWithArticles(String accesstoken, Wxuser[] wxusers, List<WxArticle> wxArticles) throws WexinReqException {
	SendMessageResponse response = null;
	if (accesstoken != null) {
		String requestUrl = message_openid_url.replace("ACCESS_TOKEN", accesstoken);
		List<String> openids = new ArrayList<String>();
		for(Wxuser wxuser : wxusers)
		{
			openids.add(wxuser.getOpenid());
		}
		try {
			String mediaId = getMediaId(accesstoken, wxArticles);
			JSONObject obj = new JSONObject();
			JSONObject mpnews = new JSONObject();
			obj.put("touser", openids);

			mpnews.put("media_id", mediaId);
			obj.put("mpnews", mpnews);

			obj.put("msgtype", "mpnews");
			JSONObject result = WxstoreUtils.httpRequest(requestUrl, "POST", obj.toString());
			//System.out.println("微信返回的结果:" + result.toString());
			response = (SendMessageResponse) JSONObject.toBean(result, SendMessageResponse.class);
		} catch (Exception e) {

			throw new WexinReqException(e);
		}
	} else {
		throw new WexinReqException("accesstoken 为空,请检查!");
	}
	return response;
}
 
Example 14
Source File: OHDSIApis.java    From Criteria2Query with Apache License 2.0 5 votes vote down vote up
public static JSONObject formatOneitem(Integer conceptId){
	JSONObject jo=new JSONObject();
	try {
		jo.put("conceptId", conceptId);
		jo.put("isExcluded", 0);
		jo.put("includeDescendants", 1);//
		jo.put("includeMapped", 0);//
	} catch (JSONException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
	return jo;
}
 
Example 15
Source File: RoleController.java    From JavaWeb with Apache License 2.0 5 votes vote down vote up
@PostMapping(value="/modifyRole",produces=MediaType.APPLICATION_JSON_UTF8_VALUE)
@ResponseBody
public String modifyRole(HttpServletRequest request, 
		  			     HttpServletResponse response,
		  			     @RequestBody Role role) {
	JSONObject jo = new JSONObject();
	try{
		roleService.modifyRole(role);
		jo.put("message", "修改角色成功");
	}catch(Exception e){
		jo.put("message", "修改角色失败");
	}
	return jo.toString();
}
 
Example 16
Source File: IdentityAction.java    From anychat with MIT License 5 votes vote down vote up
/**
 * 获取好友列表相当于组里的所有人
 * 
 * @param userGroupTopId
 *            组id
 * @param token
 *            身份
 * @return
 */
public static List<UserData> getFriendList(String userGroupTopId, String token) {
	JSONObject js = new JSONObject();
	js.put("hOpCode", "13");
	js.put("userGroupTopId", userGroupTopId);
	Map<String, String> header = new HashMap<>();
	header.put("hOpCode", "13");
	header.put("token", token);
	byte[] returnByte = HttpUtil.send(js.toString(), CommonConfigChat.IDENTITY_URL, header, HttpUtil.POST);
	if (returnByte != null) {
		String str = null;
		try {
			str = new String(returnByte, "UTF-8");
		} catch (UnsupportedEncodingException e) {
			WSManager.log.error("返回字符串解析异常", e);
		}
		JSONObject returnjs = JSONObject.fromObject(str);
		// 如果返回的是错误类型,说明用户中心拦截器没通过
		if (returnjs.getString("hOpCode").equals("0")) {
			return null;
		}
		JSONArray jsArray = returnjs.getJSONArray("user");
		List<UserData> list = new ArrayList<>();
		for (int i = 0; i < jsArray.size(); i++) {
			JSONObject user = jsArray.getJSONObject(i);
			UserData userData = new UserData(user);
			list.add(userData);
		}
		return list;
	}
	return null;
}
 
Example 17
Source File: RoleController.java    From JavaWeb with Apache License 2.0 5 votes vote down vote up
@PostMapping(value="/getRoles",produces=MediaType.APPLICATION_JSON_UTF8_VALUE)
@ResponseBody
public String getRoles(HttpServletRequest request, 
		  			   HttpServletResponse response,
		  			   @RequestBody JsonNode jsonNode) {
	JSONObject jo = new JSONObject();
	try{
		RoleSearchVO searchConditionVO = new RoleSearchVO();
		long currentPage = Long.parseLong(jsonNode.get("currentPage").asText());
		long pageSize = Long.parseLong(jsonNode.get("pageSize").asText());
		if(jsonNode.get("rolename")!=null){
			searchConditionVO.setRolename(jsonNode.get("rolename").asText());
		}
		if(jsonNode.get("startdate")!=null){
			searchConditionVO.setStartDate(jsonNode.get("startdate").asText());
		}
		if(jsonNode.get("enddate")!=null){
			searchConditionVO.setEndDate(jsonNode.get("enddate").asText());
		}
		Page page = new Page();
		Map<String,Object> map = new HashMap<>();
		map.put("searchCondition", searchConditionVO);
		long totalCount = roleService.rolesCount(map);
		page.setCurrentPage(currentPage-1);//从0开始
		page.setTotalCount(totalCount);
		page.setPageSize(pageSize);
		page.setTotalPage(totalCount%pageSize==0?totalCount/pageSize:totalCount/pageSize+1);
		page.setCurrentCount(page.getCurrentPage()*page.getPageSize());
		page.setTotalCount(totalCount);
		map.put("page", page);
		List<Role> list = roleService.getRoles(map);
		jo.put("list", list);
		jo.put("page", page);
		jo.put("message", "用户数据获取成功");
	}catch(Exception e){
		jo.put("message", "用户数据获取失败");
	}
	return jo.toString();
}
 
Example 18
Source File: PackerJenkinsPluginTest.java    From packer-plugin with MIT License 4 votes vote down vote up
@Test
public void testPluginBuildChdirAndJobFile() throws Exception {
    final String jsonText = "{ \"here\": \"i am\"}";

    final String templateFile = "pckr.json";

    PackerInstallation installation = new PackerInstallation(name, home,
            "-var 'a=b'", createTemplateModeJson(TemplateMode.FILE, templateFile),
            Collections.EMPTY_LIST, null);

    final String pluginHome = "bin";

    List<PackerFileEntry> wkspFileEntries = new ArrayList<>();
    PackerPublisher placeHolder = new PackerPublisher(name,
            null, null, pluginHome, "-var 'ami=123'", wkspFileEntries, false, "${WORKSPACE}/blah/here");

    PackerInstallation[] installations = new PackerInstallation[1];
    installations[0] = installation;

    placeHolder.getDescriptor().setInstallations(installations);

    StaplerRequest mockReq = mock(StaplerRequest.class);
    when(mockReq.bindJSON(any(Class.class), any(JSONObject.class))).thenReturn(placeHolder);

    JSONObject formJson = new JSONObject();
    formJson.put("templateMode", createTemplateModeJson(TemplateMode.FILE, templateFile));
    formJson.put("useDebug", true);
    PackerPublisher plugin = placeHolder.getDescriptor().newInstance(mockReq, formJson);

    FreeStyleProject project = jenkins.createFreeStyleProject();
    final FreeStyleBuild build = project.scheduleBuild2(0).get();

    Launcher launcherMock = mock(Launcher.class);
    BuildListener buildListenerMock = mock(BuildListener.class);

    final Proc procMock = mock(Proc.class);
    when(procMock.join()).thenReturn(0);
    when(launcherMock.launch(any(Launcher.ProcStarter.class))).then(new Answer<Proc>() {
        public Proc answer(InvocationOnMock invocation) throws Throwable {
            Launcher.ProcStarter param = (Launcher.ProcStarter) invocation.getArguments()[0];

            List<String> cmds = param.cmds();

            // Should be something like:
            // cmds: [/var/folders/5b/fpx3w1510fg4lg7_gxrn_lpwndtvmg/T/hudson8360654264565261160test/workspace/test0/bin/packer,
            //        build, -var, a=b, -var, ami=123,
            //        /var/folders/5b/fpx3w1510fg4lg7_gxrn_lpwndtvmg/T/packer8212864036611789292.json]

            for (int i = 0; i < cmds.size(); i++) {
                System.out.println("cmd(" + i + ") = " + cmds.get(i));
            }


            assertEquals(7, cmds.size());
            assertEquals(build.getWorkspace().getRemote() + "/bin/packer", cmds.get(0));
            assertEquals("build", cmds.get(1));
            assertEquals("-var", cmds.get(2));
            assertEquals("a=b", cmds.get(3));
            assertEquals("-var", cmds.get(4));
            assertEquals("ami=123", cmds.get(5));

            // /var/folders/rb/5j8w_qtn3_j5335pvy5ttg7n1cp53j/T/hudson8047293651954072708test/workspace/test0/blah/here/pckr.json
            assertTrue(cmds.get(6).endsWith("test/workspace/test0/blah/here/pckr.json"));


            assertEquals(build.getWorkspace().getRemote() + "/blah/here", param.pwd().getRemote());

            return procMock;
        }
    });

    assertTrue(plugin.perform((AbstractBuild) build, launcherMock, buildListenerMock));
}
 
Example 19
Source File: ScheduleController.java    From JavaWeb with Apache License 2.0 4 votes vote down vote up
@PostMapping(value="/getSchedule",produces=MediaType.APPLICATION_JSON_UTF8_VALUE)
@ResponseBody
public String getSchedule(HttpServletRequest request, 
		  			      HttpServletResponse response,
		  			      @RequestBody JsonNode jsonNode) {
	JSONObject jo = new JSONObject();
	final String pattern = "yyyy-MM-dd";
	final String pattern2 = "MM月dd日";
	try{
		String getYear = jsonNode.get("year").asText();
		String getMonth = jsonNode.get("month").asText();
		String yearMonth = getYear+"-"+getMonth+"-";
		String startDate = yearMonth+ConstantUtil.FIRST_DAY_OF_MONTH_STRING;
		String endDate = yearMonth+DateUtil.getLastDayOfMonth(Integer.parseInt(getYear),Integer.parseInt(getMonth));
		List<String> finalList = getDateList(startDate, endDate, pattern);
		Map<String,String> map = new HashMap<String,String>();
		map.put("startDate", finalList.get(0));
		map.put("endDate", finalList.get(finalList.size()-1));
		List<CompanySchedule> companyScheduleList = scheduleService.getScheduleByDate(map);
		JSONArray ja = new JSONArray();
		for (int i = 0; i < finalList.size(); i++) {
			JSONObject innerjo = new JSONObject();
			String date = finalList.get(i);
			boolean continueFlag = true;
			for(int j=0;j<companyScheduleList.size();j++){
				String companyDate = companyScheduleList.get(j).getCompanyDate();
				if(date.equals(companyDate)){
					date = DateUtil.getStringDate(date, pattern, pattern2);
					innerjo.put("date", date);
					innerjo.put("scheduleType", companyScheduleList.get(j).getCompanyScheduleType());
					continueFlag = false;
					break;
				}
			}
			if(continueFlag){
				int weekendsFlag = DateUtil.isWeekends(date, pattern)==true?1:2;
				date = DateUtil.getStringDate(date, pattern, pattern2);
				innerjo.put("date", date);
				innerjo.put("scheduleType", weekendsFlag);
			}
			ja.add(innerjo);
		}
		jo.put("dateList", ja);
	}catch(Exception e){
		jo.put("dateList", "");
	}
	return jo.toString();
}
 
Example 20
Source File: WeixinQrcodeController.java    From jeewx-boot with Apache License 2.0 4 votes vote down vote up
/**
 * 生成二维码
 * @return
 */
@RequestMapping(value = "/generateQrcode",method ={RequestMethod.GET, RequestMethod.POST})
@ResponseBody
public AjaxJson generateQrcode(WeixinQrcode weixinQrcode){
	AjaxJson j = new AjaxJson();
	j.setSuccess(false);
	//获取token方法
	String accessToken =WeiXinHttpUtil.getRedisWeixinToken(weixinQrcode.getJwid());
	if(oConvertUtils.isEmpty(accessToken)){
		j.setSuccess(false);
		j.setMsg("未获取到公众号accessToken");
		return j;
	}
	 String ticketurl = WeixinUtil.qrcode_ticket_url.replace("ACCESS_TOKEN",accessToken);
	 HashMap<String, Object> map = new HashMap<String, Object>();
	 HashMap<String, String> sceneMap = new HashMap<String, String>();
	 sceneMap.put("scene_id", weixinQrcode.getSceneId().toString());
	 map.put("scene", sceneMap);
	 JSONObject jsonQrcode = new JSONObject();
	 jsonQrcode.put("action_name", weixinQrcode.getActionName());
	 jsonQrcode.put("action_info", JSONObject.fromObject(map));
	 if(weixinQrcode.getActionName().equals("QR_SCENE")){
		 jsonQrcode.put("expire_seconds", weixinQrcode.getExpireSeconds());  //有效期
	 }
	 JSONObject ticketjson  = WeixinUtil.httpRequest(ticketurl, "POST", jsonQrcode.toString());
	 //判断是否执行成功
	 if(!ticketjson.containsKey("errcode")){
		 //取到ticket
		 String ticket = ticketjson.getString("ticket");
		 weixinQrcode.setTicket(ticket);
		 //通过ticket获取图片
		 String qrcodeimgurl =  WeixinUtil.get_qrcode_url.replace("TICKET",ticket);
		 weixinQrcode.setQrcodeUrl(qrcodeimgurl);
		 if(weixinQrcode.getActionName().equals("QR_SCENE")){
			 weixinQrcode.setExpireSeconds(weixinQrcode.getExpireSeconds());
			 Calendar cal = Calendar.getInstance(); 
			 cal.add(Calendar.SECOND,weixinQrcode.getExpireSeconds()); 
			 weixinQrcode.setExpireDate(cal.getTime());
		 }
		 weixinQrcodeService.doEdit(weixinQrcode);
		 j.setObj(qrcodeimgurl);
		 if(weixinQrcode.getExpireDate()!=null){
			 j.setMsg(DateUtils.formatDate(weixinQrcode.getExpireDate(),"yyyy-MM-dd HH:mm:ss"));
		 }
		 j.setSuccess(true);
	 }else{
		 j.setSuccess(false);
	 }
	 return j;
	 
}