소스 검색

Merge branch 'dev' of huangwenjie/wlyy2.0 into dev

huangwenjie 5 년 전
부모
커밋
4d38caf9d4

+ 8 - 0
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -569,6 +569,7 @@ public class ImService {
		String voiceIds = "";
		try {
			String voices = request.getParameter("voices");
			System.out.println("voices"+voices);
			if (org.apache.commons.lang3.StringUtils.isEmpty(voices)) {
				return voices;
			}
@ -602,12 +603,17 @@ public class ImService {
	public String saveVoiceToDisk(String mediaId,String wechat_appid) throws Exception {
		// 文件保存的临时路径
		String tempPath = upload_temp_path + File.separator;
		System.out.println("tempPath:"+tempPath);
		// 拼接年月日路径
		String datePath = DateUtil.getStringDate("yyyy") + File.separator + DateUtil.getStringDate("MM") + File.separator + DateUtil.getStringDate("dd") + File.separator;
		System.out.println("datePath:"+datePath);
		// 重命名文件
		String fileBase =  DateUtil.dateToStr(new Date(), DateUtil.YYYYMMDDHHMMSS) + "_" + new Random().nextInt(1000);
		System.out.println("fileBase:"+fileBase);
		String newFileName = fileBase+ ".amr";
		String mp3FileName  = fileBase + ".mp3";
		System.out.println("newFileName:"+newFileName);
		System.out.println("mp3FileName:"+mp3FileName);
		// 保存路径
		File uploadFile = new File(tempPath + datePath + newFileName);
		
@ -626,6 +632,8 @@ public class ImService {
			}
			String amrFilePath = tempPath+datePath+newFileName;
			String Mp3FilePath = tempPath+datePath+mp3FileName;
			System.out.println("amrFilePath:"+amrFilePath);
			System.out.println("Mp3FilePath:"+Mp3FilePath);
			fileUtil.changeToMp3(amrFilePath,Mp3FilePath);
			// 返回保存路径
			return Mp3FilePath;

+ 2 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/PatientConsultEndpoint.java

@ -496,7 +496,9 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
			String noncestr = UUID.randomUUID().toString();
			long timestamp = System.currentTimeMillis() / 1000;
			String url = pageUrl;
			logger.info("getSign.url="+url);
			String str = "jsapi_ticket=" + ticket + "&noncestr=" + noncestr + "&timestamp=" + timestamp + "&url=" + url;
			logger.info("getSign.str="+str);
			// sha1加密
			String signature = SHA1(str);
			map.put("noncestr", noncestr);