加申购车参数校验
This commit is contained in:
parent
dcb415763e
commit
53a4af2bb8
|
@ -3,7 +3,6 @@ package io.renren.modules.resource.controller;
|
|||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.renren.common.annotation.LogOperation;
|
||||
import io.renren.common.constant.Constant;
|
||||
import io.renren.common.controller.FileUploadController;
|
||||
import io.renren.common.page.PageData;
|
||||
import io.renren.common.utils.Result;
|
||||
import io.renren.common.validator.ValidatorUtils;
|
||||
|
@ -27,9 +26,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 资源表
|
||||
|
@ -43,7 +40,8 @@ import java.util.UUID;
|
|||
public class ResourceController {
|
||||
|
||||
@Value("${resource.devModelFilePath}")
|
||||
private String delModelFilePath;
|
||||
private String devModelFilePath;
|
||||
|
||||
@Autowired
|
||||
private ResourceService resourceService;
|
||||
|
||||
|
@ -157,7 +155,7 @@ public class ResourceController {
|
|||
public Result upload(@RequestParam("file") MultipartFile uploadFile,
|
||||
HttpServletRequest request) {
|
||||
logger.info("上传文件:" + uploadFile.getOriginalFilename());
|
||||
File folder = new File(delModelFilePath);
|
||||
File folder = new File(devModelFilePath);
|
||||
if (!folder.isDirectory()) {
|
||||
folder.mkdirs();
|
||||
}
|
||||
|
@ -181,7 +179,8 @@ public class ResourceController {
|
|||
}
|
||||
}
|
||||
|
||||
/*@GetMapping("export")
|
||||
/*
|
||||
@GetMapping("export")
|
||||
@ApiOperation("导出")
|
||||
@LogOperation("导出")
|
||||
//@RequiresPermissions("resource:resource:export")
|
||||
|
@ -190,5 +189,5 @@ public class ResourceController {
|
|||
|
||||
ExcelUtils.exportExcelToTarget(response, null, "资源表", list, ResourceExcel.class);
|
||||
}
|
||||
*/
|
||||
*/
|
||||
}
|
|
@ -17,6 +17,8 @@ import io.renren.modules.resource.entity.ResourceEntity;
|
|||
import io.renren.modules.resource.service.ResourceService;
|
||||
import io.renren.modules.security.user.SecurityUser;
|
||||
import io.renren.modules.security.user.UserDetail;
|
||||
import io.renren.modules.sys.dto.SysDeptDTO;
|
||||
import io.renren.modules.sys.service.SysDeptService;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -48,6 +50,8 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
private String delModelFilePath;
|
||||
@Value("${resource.root_url}")
|
||||
private String root_url;
|
||||
@Autowired
|
||||
private SysDeptService sysDeptService;
|
||||
|
||||
@Autowired
|
||||
private ResourceDao resourceDao;
|
||||
|
@ -113,6 +117,10 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
ResourceDTO resourceDTO = new ResourceDTO();
|
||||
ResourceEntity resourceEntity = resourceDao.selectById(id);
|
||||
BeanUtils.copyProperties(resourceEntity, resourceDTO);
|
||||
SysDeptDTO data = sysDeptService.get(resourceDTO.getDeptId());
|
||||
if (ObjectUtil.isNotNull(data)) {
|
||||
resourceDTO.setNote1(data.getName());
|
||||
}
|
||||
QueryWrapper<AttrEntity> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("data_resource_id", resourceEntity.getId())
|
||||
.eq("del_flag", 0);
|
||||
|
|
Loading…
Reference in New Issue