glj-代码提交

This commit is contained in:
glj 2023-05-08 09:10:02 +08:00
parent eaa4f0d66d
commit 846b160403
4 changed files with 23 additions and 8 deletions

View File

@ -165,6 +165,11 @@ public class RemoteSensingSourceData implements Serializable {
*/
private Integer status;
/**
* 上传用户
*/
private Long uploadId;
/**
* 分辨率集合最大值
*/

View File

@ -33,6 +33,9 @@
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="downloadUrl" column="download_url" jdbcType="VARCHAR"/>
<result property="sourceOrganization" column="source_organization" jdbcType="VARCHAR"/>
<result property="satelliteType" column="satellite_type" jdbcType="INTEGER"/>
<result property="status" column="status" jdbcType="INTEGER"/>
<result property="uploadId" column="upload_id" jdbcType="INTEGER"/>
</resultMap>
<sql id="Base_Column_List">
@ -44,7 +47,7 @@
upper_left_lon,upper_right_lat,upper_right_lon,
view_center_lat,view_center_lon,lower_right_lat,
lower_right_lon,lower_left_lat,lower_left_lon,
disaster_id,create_time,download_url,source_organization
disaster_id,create_time,download_url,source_organization,satellite_type,status,upload_id
</sql>
<select id="getRemoteSensingSourceData" resultMap="BaseResultMap">

View File

@ -75,6 +75,8 @@ public class EntityDataServiceImpl extends ServiceImpl<EntityDataMapper, EntityD
//创建实体数据
EntityData entityData = new EntityData();
RemoteSensingSourceData remoteSensingSourceData = new RemoteSensingSourceData();
//判断上传用户是否存在
LambdaQueryWrapper<GuestInfo> qw = new LambdaQueryWrapper<>();
qw.eq(GuestInfo::getEmail, entityDataUserVo.getEmail());
@ -91,12 +93,13 @@ public class EntityDataServiceImpl extends ServiceImpl<EntityDataMapper, EntityD
guestInfo.setProfessionalTitle(entityDataUserVo.getProfessionalTitle());
guestInfoMapper.insert(guestInfo);
entityData.setUploaderId(guestInfo.getId());
remoteSensingSourceData.setUploadId(guestInfo.getId());
} else {
entityData.setUploaderId(guestInfo1.getId());
remoteSensingSourceData.setUploadId(guestInfo1.getId());
}
if (entityDataUserVo.getType().equals("4")) {
RemoteSensingSourceData remoteSensingSourceData = new RemoteSensingSourceData();
remoteSensingSourceData.setDisasterId(entityDataUserVo.getDisasterId());
remoteSensingSourceData.setSourceOrganization(entityDataUserVo.getOrganization());
remoteSensingSourceData.setSatelliteCode(entityDataUserVo.getSatelliteCode());
@ -104,6 +107,7 @@ public class EntityDataServiceImpl extends ServiceImpl<EntityDataMapper, EntityD
remoteSensingSourceData.setCloudCover(entityDataUserVo.getCloudCover());
remoteSensingSourceData.setProductTime(entityDataUserVo.getProductTime());
remoteSensingSourceData.setProductBandsNum(entityDataUserVo.getProductBandsNum());
//0-爬虫获取1-未审核2-已审核上传源数据未补充下载 链接3-已审核上传源数据已补充下载链接
remoteSensingSourceData.setStatus(1);
return R.status(remoteSensingSourceDataMapper.insert(remoteSensingSourceData) > 0);
} else {

View File

@ -39,13 +39,16 @@ public class PictureInfoServiceImpl extends ServiceImpl<PictureInfoMapper, Pictu
*/
@Override
public boolean updatePicture(PictureInfo pictureInfo) {
MultipartFile multipartFile = pictureInfo.getFile();
BladeFile bladeFile = minioTemplate.putFile(multipartFile);
PictureInfo picture = new PictureInfo();
MultipartFile multipartFile = pictureInfo.getFile();
if (multipartFile!=null){
BladeFile bladeFile = minioTemplate.putFile(multipartFile);
picture.setLink(bladeFile.getLink());
picture.setName(bladeFile.getOriginalName());
picture.setSize(multipartFile.getSize());
picture.setType(multipartFile.getOriginalFilename().substring(multipartFile.getOriginalFilename().indexOf(".") + 1));
}
picture.setName(pictureInfo.getName());
picture.setIsMain(pictureInfo.getIsMain());
picture.setId(pictureInfo.getId());
return updateById(picture);