Commit 8905e998 authored by liqin's avatar liqin 💬

bug fixed

parent 2c27db79
......@@ -21,8 +21,8 @@ import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
@Component
@Slf4j
@Component
public class FastDFSUtils {
private static String dfsFileAccessBasePath;
......
package cn.wisenergy.chnmuseum.party.common.enums;
public enum ApplicableScopeEnum {
ALL_PLAT(1, "全平台"),
THIS_ORGAN(2, "仅本单位"),
THIS_ORGAN_SUB(3, "本单位及下属单位");
private Integer code;
private String msg;
ApplicableScopeEnum(Integer code, String msg) {
this.code = code;
this.msg = msg;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
}
......@@ -69,7 +69,6 @@ public class CodeGenerator {
* 分页列表查询是否排序 true:有排序参数/false:无
*/
private boolean pageListOrder = false;
/**
* 是否生成validation校验,true:生成/false:不生成
*/
......@@ -94,23 +93,18 @@ public class CodeGenerator {
* 分页查询参数父类
*/
private String superPageParam;
/**
* 分页排序查询参数父类
*/
private String superPageOrderParam;
/**
* 分页工具类路径
*/
private String commonPageUtil;
/**
* 实体父类实体列表
*/
private String[] superEntityCommonColumns;
// 公共类包路径
/**
* 公共id参数路径
*/
......@@ -261,7 +255,6 @@ public class CodeGenerator {
// 查询参数类路径
map.put("pageParamPath", paramPackage + StringPool.DOT + pascalTableName + "PageParam");
// 查询参数共公包路径
System.out.println("superPageParam = " + superPageParam);
map.put("superPageParamPath", superPageParam);
map.put("superPageOrderParamPath", superPageOrderParam);
map.put("commonPageUtilPath", commonPageUtil);
......
......@@ -44,7 +44,7 @@ public class MetaObjectHandlerConfig implements MetaObjectHandler {
// this.setFieldValByName("modifierBy", 111L, metaObject);
}
/**
/*
* 获取当前登录用户
*
* @return 用户对象
......
......@@ -2,11 +2,22 @@ package cn.wisenergy.chnmuseum.party.common.mybatis;
public class MysqlGenerator {
private static final String[] tableNames = new String[] {
"t_user_role_link"
private static final String[] tableNames = new String[]{
"asset",
"asset_type",
"copyright_owner",
"copyright_owner_asset_type",
"copyright_owner_board_type",
"exhibition_board",
"exhibition_board_cat",
"learning_content",
"learning_content_board",
"learning_content_board_cat",
"learning_content_copyright_owner",
"learning_project"
};
private static final String projectPath = "D:\\develop\\Project\\chnmuseum-party";
// private static final String projectPath = "/opt/ss";
// private static final String projectPath = "D:\\develop\\Project\\chnmuseum-party";
private static final String projectPath = "/opt/ss";
public static void main(String[] args) {
CodeGenerator codeGenerator = new CodeGenerator();
......
......@@ -13,7 +13,7 @@ public class AjaxResult {
/**
* 是否成功
*/
private boolean success = true;
private boolean success;
/**
* 失败或成功的提示信息
......
package cn.wisenergy.chnmuseum.party.common.vo;
import lombok.*;
import lombok.experimental.Accessors;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
public class AudioVo {
private String fileName;
private String fileExtName;
private Long fileSize;
private String fileUrl;
private String language;
}
package cn.wisenergy.chnmuseum.party.common.vo;
public class Department {
private Long id;
private String name;
private Long parentId;
......
......@@ -9,46 +9,17 @@ import lombok.experimental.Accessors;
@NoArgsConstructor
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
public class AssetVo {
public class VideoVo {
private String fileName;
private String fileExt;
private String fileExtName;
private Long fileSize;
private String fileUrl;
public String getFileName() {
return fileName;
}
private String language;
public void setFileName(String fileName) {
this.fileName = fileName;
}
public String getFileExt() {
return fileExt;
}
public void setFileExt(String fileExt) {
this.fileExt = fileExt;
}
public Long getFileSize() {
return fileSize;
}
public void setFileSize(Long fileSize) {
this.fileSize = fileSize;
}
public String getFileUrl() {
return fileUrl;
}
public void setFileUrl(String fileUrl) {
this.fileUrl = fileUrl;
}
}
......@@ -14,8 +14,6 @@ import java.sql.Timestamp;
*/
public class Index{
private static final long serialVersionUID = 1L;
@ApiModelProperty("单据id")
private String id;
......
......@@ -6,7 +6,7 @@ import cn.wisenergy.chnmuseum.party.common.enums.RESPONSE_CODE_ENUM;
import cn.wisenergy.chnmuseum.party.common.mvc.InterfaceException;
import cn.wisenergy.chnmuseum.party.common.validator.groups.Add;
import cn.wisenergy.chnmuseum.party.common.validator.groups.Update;
import cn.wisenergy.chnmuseum.party.common.vo.AssetVo;
import cn.wisenergy.chnmuseum.party.common.vo.VideoVo;
import cn.wisenergy.chnmuseum.party.common.vo.GenericPageParam;
import cn.wisenergy.chnmuseum.party.model.Asset;
import cn.wisenergy.chnmuseum.party.model.AssetType;
......@@ -76,12 +76,12 @@ public class AssetController extends BaseController {
if (files.length == 0) {
throw new InterfaceException(RESPONSE_CODE_ENUM.REQUEST_PARAMS_ERROR.getCode(), "视频必须上传");
}
final List<AssetVo> filesMetadata = new ArrayList<>(2);
final List<VideoVo> filesMetadata = new ArrayList<>(2);
for (MultipartFile file : files) {
// 原始文件名
String originalFilename = file.getOriginalFilename();
String url = FastDFSUtils.uploadFile(file.getInputStream(), file.getSize(), originalFilename);
filesMetadata.add(AssetVo.builder().fileName(originalFilename).fileExt(FilenameUtils.getExtension(originalFilename))
filesMetadata.add(VideoVo.builder().fileName(originalFilename).fileExtName(FilenameUtils.getExtension(originalFilename))
.fileSize(file.getSize()).fileUrl(url).build());
}
asset.setVideoUrl(JSONObject.toJSONString(filesMetadata));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment