Commit 8905e998 authored by liqin's avatar liqin 💬

bug fixed

parent 2c27db79
...@@ -21,8 +21,8 @@ import java.io.InputStream; ...@@ -21,8 +21,8 @@ import java.io.InputStream;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@Component
@Slf4j @Slf4j
@Component
public class FastDFSUtils { public class FastDFSUtils {
private static String dfsFileAccessBasePath; 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 { ...@@ -69,7 +69,6 @@ public class CodeGenerator {
* 分页列表查询是否排序 true:有排序参数/false:无 * 分页列表查询是否排序 true:有排序参数/false:无
*/ */
private boolean pageListOrder = false; private boolean pageListOrder = false;
/** /**
* 是否生成validation校验,true:生成/false:不生成 * 是否生成validation校验,true:生成/false:不生成
*/ */
...@@ -94,23 +93,18 @@ public class CodeGenerator { ...@@ -94,23 +93,18 @@ public class CodeGenerator {
* 分页查询参数父类 * 分页查询参数父类
*/ */
private String superPageParam; private String superPageParam;
/** /**
* 分页排序查询参数父类 * 分页排序查询参数父类
*/ */
private String superPageOrderParam; private String superPageOrderParam;
/** /**
* 分页工具类路径 * 分页工具类路径
*/ */
private String commonPageUtil; private String commonPageUtil;
/** /**
* 实体父类实体列表 * 实体父类实体列表
*/ */
private String[] superEntityCommonColumns; private String[] superEntityCommonColumns;
// 公共类包路径
/** /**
* 公共id参数路径 * 公共id参数路径
*/ */
...@@ -261,7 +255,6 @@ public class CodeGenerator { ...@@ -261,7 +255,6 @@ public class CodeGenerator {
// 查询参数类路径 // 查询参数类路径
map.put("pageParamPath", paramPackage + StringPool.DOT + pascalTableName + "PageParam"); map.put("pageParamPath", paramPackage + StringPool.DOT + pascalTableName + "PageParam");
// 查询参数共公包路径 // 查询参数共公包路径
System.out.println("superPageParam = " + superPageParam);
map.put("superPageParamPath", superPageParam); map.put("superPageParamPath", superPageParam);
map.put("superPageOrderParamPath", superPageOrderParam); map.put("superPageOrderParamPath", superPageOrderParam);
map.put("commonPageUtilPath", commonPageUtil); map.put("commonPageUtilPath", commonPageUtil);
......
...@@ -44,7 +44,7 @@ public class MetaObjectHandlerConfig implements MetaObjectHandler { ...@@ -44,7 +44,7 @@ public class MetaObjectHandlerConfig implements MetaObjectHandler {
// this.setFieldValByName("modifierBy", 111L, metaObject); // this.setFieldValByName("modifierBy", 111L, metaObject);
} }
/** /*
* 获取当前登录用户 * 获取当前登录用户
* *
* @return 用户对象 * @return 用户对象
......
...@@ -2,11 +2,22 @@ package cn.wisenergy.chnmuseum.party.common.mybatis; ...@@ -2,11 +2,22 @@ package cn.wisenergy.chnmuseum.party.common.mybatis;
public class MysqlGenerator { public class MysqlGenerator {
private static final String[] tableNames = new String[] { private static final String[] tableNames = new String[]{
"t_user_role_link" "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 = "D:\\develop\\Project\\chnmuseum-party";
// private static final String projectPath = "/opt/ss"; private static final String projectPath = "/opt/ss";
public static void main(String[] args) { public static void main(String[] args) {
CodeGenerator codeGenerator = new CodeGenerator(); CodeGenerator codeGenerator = new CodeGenerator();
......
...@@ -13,7 +13,7 @@ public class AjaxResult { ...@@ -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; package cn.wisenergy.chnmuseum.party.common.vo;
public class Department { public class Department {
private Long id; private Long id;
private String name; private String name;
private Long parentId; private Long parentId;
......
...@@ -9,46 +9,17 @@ import lombok.experimental.Accessors; ...@@ -9,46 +9,17 @@ import lombok.experimental.Accessors;
@NoArgsConstructor @NoArgsConstructor
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
public class AssetVo { public class VideoVo {
private String fileName; private String fileName;
private String fileExt; private String fileExtName;
private Long fileSize; private Long fileSize;
private String fileUrl; private String fileUrl;
public String getFileName() { private String language;
return fileName;
}
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; ...@@ -14,8 +14,6 @@ import java.sql.Timestamp;
*/ */
public class Index{ public class Index{
private static final long serialVersionUID = 1L;
@ApiModelProperty("单据id") @ApiModelProperty("单据id")
private String id; private String id;
......
...@@ -6,7 +6,7 @@ import cn.wisenergy.chnmuseum.party.common.enums.RESPONSE_CODE_ENUM; ...@@ -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.mvc.InterfaceException;
import cn.wisenergy.chnmuseum.party.common.validator.groups.Add; import cn.wisenergy.chnmuseum.party.common.validator.groups.Add;
import cn.wisenergy.chnmuseum.party.common.validator.groups.Update; 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.common.vo.GenericPageParam;
import cn.wisenergy.chnmuseum.party.model.Asset; import cn.wisenergy.chnmuseum.party.model.Asset;
import cn.wisenergy.chnmuseum.party.model.AssetType; import cn.wisenergy.chnmuseum.party.model.AssetType;
...@@ -76,12 +76,12 @@ public class AssetController extends BaseController { ...@@ -76,12 +76,12 @@ public class AssetController extends BaseController {
if (files.length == 0) { if (files.length == 0) {
throw new InterfaceException(RESPONSE_CODE_ENUM.REQUEST_PARAMS_ERROR.getCode(), "视频必须上传"); 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) { for (MultipartFile file : files) {
// 原始文件名 // 原始文件名
String originalFilename = file.getOriginalFilename(); String originalFilename = file.getOriginalFilename();
String url = FastDFSUtils.uploadFile(file.getInputStream(), file.getSize(), originalFilename); 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()); .fileSize(file.getSize()).fileUrl(url).build());
} }
asset.setVideoUrl(JSONObject.toJSONString(filesMetadata)); 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