Browse Source

微信语音问题处理

8 years ago
parent
commit
4ad75cb8e9

+ 1 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/util/CommonUtil.java

@ -176,11 +176,10 @@ public class CommonUtil {
     */
    public static String copyTempVoice(String voices) throws  Exception {
        // 文件保存的临时路径
        String tempPath = SystemConf.getInstance().getTempPath() + File.separator;
        String serverUrl = SystemConf.getInstance().getSystemProperties().getProperty("fastdfs_file_url");
        FastDFSUtil fastDFSUtil = new FastDFSUtil();
        String fileUrls = "";
        File f = new File(tempPath + voices);
        File f = new File(voices);
        if (f.exists()) {
            String fileName = f.getName();
            InputStream in = new FileInputStream(f);

+ 1 - 4
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/WeixinBaseController.java

@ -19,8 +19,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import com.yihu.wlyy.entity.security.AccessToken;
import com.yihu.wlyy.entity.security.JsApiTicket;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.entity.security.Token;
import com.yihu.wlyy.service.common.account.AccessTokenService;
import com.yihu.wlyy.service.common.account.PatientService;
import com.yihu.wlyy.service.common.account.TokenService;
@ -442,9 +440,8 @@ public class WeixinBaseController extends BaseController {
			String amrFilePath = tempPath+datePath+newFileName;
			String Mp3FilePath = tempPath+datePath+mp3FileName;
			CommonUtil.changeToMp3(amrFilePath,Mp3FilePath);
			System.out.print("");
			// 返回保存路径
			return datePath + Mp3FilePath;
			return Mp3FilePath;
		} catch (IOException e) {
			e.printStackTrace();
		} finally {