冲突解决
This commit is contained in:
commit
b596ecf9f5
|
@ -220,6 +220,9 @@ public class RemoteSensingSourceData implements Serializable {
|
|||
//结束时间
|
||||
@TableField(exist = false)
|
||||
private String endTime;
|
||||
//标志灾前灾后字段 0-灾前,1-灾后
|
||||
@TableField(exist = false)
|
||||
private Integer beforeOrAfter =1;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -457,4 +457,10 @@ public class DisasterInfoController {
|
|||
public R getByUserDisasterInfo(Long userId) {
|
||||
return R.data(disasterInfoService.getByUserDisasterInfoStatistics(userId));
|
||||
}
|
||||
//根据ID删除
|
||||
@DeleteMapping("/deleteByIds")
|
||||
public R deleteByIds(@RequestBody List<Long> ids) {
|
||||
return R.status(disasterInfoService.removeByIds(ids));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -20,6 +20,8 @@ import org.springframework.web.multipart.MultipartFile;
|
|||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.awt.*;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
|
@ -98,4 +100,13 @@ public class NewsController {
|
|||
public R fileExcelUpload(@RequestParam("fileData") MultipartFile file,@RequestParam("type") Integer type,@RequestParam("disasterId") Long disasterId) {
|
||||
return R.data(newsService.importTemplate(file,type,disasterId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据IDS 删除
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping("/deleteByIds")
|
||||
public R<Boolean> delete(@RequestBody List<Long> ids) {
|
||||
return R.data(newsService.removeByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ public class RemoteSensingSourceDataController {
|
|||
if (optionsJson != null) {
|
||||
remoteSensingSourceData = (RemoteSensingSourceData) JSON.parseObject(optionsJson, RemoteSensingSourceData.class);
|
||||
}
|
||||
|
||||
return R.data(remoteSensingSourceDataService.getRemoteSensingSourceDataByCondition(Condition.getPage(query), remoteSensingSourceData));
|
||||
}
|
||||
|
||||
|
@ -98,6 +99,11 @@ public class RemoteSensingSourceDataController {
|
|||
*/
|
||||
@PostMapping({"/importTemplateImgList"})
|
||||
public R importTemplateImgList(@RequestParam("fileList") List<MultipartFile> fileList, @RequestParam("disasterId") Long disasterId) {
|
||||
return R.data(remoteSensingSourceDataService.importTemplateImgList(fileList,disasterId));
|
||||
return R.data(remoteSensingSourceDataService.importTemplateImgList(fileList, disasterId));
|
||||
}
|
||||
|
||||
@DeleteMapping("/remove")
|
||||
public R<Boolean> delete(@RequestBody List<Long> ids) {
|
||||
return R.status(remoteSensingSourceDataService.removeByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,4 +80,8 @@ public class SocialMediaController {
|
|||
Boolean flag=service.update(updateWrapper);
|
||||
return R.data(flag);
|
||||
}
|
||||
@DeleteMapping("/deleteByIds")
|
||||
public R<Boolean> delete(@RequestBody List<Long> ids) {
|
||||
return R.data(service.removeByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,8 +91,15 @@
|
|||
open="(" separator="," close=")">#{AList}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="remoteSensingSourceData.startTime != null and remoteSensingSourceData.startTime != '' and remoteSensingSourceData.endTime != null and remoteSensingSourceData.endTime != '' ">
|
||||
and r.product_time between #{remoteSensingSourceData.startTime} and #{remoteSensingSourceData.endTime}
|
||||
<if test="remoteSensingSourceData.beforeOrAfter == 1">
|
||||
and r.product_time >= (select
|
||||
disaster_time
|
||||
from disaster_info where id = #{remoteSensingSourceData.disasterId})
|
||||
</if>
|
||||
<if test="remoteSensingSourceData.beforeOrAfter == 0">
|
||||
and r.product_time < (select
|
||||
disaster_time
|
||||
from disaster_info where id = #{remoteSensingSourceData.disasterId})
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
|
Loading…
Reference in New Issue