Explorar el Código

文件存放位置及md生成问题

private_deployment
谈文友 hace 1 año
padre
commit
099b42dcf7
Se han modificado 8 ficheros con 42 adiciones y 26 borrados
  1. +2
    -7
      suimangCApi/src/main/java/com/iformall/controller/UserLiveController.java
  2. +3
    -1
      suimangService/src/main/java/com/iformall/domain/po/WxCUserAuthority.java
  3. +7
    -3
      suimangService/src/main/java/com/iformall/domain/po/WxCVideoTable.java
  4. +2
    -1
      suimangService/src/main/java/com/iformall/domain/po/WxCVoiceTable.java
  5. +4
    -4
      suimangService/src/main/java/com/iformall/service/impl/WxCUserAuthorityServiceImpl.java
  6. +19
    -7
      suimangService/src/main/java/com/iformall/service/impl/WxCVideoServiceImpl.java
  7. +2
    -2
      suimangService/src/main/java/com/iformall/service/impl/WxCVoiceServiceImpl.java
  8. +3
    -1
      suimangService/src/main/resources/mapper/WxCVideoMapper.xml

+ 2
- 7
suimangCApi/src/main/java/com/iformall/controller/UserLiveController.java Ver fichero

@@ -160,12 +160,7 @@ public class UserLiveController extends BaseController {
//wxCLiveLoginVo.setStatus(0);
//wxCLiveLoginVo.setCurrent_time(new Date(System.currentTimeMillis() / 1000));
// wxCLiveLoginVo.setExpire_time(basicLiveInfo.getExpireTime().getTime() / 1000);
//生成一个token
String token = UUID.randomUUID().toString().replace("-","");
//将token和用户信息绑定放到redis redis--key:user:info:token value:用户信息
redisTemplate.opsForValue().set("user:login"+token,JSON.toJSONString(wxCLiveLoginVo));
//返回给前端
wxCLiveLoginVo.setToken(token);

Map<String, Object> info = new HashMap();
Map<String, Object> data = new HashMap();
Map<Object, Object> status = new HashMap<>();
@@ -186,7 +181,7 @@ public class UserLiveController extends BaseController {
wxCLiveLoginVo.setData(data);
wxCLiveLoginVo.setInfo(info);
wxCLiveLoginVos.put("status",status);
wxCLiveLoginVos.put("token",token);
wxCLiveLoginVos.put("token",basicInfo.getToken());
System.out.println("wxCLiveLoginVo.getToken() = " + wxCLiveLoginVo.getToken());




+ 3
- 1
suimangService/src/main/java/com/iformall/domain/po/WxCUserAuthority.java Ver fichero

@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.ToString;

import java.util.Date;

@TableName(value = "wx_c_voice")
@Data
@ToString(callSuper = true)
@@ -22,7 +24,7 @@ public class WxCUserAuthority {
@TableField(exist = false)
private String currentTime;
@TableField(exist = false)
private String expireTime;
private Date expireTime;


}

+ 7
- 3
suimangService/src/main/java/com/iformall/domain/po/WxCVideoTable.java Ver fichero

@@ -23,7 +23,7 @@ public class WxCVideoTable extends TenantEntityWithoutFinalTenantId {
@TableField(exist = false)
private String currentTime;
@TableField(exist = false)
private String expireTime;
private Date expireTime;


@io.swagger.annotations.ApiModelProperty(value="数字人id",name="id")
@@ -37,14 +37,18 @@ public class WxCVideoTable extends TenantEntityWithoutFinalTenantId {
private String image;
@io.swagger.annotations.ApiModelProperty(value="数字人样例视频链接",name="demo")
private String demo;
@io.swagger.annotations.ApiModelProperty(value="数字人样例视频链接",name="model")
@io.swagger.annotations.ApiModelProperty(value="数字人模板视频链接",name="model")
private String model;
@io.swagger.annotations.ApiModelProperty(value="数字人模板预处理信息文件链接",name="preinfo")
private String preInfo;
@io.swagger.annotations.ApiModelProperty(value="数字人模板预处理信息文件链接",name="model_path")
@io.swagger.annotations.ApiModelProperty(value="数字人模板文件链接",name="model_path")
private String modelPath;
@io.swagger.annotations.ApiModelProperty(value="数字人模板预处理信息文件链接",name="preInfo_path")
private String preInfoPath;
@io.swagger.annotations.ApiModelProperty(value="数字人模板md文件校验码",name="model_md5")
private String modelMd5;
@io.swagger.annotations.ApiModelProperty(value="数字人模板预处理信息md文件校验码",name="preinfo_md5")
private String preInfoMd5;





+ 2
- 1
suimangService/src/main/java/com/iformall/domain/po/WxCVoiceTable.java Ver fichero

@@ -6,6 +6,7 @@ import lombok.Data;
import lombok.ToString;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@TableName(value = "voice_info")
@@ -19,7 +20,7 @@ public class WxCVoiceTable {
@TableField(exist = false)
private String currentTime;
@TableField(exist = false)
private String expireTime;
private Date expireTime;

@io.swagger.annotations.ApiModelProperty(value = "地区名称", name = "local_name")
private String localelName;


+ 4
- 4
suimangService/src/main/java/com/iformall/service/impl/WxCUserAuthorityServiceImpl.java Ver fichero

@@ -44,8 +44,8 @@ public class WxCUserAuthorityServiceImpl implements WxCUserAuthorityService {
data.put("type",wxCUserAuthority.getType());
data.put("resource_id",wxCUserAuthority.getResourceId());
data.put("class",wxCUserAuthority.getClassType());
data.put("current_time",new Date(System.currentTimeMillis()));
data.put("expire_time",wxCUserAuthority.getExpireTime());
data.put("current_time",new Date(System.currentTimeMillis()/1000));
data.put("expire_time",wxCUserAuthority.getExpireTime().getTime()/1000);
authorList.add(data);
}
authorVos.put("authorList",authorList);
@@ -68,8 +68,8 @@ public class WxCUserAuthorityServiceImpl implements WxCUserAuthorityService {
data.put("class",wxCUserAuthority.getClassType());
}
data.put("class", EnumClassType.SHARE.getCode());
data.put("current_time",new Date(System.currentTimeMillis()));
data.put("expire_time",wxCUserAuthority.getExpireTime());
data.put("current_time",new Date(System.currentTimeMillis()/1000));
data.put("expire_time",wxCUserAuthority.getExpireTime().getTime()/1000);

}
authorVos.put("data",data);


+ 19
- 7
suimangService/src/main/java/com/iformall/service/impl/WxCVideoServiceImpl.java Ver fichero

@@ -51,7 +51,7 @@ public class WxCVideoServiceImpl implements WxCVideoService,IExcelExportServer {
List authorlist = new ArrayList();
for (WxCVideoTable wxCVideoTable : TemplateVideo) {
data.put("username",wxCVideoTable.getUserName());
data.put("current_time",new Date(System.currentTimeMillis()));
data.put("current_time",new Date(System.currentTimeMillis()/1000));

Map<String,Object> avatar = new HashMap();
avatar.put("avatar_id",wxCVideoTable.getId());
@@ -59,14 +59,26 @@ public class WxCVideoServiceImpl implements WxCVideoService,IExcelExportServer {
avatar.put("avatar_image",wxCVideoTable.getImage());
avatar.put("avatar_demo",wxCVideoTable.getDemo());
avatar.put("avatar_model",wxCVideoTable.getModel());
File modelFile = new File(wxCVideoTable.getModelPath());
//模板文件和预处理信息存放问题
try {
File modelFile = new File(wxCVideoTable.getModelPath());
avatar.put("avatar_model_md5",getFileMD5(modelFile));
} catch (Exception e) {
e.printStackTrace();
avatar.put("avatar_model_md5",wxCVideoTable.getModelMd5());
}

avatar.put("avatar_demo_md5",getFileMD5(modelFile));
avatar.put("avatar_preinfo",wxCVideoTable.getPreInfo());

File preinfoFile = new File(wxCVideoTable.getPreInfoPath());
avatar.put("avatar_preinfo_md5",getFileMD5(preinfoFile));
avatar.put("expire_time",wxCVideoTable.getExpireTime());
try {
File preinfoFile = new File(wxCVideoTable.getPreInfoPath());
avatar.put("avatar_preinfo_md5",getFileMD5(preinfoFile));
} catch (Exception e) {
e.printStackTrace();
avatar.put("avatar_preinfo_md5",wxCVideoTable.getPreInfoMd5());
}

avatar.put("avatar_preinfo",wxCVideoTable.getPreInfo());
avatar.put("expire_time",wxCVideoTable.getExpireTime().getTime()/1000);
avatar.put("class", wxCVideoTable.getClassType());
authorlist.add(avatar);
data.put("authorlist",authorlist);


+ 2
- 2
suimangService/src/main/java/com/iformall/service/impl/WxCVoiceServiceImpl.java Ver fichero

@@ -51,7 +51,7 @@ public class WxCVoiceServiceImpl implements WxCVoiceService {
HashMap<String, Object> voice = new HashMap<>();

data.put("username", wxCVoiceTable.getUserName());
data.put("current_time", new Date(System.currentTimeMillis()));
data.put("current_time", new Date(System.currentTimeMillis()/1000));
audioList.add(audio);

audio.put("LocaleName", wxCVoiceTable.getLocalelName());
@@ -62,7 +62,7 @@ public class WxCVoiceServiceImpl implements WxCVoiceService {


voice.put("voiceid", wxCVoiceTable.getVoiceId());
voice.put("expire_time", wxCVoiceTable.getExpireTime());
voice.put("expire_time", wxCVoiceTable.getExpireTime().getTime()/1000);
voice.put("voicename", wxCVoiceTable.getVoiceName());
voice.put("voicetype", EnumClassType.SHARE.getCode());
voice.put("displayname", wxCVoiceTable.getVoiceDisplayName());


+ 3
- 1
suimangService/src/main/resources/mapper/WxCVideoMapper.xml Ver fichero

@@ -9,9 +9,11 @@
<result column="image" jdbcType="VARCHAR" property="image"/>
<result column="demo" jdbcType="VARCHAR" property="demo"/>
<result column="model" jdbcType="VARCHAR" property="model"/>
<result column="model_md5" jdbcType="VARCHAR" property="modelMd5"/>
<result column="model_path" jdbcType="VARCHAR" property="modelPath"/>
<result column="class" jdbcType="VARCHAR" property="classType"/>
<result column="preinfo" jdbcType="VARCHAR" property="preInfo"/>
<result column="preinfo_md5" jdbcType="VARCHAR" property="preInfoMd5"/>
<result column="preinfo_path" jdbcType="VARCHAR" property="preInfoPath"/>
<result column="expire_time" jdbcType="VARCHAR" property="expireTime"/>

@@ -25,7 +27,7 @@
</resultMap>-->
<select id="getById" resultMap="BaseResultMap">
SELECT wca.user_name,expire_time,wcav.id,wcav.name,wcav.image,wcav.model,wcav.preinfo,wcav.demo
,wcav.class,wcav.model_path,wcav.preinfo_path
,wcav.class,wcav.model_path,wcav.preinfo_path,wcav.model_md5,wcav.preinfo_md5
from wx_c_author wca
left join wx_c_avatar wcav on wcav.id =wca.resource_id
where wca.resource_id


Cargando…
Cancelar
Guardar