主管理员 2 months ago
parent
commit
7005c644ef
27 changed files with 384 additions and 216 deletions
  1. +3
    -2
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/controller/AppletApiTTSController.java
  2. +18
    -0
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/entity/TtsVo.java
  3. +2
    -1
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/service/AppletApiTTService.java
  4. +42
    -39
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/service/impl/AppletApiTTServiceImpl.java
  5. +20
    -6
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/service/impl/AppletApiWaterServiceImpl.java
  6. +30
    -6
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/service/impl/WxAppletService.java
  7. +1
    -1
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/common/wxUtils/transfer/TransferToUser.java
  8. +3
    -0
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletConfig/service/IAppletConfigService.java
  9. +8
    -0
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletConfig/service/impl/AppletConfigServiceImpl.java
  10. +7
    -1
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletLink/entity/AppletLink.java
  11. +16
    -16
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletTtsCache/controller/AppletTtsCacheController.java
  12. +28
    -20
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletTtsCache/entity/AppletTtsCache.java
  13. +2
    -2
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletTtsCache/mapper/AppletTtsCacheMapper.java
  14. +2
    -2
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletTtsCache/service/IAppletTtsCacheService.java
  15. +2
    -2
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletTtsCache/service/impl/AppletTtsCacheServiceImpl.java
  16. +20
    -9
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletTtsCache/uniapp/AppletTtsCacheForm.vue
  17. +2
    -2
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletTtsCache/uniapp/AppletTtsCacheList.vue
  18. +22
    -10
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletTtsCache/uniapp3/AppletTtsCacheData.ts
  19. +50
    -38
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletTtsCache/uniapp3/AppletTtsCacheForm.vue
  20. +2
    -2
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletTtsCache/uniapp3/AppletTtsCacheList.vue
  21. +46
    -41
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletTtsCache/vue3/AppletTtsCache.data.ts
  22. +2
    -2
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletTtsCache/vue3/AppletTtsCacheList.vue
  23. +26
    -0
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletTtsCache/vue3/V20250923_1__menu_insert_AppletTtsCache.sql
  24. +4
    -0
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletVip/entity/AppletVip.java
  25. +3
    -3
      jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml
  26. +14
    -11
      jeecgboot-vue3/src/views/applet/withdrawal/AppletWithdrawal.data.ts
  27. +9
    -0
      txt.txt

+ 3
- 2
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/controller/AppletApiTTSController.java View File

@ -8,6 +8,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.config.shiro.IgnoreAuth; import org.jeecg.config.shiro.IgnoreAuth;
import org.jeecg.modules.applet.entity.TtsVo;
import org.jeecg.modules.applet.service.AppletApiTTService; import org.jeecg.modules.applet.service.AppletApiTTService;
import org.jeecg.modules.demo.appletTtsTimbre.entity.AppletTtsTimbre; import org.jeecg.modules.demo.appletTtsTimbre.entity.AppletTtsTimbre;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -78,7 +79,7 @@ public class AppletApiTTSController {
// return ResponseEntity.internalServerError().build(); // return ResponseEntity.internalServerError().build();
// } // }
// } // }
public Result<TextToVoiceResponse> textToVoice(
public Result<TtsVo> textToVoice(
@Parameter(description = "要转换的文本内容", required = true) String text, @Parameter(description = "要转换的文本内容", required = true) String text,
@Parameter(description = "语速,范围:[-2,6],默认为0-2代表0.6倍\n" + @Parameter(description = "语速,范围:[-2,6],默认为0-2代表0.6倍\n" +
"-1代表0.8倍\n" + "-1代表0.8倍\n" +
@ -90,7 +91,7 @@ public class AppletApiTTSController {
@Parameter(description = "音量大小,范围[-10,10],默认为0") Float volume, @Parameter(description = "音量大小,范围[-10,10],默认为0") Float volume,
@Parameter(description = "返回音频格式,可取值:wav(默认),mp3,pcm") String codec) { @Parameter(description = "返回音频格式,可取值:wav(默认),mp3,pcm") String codec) {
TextToVoiceResponse audioData = appletApiTTService.textToVoice(text, speed, voiceType, volume, codec);
TtsVo audioData = appletApiTTService.textToVoice(text, speed, voiceType, volume, codec);
return Result.ok(audioData); return Result.ok(audioData);
} }


+ 18
- 0
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/entity/TtsVo.java View File

@ -0,0 +1,18 @@
package org.jeecg.modules.applet.entity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class TtsVo {
private String url;
private double time;
}

+ 2
- 1
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/service/AppletApiTTService.java View File

@ -1,6 +1,7 @@
package org.jeecg.modules.applet.service; package org.jeecg.modules.applet.service;
import com.tencentcloudapi.tts.v20190823.models.TextToVoiceResponse; import com.tencentcloudapi.tts.v20190823.models.TextToVoiceResponse;
import org.jeecg.modules.applet.entity.TtsVo;
import org.jeecg.modules.demo.appletTtsTimbre.entity.AppletTtsTimbre; import org.jeecg.modules.demo.appletTtsTimbre.entity.AppletTtsTimbre;
import java.util.List; import java.util.List;
@ -15,7 +16,7 @@ public interface AppletApiTTService {
* @param codec 返回音频格式可取值wav默认mp3pcm * @param codec 返回音频格式可取值wav默认mp3pcm
* @return 音频二进制数据 * @return 音频二进制数据
*/ */
TextToVoiceResponse textToVoice(String text, Float speed, Integer voiceType, Float volume, String codec);
TtsVo textToVoice(String text, Float speed, Integer voiceType, Float volume, String codec);
List<AppletTtsTimbre> list(); List<AppletTtsTimbre> list();


+ 42
- 39
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/service/impl/AppletApiTTServiceImpl.java View File

@ -9,8 +9,10 @@ import com.tencentcloudapi.tts.v20190823.TtsClient;
import com.tencentcloudapi.tts.v20190823.models.TextToVoiceRequest; import com.tencentcloudapi.tts.v20190823.models.TextToVoiceRequest;
import com.tencentcloudapi.tts.v20190823.models.TextToVoiceResponse; import com.tencentcloudapi.tts.v20190823.models.TextToVoiceResponse;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.system.util.AppletUserUtil; import org.jeecg.common.system.util.AppletUserUtil;
import org.jeecg.common.util.oss.OssBootUtil; import org.jeecg.common.util.oss.OssBootUtil;
import org.jeecg.modules.applet.entity.TtsVo;
import org.jeecg.modules.applet.service.AppletApiTTService; import org.jeecg.modules.applet.service.AppletApiTTService;
import org.jeecg.modules.common.IdUtils; import org.jeecg.modules.common.IdUtils;
import org.jeecg.modules.demo.appletTtsPlayLog.service.IAppletTtsPlayLogService; import org.jeecg.modules.demo.appletTtsPlayLog.service.IAppletTtsPlayLogService;
@ -44,7 +46,7 @@ public class AppletApiTTServiceImpl implements AppletApiTTService {
private IAppletTtsCacheService appletTtsCacheService; private IAppletTtsCacheService appletTtsCacheService;
public TextToVoiceResponse textToVoice(String text, Float speed, Integer voiceType, Float volume, String codec) {
public TtsVo textToVoice(String text, Float speed, Integer voiceType, Float volume, String codec) {
long startTime = System.currentTimeMillis(); long startTime = System.currentTimeMillis();
String userId = AppletUserUtil.getCurrentAppletUserId(); String userId = AppletUserUtil.getCurrentAppletUserId();
@ -72,10 +74,10 @@ public class AppletApiTTServiceImpl implements AppletApiTTService {
savePlayLog(userId, text, voiceType, volume != null ? volume.doubleValue() : null, savePlayLog(userId, text, voiceType, volume != null ? volume.doubleValue() : null,
speed != null ? speed.doubleValue() : null, elapsedTime, true, existingCache.getId()); speed != null ? speed.doubleValue() : null, elapsedTime, true, existingCache.getId());
// 创建返回对象将audioId放在Audio字段中返回给前端
TextToVoiceResponse response = new TextToVoiceResponse();
response.setAudio(existingCache.getAudioId()); //返回音频文件URL
return response;
return TtsVo.builder()
.url(existingCache.getAudioId())
.time(existingCache.getDuration())
.build();
} }
// 2. 缓存未命中调用腾讯云TTS接口生成音频 // 2. 缓存未命中调用腾讯云TTS接口生成音频
@ -141,48 +143,49 @@ public class AppletApiTTServiceImpl implements AppletApiTTService {
// 使用ByteArrayInputStream上传到OSS // 使用ByteArrayInputStream上传到OSS
ByteArrayInputStream inputStream = new ByteArrayInputStream(audioData); ByteArrayInputStream inputStream = new ByteArrayInputStream(audioData);
String audioUrl = OssBootUtil.upload(inputStream, "tts/" + fileName); String audioUrl = OssBootUtil.upload(inputStream, "tts/" + fileName);
if (audioUrl != null) {
// 4. 保存到缓存数据库
AppletTtsCache cache = new AppletTtsCache();
cache.setAudioId(audioUrl);
cache.setText(text);
cache.setVoiceType(voiceType);
cache.setVolume(volume != null ? volume.doubleValue() : null);
cache.setSpeed(speed != null ? speed.doubleValue() : null);
cache.setSuccess("Y");
cache.setCreateTime(new java.util.Date());
// 计算音频时长通过音频文件解析获得真实时长
Double realDuration = AudioDurationUtil.calculateDuration(audioData);
if (realDuration != null) {
cache.setDuration(realDuration);
log.info("音频真实时长计算成功: {}秒", realDuration);
} else {
// 如果真实时长计算失败使用文本长度估算作为备选方案
if (text != null) {
double estimatedDuration = text.length() / 5.0;
cache.setDuration(estimatedDuration);
log.warn("音频真实时长计算失败,使用文本长度估算: {}秒", estimatedDuration);
}
}
appletTtsCacheService.save(cache);
cacheId = cache.getId();
log.info("TTS音频生成成功并已缓存,audioUrl: {}, cacheId: {}", audioUrl, cacheId);
} else {
if (audioUrl == null) {
log.error("音频上传到OSS失败"); log.error("音频上传到OSS失败");
throw new JeecgBootException("音频上传到OSS失败");
}
AppletTtsCache cache = new AppletTtsCache();
// 4. 保存到缓存数据库
cache.setAudioId(audioUrl);
cache.setText(text);
cache.setVoiceType(voiceType);
cache.setVolume(volume != null ? volume.doubleValue() : null);
cache.setSpeed(speed != null ? speed.doubleValue() : null);
cache.setSuccess("Y");
cache.setState(1);
cache.setCreateTime(new java.util.Date());
// 计算音频时长通过音频文件解析获得真实时长
Double realDuration = AudioDurationUtil.calculateDuration(audioData);
if (realDuration != null) {
cache.setDuration(realDuration);
log.info("音频真实时长计算成功: {}秒", realDuration);
} else {
// 如果真实时长计算失败使用文本长度估算作为备选方案
if (text != null) {
double estimatedDuration = text.length() / 5.0;
cache.setDuration(estimatedDuration);
log.warn("音频真实时长计算失败,使用文本长度估算: {}秒", estimatedDuration);
}
} }
appletTtsCacheService.save(cache);
cacheId = cache.getId();
log.info("TTS音频生成成功并已缓存,audioUrl: {}, cacheId: {}", audioUrl, cacheId);
// 记录成功的TTS调用日志 // 记录成功的TTS调用日志
savePlayLog(userId, text, voiceType, volume != null ? volume.doubleValue() : null, savePlayLog(userId, text, voiceType, volume != null ? volume.doubleValue() : null,
speed != null ? speed.doubleValue() : null, elapsedTime, true, cacheId); speed != null ? speed.doubleValue() : null, elapsedTime, true, cacheId);
// 返回音频URL给前端
resp.setAudio(audioUrl);
log.info("TTS调用成功,文本长度: {}, 耗时: {}秒", text != null ? text.length() : 0, elapsedTime); log.info("TTS调用成功,文本长度: {}, 耗时: {}秒", text != null ? text.length() : 0, elapsedTime);
return resp;
return TtsVo.builder()
.url(cache.getAudioId())
.time(cache.getDuration())
.build();
} else { } else {
// 记录失败的TTS调用日志 // 记录失败的TTS调用日志
savePlayLog(userId, text, voiceType, volume != null ? volume.doubleValue() : null, savePlayLog(userId, text, voiceType, volume != null ? volume.doubleValue() : null,


+ 20
- 6
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/service/impl/AppletApiWaterServiceImpl.java View File

@ -77,6 +77,7 @@ public class AppletApiWaterServiceImpl implements AppletApiWaterService {
// 获取必要的配置信息 // 获取必要的配置信息
String xcxSharePage = appletConfigService.getContentByCode("xcxSharePage"); String xcxSharePage = appletConfigService.getContentByCode("xcxSharePage");
String backgroundImageUrl = appletConfigService.getContentByCode("qr_code_bg");
try { try {
@ -96,7 +97,7 @@ public class AppletApiWaterServiceImpl implements AppletApiWaterService {
param.put("line_color", line_color); param.put("line_color", line_color);
// param.put("is_hyaline", true);
param.put("is_hyaline", true);
// 获取微信小程序码 // 获取微信小程序码
String accessToken = wxHttpUtils.getAccessToken(); String accessToken = wxHttpUtils.getAccessToken();
@ -109,8 +110,8 @@ public class AppletApiWaterServiceImpl implements AppletApiWaterService {
ResponseEntity<byte[]> entity = rest.exchange(url, HttpMethod.POST, requestEntity, byte[].class, new Object[0]); ResponseEntity<byte[]> entity = rest.exchange(url, HttpMethod.POST, requestEntity, byte[].class, new Object[0]);
byte[] qrCodeBytes = entity.getBody(); byte[] qrCodeBytes = entity.getBody();
return qrCodeBytes;
// return this.generateAndCombineImagesFromUrl2(qrCodeBytes, backgroundImageUrl);
// return qrCodeBytes;
return this.generateAndCombineImagesFromUrl2(qrCodeBytes, backgroundImageUrl);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
return null; return null;
@ -121,6 +122,10 @@ public class AppletApiWaterServiceImpl implements AppletApiWaterService {
public byte[] generateAndCombineImagesFromUrl2(byte[] qrCodeImageByte, String backgroundUrl) { public byte[] generateAndCombineImagesFromUrl2(byte[] qrCodeImageByte, String backgroundUrl) {
File file = null; File file = null;
try { try {
int qr_code_y = appletConfigService.getContentByCodeAsInt("qr_code_y");
int qr_code_x = appletConfigService.getContentByCodeAsInt("qr_code_x");
// 从字节数组加载小程序码图像 // 从字节数组加载小程序码图像
BufferedImage qrCodeImage = ImageIO.read(new ByteArrayInputStream(qrCodeImageByte)); BufferedImage qrCodeImage = ImageIO.read(new ByteArrayInputStream(qrCodeImageByte));
@ -138,7 +143,7 @@ public class AppletApiWaterServiceImpl implements AppletApiWaterService {
int qrCodeY = (int) ((backgroundImage.getHeight() - wh) * 0.6); int qrCodeY = (int) ((backgroundImage.getHeight() - wh) * 0.6);
// 绘制小程序码图像 // 绘制小程序码图像
g2d.drawImage(qrCodeImage, qrCodeX, qrCodeY, wh, wh, null);
g2d.drawImage(qrCodeImage, qrCodeX + qr_code_x, qrCodeY + qr_code_y, wh, wh, null);
// 释放Graphics2D资源 // 释放Graphics2D资源
g2d.dispose(); g2d.dispose();
@ -204,8 +209,8 @@ public class AppletApiWaterServiceImpl implements AppletApiWaterService {
if (appletWithdrawal.getMoney() == null) { if (appletWithdrawal.getMoney() == null) {
throw new JeecgBootException("提现金额不能为空"); throw new JeecgBootException("提现金额不能为空");
} }
if (appletWithdrawal.getMoney().compareTo(new BigDecimal(0.03)) <= 0) {
throw new JeecgBootException("提现金额不能为负数");
if (appletWithdrawal.getMoney().compareTo(new BigDecimal("0.3")) < 0) {
throw new JeecgBootException("提现金额不能小于0.3元");
} }
if (appletWithdrawal.getName() == null) { if (appletWithdrawal.getName() == null) {
@ -237,7 +242,16 @@ public class AppletApiWaterServiceImpl implements AppletApiWaterService {
//保存提现记录 //保存提现记录
appletWithdrawal.setWaterId(water.getId()); appletWithdrawal.setWaterId(water.getId());
appletWithdrawal.setWithdrawStatus("0"); appletWithdrawal.setWithdrawStatus("0");
appletWithdrawal.setStatus("0");
appletWithdrawal.setUserId(userId); appletWithdrawal.setUserId(userId);
// 根据提现金额设置提现方式大于200元为线下(1)否则为微信(0)
if (appletWithdrawal.getMoney().compareTo(new BigDecimal("200")) > 0) {
appletWithdrawal.setMethod("1"); // 线下
} else {
appletWithdrawal.setMethod("0"); // 微信
}
appletWithdrawalService.save(appletWithdrawal); appletWithdrawalService.save(appletWithdrawal);
return appletWithdrawal; return appletWithdrawal;
} }


+ 30
- 6
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/service/impl/WxAppletService.java View File

@ -232,20 +232,43 @@ public class WxAppletService {
TransferToUser.TransferToUserRequest request = new TransferToUser.TransferToUserRequest(); TransferToUser.TransferToUserRequest request = new TransferToUser.TransferToUserRequest();
request.appid = appid; request.appid = appid;
request.outBillNo = withdrawal.getId(); request.outBillNo = withdrawal.getId();
request.transferSceneId = "1010";//商户转账场景ID 1010-二手回收
request.transferSceneId = "1005";//
request.openid = user.getOpenid(); request.openid = user.getOpenid();
request.userName = withdrawal.getName();
request.userName = client.encrypt(withdrawal.getName());
request.transferAmount = withdrawal.getMoney().multiply(new BigDecimal(100)).longValue();//单位为分 request.transferAmount = withdrawal.getMoney().multiply(new BigDecimal(100)).longValue();//单位为分
request.transferRemark = "备注";
request.transferRemark = "佣金报酬";
request.notifyUrl = transferNotify; request.notifyUrl = transferNotify;
// request.notifyUrl = "https://www.yurangongfang.com/massage-admin/massage/cash/cashoutNotify/"; // request.notifyUrl = "https://www.yurangongfang.com/massage-admin/massage/cash/cashoutNotify/";
request.userRecvPerception = "";
request.userRecvPerception = "劳务报酬";
request.transferSceneReportInfos = new ArrayList<>(); request.transferSceneReportInfos = new ArrayList<>();
{ {
TransferToUser.TransferSceneReportInfo item0 = new TransferToUser.TransferSceneReportInfo(); TransferToUser.TransferSceneReportInfo item0 = new TransferToUser.TransferSceneReportInfo();
item0.infoType = "回收商品名称";
item0.infoContent = "衣服";
item0.infoType = "岗位类型";
item0.infoContent = "外卖员";
request.transferSceneReportInfos.add(item0); request.transferSceneReportInfos.add(item0);
TransferToUser.TransferSceneReportInfo item1 = new TransferToUser.TransferSceneReportInfo();
item1.infoType = "报酬说明";
item1.infoContent = "高温补贴";
request.transferSceneReportInfos.add(item1);
// TransferToUser.TransferSceneReportInfo item0 = new TransferToUser.TransferSceneReportInfo();
// item0.infoType = map.get("infoType1").toString();
// item0.infoContent = map.get("infoContent1").toString();
// request.transferSceneReportInfos.add(item0);
// TransferToUser.TransferSceneReportInfo item1 = new TransferToUser.TransferSceneReportInfo();
// item1.infoType = map.get("infoType2").toString();
// item1.infoContent = map.get("infoContent2").toString();
// request.transferSceneReportInfos.add(item1);
// map.put("transferRemark", "佣金报酬");//商户转账场景ID 1005-佣金报酬
// map.put("userRecvPerception", "劳务报酬");//商户转账场景ID 1005-佣金报酬
//变化的用户信息参数
//转账场景报备信息ransfer_scene_report_infos为数组类型参数在现金营销的转账场景下需固定传两条明细每条转账场景报备信息明细包含info_typeinfo_content两个参数
// map.put("infoType1","岗位类型");
// map.put("infoContent1","外卖员");
// map.put("infoType2","报酬说明");
// map.put("infoContent2","高温补贴");
} }
//3执行提现 //3执行提现
@ -253,6 +276,7 @@ public class WxAppletService {
try { try {
response = client.run(request); response = client.run(request);
}catch (WXPayUtility.ApiException e){ }catch (WXPayUtility.ApiException e){
log.error("提现失败 {}", e.getMessage());
if (e.statusCode == 400){ if (e.statusCode == 400){
throw new JeecgBootException("请输入您的真实姓名"); throw new JeecgBootException("请输入您的真实姓名");
} }


+ 1
- 1
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/common/wxUtils/transfer/TransferToUser.java View File

@ -37,7 +37,7 @@ public class TransferToUser {
// map.put("method", "POST");//请求类型 // map.put("method", "POST");//请求类型
// map.put("path", "/v3/fund-app/mch-transfer/transfer-bills");//提现接口 // map.put("path", "/v3/fund-app/mch-transfer/transfer-bills");//提现接口
String uri = "https://api.mch.weixin.qq.com";
String uri = "/v3/fund-app/mch-transfer/transfer-bills";
String host = "https://api.mch.weixin.qq.com"; String host = "https://api.mch.weixin.qq.com";
String method = "POST"; String method = "POST";
String reqBody = WXPayUtility.toJson(request); String reqBody = WXPayUtility.toJson(request);


+ 3
- 0
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletConfig/service/IAppletConfigService.java View File

@ -13,4 +13,7 @@ public interface IAppletConfigService extends IService<AppletConfig> {
String getContentByCode(String code); String getContentByCode(String code);
Integer getContentByCodeAsInt(String code);
} }

+ 8
- 0
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletConfig/service/impl/AppletConfigServiceImpl.java View File

@ -26,4 +26,12 @@ public class AppletConfigServiceImpl extends ServiceImpl<AppletConfigMapper, App
return config != null ? config.getContent() : null; return config != null ? config.getContent() : null;
} }
@Override
public Integer getContentByCodeAsInt(String code) {
String i = getContentByCode(code);
return i != null ? Integer.parseInt(i) : null;
}
} }

+ 7
- 1
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletLink/entity/AppletLink.java View File

@ -69,6 +69,12 @@ public class AppletLink implements Serializable {
*/ */
@Schema(description = "所属部门") @Schema(description = "所属部门")
private java.lang.String sysOrgCode; private java.lang.String sysOrgCode;
/**
* 标题
*/
@Excel(name = "标题", width = 15)
@Schema(description = "标题")
private java.lang.String title;
/** /**
* 图片 * 图片
*/ */
@ -80,7 +86,7 @@ public class AppletLink implements Serializable {
*/ */
@Excel(name = "类型", width = 15, dicCode = "applet_content_type") @Excel(name = "类型", width = 15, dicCode = "applet_content_type")
@Dict(dicCode = "applet_content_type") @Dict(dicCode = "applet_content_type")
@Schema(description = "类型 普通:0 个人语境定制方案:1 个人语境定制方案:2")
@Schema(description = "类型 (普通:0) (个人语境定制方案:1)")
private java.lang.String type; private java.lang.String type;
/** /**
* 内容 * 内容


+ 16
- 16
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletTtsCache/controller/AppletTtsCacheController.java View File

@ -39,12 +39,12 @@ import io.swagger.v3.oas.annotations.Operation;
import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.aspect.annotation.AutoLog;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
/** /**
* @Description: 朗读音频
* @Description: applet_tts_cache
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2025-09-21
* @Date: 2025-09-23
* @Version: V1.0 * @Version: V1.0
*/ */
@Tag(name="朗读音频")
@Tag(name="applet_tts_cache")
@RestController @RestController
@RequestMapping("/appletTtsCache/appletTtsCache") @RequestMapping("/appletTtsCache/appletTtsCache")
@Slf4j @Slf4j
@ -61,8 +61,8 @@ public class AppletTtsCacheController extends JeecgController<AppletTtsCache, IA
* @param req * @param req
* @return * @return
*/ */
//@AutoLog(value = "朗读音频-分页列表查询")
@Operation(summary="朗读音频-分页列表查询")
//@AutoLog(value = "applet_tts_cache-分页列表查询")
@Operation(summary="applet_tts_cache-分页列表查询")
@GetMapping(value = "/list") @GetMapping(value = "/list")
public Result<IPage<AppletTtsCache>> queryPageList(AppletTtsCache appletTtsCache, public Result<IPage<AppletTtsCache>> queryPageList(AppletTtsCache appletTtsCache,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@ -82,8 +82,8 @@ public class AppletTtsCacheController extends JeecgController<AppletTtsCache, IA
* @param appletTtsCache * @param appletTtsCache
* @return * @return
*/ */
@AutoLog(value = "朗读音频-添加")
@Operation(summary="朗读音频-添加")
@AutoLog(value = "applet_tts_cache-添加")
@Operation(summary="applet_tts_cache-添加")
@RequiresPermissions("appletTtsCache:applet_tts_cache:add") @RequiresPermissions("appletTtsCache:applet_tts_cache:add")
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result<String> add(@RequestBody AppletTtsCache appletTtsCache) { public Result<String> add(@RequestBody AppletTtsCache appletTtsCache) {
@ -98,8 +98,8 @@ public class AppletTtsCacheController extends JeecgController<AppletTtsCache, IA
* @param appletTtsCache * @param appletTtsCache
* @return * @return
*/ */
@AutoLog(value = "朗读音频-编辑")
@Operation(summary="朗读音频-编辑")
@AutoLog(value = "applet_tts_cache-编辑")
@Operation(summary="applet_tts_cache-编辑")
@RequiresPermissions("appletTtsCache:applet_tts_cache:edit") @RequiresPermissions("appletTtsCache:applet_tts_cache:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody AppletTtsCache appletTtsCache) { public Result<String> edit(@RequestBody AppletTtsCache appletTtsCache) {
@ -113,8 +113,8 @@ public class AppletTtsCacheController extends JeecgController<AppletTtsCache, IA
* @param id * @param id
* @return * @return
*/ */
@AutoLog(value = "朗读音频-通过id删除")
@Operation(summary="朗读音频-通过id删除")
@AutoLog(value = "applet_tts_cache-通过id删除")
@Operation(summary="applet_tts_cache-通过id删除")
@RequiresPermissions("appletTtsCache:applet_tts_cache:delete") @RequiresPermissions("appletTtsCache:applet_tts_cache:delete")
@DeleteMapping(value = "/delete") @DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) { public Result<String> delete(@RequestParam(name="id",required=true) String id) {
@ -128,8 +128,8 @@ public class AppletTtsCacheController extends JeecgController<AppletTtsCache, IA
* @param ids * @param ids
* @return * @return
*/ */
@AutoLog(value = "朗读音频-批量删除")
@Operation(summary="朗读音频-批量删除")
@AutoLog(value = "applet_tts_cache-批量删除")
@Operation(summary="applet_tts_cache-批量删除")
@RequiresPermissions("appletTtsCache:applet_tts_cache:deleteBatch") @RequiresPermissions("appletTtsCache:applet_tts_cache:deleteBatch")
@DeleteMapping(value = "/deleteBatch") @DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
@ -143,8 +143,8 @@ public class AppletTtsCacheController extends JeecgController<AppletTtsCache, IA
* @param id * @param id
* @return * @return
*/ */
//@AutoLog(value = "朗读音频-通过id查询")
@Operation(summary="朗读音频-通过id查询")
//@AutoLog(value = "applet_tts_cache-通过id查询")
@Operation(summary="applet_tts_cache-通过id查询")
@GetMapping(value = "/queryById") @GetMapping(value = "/queryById")
public Result<AppletTtsCache> queryById(@RequestParam(name="id",required=true) String id) { public Result<AppletTtsCache> queryById(@RequestParam(name="id",required=true) String id) {
AppletTtsCache appletTtsCache = appletTtsCacheService.getById(id); AppletTtsCache appletTtsCache = appletTtsCacheService.getById(id);
@ -163,7 +163,7 @@ public class AppletTtsCacheController extends JeecgController<AppletTtsCache, IA
@RequiresPermissions("appletTtsCache:applet_tts_cache:exportXls") @RequiresPermissions("appletTtsCache:applet_tts_cache:exportXls")
@RequestMapping(value = "/exportXls") @RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, AppletTtsCache appletTtsCache) { public ModelAndView exportXls(HttpServletRequest request, AppletTtsCache appletTtsCache) {
return super.exportXls(request, appletTtsCache, AppletTtsCache.class, "朗读音频");
return super.exportXls(request, appletTtsCache, AppletTtsCache.class, "applet_tts_cache");
} }
/** /**


+ 28
- 20
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletTtsCache/entity/AppletTtsCache.java View File

@ -20,26 +20,31 @@ import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
/** /**
* @Description: 朗读音频
* @Description: applet_tts_cache
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2025-09-21
* @Date: 2025-09-23
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("applet_tts_cache") @TableName("applet_tts_cache")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Schema(description="朗读音频")
@Schema(description="applet_tts_cache")
public class AppletTtsCache implements Serializable { public class AppletTtsCache implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**id*/
/**ID*/
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@Schema(description = "id")
@Schema(description = "ID")
private java.lang.String id; private java.lang.String id;
/**创建人*/ /**创建人*/
@Schema(description = "创建人") @Schema(description = "创建人")
private java.lang.String createBy; private java.lang.String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "创建日期")
private java.util.Date createTime;
/**更新人*/ /**更新人*/
@Schema(description = "更新人") @Schema(description = "更新人")
private java.lang.String updateBy; private java.lang.String updateBy;
@ -51,22 +56,17 @@ public class AppletTtsCache implements Serializable {
/**所属部门*/ /**所属部门*/
@Schema(description = "所属部门") @Schema(description = "所属部门")
private java.lang.String sysOrgCode; private java.lang.String sysOrgCode;
/**ID*/
@Excel(name = "ID", width = 15)
@Schema(description = "ID")
/**音频文件ID/URL*/
@Excel(name = "音频文件ID/URL", width = 15)
@Schema(description = "音频文件ID/URL")
private java.lang.String audioId; private java.lang.String audioId;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "创建日期")
private java.util.Date createTime;
/**时长*/
@Excel(name = "时长", width = 15)
@Schema(description = "时长")
/**音频时长(秒)*/
@Excel(name = "音频时长(秒)", width = 15)
@Schema(description = "音频时长(秒)")
private java.lang.Double duration; private java.lang.Double duration;
/**文本*/
@Excel(name = "文本", width = 15)
@Schema(description = "文本")
/**朗读文本内容*/
@Excel(name = "朗读文本内容", width = 15)
@Schema(description = "朗读文本内容")
private java.lang.String text; private java.lang.String text;
/**音色ID*/ /**音色ID*/
@Excel(name = "音色ID", width = 15) @Excel(name = "音色ID", width = 15)
@ -81,7 +81,15 @@ public class AppletTtsCache implements Serializable {
@Schema(description = "语速") @Schema(description = "语速")
private java.lang.Double speed; private java.lang.Double speed;
/**是否成功*/ /**是否成功*/
@Excel(name = "是否成功", width = 15,replace = {"是_Y","否_N"} )
@Excel(name = "是否成功", width = 15)
@Schema(description = "是否成功") @Schema(description = "是否成功")
private java.lang.String success; private java.lang.String success;
/**页面*/
@Excel(name = "页面", width = 15)
@Schema(description = "页面")
private java.lang.String pageId;
/**状态*/
@Excel(name = "状态", width = 15)
@Schema(description = "状态 0生成中 1已完成")
private java.lang.Integer state;
} }

+ 2
- 2
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletTtsCache/mapper/AppletTtsCacheMapper.java View File

@ -7,9 +7,9 @@ import org.jeecg.modules.demo.appletTtsCache.entity.AppletTtsCache;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/** /**
* @Description: 朗读音频
* @Description: applet_tts_cache
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2025-09-21
* @Date: 2025-09-23
* @Version: V1.0 * @Version: V1.0
*/ */
public interface AppletTtsCacheMapper extends BaseMapper<AppletTtsCache> { public interface AppletTtsCacheMapper extends BaseMapper<AppletTtsCache> {


+ 2
- 2
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletTtsCache/service/IAppletTtsCacheService.java View File

@ -4,9 +4,9 @@ import org.jeecg.modules.demo.appletTtsCache.entity.AppletTtsCache;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* @Description: 朗读音频
* @Description: applet_tts_cache
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2025-09-21
* @Date: 2025-09-23
* @Version: V1.0 * @Version: V1.0
*/ */
public interface IAppletTtsCacheService extends IService<AppletTtsCache> { public interface IAppletTtsCacheService extends IService<AppletTtsCache> {


+ 2
- 2
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletTtsCache/service/impl/AppletTtsCacheServiceImpl.java View File

@ -8,9 +8,9 @@ import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/** /**
* @Description: 朗读音频
* @Description: applet_tts_cache
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2025-09-21
* @Date: 2025-09-23
* @Version: V1.0 * @Version: V1.0
*/ */
@Service @Service


+ 20
- 9
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletTtsCache/uniapp/AppletTtsCacheForm.vue View File

@ -3,34 +3,33 @@
<!--标题和返回--> <!--标题和返回-->
<cu-custom :bgColor="NavBarColor" isBack :backRouterName="backRouteName"> <cu-custom :bgColor="NavBarColor" isBack :backRouterName="backRouteName">
<block slot="backText">返回</block> <block slot="backText">返回</block>
<block slot="content">朗读音频</block>
<block slot="content">applet_tts_cache</block>
</cu-custom> </cu-custom>
<!--表单区域--> <!--表单区域-->
<view> <view>
<form> <form>
<view class="cu-form-group"> <view class="cu-form-group">
<view class="flex align-center"> <view class="flex align-center">
<view class="title"><text space="ensp">ID</text></view>
<input placeholder="请输入ID" v-model="model.audioId"/>
<view class="title"><text space="ensp">音频文件ID/URL</text></view>
<input placeholder="请输入音频文件ID/URL" v-model="model.audioId"/>
</view> </view>
</view> </view>
<my-date label="创建日期:" v-model="model.createTime" placeholder="请输入创建日期"></my-date>
<view class="cu-form-group"> <view class="cu-form-group">
<view class="flex align-center"> <view class="flex align-center">
<view class="title"><text space="ensp">时长</text></view>
<input type="number" placeholder="请输入时长" v-model="model.duration"/>
<view class="title"><text space="ensp">音频时长()</text></view>
<input type="number" placeholder="请输入音频时长(秒)" v-model="model.duration"/>
</view> </view>
</view> </view>
<view class="cu-form-group"> <view class="cu-form-group">
<view class="flex align-center"> <view class="flex align-center">
<view class="title"><text space="ensp">文本</text></view>
<input placeholder="请输入文本" v-model="model.text"/>
<view class="title"><text space="ensp">朗读文本内容</text></view>
<input placeholder="请输入朗读文本内容" v-model="model.text"/>
</view> </view>
</view> </view>
<view class="cu-form-group"> <view class="cu-form-group">
<view class="flex align-center"> <view class="flex align-center">
<view class="title"><text space="ensp">音色ID</text></view> <view class="title"><text space="ensp">音色ID</text></view>
<input type="number" placeholder="请输入音色ID" v-model="model.voicetype"/>
<input type="number" placeholder="请输入音色ID" v-model="model.voiceType"/>
</view> </view>
</view> </view>
<view class="cu-form-group"> <view class="cu-form-group">
@ -50,6 +49,18 @@
<view class="title"><text space="ensp">是否成功</text></view> <view class="title"><text space="ensp">是否成功</text></view>
<input placeholder="请输入是否成功" v-model="model.success"/> <input placeholder="请输入是否成功" v-model="model.success"/>
</view> </view>
</view>
<view class="cu-form-group">
<view class="flex align-center">
<view class="title"><text space="ensp">页面</text></view>
<input placeholder="请输入页面" v-model="model.pageId"/>
</view>
</view>
<view class="cu-form-group">
<view class="flex align-center">
<view class="title"><text space="ensp">状态</text></view>
<input type="number" placeholder="请输入状态" v-model="model.state"/>
</view>
</view> </view>
<view class="padding"> <view class="padding">
<button class="cu-btn block bg-blue margin-tb-sm lg" @click="onSubmit"> <button class="cu-btn block bg-blue margin-tb-sm lg" @click="onSubmit">


+ 2
- 2
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletTtsCache/uniapp/AppletTtsCacheList.vue View File

@ -3,7 +3,7 @@
<!--标题和返回--> <!--标题和返回-->
<cu-custom :bgColor="NavBarColor" isBack> <cu-custom :bgColor="NavBarColor" isBack>
<block slot="backText">返回</block> <block slot="backText">返回</block>
<block slot="content">朗读音频</block>
<block slot="content">applet_tts_cache</block>
</cu-custom> </cu-custom>
<!--滚动加载列表--> <!--滚动加载列表-->
<mescroll-body ref="mescrollRef" bottom="88" @init="mescrollInit" :up="upOption" :down="downOption" @down="downCallback" @up="upCallback"> <mescroll-body ref="mescrollRef" bottom="88" @init="mescrollInit" :up="upOption" :down="downOption" @down="downCallback" @up="upCallback">
@ -25,7 +25,7 @@
import Mixin from "@/common/mixin/Mixin.js"; import Mixin from "@/common/mixin/Mixin.js";
export default { export default {
name: '朗读音频',
name: 'applet_tts_cache',
mixins: [MescrollMixin,Mixin], mixins: [MescrollMixin,Mixin],
data() { data() {
return { return {


+ 22
- 10
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletTtsCache/uniapp3/AppletTtsCacheData.ts View File

@ -2,24 +2,29 @@ import { render } from '@/common/renderUtils';
//列表数据 //列表数据
export const columns = [ export const columns = [
{ {
title: 'ID',
title: '音频文件ID/URL',
align:"center", align:"center",
dataIndex: 'audioId' dataIndex: 'audioId'
}, },
{ {
title: '创建日期',
title: '音频时长(秒)',
align:"center", align:"center",
dataIndex: 'createTime'
dataIndex: 'duration'
}, },
{ {
title: '时长',
title: '朗读文本内容',
align:"center", align:"center",
dataIndex: 'duration'
dataIndex: 'text'
}, },
{ {
title: '音色ID', title: '音色ID',
align:"center", align:"center",
dataIndex: 'voicetype'
dataIndex: 'voiceType'
},
{
title: '音量',
align:"center",
dataIndex: 'volume'
}, },
{ {
title: '语速', title: '语速',
@ -29,9 +34,16 @@ export const columns = [
{ {
title: '是否成功', title: '是否成功',
align:"center", align:"center",
dataIndex: 'success',
customRender:({text}) => {
return render.renderSwitch(text, [{text:'是',value:'Y'},{text:'否',value:'N'}])
},
dataIndex: 'success'
},
{
title: '页面',
align:"center",
dataIndex: 'pageId'
},
{
title: '状态',
align:"center",
dataIndex: 'state'
}, },
]; ];

+ 50
- 38
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletTtsCache/uniapp3/AppletTtsCacheForm.vue View File

@ -3,7 +3,7 @@
layout: 'default', layout: 'default',
style: { style: {
navigationStyle: 'custom', navigationStyle: 'custom',
navigationBarTitleText: '朗读音频',
navigationBarTitleText: 'applet_tts_cache',
}, },
} }
</route> </route>
@ -17,42 +17,32 @@ navigationBarTitleText: '朗读音频',
<wd-input <wd-input
label-width="100px" label-width="100px"
v-model="myFormData['audioId']" v-model="myFormData['audioId']"
:label="get4Label('ID')"
:label="get4Label('音频文件ID/URL')"
name='audioId' name='audioId'
prop='audioId' prop='audioId'
placeholder="请选择ID"
placeholder="请选择音频文件ID/URL"
:rules="[ :rules="[
]" ]"
clearable clearable
/> />
</view> </view>
<view class="{ 'mt-14px': 1 == 0 }"> <view class="{ 'mt-14px': 1 == 0 }">
<DateTime
:label="get4Label('创建日期')"
labelWidth="100px"
type="datetime"
format="YYYY-MM-DD HH:mm:ss"
name='createTime'
v-model="myFormData['createTime']"
></DateTime>
</view>
<view class="{ 'mt-14px': 0 == 0 }">
<wd-input <wd-input
label-width="100px" label-width="100px"
v-model="myFormData['duration']" v-model="myFormData['duration']"
:label="get4Label('时长')"
:label="get4Label('音频时长(秒)')"
name='duration' name='duration'
prop='duration' prop='duration'
placeholder="请选择时长"
placeholder="请选择音频时长(秒)"
inputMode="numeric" inputMode="numeric"
:rules="[ :rules="[
]" ]"
clearable clearable
/> />
</view> </view>
<view class="{ 'mt-14px': 1 == 0 }">
<view class="{ 'mt-14px': 0 == 0 }">
<wd-textarea <wd-textarea
:label="get4Label('文本')"
:label="get4Label('朗读文本内容')"
labelWidth="100px" labelWidth="100px"
type="textarea" type="textarea"
name='text' name='text'
@ -62,13 +52,13 @@ navigationBarTitleText: '朗读音频',
v-model="myFormData['text']" v-model="myFormData['text']"
></wd-textarea> ></wd-textarea>
</view> </view>
<view class="{ 'mt-14px': 0 == 0 }">
<view class="{ 'mt-14px': 1 == 0 }">
<wd-input <wd-input
label-width="100px" label-width="100px"
v-model="myFormData['voicetype']"
v-model="myFormData['voiceType']"
:label="get4Label('音色ID')" :label="get4Label('音色ID')"
name='voicetype'
prop='voicetype'
name='voiceType'
prop='voiceType'
placeholder="请选择音色ID" placeholder="请选择音色ID"
inputMode="numeric" inputMode="numeric"
:rules="[ :rules="[
@ -76,7 +66,7 @@ navigationBarTitleText: '朗读音频',
clearable clearable
/> />
</view> </view>
<view class="{ 'mt-14px': 1 == 0 }">
<view class="{ 'mt-14px': 0 == 0 }">
<wd-input <wd-input
label-width="100px" label-width="100px"
v-model="myFormData['volume']" v-model="myFormData['volume']"
@ -90,7 +80,7 @@ navigationBarTitleText: '朗读音频',
clearable clearable
/> />
</view> </view>
<view class="{ 'mt-14px': 0 == 0 }">
<view class="{ 'mt-14px': 1 == 0 }">
<wd-input <wd-input
label-width="100px" label-width="100px"
v-model="myFormData['speed']" v-model="myFormData['speed']"
@ -104,23 +94,45 @@ navigationBarTitleText: '朗读音频',
clearable clearable
/> />
</view> </view>
<view class="{ 'mt-14px': 1 == 0 }">
<!-- 开关 -->
<wd-cell
:label="get4Label('是否成功')"
name='success'
title-width="100px"
center
>
<wd-switch
<view class="{ 'mt-14px': 0 == 0 }">
<wd-input
label-width="100px"
v-model="myFormData['success']"
:label="get4Label('是否成功')" :label="get4Label('是否成功')"
name='success' name='success'
size="18px"
v-model="myFormData['success']"
active-value="Y"
inactive-value="N"
/>
</wd-cell>
prop='success'
placeholder="请选择是否成功"
:rules="[
]"
clearable
/>
</view>
<view class="{ 'mt-14px': 1 == 0 }">
<wd-input
label-width="100px"
v-model="myFormData['pageId']"
:label="get4Label('页面')"
name='pageId'
prop='pageId'
placeholder="请选择页面"
:rules="[
]"
clearable
/>
</view>
<view class="{ 'mt-14px': 0 == 0 }">
<wd-input
label-width="100px"
v-model="myFormData['state']"
:label="get4Label('状态')"
name='state'
prop='state'
placeholder="请选择状态"
inputMode="numeric"
:rules="[
]"
clearable
/>
</view> </view>
</wd-cell-group> </wd-cell-group>
</wd-form> </wd-form>


+ 2
- 2
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletTtsCache/uniapp3/AppletTtsCacheList.vue View File

@ -2,13 +2,13 @@
{ {
layout: 'default', layout: 'default',
style: { style: {
navigationBarTitleText: '朗读音频',
navigationBarTitleText: 'applet_tts_cache',
navigationStyle: 'custom', navigationStyle: 'custom',
}, },
} }
</route> </route>
<template> <template>
<PageLayout navTitle="朗读音频" backRouteName="index" routeMethod="pushTab">
<PageLayout navTitle="applet_tts_cache" backRouteName="index" routeMethod="pushTab">
<view class="wrap"> <view class="wrap">
<z-paging <z-paging
ref="paging" ref="paging"


+ 46
- 41
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletTtsCache/vue3/AppletTtsCache.data.ts View File

@ -6,24 +6,29 @@ import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据 //列表数据
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
title: 'ID',
title: '音频文件ID/URL',
align:"center", align:"center",
dataIndex: 'audioId' dataIndex: 'audioId'
}, },
{ {
title: '创建日期',
title: '音频时长(秒)',
align:"center", align:"center",
dataIndex: 'createTime'
dataIndex: 'duration'
}, },
{ {
title: '时长',
title: '朗读文本内容',
align:"center", align:"center",
dataIndex: 'duration'
dataIndex: 'text'
}, },
{ {
title: '音色ID', title: '音色ID',
align:"center", align:"center",
dataIndex: 'voicetype'
dataIndex: 'voiceType'
},
{
title: '音量',
align:"center",
dataIndex: 'volume'
}, },
{ {
title: '语速', title: '语速',
@ -33,53 +38,42 @@ export const columns: BasicColumn[] = [
{ {
title: '是否成功', title: '是否成功',
align:"center", align:"center",
dataIndex: 'success',
customRender:({text}) => {
return render.renderSwitch(text, [{text:'是',value:'Y'},{text:'否',value:'N'}])
},
dataIndex: 'success'
},
{
title: '页面',
align:"center",
dataIndex: 'pageId'
},
{
title: '状态',
align:"center",
dataIndex: 'state'
}, },
]; ];
//查询数据 //查询数据
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
{
label: "是否成功",
field: 'success',
component: 'JSwitch',
componentProps:{
query:true,
},
//colProps: {span: 6},
},
]; ];
//表单数据 //表单数据
export const formSchema: FormSchema[] = [ export const formSchema: FormSchema[] = [
{ {
label: 'ID',
label: '音频文件ID/URL',
field: 'audioId', field: 'audioId',
component: 'Input', component: 'Input',
}, },
{ {
label: '创建日期',
field: 'createTime',
component: 'DatePicker',
componentProps: {
showTime: true,
valueFormat: 'YYYY-MM-DD HH:mm:ss'
},
},
{
label: '时长',
label: '音频时长(秒)',
field: 'duration', field: 'duration',
component: 'InputNumber', component: 'InputNumber',
}, },
{ {
label: '文本',
label: '朗读文本内容',
field: 'text', field: 'text',
component: 'InputTextArea', component: 'InputTextArea',
}, },
{ {
label: '音色ID', label: '音色ID',
field: 'voicetype',
field: 'voiceType',
component: 'InputNumber', component: 'InputNumber',
}, },
{ {
@ -95,9 +89,17 @@ export const formSchema: FormSchema[] = [
{ {
label: '是否成功', label: '是否成功',
field: 'success', field: 'success',
component: 'JSwitch',
componentProps:{
},
component: 'Input',
},
{
label: '页面',
field: 'pageId',
component: 'Input',
},
{
label: '状态',
field: 'state',
component: 'InputNumber',
}, },
// TODO 主键隐藏字段,目前写死为ID // TODO 主键隐藏字段,目前写死为ID
{ {
@ -110,12 +112,15 @@ export const formSchema: FormSchema[] = [
// 高级查询数据 // 高级查询数据
export const superQuerySchema = { export const superQuerySchema = {
audioId: {title: 'ID',order: 0,view: 'text', type: 'string',},
createTime: {title: '创建日期',order: 1,view: 'datetime', type: 'string',},
duration: {title: '时长',order: 2,view: 'number', type: 'number',},
voicetype: {title: '音色ID',order: 4,view: 'number', type: 'number',},
speed: {title: '语速',order: 6,view: 'number', type: 'number',},
success: {title: '是否成功',order: 7,view: 'switch', type: 'string',},
audioId: {title: '音频文件ID/URL',order: 0,view: 'text', type: 'string',},
duration: {title: '音频时长(秒)',order: 1,view: 'number', type: 'number',},
text: {title: '朗读文本内容',order: 2,view: 'textarea', type: 'string',},
voiceType: {title: '音色ID',order: 3,view: 'number', type: 'number',},
volume: {title: '音量',order: 4,view: 'number', type: 'number',},
speed: {title: '语速',order: 5,view: 'number', type: 'number',},
success: {title: '是否成功',order: 6,view: 'text', type: 'string',},
pageId: {title: '页面',order: 7,view: 'text', type: 'string',},
state: {title: '状态',order: 8,view: 'number', type: 'number',},
}; };
/** /**


+ 2
- 2
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletTtsCache/vue3/AppletTtsCacheList.vue View File

@ -61,7 +61,7 @@
//table //table
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({ const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{ tableProps:{
title: '朗读音频',
title: 'applet_tts_cache',
api: list, api: list,
columns, columns,
canResize:true, canResize:true,
@ -91,7 +91,7 @@
}, },
}, },
exportConfig: { exportConfig: {
name:"朗读音频",
name:"applet_tts_cache",
url: getExportUrl, url: getExportUrl,
params: queryParam, params: queryParam,
}, },


+ 26
- 0
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletTtsCache/vue3/V20250923_1__menu_insert_AppletTtsCache.sql View File

@ -0,0 +1,26 @@
-- 注意:该页面对应的前台目录为views/appletTtsCache文件夹下
-- 如果你想更改到其他目录,请修改sql中component字段对应的值
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
VALUES ('2025092311044660040', NULL, 'applet_tts_cache', '/appletTtsCache/appletTtsCacheList', 'appletTtsCache/AppletTtsCacheList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2025-09-23 11:04:04', NULL, NULL, 0);
-- 权限控制sql
-- 新增
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2025092311044660041', '2025092311044660040', '添加applet_tts_cache', NULL, NULL, 0, NULL, NULL, 2, 'appletTtsCache:applet_tts_cache:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-09-23 11:04:04', NULL, NULL, 0, 0, '1', 0);
-- 编辑
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2025092311044660042', '2025092311044660040', '编辑applet_tts_cache', NULL, NULL, 0, NULL, NULL, 2, 'appletTtsCache:applet_tts_cache:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-09-23 11:04:04', NULL, NULL, 0, 0, '1', 0);
-- 删除
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2025092311044660043', '2025092311044660040', '删除applet_tts_cache', NULL, NULL, 0, NULL, NULL, 2, 'appletTtsCache:applet_tts_cache:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-09-23 11:04:04', NULL, NULL, 0, 0, '1', 0);
-- 批量删除
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2025092311044660044', '2025092311044660040', '批量删除applet_tts_cache', NULL, NULL, 0, NULL, NULL, 2, 'appletTtsCache:applet_tts_cache:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-09-23 11:04:04', NULL, NULL, 0, 0, '1', 0);
-- 导出excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2025092311044660045', '2025092311044660040', '导出excel_applet_tts_cache', NULL, NULL, 0, NULL, NULL, 2, 'appletTtsCache:applet_tts_cache:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-09-23 11:04:04', NULL, NULL, 0, 0, '1', 0);
-- 导入excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2025092311044660046', '2025092311044660040', '导入excel_applet_tts_cache', NULL, NULL, 0, NULL, NULL, 2, 'appletTtsCache:applet_tts_cache:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-09-23 11:04:04', NULL, NULL, 0, 0, '1', 0);

+ 4
- 0
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/demo/appletVip/entity/AppletVip.java View File

@ -71,6 +71,10 @@ public class AppletVip implements Serializable {
@Excel(name = "启用", width = 15,replace = {"是_Y","否_N"} ) @Excel(name = "启用", width = 15,replace = {"是_Y","否_N"} )
@Schema(description = "启用") @Schema(description = "启用")
private java.lang.String status; private java.lang.String status;
/**编码*/
@Excel(name = "编码", width = 15)
@Schema(description = "编码")
private java.lang.String code;
@TableField(exist = false) @TableField(exist = false)
private List<AppletSetmeal> setmeals; private List<AppletSetmeal> setmeals;


+ 3
- 3
jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml View File

@ -333,12 +333,12 @@ wechat:
mpAppId: wx24736a3864e8f0e9 # 微信小程序appid mpAppId: wx24736a3864e8f0e9 # 微信小程序appid
mpAppSecret: 7a530b7bba042128e76bcfdbaedd7e71 # 微信小程序密钥 mpAppSecret: 7a530b7bba042128e76bcfdbaedd7e71 # 微信小程序密钥
merchantId: 1724993508 # 商户号 merchantId: 1724993508 # 商户号
privateKeyPath: jeecg-system-start/src/main/resources/apiclient_key.pem #本地私钥路径
publicKeyPath: jeecg-system-start/src/main/resources/pub_key.pem #本地公钥路径
privateKeyPath: E:/file/code/8/englishread-admin/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/apiclient_key.pem #本地私钥路径
publicKeyPath: E:/file/code/8/englishread-admin/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/pub_key.pem #本地公钥路径
# privateKeyPath: /data/app-test/hly/cerFile/apiclient_key.pem #线上私钥路径 # privateKeyPath: /data/app-test/hly/cerFile/apiclient_key.pem #线上私钥路径
# publicKeyPath: /data/app-test/hly/cerFile/pub_key.pem #线上公钥路径 # publicKeyPath: /data/app-test/hly/cerFile/pub_key.pem #线上公钥路径
publicKeyId: PUB_KEY_ID_0117249935082025082500212307001600 #公钥 publicKeyId: PUB_KEY_ID_0117249935082025082500212307001600 #公钥
merchantSerialNumber: 4B672D1BCB20B22081FD6C5ECAA7C1277AF1B772 # 商户API证书序列号
merchantSerialNumber: 55B6EF6CCD7CDC41504138E6B0B7E3EE23209A65 # 商户API证书序列号
apiV3Key: 0fdb77429ffdf206c151af76a663041c # 商户APIV3密钥 apiV3Key: 0fdb77429ffdf206c151af76a663041c # 商户APIV3密钥
refundNotifyUrl: # 退款通知地址(正式环境) refundNotifyUrl: # 退款通知地址(正式环境)
transferNotify: https://www.yurangongfang.com/massage-admin/massage/cash/cashoutNotify/ # 转账结果通知地址 transferNotify: https://www.yurangongfang.com/massage-admin/massage/cash/cashoutNotify/ # 转账结果通知地址


+ 14
- 11
jeecgboot-vue3/src/views/applet/withdrawal/AppletWithdrawal.data.ts View File

@ -5,8 +5,13 @@ import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils'; import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据 //列表数据
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{
title: '流水号',
align:"center",
dataIndex: 'waterId_dictText'
},
{ {
title: '用户',
title: '用户id',
align:"center", align:"center",
dataIndex: 'userId_dictText' dataIndex: 'userId_dictText'
}, },
@ -30,7 +35,10 @@ export const columns: BasicColumn[] = [
align:"center", align:"center",
dataIndex: 'upload', dataIndex: 'upload',
customRender:({text}) => { customRender:({text}) => {
return render.renderImage(text)
if(text){
return render.renderImage(text)
}
return '无图片'
}, },
}, },
{ {
@ -43,11 +51,6 @@ export const columns: BasicColumn[] = [
align:"center", align:"center",
dataIndex: 'withdrawStatus_dictText' dataIndex: 'withdrawStatus_dictText'
}, },
{
title: '流水号',
align:"center",
dataIndex: 'waterId_dictText'
},
]; ];
//查询数据 //查询数据
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
@ -55,7 +58,7 @@ export const searchFormSchema: FormSchema[] = [
//表单数据 //表单数据
export const formSchema: FormSchema[] = [ export const formSchema: FormSchema[] = [
{ {
label: '用户',
label: '用户id',
field: 'userId', field: 'userId',
component: 'JSearchSelect', component: 'JSearchSelect',
componentProps:{ componentProps:{
@ -85,8 +88,8 @@ export const formSchema: FormSchema[] = [
field: 'upload', field: 'upload',
component: 'JImageUpload', component: 'JImageUpload',
componentProps:{ componentProps:{
bizPath: 'withdrawal',
fileMax: 1, fileMax: 1,
text: '上传凭证图片'
}, },
}, },
{ {
@ -124,7 +127,7 @@ export const formSchema: FormSchema[] = [
// 高级查询数据 // 高级查询数据
export const superQuerySchema = { export const superQuerySchema = {
userId: {title: '用户',order: 0,view: 'sel_search', type: 'string',dictTable: "applet_user", dictCode: 'id', dictText: 'name',},
userId: {title: '用户id',order: 0,view: 'sel_search', type: 'string',dictTable: "applet_user", dictCode: 'id', dictText: 'name',},
name: {title: '申请人',order: 1,view: 'text', type: 'string',}, name: {title: '申请人',order: 1,view: 'text', type: 'string',},
money: {title: '提现金额',order: 2,view: 'number', type: 'number',}, money: {title: '提现金额',order: 2,view: 'number', type: 'number',},
method: {title: '提现方式',order: 3,view: 'list', type: 'string',dictCode: 'applett_translate_type',}, method: {title: '提现方式',order: 3,view: 'list', type: 'string',dictCode: 'applett_translate_type',},
@ -141,4 +144,4 @@ export const superQuerySchema = {
export function getBpmFormSchema(_formData): FormSchema[]{ export function getBpmFormSchema(_formData): FormSchema[]{
// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
return formSchema; return formSchema;
}
}

+ 9
- 0
txt.txt View File

@ -0,0 +1,9 @@
请你制作一个组件用于展示和构建语音缓存,构建缓存的方法可以参考目前给前端的代码
语音缓存需要有以下功能
1、构建状态,生成中还是已完成,生成中不能再次构建
2、试听功能
3、每个页面有多个不同音色的音频
4、组件显示播放器组件、音色ID、状态
5、构建按钮,支持初始化音频和重新生成

Loading…
Cancel
Save