parent
8056416a15
commit
77451f10db
|
@ -1,74 +0,0 @@
|
||||||
package com.zcloud.modules.kangzai.controller;
|
|
||||||
|
|
||||||
import com.zcloud.common.annotation.SysLog;
|
|
||||||
import com.zcloud.common.utils.PageUtils;
|
|
||||||
import com.zcloud.common.utils.R;
|
|
||||||
import com.zcloud.modules.kangzai.entity.BusRiverSectionsStreetEntity;
|
|
||||||
import com.zcloud.modules.kangzai.service.BusRiverSectionsStreetService;
|
|
||||||
import com.zcloud.modules.sys.controller.AbstractController;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author fangjiakai
|
|
||||||
* @Desc 河流县区段信息表(BusRiverSectionsStreet)表控制层
|
|
||||||
* @Date 2025-06-12 17:14:57
|
|
||||||
*/
|
|
||||||
@Api(tags = "河流县区段信息表")
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("busRiverSectionsStreet")
|
|
||||||
public class BusRiverSectionsStreetController extends AbstractController {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private BusRiverSectionsStreetService busRiverSectionsStreetService;
|
|
||||||
|
|
||||||
@ApiOperation("河流县区段信息表-新增数据")
|
|
||||||
@SysLog("河流县区段信息表-新增数据")
|
|
||||||
@PostMapping("/save")
|
|
||||||
public R insert(@RequestBody BusRiverSectionsStreetEntity param) {
|
|
||||||
busRiverSectionsStreetService.save(param);
|
|
||||||
|
|
||||||
return R.ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("河流县区段信息表-编辑数据")
|
|
||||||
@SysLog("河流县区段信息表-编辑数据")
|
|
||||||
@PostMapping("/update")
|
|
||||||
public R update(@RequestBody BusRiverSectionsStreetEntity param) {
|
|
||||||
busRiverSectionsStreetService.updateById(param);
|
|
||||||
|
|
||||||
return R.ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation("河流县区段信息表-删除数据")
|
|
||||||
@SysLog("河流县区段信息表-删除数据")
|
|
||||||
@PostMapping("/delete")
|
|
||||||
public R delete(@RequestBody BusRiverSectionsStreetEntity param) {
|
|
||||||
busRiverSectionsStreetService.delete(param.getRiverSectionsStreetId(),getUserId());
|
|
||||||
return R.ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("河流县区段信息表-分页查询")
|
|
||||||
@SysLog("河流县区段信息表-分页查询")
|
|
||||||
@PostMapping("/listPage")
|
|
||||||
public R listPage(@RequestBody Map<String, Object> params) {
|
|
||||||
PageUtils page = busRiverSectionsStreetService.listPage(params);
|
|
||||||
|
|
||||||
return R.ok().put("page", page);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation("河流县区段信息表-根据ID查详情")
|
|
||||||
@SysLog("河流县区段信息表-根据ID查详情")
|
|
||||||
@PostMapping("/info")
|
|
||||||
public R info(@RequestBody BusRiverSectionsStreetEntity param) {
|
|
||||||
BusRiverSectionsStreetEntity busRiverSectionsStreet = busRiverSectionsStreetService.getById(param.getRiverSectionsStreetId());
|
|
||||||
return R.ok().put("busRiverSectionsStreet", busRiverSectionsStreet);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -78,7 +78,7 @@ public class Mapcontroller extends AbstractController {
|
||||||
@RequestMapping("/mountainFloodVillage")
|
@RequestMapping("/mountainFloodVillage")
|
||||||
public R mountainFloodVillage() {
|
public R mountainFloodVillage() {
|
||||||
List<BusMountainFloodVillageEntity> list = busMountainFloodVillageService.queryListByFlexibleParams("is_delete",0);
|
List<BusMountainFloodVillageEntity> list = busMountainFloodVillageService.queryListByFlexibleParams("is_delete",0);
|
||||||
List<SysDictionariesEntity> sysDictionaries = sysDictionariesService.queryListParentId("3faa58f95b2d482787ed29c9ec176fbf");
|
List<SysDictionariesEntity> sysDictionaries = sysDictionariesService.queryListParentId("e72d17163f3b4045a2f1eef8e55ea835");
|
||||||
|
|
||||||
Map<String, String> dictMap = new HashMap<>();
|
Map<String, String> dictMap = new HashMap<>();
|
||||||
for (SysDictionariesEntity entity : sysDictionaries) {
|
for (SysDictionariesEntity entity : sysDictionaries) {
|
||||||
|
@ -150,7 +150,7 @@ public class Mapcontroller extends AbstractController {
|
||||||
@RequestMapping("/emergencyStorage")
|
@RequestMapping("/emergencyStorage")
|
||||||
public R emergencyStorage() {
|
public R emergencyStorage() {
|
||||||
List<BusEmergencyStorageEntity> list = busEmergencyStorageService.queryListByFlexibleParams("is_delete",0);
|
List<BusEmergencyStorageEntity> list = busEmergencyStorageService.queryListByFlexibleParams("is_delete",0);
|
||||||
List<SysDictionariesEntity> sysDictionaries = sysDictionariesService.queryListParentId("3faa58f95b2d482787ed29c9ec176fbf");
|
List<SysDictionariesEntity> sysDictionaries = sysDictionariesService.queryListParentId("e72d17163f3b4045a2f1eef8e55ea835");
|
||||||
|
|
||||||
Map<String, String> dictMap = new HashMap<>();
|
Map<String, String> dictMap = new HashMap<>();
|
||||||
for (SysDictionariesEntity entity : sysDictionaries) {
|
for (SysDictionariesEntity entity : sysDictionaries) {
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
package com.zcloud.modules.kangzai.dao;
|
|
||||||
|
|
||||||
import com.zcloud.modules.kangzai.entity.BusRiverSectionsStreetEntity;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
import java.util.Map;
|
|
||||||
/**
|
|
||||||
* @Author fangjiakai
|
|
||||||
* @Desc 河流县区段信息表(BusRiverSectionsStreet)表数据库访问层
|
|
||||||
* @Date 2025-06-12 17:14:57
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface BusRiverSectionsStreetDao extends BaseMapper<BusRiverSectionsStreetEntity> {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页查询
|
|
||||||
*/
|
|
||||||
IPage<BusRiverSectionsStreetEntity> listPage(@Param("page") Page<Map<String,Object>> page,@Param("params") Map<String, Object> params);
|
|
||||||
}
|
|
|
@ -43,21 +43,12 @@ public class BusRiverRiskVillagesEntity implements Serializable {
|
||||||
//地区
|
//地区
|
||||||
@ApiModelProperty(value = "地区")
|
@ApiModelProperty(value = "地区")
|
||||||
private String areaName;
|
private String areaName;
|
||||||
// 灾害涉及人员数
|
|
||||||
@ApiModelProperty(value = "灾害涉及人员数")
|
|
||||||
private Integer involvedPersonnelNum;
|
|
||||||
//隐患等级(1-低风险,2-中风险,3-高风险)
|
//隐患等级(1-低风险,2-中风险,3-高风险)
|
||||||
@ApiModelProperty(value = "隐患等级(1-低风险,2-中风险,3-高风险)")
|
@ApiModelProperty(value = "隐患等级(1-低风险,2-中风险,3-高风险)")
|
||||||
private Integer riskLevel;
|
private Integer riskLevel;
|
||||||
//隐患描述(如:堤防薄弱、河道淤积)
|
//隐患描述(如:堤防薄弱、河道淤积)
|
||||||
@ApiModelProperty(value = "隐患描述(如:堤防薄弱、河道淤积)")
|
@ApiModelProperty(value = "隐患描述(如:堤防薄弱、河道淤积)")
|
||||||
private String riskDescription;
|
private String riskDescription;
|
||||||
//经度
|
|
||||||
@ApiModelProperty(value = "经度")
|
|
||||||
private Double longitude;
|
|
||||||
//纬度
|
|
||||||
@ApiModelProperty(value = "纬度")
|
|
||||||
private Double latitude;
|
|
||||||
//是否删除
|
//是否删除
|
||||||
@ApiModelProperty(value = "是否删除")
|
@ApiModelProperty(value = "是否删除")
|
||||||
@TableField(fill = FieldFill.INSERT)
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
|
|
@ -1,73 +0,0 @@
|
||||||
package com.zcloud.modules.kangzai.entity;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author fangjiakai
|
|
||||||
* @Desc 河流县区段信息表(BusRiverSectionsStreet)实体
|
|
||||||
* @Date 2025-06-12 17:14:57
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@TableName("bus_river_sections_street")
|
|
||||||
public class BusRiverSectionsStreetEntity implements Serializable {
|
|
||||||
private static final long serialVersionUID = -37823698486825338L;
|
|
||||||
//河段ID
|
|
||||||
@ApiModelProperty(value = "河段ID")
|
|
||||||
@TableId
|
|
||||||
private String riverSectionsStreetId;
|
|
||||||
//关联河流ID
|
|
||||||
@ApiModelProperty(value = "关联河流ID")
|
|
||||||
private String riverId;
|
|
||||||
//县区段长度(km)
|
|
||||||
@ApiModelProperty(value = "县区段长度(km)")
|
|
||||||
private Double sectionLength;
|
|
||||||
//最小河宽(m)
|
|
||||||
@ApiModelProperty(value = "最小河宽(m)")
|
|
||||||
private Double riverWidthMin;
|
|
||||||
//最大河宽(m)
|
|
||||||
@ApiModelProperty(value = "最大河宽(m)")
|
|
||||||
private Double riverWidthMax;
|
|
||||||
//平均河宽(m)
|
|
||||||
@ApiModelProperty(value = "平均河宽(m)")
|
|
||||||
private Double riverWidthAvg;
|
|
||||||
//河段特征描述
|
|
||||||
@ApiModelProperty(value = "河段特征描述")
|
|
||||||
private String sectionDescription;
|
|
||||||
//省(字典)
|
|
||||||
@ApiModelProperty(value = "省(字典)")
|
|
||||||
private String province;
|
|
||||||
//区行政编码
|
|
||||||
@ApiModelProperty(value = "区行政编码")
|
|
||||||
private String county;
|
|
||||||
//市(字典)
|
|
||||||
@ApiModelProperty(value = "市(字典)")
|
|
||||||
private String city;
|
|
||||||
//村庄行政编码
|
|
||||||
@ApiModelProperty(value = "村庄行政编码")
|
|
||||||
private String village;
|
|
||||||
//街(字典)
|
|
||||||
@ApiModelProperty(value = "街(字典)")
|
|
||||||
private String street;
|
|
||||||
//区名称
|
|
||||||
@ApiModelProperty(value = "区名称")
|
|
||||||
private String areaName;
|
|
||||||
//经度
|
|
||||||
@ApiModelProperty(value = "经度")
|
|
||||||
private Double longitude;
|
|
||||||
//纬度
|
|
||||||
@ApiModelProperty(value = "纬度")
|
|
||||||
private Double latitude;
|
|
||||||
//是否删除
|
|
||||||
@ApiModelProperty(value = "是否删除")
|
|
||||||
@TableField(fill = FieldFill.INSERT)
|
|
||||||
private Integer isDelete;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
package com.zcloud.modules.kangzai.service;
|
|
||||||
|
|
||||||
import com.zcloud.common.utils.PageUtils;
|
|
||||||
import com.zcloud.modules.kangzai.entity.BusRiverSectionsStreetEntity;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author fangjiakai
|
|
||||||
* @Desc 河流县区段信息表(BusRiverSectionsStreet)表服务接口
|
|
||||||
* @Date 2025-06-12 17:14:57
|
|
||||||
*/
|
|
||||||
public interface BusRiverSectionsStreetService extends IService<BusRiverSectionsStreetEntity> {
|
|
||||||
|
|
||||||
BusRiverSectionsStreetEntity queryByFlexibleParams(String paramName, Object paramValue);
|
|
||||||
|
|
||||||
List<BusRiverSectionsStreetEntity> queryListByFlexibleParams(String paramName, Object paramValue);
|
|
||||||
/**
|
|
||||||
* 分页查询
|
|
||||||
*/
|
|
||||||
PageUtils listPage(Map<String, Object> params);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过主键删除数据
|
|
||||||
*/
|
|
||||||
void delete(String riverSectionsStreetId,String userId);
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,60 +0,0 @@
|
||||||
package com.zcloud.modules.kangzai.service.impl;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.zcloud.common.utils.PageUtils;
|
|
||||||
import com.zcloud.modules.kangzai.dao.BusRiverSectionsStreetDao;
|
|
||||||
import com.zcloud.modules.kangzai.entity.BusRiverSectionsStreetEntity;
|
|
||||||
import com.zcloud.modules.kangzai.service.BusRiverSectionsStreetService;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author fangjiakai
|
|
||||||
* @Desc 河流县区段信息表(BusRiverSectionsStreet)表服务实现类
|
|
||||||
* @Date 2025-06-12 17:14:57
|
|
||||||
*/
|
|
||||||
@Service("busRiverSectionsStreetService")
|
|
||||||
public class BusRiverSectionsStreetServiceImpl extends ServiceImpl<BusRiverSectionsStreetDao, BusRiverSectionsStreetEntity> implements BusRiverSectionsStreetService {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BusRiverSectionsStreetEntity queryByFlexibleParams(String paramName, Object paramValue) {
|
|
||||||
QueryWrapper<BusRiverSectionsStreetEntity> queryWrapper = new QueryWrapper<>();
|
|
||||||
queryWrapper.eq(paramName, paramValue); // 根据传入的参数名和参数值动态构建查询条件
|
|
||||||
|
|
||||||
return baseMapper.selectOne(queryWrapper);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<BusRiverSectionsStreetEntity> queryListByFlexibleParams(String paramName, Object paramValue) {
|
|
||||||
QueryWrapper<BusRiverSectionsStreetEntity> queryWrapper = new QueryWrapper<>();
|
|
||||||
queryWrapper.eq(paramName, paramValue); // 根据传入的参数名和参数值动态构建查询条件
|
|
||||||
|
|
||||||
return baseMapper.selectList(queryWrapper);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public PageUtils listPage(Map<String, Object> params) {
|
|
||||||
Page<Map<String,Object>> page = new Page<>(Integer.parseInt(params.get("curPage").toString()),Integer.parseInt(params.get("limit").toString()));
|
|
||||||
params.put("isDelete",0);
|
|
||||||
IPage<BusRiverSectionsStreetEntity> ipage = baseMapper.listPage(page,params);
|
|
||||||
return new PageUtils(ipage);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void delete(String riverSectionsStreetId,String userId){
|
|
||||||
UpdateWrapper<BusRiverSectionsStreetEntity> updateWrapper = new UpdateWrapper<>();
|
|
||||||
updateWrapper.eq("river_sections_street_id",riverSectionsStreetId);
|
|
||||||
|
|
||||||
BusRiverSectionsStreetEntity busRiverSectionsStreet = new BusRiverSectionsStreetEntity();
|
|
||||||
busRiverSectionsStreet.setIsDelete(1);
|
|
||||||
|
|
||||||
this.update(busRiverSectionsStreet, updateWrapper);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -130,12 +130,5 @@ public class SysDictionariesController extends AbstractController {
|
||||||
dictionaries = sysDictionariesService.getById(dictionaries.getDictionariesId());
|
dictionaries = sysDictionariesService.getById(dictionaries.getDictionariesId());
|
||||||
return R.ok().put("dictionaries", dictionaries);
|
return R.ok().put("dictionaries", dictionaries);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/init")
|
|
||||||
//@RequiresPermission("sys:dictionaries:info")
|
|
||||||
public R init(){
|
|
||||||
sysDictionariesService.importAreaFromJson();
|
|
||||||
return R.ok();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,4 @@ public interface SysDictionariesDao extends BaseMapper<SysDictionariesEntity> {
|
||||||
String getRecurrenceIds(String id);
|
String getRecurrenceIds(String id);
|
||||||
|
|
||||||
List<SysDictionariesEntity> cteldAll(String parentId);
|
List<SysDictionariesEntity> cteldAll(String parentId);
|
||||||
|
|
||||||
void deleteCte(String parentId);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,7 +160,7 @@ public class SysDictionariesServiceImpl extends ServiceImpl<SysDictionariesDao,
|
||||||
SysDictionariesEntity spd = new SysDictionariesEntity();
|
SysDictionariesEntity spd = new SysDictionariesEntity();
|
||||||
spd.setDictionariesId(get32UUID()); //主键
|
spd.setDictionariesId(get32UUID()); //主键
|
||||||
spd.setName(street.getString("label"));
|
spd.setName(street.getString("label"));
|
||||||
spd.setBianma(street.getString("value"));
|
spd.setBianma(street.getString("value").substring(0,9));
|
||||||
spd.setOrderBy(vorder);
|
spd.setOrderBy(vorder);
|
||||||
spd.setParentId(vpd.getDictionariesId());
|
spd.setParentId(vpd.getDictionariesId());
|
||||||
save(spd);
|
save(spd);
|
||||||
|
|
|
@ -3,9 +3,9 @@ spring:
|
||||||
type: com.alibaba.druid.pool.DruidDataSource
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
druid:
|
druid:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://127.0.0.1:33080/qa_kangzai?serverTimezone=Asia/Shanghai&useSSL=true&useUnicode=true&characterEncoding=utf-8
|
url: jdbc:mysql://127.0.0.1:33068/qa_mine?serverTimezone=Asia/Shanghai&useSSL=false&useUnicode=true&characterEncoding=utf-8
|
||||||
username: root
|
username: root
|
||||||
password: Mysql@zcloud33080
|
password: Mysql@zcloud2025
|
||||||
initial-size: 10
|
initial-size: 10
|
||||||
max-active: 100
|
max-active: 100
|
||||||
min-idle: 10
|
min-idle: 10
|
||||||
|
|
|
@ -35,9 +35,6 @@
|
||||||
<if test="params.riskDescription != null and params.riskDescription != ''">
|
<if test="params.riskDescription != null and params.riskDescription != ''">
|
||||||
AND t.risk_description = #{params.riskDescription}
|
AND t.risk_description = #{params.riskDescription}
|
||||||
</if>
|
</if>
|
||||||
<if test="params.isDelete != null">
|
|
||||||
AND t.is_delete = #{params.isDelete}
|
|
||||||
</if>
|
|
||||||
</where>
|
</where>
|
||||||
ORDER BY t.village
|
ORDER BY t.village
|
||||||
</select>
|
</select>
|
||||||
|
|
|
@ -38,9 +38,6 @@
|
||||||
<if test="params.sectionDescription != null and params.sectionDescription != ''">
|
<if test="params.sectionDescription != null and params.sectionDescription != ''">
|
||||||
AND t.section_description = #{params.sectionDescription}
|
AND t.section_description = #{params.sectionDescription}
|
||||||
</if>
|
</if>
|
||||||
<if test="params.isDelete != null">
|
|
||||||
AND t.is_delete = #{params.isDelete}
|
|
||||||
</if>
|
|
||||||
</where>
|
</where>
|
||||||
ORDER BY t.county DESC
|
ORDER BY t.county DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
|
@ -1,62 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.zcloud.modules.kangzai.dao.BusRiverSectionsStreetDao">
|
|
||||||
|
|
||||||
<!--分页查询-->
|
|
||||||
<select id="listPage" resultType="com.zcloud.modules.kangzai.entity.BusRiverSectionsStreetEntity">
|
|
||||||
SELECT
|
|
||||||
t.*
|
|
||||||
FROM bus_river_sections_street t
|
|
||||||
<where>
|
|
||||||
<if test="params.riverSectionsStreetId != null and params.riverSectionsStreetId != ''">
|
|
||||||
AND t.river_sections_street_id = #{params.riverSectionsStreetId}
|
|
||||||
</if>
|
|
||||||
<if test="params.riverId != null and params.riverId != ''">
|
|
||||||
AND t.river_id = #{params.riverId}
|
|
||||||
</if>
|
|
||||||
<if test="params.sectionLength != null and params.sectionLength != ''">
|
|
||||||
AND t.section_length = #{params.sectionLength}
|
|
||||||
</if>
|
|
||||||
<if test="params.riverWidthMin != null and params.riverWidthMin != ''">
|
|
||||||
AND t.river_width_min = #{params.riverWidthMin}
|
|
||||||
</if>
|
|
||||||
<if test="params.riverWidthMax != null and params.riverWidthMax != ''">
|
|
||||||
AND t.river_width_max = #{params.riverWidthMax}
|
|
||||||
</if>
|
|
||||||
<if test="params.riverWidthAvg != null and params.riverWidthAvg != ''">
|
|
||||||
AND t.river_width_avg = #{params.riverWidthAvg}
|
|
||||||
</if>
|
|
||||||
<if test="params.sectionDescription != null and params.sectionDescription != ''">
|
|
||||||
AND t.section_description = #{params.sectionDescription}
|
|
||||||
</if>
|
|
||||||
<if test="params.province != null and params.province != ''">
|
|
||||||
AND t.province = #{params.province}
|
|
||||||
</if>
|
|
||||||
<if test="params.county != null and params.county != ''">
|
|
||||||
AND t.county = #{params.county}
|
|
||||||
</if>
|
|
||||||
<if test="params.city != null and params.city != ''">
|
|
||||||
AND t.city = #{params.city}
|
|
||||||
</if>
|
|
||||||
<if test="params.village != null and params.village != ''">
|
|
||||||
AND t.village = #{params.village}
|
|
||||||
</if>
|
|
||||||
<if test="params.street != null and params.street != ''">
|
|
||||||
AND t.street = #{params.street}
|
|
||||||
</if>
|
|
||||||
<if test="params.areaName != null and params.areaName != ''">
|
|
||||||
AND t.area_name = #{params.areaName}
|
|
||||||
</if>
|
|
||||||
<if test="params.longitude != null and params.longitude != ''">
|
|
||||||
AND t.longitude = #{params.longitude}
|
|
||||||
</if>
|
|
||||||
<if test="params.latitude != null and params.latitude != ''">
|
|
||||||
AND t.latitude = #{params.latitude}
|
|
||||||
</if>
|
|
||||||
<if test="params.isDelete != null">
|
|
||||||
AND t.is_delete = #{params.isDelete}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
ORDER BY t.street
|
|
||||||
</select>
|
|
||||||
</mapper>
|
|
|
@ -21,21 +21,4 @@
|
||||||
)
|
)
|
||||||
select * from cte order by order_by asc
|
select * from cte order by order_by asc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<delete id="deleteCte" parameterType="string">
|
|
||||||
WITH RECURSIVE descendant_ids AS (
|
|
||||||
SELECT dictionaries_id
|
|
||||||
FROM sys_dictionaries
|
|
||||||
WHERE parent_id = #{parentId}
|
|
||||||
|
|
||||||
UNION ALL
|
|
||||||
|
|
||||||
SELECT child.dictionaries_id
|
|
||||||
FROM sys_dictionaries child
|
|
||||||
JOIN descendant_ids parent ON child.parent_id = parent.dictionaries_id
|
|
||||||
)
|
|
||||||
|
|
||||||
DELETE FROM sys_dictionaries
|
|
||||||
WHERE dictionaries_id IN (SELECT dictionaries_id FROM descendant_ids);
|
|
||||||
</delete>
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue