feat(基础数据): 新增路径明细关联及操作人信息显示

- 为路径信息添加明细列表关联功能,并在所有基础数据VO中增加创建人、更新人及相关名称字段
- 重构Mapper XML文件,优化SQL查询并统一排序规则
- 为所有Service实现类添加@Slave和@DSTransactional注解
main
zch 2 months ago
parent 05cb2dee06
commit f83ced0ddb

@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;
/**
* base_path_info
@ -78,5 +79,10 @@ public class BasePathInfo implements Serializable {
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updatedTime;
/**
*
*/
@TableField(exist = false)
private List<BasePathDetails> details;
}

@ -9,6 +9,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
@ -53,5 +54,9 @@ public class BasePathInfoBo extends BaseEntity {
*/
private Date createdTime;
/**
*
*/
private List<BasePathDetailsBo> details;
}

@ -85,5 +85,28 @@ public class BaseDeviceHostVo implements Serializable {
@ExcelProperty(value = "创建时间")
private Date createdTime;
/**
*
*/
@ExcelProperty(value = "创建人")
private Long createdBy;
/**
*
*/
@ExcelProperty(value = "更新人")
private Long updatedBy;
/**
*
*/
@ExcelProperty(value = "创建人名称")
private String createdByName;
/**
*
*/
@ExcelProperty(value = "更新人名称")
private String updatedByName;
}

@ -84,5 +84,34 @@ public class BaseDeviceInfoVo implements Serializable {
@ExcelProperty(value = "创建时间")
private Date createdTime;
/**
*
*/
@ExcelProperty(value = "所属主机名称")
private String hostName;
/**
*
*/
@ExcelProperty(value = "创建人")
private Long createdBy;
/**
*
*/
@ExcelProperty(value = "更新人")
private Long updatedBy;
/**
*
*/
@ExcelProperty(value = "创建人名称")
private String createdByName;
/**
*
*/
@ExcelProperty(value = "更新人名称")
private String updatedByName;
}

@ -97,5 +97,34 @@ public class BaseDeviceParamVo implements Serializable {
@ExcelProperty(value = "创建时间")
private Date createdTime;
/**
*
*/
@ExcelProperty(value = "设备名称")
private String deviceName;
/**
*
*/
@ExcelProperty(value = "创建人")
private Long createdBy;
/**
*
*/
@ExcelProperty(value = "更新人")
private Long updatedBy;
/**
*
*/
@ExcelProperty(value = "创建人名称")
private String createdByName;
/**
*
*/
@ExcelProperty(value = "更新人名称")
private String updatedByName;
}

@ -128,5 +128,40 @@ public class BaseLocationInfoVo implements Serializable {
@ExcelProperty(value = "创建时间")
private Date createdTime;
/**
*
*/
@ExcelProperty(value = "仓库名称")
private String storeName;
/**
*
*/
@ExcelProperty(value = "物料名称")
private String materialName;
/**
*
*/
@ExcelProperty(value = "创建人")
private Long createdBy;
/**
*
*/
@ExcelProperty(value = "更新人")
private Long updatedBy;
/**
*
*/
@ExcelProperty(value = "创建人名称")
private String createdByName;
/**
*
*/
@ExcelProperty(value = "更新人名称")
private String updatedByName;
}

@ -91,5 +91,28 @@ public class BaseMaterialInfoVo implements Serializable {
@ExcelProperty(value = "创建时间")
private Date createdTime;
/**
*
*/
@ExcelProperty(value = "创建人")
private Long createdBy;
/**
*
*/
@ExcelProperty(value = "更新人")
private Long updatedBy;
/**
*
*/
@ExcelProperty(value = "创建人名称")
private String createdByName;
/**
*
*/
@ExcelProperty(value = "更新人名称")
private String updatedByName;
}

@ -73,5 +73,28 @@ public class BasePathDetailsVo implements Serializable {
@ExcelProperty(value = "创建时间")
private Date createdTime;
/**
*
*/
@ExcelProperty(value = "创建人")
private Long createdBy;
/**
*
*/
@ExcelProperty(value = "更新人")
private Long updatedBy;
/**
*
*/
@ExcelProperty(value = "创建人名称")
private String createdByName;
/**
*
*/
@ExcelProperty(value = "更新人名称")
private String updatedByName;
}

@ -13,6 +13,8 @@ import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.dromara.wcs.domain.vo.BasePathDetailsVo;
@ -67,5 +69,34 @@ public class BasePathInfoVo implements Serializable {
@ExcelProperty(value = "创建时间")
private Date createdTime;
/**
*
*/
@ExcelProperty(value = "路径明细列表")
private List<BasePathDetailsVo> details;
/**
*
*/
@ExcelProperty(value = "创建人")
private Long createdBy;
/**
*
*/
@ExcelProperty(value = "更新人")
private Long updatedBy;
/**
*
*/
@ExcelProperty(value = "创建人名称")
private String createdByName;
/**
*
*/
@ExcelProperty(value = "更新人名称")
private String updatedByName;
}

@ -67,5 +67,28 @@ public class BaseStoreInfoVo implements Serializable {
@ExcelProperty(value = "创建时间")
private Date createdTime;
/**
*
*/
@ExcelProperty(value = "创建人")
private Long createdBy;
/**
*
*/
@ExcelProperty(value = "更新人")
private Long updatedBy;
/**
*
*/
@ExcelProperty(value = "创建人名称")
private String createdByName;
/**
*
*/
@ExcelProperty(value = "更新人名称")
private String updatedByName;
}

@ -1,5 +1,7 @@
package org.dromara.wcs.service.impl;
import com.baomidou.dynamic.datasource.annotation.Slave;
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
import org.dromara.common.core.utils.MapstructUtils;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.mybatis.core.page.TableDataInfo;
@ -17,7 +19,6 @@ import org.dromara.wcs.mapper.BaseDeviceHostMapper;
import org.dromara.wcs.service.IBaseDeviceHostService;
import java.util.List;
import java.util.Map;
import java.util.Collection;
/**
@ -26,6 +27,7 @@ import java.util.Collection;
* @author zch
* @date 2026-05-06
*/
@Slave
@Slf4j
@RequiredArgsConstructor
@Service
@ -94,7 +96,7 @@ public class BaseDeviceHostServiceImpl implements IBaseDeviceHostService {
*/
@Override
public Long queryCount(BaseDeviceHostBo bo) {
return baseMapper.countCustomBaseDeviceHost(buildQueryWrapper(bo, false));
return baseMapper.countCustomBaseDeviceHost(buildQueryWrapper(bo));
}
/**
@ -105,20 +107,11 @@ public class BaseDeviceHostServiceImpl implements IBaseDeviceHostService {
*/
@Override
public Boolean queryExists(BaseDeviceHostBo bo) {
return baseMapper.countCustomBaseDeviceHost(buildQueryWrapper(bo, false)) > 0;
return baseMapper.countCustomBaseDeviceHost(buildQueryWrapper(bo)) > 0;
}
private QueryWrapper<BaseDeviceHost> buildQueryWrapper(BaseDeviceHostBo bo) {
return buildQueryWrapper(bo, true);
}
private QueryWrapper<BaseDeviceHost> buildQueryWrapper(BaseDeviceHostBo bo, boolean appendDefaultOrder) {
Map<String, Object> params = bo.getParams();
QueryWrapper<BaseDeviceHost> queryWrapper = Wrappers.query();
if (appendDefaultOrder) {
// 默认把主表别名带上后续就算扩展连表SQL也尽量不因为同名字段导致排序歧义。
queryWrapper.orderByAsc("t.obj_id");
}
queryWrapper.eq(StringUtils.isNotBlank(bo.getHostCode()), "t.host_code", bo.getHostCode());
queryWrapper.like(StringUtils.isNotBlank(bo.getHostName()), "t.host_name", bo.getHostName());
queryWrapper.eq(StringUtils.isNotBlank(bo.getHostIp()), "t.host_ip", bo.getHostIp());
@ -136,6 +129,7 @@ public class BaseDeviceHostServiceImpl implements IBaseDeviceHostService {
* @return
*/
@Override
@DSTransactional
public Boolean insertByBo(BaseDeviceHostBo bo) {
BaseDeviceHost add = MapstructUtils.convert(bo, BaseDeviceHost.class);
validEntityBeforeSave(add);
@ -153,6 +147,7 @@ public class BaseDeviceHostServiceImpl implements IBaseDeviceHostService {
* @return
*/
@Override
@DSTransactional
public Boolean updateByBo(BaseDeviceHostBo bo) {
BaseDeviceHost update = MapstructUtils.convert(bo, BaseDeviceHost.class);
validEntityBeforeSave(update);
@ -174,6 +169,7 @@ public class BaseDeviceHostServiceImpl implements IBaseDeviceHostService {
* @return
*/
@Override
@DSTransactional
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
if(isValid){
//TODO 做一些业务上的校验,判断是否需要校验

@ -1,5 +1,7 @@
package org.dromara.wcs.service.impl;
import com.baomidou.dynamic.datasource.annotation.Slave;
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
import org.dromara.common.core.utils.MapstructUtils;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.mybatis.core.page.TableDataInfo;
@ -17,7 +19,6 @@ import org.dromara.wcs.mapper.BaseDeviceInfoMapper;
import org.dromara.wcs.service.IBaseDeviceInfoService;
import java.util.List;
import java.util.Map;
import java.util.Collection;
/**
@ -26,6 +27,7 @@ import java.util.Collection;
* @author zch
* @date 2026-05-06
*/
@Slave
@Slf4j
@RequiredArgsConstructor
@Service
@ -94,7 +96,7 @@ public class BaseDeviceInfoServiceImpl implements IBaseDeviceInfoService {
*/
@Override
public Long queryCount(BaseDeviceInfoBo bo) {
return baseMapper.countCustomBaseDeviceInfo(buildQueryWrapper(bo, false));
return baseMapper.countCustomBaseDeviceInfo(buildQueryWrapper(bo));
}
/**
@ -105,20 +107,11 @@ public class BaseDeviceInfoServiceImpl implements IBaseDeviceInfoService {
*/
@Override
public Boolean queryExists(BaseDeviceInfoBo bo) {
return baseMapper.countCustomBaseDeviceInfo(buildQueryWrapper(bo, false)) > 0;
return baseMapper.countCustomBaseDeviceInfo(buildQueryWrapper(bo)) > 0;
}
private QueryWrapper<BaseDeviceInfo> buildQueryWrapper(BaseDeviceInfoBo bo) {
return buildQueryWrapper(bo, true);
}
private QueryWrapper<BaseDeviceInfo> buildQueryWrapper(BaseDeviceInfoBo bo, boolean appendDefaultOrder) {
Map<String, Object> params = bo.getParams();
QueryWrapper<BaseDeviceInfo> queryWrapper = Wrappers.query();
if (appendDefaultOrder) {
// 默认把主表别名带上后续就算扩展连表SQL也尽量不因为同名字段导致排序歧义。
queryWrapper.orderByAsc("t.obj_id");
}
queryWrapper.eq(StringUtils.isNotBlank(bo.getDeviceCode()), "t.device_code", bo.getDeviceCode());
queryWrapper.like(StringUtils.isNotBlank(bo.getDeviceName()), "t.device_name", bo.getDeviceName());
queryWrapper.eq(StringUtils.isNotBlank(bo.getHostCode()), "t.host_code", bo.getHostCode());
@ -136,6 +129,7 @@ public class BaseDeviceInfoServiceImpl implements IBaseDeviceInfoService {
* @return
*/
@Override
@DSTransactional
public Boolean insertByBo(BaseDeviceInfoBo bo) {
BaseDeviceInfo add = MapstructUtils.convert(bo, BaseDeviceInfo.class);
validEntityBeforeSave(add);
@ -153,6 +147,7 @@ public class BaseDeviceInfoServiceImpl implements IBaseDeviceInfoService {
* @return
*/
@Override
@DSTransactional
public Boolean updateByBo(BaseDeviceInfoBo bo) {
BaseDeviceInfo update = MapstructUtils.convert(bo, BaseDeviceInfo.class);
validEntityBeforeSave(update);
@ -174,6 +169,7 @@ public class BaseDeviceInfoServiceImpl implements IBaseDeviceInfoService {
* @return
*/
@Override
@DSTransactional
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
if(isValid){
//TODO 做一些业务上的校验,判断是否需要校验

@ -1,5 +1,7 @@
package org.dromara.wcs.service.impl;
import com.baomidou.dynamic.datasource.annotation.Slave;
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
import org.dromara.common.core.utils.MapstructUtils;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.mybatis.core.page.TableDataInfo;
@ -17,7 +19,6 @@ import org.dromara.wcs.mapper.BaseDeviceParamMapper;
import org.dromara.wcs.service.IBaseDeviceParamService;
import java.util.List;
import java.util.Map;
import java.util.Collection;
/**
@ -26,6 +27,7 @@ import java.util.Collection;
* @author zch
* @date 2026-05-06
*/
@Slave
@Slf4j
@RequiredArgsConstructor
@Service
@ -94,7 +96,7 @@ public class BaseDeviceParamServiceImpl implements IBaseDeviceParamService {
*/
@Override
public Long queryCount(BaseDeviceParamBo bo) {
return baseMapper.countCustomBaseDeviceParam(buildQueryWrapper(bo, false));
return baseMapper.countCustomBaseDeviceParam(buildQueryWrapper(bo));
}
/**
@ -105,20 +107,11 @@ public class BaseDeviceParamServiceImpl implements IBaseDeviceParamService {
*/
@Override
public Boolean queryExists(BaseDeviceParamBo bo) {
return baseMapper.countCustomBaseDeviceParam(buildQueryWrapper(bo, false)) > 0;
return baseMapper.countCustomBaseDeviceParam(buildQueryWrapper(bo)) > 0;
}
private QueryWrapper<BaseDeviceParam> buildQueryWrapper(BaseDeviceParamBo bo) {
return buildQueryWrapper(bo, true);
}
private QueryWrapper<BaseDeviceParam> buildQueryWrapper(BaseDeviceParamBo bo, boolean appendDefaultOrder) {
Map<String, Object> params = bo.getParams();
QueryWrapper<BaseDeviceParam> queryWrapper = Wrappers.query();
if (appendDefaultOrder) {
// 默认把主表别名带上后续就算扩展连表SQL也尽量不因为同名字段导致排序歧义。
queryWrapper.orderByAsc("t.obj_id");
}
queryWrapper.eq(StringUtils.isNotBlank(bo.getParamCode()), "t.param_code", bo.getParamCode());
queryWrapper.eq(StringUtils.isNotBlank(bo.getDeviceCode()), "t.device_code", bo.getDeviceCode());
queryWrapper.like(StringUtils.isNotBlank(bo.getParamName()), "t.param_name", bo.getParamName());
@ -138,6 +131,7 @@ public class BaseDeviceParamServiceImpl implements IBaseDeviceParamService {
* @return
*/
@Override
@DSTransactional
public Boolean insertByBo(BaseDeviceParamBo bo) {
BaseDeviceParam add = MapstructUtils.convert(bo, BaseDeviceParam.class);
validEntityBeforeSave(add);
@ -155,6 +149,7 @@ public class BaseDeviceParamServiceImpl implements IBaseDeviceParamService {
* @return
*/
@Override
@DSTransactional
public Boolean updateByBo(BaseDeviceParamBo bo) {
BaseDeviceParam update = MapstructUtils.convert(bo, BaseDeviceParam.class);
validEntityBeforeSave(update);
@ -176,6 +171,7 @@ public class BaseDeviceParamServiceImpl implements IBaseDeviceParamService {
* @return
*/
@Override
@DSTransactional
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
if(isValid){
//TODO 做一些业务上的校验,判断是否需要校验

@ -1,5 +1,7 @@
package org.dromara.wcs.service.impl;
import com.baomidou.dynamic.datasource.annotation.Slave;
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
import org.dromara.common.core.utils.MapstructUtils;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.mybatis.core.page.TableDataInfo;
@ -17,7 +19,6 @@ import org.dromara.wcs.mapper.BaseLocationInfoMapper;
import org.dromara.wcs.service.IBaseLocationInfoService;
import java.util.List;
import java.util.Map;
import java.util.Collection;
/**
@ -26,6 +27,7 @@ import java.util.Collection;
* @author zch
* @date 2026-05-06
*/
@Slave
@Slf4j
@RequiredArgsConstructor
@Service
@ -94,7 +96,7 @@ public class BaseLocationInfoServiceImpl implements IBaseLocationInfoService {
*/
@Override
public Long queryCount(BaseLocationInfoBo bo) {
return baseMapper.countCustomBaseLocationInfo(buildQueryWrapper(bo, false));
return baseMapper.countCustomBaseLocationInfo(buildQueryWrapper(bo));
}
/**
@ -105,20 +107,11 @@ public class BaseLocationInfoServiceImpl implements IBaseLocationInfoService {
*/
@Override
public Boolean queryExists(BaseLocationInfoBo bo) {
return baseMapper.countCustomBaseLocationInfo(buildQueryWrapper(bo, false)) > 0;
return baseMapper.countCustomBaseLocationInfo(buildQueryWrapper(bo)) > 0;
}
private QueryWrapper<BaseLocationInfo> buildQueryWrapper(BaseLocationInfoBo bo) {
return buildQueryWrapper(bo, true);
}
private QueryWrapper<BaseLocationInfo> buildQueryWrapper(BaseLocationInfoBo bo, boolean appendDefaultOrder) {
Map<String, Object> params = bo.getParams();
QueryWrapper<BaseLocationInfo> queryWrapper = Wrappers.query();
if (appendDefaultOrder) {
// 默认把主表别名带上后续就算扩展连表SQL也尽量不因为同名字段导致排序歧义。
queryWrapper.orderByAsc("t.obj_id");
}
queryWrapper.eq(StringUtils.isNotBlank(bo.getLocationCode()), "t.location_code", bo.getLocationCode());
queryWrapper.like(StringUtils.isNotBlank(bo.getLocationName()), "t.location_name", bo.getLocationName());
queryWrapper.eq(StringUtils.isNotBlank(bo.getLocationArea()), "t.location_area", bo.getLocationArea());
@ -143,6 +136,7 @@ public class BaseLocationInfoServiceImpl implements IBaseLocationInfoService {
* @return
*/
@Override
@DSTransactional
public Boolean insertByBo(BaseLocationInfoBo bo) {
BaseLocationInfo add = MapstructUtils.convert(bo, BaseLocationInfo.class);
validEntityBeforeSave(add);
@ -160,6 +154,7 @@ public class BaseLocationInfoServiceImpl implements IBaseLocationInfoService {
* @return
*/
@Override
@DSTransactional
public Boolean updateByBo(BaseLocationInfoBo bo) {
BaseLocationInfo update = MapstructUtils.convert(bo, BaseLocationInfo.class);
validEntityBeforeSave(update);
@ -181,6 +176,7 @@ public class BaseLocationInfoServiceImpl implements IBaseLocationInfoService {
* @return
*/
@Override
@DSTransactional
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
if(isValid){
//TODO 做一些业务上的校验,判断是否需要校验

@ -1,5 +1,7 @@
package org.dromara.wcs.service.impl;
import com.baomidou.dynamic.datasource.annotation.Slave;
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
import org.dromara.common.core.utils.MapstructUtils;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.mybatis.core.page.TableDataInfo;
@ -17,7 +19,6 @@ import org.dromara.wcs.mapper.BaseMaterialInfoMapper;
import org.dromara.wcs.service.IBaseMaterialInfoService;
import java.util.List;
import java.util.Map;
import java.util.Collection;
/**
@ -26,6 +27,7 @@ import java.util.Collection;
* @author zch
* @date 2026-05-06
*/
@Slave
@Slf4j
@RequiredArgsConstructor
@Service
@ -94,7 +96,7 @@ public class BaseMaterialInfoServiceImpl implements IBaseMaterialInfoService {
*/
@Override
public Long queryCount(BaseMaterialInfoBo bo) {
return baseMapper.countCustomBaseMaterialInfo(buildQueryWrapper(bo, false));
return baseMapper.countCustomBaseMaterialInfo(buildQueryWrapper(bo));
}
/**
@ -105,20 +107,11 @@ public class BaseMaterialInfoServiceImpl implements IBaseMaterialInfoService {
*/
@Override
public Boolean queryExists(BaseMaterialInfoBo bo) {
return baseMapper.countCustomBaseMaterialInfo(buildQueryWrapper(bo, false)) > 0;
return baseMapper.countCustomBaseMaterialInfo(buildQueryWrapper(bo)) > 0;
}
private QueryWrapper<BaseMaterialInfo> buildQueryWrapper(BaseMaterialInfoBo bo) {
return buildQueryWrapper(bo, true);
}
private QueryWrapper<BaseMaterialInfo> buildQueryWrapper(BaseMaterialInfoBo bo, boolean appendDefaultOrder) {
Map<String, Object> params = bo.getParams();
QueryWrapper<BaseMaterialInfo> queryWrapper = Wrappers.query();
if (appendDefaultOrder) {
// 默认把主表别名带上后续就算扩展连表SQL也尽量不因为同名字段导致排序歧义。
queryWrapper.orderByAsc("t.obj_id");
}
queryWrapper.eq(StringUtils.isNotBlank(bo.getMaterialCode()), "t.material_code", bo.getMaterialCode());
queryWrapper.like(StringUtils.isNotBlank(bo.getMaterialName()), "t.material_name", bo.getMaterialName());
queryWrapper.eq(StringUtils.isNotBlank(bo.getMaterialType()), "t.material_type", bo.getMaterialType());
@ -137,6 +130,7 @@ public class BaseMaterialInfoServiceImpl implements IBaseMaterialInfoService {
* @return
*/
@Override
@DSTransactional
public Boolean insertByBo(BaseMaterialInfoBo bo) {
BaseMaterialInfo add = MapstructUtils.convert(bo, BaseMaterialInfo.class);
validEntityBeforeSave(add);
@ -154,6 +148,7 @@ public class BaseMaterialInfoServiceImpl implements IBaseMaterialInfoService {
* @return
*/
@Override
@DSTransactional
public Boolean updateByBo(BaseMaterialInfoBo bo) {
BaseMaterialInfo update = MapstructUtils.convert(bo, BaseMaterialInfo.class);
validEntityBeforeSave(update);
@ -175,6 +170,7 @@ public class BaseMaterialInfoServiceImpl implements IBaseMaterialInfoService {
* @return
*/
@Override
@DSTransactional
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
if(isValid){
//TODO 做一些业务上的校验,判断是否需要校验

@ -1,5 +1,7 @@
package org.dromara.wcs.service.impl;
import com.baomidou.dynamic.datasource.annotation.Slave;
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
import org.dromara.common.core.utils.MapstructUtils;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.mybatis.core.page.TableDataInfo;
@ -17,7 +19,6 @@ import org.dromara.wcs.mapper.BasePathDetailsMapper;
import org.dromara.wcs.service.IBasePathDetailsService;
import java.util.List;
import java.util.Map;
import java.util.Collection;
/**
@ -26,6 +27,7 @@ import java.util.Collection;
* @author zch
* @date 2026-05-06
*/
@Slave
@Slf4j
@RequiredArgsConstructor
@Service
@ -94,7 +96,7 @@ public class BasePathDetailsServiceImpl implements IBasePathDetailsService {
*/
@Override
public Long queryCount(BasePathDetailsBo bo) {
return baseMapper.countCustomBasePathDetails(buildQueryWrapper(bo, false));
return baseMapper.countCustomBasePathDetails(buildQueryWrapper(bo));
}
/**
@ -105,20 +107,11 @@ public class BasePathDetailsServiceImpl implements IBasePathDetailsService {
*/
@Override
public Boolean queryExists(BasePathDetailsBo bo) {
return baseMapper.countCustomBasePathDetails(buildQueryWrapper(bo, false)) > 0;
return baseMapper.countCustomBasePathDetails(buildQueryWrapper(bo)) > 0;
}
private QueryWrapper<BasePathDetails> buildQueryWrapper(BasePathDetailsBo bo) {
return buildQueryWrapper(bo, true);
}
private QueryWrapper<BasePathDetails> buildQueryWrapper(BasePathDetailsBo bo, boolean appendDefaultOrder) {
Map<String, Object> params = bo.getParams();
QueryWrapper<BasePathDetails> queryWrapper = Wrappers.query();
if (appendDefaultOrder) {
// 默认把主表别名带上后续就算扩展连表SQL也尽量不因为同名字段导致排序歧义。
queryWrapper.orderByAsc("t.obj_id");
}
queryWrapper.eq(StringUtils.isNotBlank(bo.getPathCode()), "t.path_code", bo.getPathCode());
queryWrapper.eq(StringUtils.isNotBlank(bo.getStartPoint()), "t.start_point", bo.getStartPoint());
queryWrapper.eq(StringUtils.isNotBlank(bo.getEndPoint()), "t.end_point", bo.getEndPoint());
@ -134,6 +127,7 @@ public class BasePathDetailsServiceImpl implements IBasePathDetailsService {
* @return
*/
@Override
@DSTransactional
public Boolean insertByBo(BasePathDetailsBo bo) {
BasePathDetails add = MapstructUtils.convert(bo, BasePathDetails.class);
validEntityBeforeSave(add);
@ -151,6 +145,7 @@ public class BasePathDetailsServiceImpl implements IBasePathDetailsService {
* @return
*/
@Override
@DSTransactional
public Boolean updateByBo(BasePathDetailsBo bo) {
BasePathDetails update = MapstructUtils.convert(bo, BasePathDetails.class);
validEntityBeforeSave(update);
@ -172,6 +167,7 @@ public class BasePathDetailsServiceImpl implements IBasePathDetailsService {
* @return
*/
@Override
@DSTransactional
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
if(isValid){
//TODO 做一些业务上的校验,判断是否需要校验

@ -1,5 +1,7 @@
package org.dromara.wcs.service.impl;
import com.baomidou.dynamic.datasource.annotation.Slave;
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
import org.dromara.common.core.utils.MapstructUtils;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.mybatis.core.page.TableDataInfo;
@ -17,7 +19,6 @@ import org.dromara.wcs.mapper.BasePathInfoMapper;
import org.dromara.wcs.service.IBasePathInfoService;
import java.util.List;
import java.util.Map;
import java.util.Collection;
/**
@ -26,6 +27,7 @@ import java.util.Collection;
* @author zch
* @date 2026-05-06
*/
@Slave
@Slf4j
@RequiredArgsConstructor
@Service
@ -94,7 +96,7 @@ public class BasePathInfoServiceImpl implements IBasePathInfoService {
*/
@Override
public Long queryCount(BasePathInfoBo bo) {
return baseMapper.countCustomBasePathInfo(buildQueryWrapper(bo, false));
return baseMapper.countCustomBasePathInfo(buildQueryWrapper(bo));
}
/**
@ -105,20 +107,11 @@ public class BasePathInfoServiceImpl implements IBasePathInfoService {
*/
@Override
public Boolean queryExists(BasePathInfoBo bo) {
return baseMapper.countCustomBasePathInfo(buildQueryWrapper(bo, false)) > 0;
return baseMapper.countCustomBasePathInfo(buildQueryWrapper(bo)) > 0;
}
private QueryWrapper<BasePathInfo> buildQueryWrapper(BasePathInfoBo bo) {
return buildQueryWrapper(bo, true);
}
private QueryWrapper<BasePathInfo> buildQueryWrapper(BasePathInfoBo bo, boolean appendDefaultOrder) {
Map<String, Object> params = bo.getParams();
QueryWrapper<BasePathInfo> queryWrapper = Wrappers.query();
if (appendDefaultOrder) {
// 默认把主表别名带上后续就算扩展连表SQL也尽量不因为同名字段导致排序歧义。
queryWrapper.orderByAsc("t.obj_id");
}
queryWrapper.eq(StringUtils.isNotBlank(bo.getPathCode()), "t.path_code", bo.getPathCode());
queryWrapper.like(StringUtils.isNotBlank(bo.getPathName()), "t.path_name", bo.getPathName());
queryWrapper.eq(bo.getIsFlag() != null, "t.is_flag", bo.getIsFlag());
@ -133,6 +126,7 @@ public class BasePathInfoServiceImpl implements IBasePathInfoService {
* @return
*/
@Override
@DSTransactional
public Boolean insertByBo(BasePathInfoBo bo) {
BasePathInfo add = MapstructUtils.convert(bo, BasePathInfo.class);
validEntityBeforeSave(add);
@ -150,6 +144,7 @@ public class BasePathInfoServiceImpl implements IBasePathInfoService {
* @return
*/
@Override
@DSTransactional
public Boolean updateByBo(BasePathInfoBo bo) {
BasePathInfo update = MapstructUtils.convert(bo, BasePathInfo.class);
validEntityBeforeSave(update);
@ -171,6 +166,7 @@ public class BasePathInfoServiceImpl implements IBasePathInfoService {
* @return
*/
@Override
@DSTransactional
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
if(isValid){
//TODO 做一些业务上的校验,判断是否需要校验

@ -1,5 +1,7 @@
package org.dromara.wcs.service.impl;
import com.baomidou.dynamic.datasource.annotation.Slave;
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
import org.dromara.common.core.utils.MapstructUtils;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.mybatis.core.page.TableDataInfo;
@ -17,7 +19,6 @@ import org.dromara.wcs.mapper.BaseStoreInfoMapper;
import org.dromara.wcs.service.IBaseStoreInfoService;
import java.util.List;
import java.util.Map;
import java.util.Collection;
/**
@ -26,6 +27,7 @@ import java.util.Collection;
* @author zch
* @date 2026-05-06
*/
@Slave
@Slf4j
@RequiredArgsConstructor
@Service
@ -94,7 +96,7 @@ public class BaseStoreInfoServiceImpl implements IBaseStoreInfoService {
*/
@Override
public Long queryCount(BaseStoreInfoBo bo) {
return baseMapper.countCustomBaseStoreInfo(buildQueryWrapper(bo, false));
return baseMapper.countCustomBaseStoreInfo(buildQueryWrapper(bo));
}
/**
@ -105,20 +107,11 @@ public class BaseStoreInfoServiceImpl implements IBaseStoreInfoService {
*/
@Override
public Boolean queryExists(BaseStoreInfoBo bo) {
return baseMapper.countCustomBaseStoreInfo(buildQueryWrapper(bo, false)) > 0;
return baseMapper.countCustomBaseStoreInfo(buildQueryWrapper(bo)) > 0;
}
private QueryWrapper<BaseStoreInfo> buildQueryWrapper(BaseStoreInfoBo bo) {
return buildQueryWrapper(bo, true);
}
private QueryWrapper<BaseStoreInfo> buildQueryWrapper(BaseStoreInfoBo bo, boolean appendDefaultOrder) {
Map<String, Object> params = bo.getParams();
QueryWrapper<BaseStoreInfo> queryWrapper = Wrappers.query();
if (appendDefaultOrder) {
// 默认把主表别名带上后续就算扩展连表SQL也尽量不因为同名字段导致排序歧义。
queryWrapper.orderByAsc("t.obj_id");
}
queryWrapper.eq(StringUtils.isNotBlank(bo.getStoreCode()), "t.store_code", bo.getStoreCode());
queryWrapper.like(StringUtils.isNotBlank(bo.getStoreName()), "t.store_name", bo.getStoreName());
queryWrapper.eq(bo.getIsFlag() != null, "t.is_flag", bo.getIsFlag());
@ -133,6 +126,7 @@ public class BaseStoreInfoServiceImpl implements IBaseStoreInfoService {
* @return
*/
@Override
@DSTransactional
public Boolean insertByBo(BaseStoreInfoBo bo) {
BaseStoreInfo add = MapstructUtils.convert(bo, BaseStoreInfo.class);
validEntityBeforeSave(add);
@ -150,6 +144,7 @@ public class BaseStoreInfoServiceImpl implements IBaseStoreInfoService {
* @return
*/
@Override
@DSTransactional
public Boolean updateByBo(BaseStoreInfoBo bo) {
BaseStoreInfo update = MapstructUtils.convert(bo, BaseStoreInfo.class);
validEntityBeforeSave(update);
@ -171,6 +166,7 @@ public class BaseStoreInfoServiceImpl implements IBaseStoreInfoService {
* @return
*/
@Override
@DSTransactional
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
if(isValid){
//TODO 做一些业务上的校验,判断是否需要校验

@ -14,9 +14,13 @@
<result property="isFlag" column="is_flag"/>
<result property="remark" column="remark"/>
<result property="createdTime" column="created_time"/>
<result property="createdBy" column="created_by"/>
<result property="updatedBy" column="updated_by"/>
<result property="createdByName" column="created_by_name"/>
<result property="updatedByName" column="updated_by_name"/>
</resultMap>
<sql id="selectCustomBaseDeviceHostVoColumns">
<sql id="selectBaseDeviceHostVoColumns">
select
t.obj_id,
t.host_code,
@ -30,52 +34,42 @@
t.created_time,
t.create_dept,
t.updated_by,
t.updated_time
t.updated_time,
cu.user_name as created_by_name,
uu.user_name as updated_by_name
from base_device_host t
left join wcs_core_ruoyi.sys_user cu on t.created_by = cu.user_id
left join wcs_core_ruoyi.sys_user uu on t.updated_by = uu.user_id
</sql>
<sql id="customBaseDeviceHostSqlSegment">
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != ''">
<choose>
<!-- 有真实过滤条件时把sqlSegment包进where方便后续扩展join后继续复用Wrapper。 -->
<when test="ew.nonEmptyOfWhere">
<where>
${ew.sqlSegment}
</where>
</when>
<!-- 只有排序/分组时不能强行包where否则会生成非法SQL。 -->
<otherwise>
${ew.sqlSegment}
</otherwise>
</choose>
<select id="selectCustomBaseDeviceHostVoList" resultMap="BaseDeviceHostResult">
<include refid="selectBaseDeviceHostVoColumns"/>
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere">
<!-- 公共业务条件统一来自buildQueryWrapper避免XML再维护一套重复筛选条件。 -->
<where>
${ew.sqlSegment}
</where>
</if>
</sql>
order by t.obj_id desc
</select>
<sql id="customBaseDeviceHostWhereSegment">
<select id="selectCustomBaseDeviceHostVoPage" resultMap="BaseDeviceHostResult">
<include refid="selectBaseDeviceHostVoColumns"/>
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere">
<where>
${ew.sqlSegment}
</where>
</if>
</sql>
<select id="selectCustomBaseDeviceHostVoList" resultMap="BaseDeviceHostResult">
<include refid="selectCustomBaseDeviceHostVoColumns"/>
<include refid="customBaseDeviceHostSqlSegment"/>
</select>
<select id="selectCustomBaseDeviceHostVoPage" resultMap="BaseDeviceHostResult">
<include refid="selectCustomBaseDeviceHostVoColumns"/>
<include refid="customBaseDeviceHostSqlSegment"/>
order by t.obj_id desc
</select>
<select id="selectCustomBaseDeviceHostVoById" resultMap="BaseDeviceHostResult">
<include refid="selectCustomBaseDeviceHostVoColumns"/>
<include refid="selectBaseDeviceHostVoColumns"/>
where t.obj_id = #{id}
</select>
<select id="selectCustomBaseDeviceHostVoByIds" resultMap="BaseDeviceHostResult">
<include refid="selectCustomBaseDeviceHostVoColumns"/>
<include refid="selectBaseDeviceHostVoColumns"/>
where t.obj_id in
<foreach collection="coll" item="id" open="(" separator="," close=")">
#{id}
@ -85,6 +79,10 @@
<select id="countCustomBaseDeviceHost" resultType="java.lang.Long">
select count(1)
from base_device_host t
<include refid="customBaseDeviceHostWhereSegment"/>
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere">
<where>
${ew.sqlSegment}
</where>
</if>
</select>
</mapper>

@ -1,7 +1,5 @@
<?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">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.dromara.wcs.mapper.BaseDeviceInfoMapper">
<resultMap id="BaseDeviceInfoResult" type="org.dromara.wcs.domain.vo.BaseDeviceInfoVo" autoMapping="true">
@ -9,82 +7,67 @@
<result property="deviceCode" column="device_code"/>
<result property="deviceName" column="device_name"/>
<result property="hostCode" column="host_code"/>
<result property="hostName" column="host_name"/>
<result property="deviceType" column="device_type"/>
<result property="deviceStatus" column="device_status"/>
<result property="isFlag" column="is_flag"/>
<result property="remark" column="remark"/>
<result property="createdTime" column="created_time"/>
<result property="createdBy" column="created_by"/>
<result property="updatedBy" column="updated_by"/>
<result property="createdByName" column="created_by_name"/>
<result property="updatedByName" column="updated_by_name"/>
</resultMap>
<sql id="selectCustomBaseDeviceInfoVoColumns">
<sql id="selectBaseDeviceInfoVoColumns">
select
t.obj_id,
t.device_code,
t.device_name,
t.host_code,
t.device_type,
t.device_status,
t.is_flag,
t.remark,
t.created_by,
t.created_time,
t.create_dept,
t.updated_by,
t.updated_time
t.obj_id, t.device_code, t.device_name, t.host_code,
h.host_name,
t.device_type, t.device_status, t.is_flag, t.remark,
t.created_by, t.created_time, t.create_dept,
t.updated_by, t.updated_time,
cu.user_name as created_by_name,
uu.user_name as updated_by_name
from base_device_info t
left join base_device_host h on t.host_code = h.host_code
left join wcs_core_ruoyi.sys_user cu on t.created_by = cu.user_id
left join wcs_core_ruoyi.sys_user uu on t.updated_by = uu.user_id
</sql>
<sql id="customBaseDeviceInfoSqlSegment">
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != ''">
<choose>
<!-- 有真实过滤条件时把sqlSegment包进where方便后续扩展join后继续复用Wrapper。 -->
<when test="ew.nonEmptyOfWhere">
<where>
${ew.sqlSegment}
</where>
</when>
<!-- 只有排序/分组时不能强行包where否则会生成非法SQL。 -->
<otherwise>
${ew.sqlSegment}
</otherwise>
</choose>
<select id="selectCustomBaseDeviceInfoVoList" resultMap="BaseDeviceInfoResult">
<include refid="selectBaseDeviceInfoVoColumns"/>
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere">
<!-- 公共业务条件统一来自buildQueryWrapper避免XML再维护一套重复筛选条件。 -->
<where>
${ew.sqlSegment}
</where>
</if>
</sql>
<sql id="customBaseDeviceInfoWhereSegment">
order by t.obj_id desc
</select>
<select id="selectCustomBaseDeviceInfoVoPage" resultMap="BaseDeviceInfoResult">
<include refid="selectBaseDeviceInfoVoColumns"/>
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere">
<where>
${ew.sqlSegment}
</where>
</if>
</sql>
<select id="selectCustomBaseDeviceInfoVoList" resultMap="BaseDeviceInfoResult">
<include refid="selectCustomBaseDeviceInfoVoColumns"/>
<include refid="customBaseDeviceInfoSqlSegment"/>
order by t.obj_id desc
</select>
<select id="selectCustomBaseDeviceInfoVoPage" resultMap="BaseDeviceInfoResult">
<include refid="selectCustomBaseDeviceInfoVoColumns"/>
<include refid="customBaseDeviceInfoSqlSegment"/>
</select>
<select id="selectCustomBaseDeviceInfoVoById" resultMap="BaseDeviceInfoResult">
<include refid="selectCustomBaseDeviceInfoVoColumns"/>
<include refid="selectBaseDeviceInfoVoColumns"/>
where t.obj_id = #{id}
</select>
<select id="selectCustomBaseDeviceInfoVoByIds" resultMap="BaseDeviceInfoResult">
<include refid="selectCustomBaseDeviceInfoVoColumns"/>
<include refid="selectBaseDeviceInfoVoColumns"/>
where t.obj_id in
<foreach collection="coll" item="id" open="(" separator="," close=")">
#{id}
</foreach>
<foreach collection="coll" item="id" open="(" separator="," close=")">#{id}</foreach>
</select>
<select id="countCustomBaseDeviceInfo" resultType="java.lang.Long">
select count(1)
from base_device_info t
<include refid="customBaseDeviceInfoWhereSegment"/>
select count(1) from base_device_info t
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere">
<where>
${ew.sqlSegment}
</where>
</if>
</select>
</mapper>

@ -1,13 +1,11 @@
<?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">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.dromara.wcs.mapper.BaseDeviceParamMapper">
<resultMap id="BaseDeviceParamResult" type="org.dromara.wcs.domain.vo.BaseDeviceParamVo" autoMapping="true">
<id property="objId" column="obj_id"/>
<result property="paramCode" column="param_code"/>
<result property="deviceCode" column="device_code"/>
<result property="deviceName" column="device_name"/>
<result property="paramName" column="param_name"/>
<result property="paramAddress" column="param_address"/>
<result property="paramType" column="param_type"/>
@ -16,79 +14,56 @@
<result property="isFlag" column="is_flag"/>
<result property="remark" column="remark"/>
<result property="createdTime" column="created_time"/>
<result property="createdBy" column="created_by"/>
<result property="updatedBy" column="updated_by"/>
<result property="createdByName" column="created_by_name"/>
<result property="updatedByName" column="updated_by_name"/>
</resultMap>
<sql id="selectCustomBaseDeviceParamVoColumns">
select
t.obj_id,
t.param_code,
t.device_code,
t.param_name,
t.param_address,
t.param_type,
t.operation_type,
t.operation_frequency,
t.is_flag,
t.remark,
t.created_by,
t.created_time,
t.create_dept,
t.updated_by,
t.updated_time
<sql id="selectBaseDeviceParamVoColumns">
select t.obj_id, t.param_code, t.device_code, d.device_name,
t.param_name, t.param_address, t.param_type,
t.operation_type, t.operation_frequency, t.is_flag, t.remark,
t.created_by, t.created_time, t.create_dept, t.updated_by, t.updated_time,
cu.user_name as created_by_name, uu.user_name as updated_by_name
from base_device_param t
left join base_device_info d on t.device_code = d.device_code
left join wcs_core_ruoyi.sys_user cu on t.created_by = cu.user_id
left join wcs_core_ruoyi.sys_user uu on t.updated_by = uu.user_id
</sql>
<sql id="customBaseDeviceParamSqlSegment">
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != ''">
<choose>
<!-- 有真实过滤条件时把sqlSegment包进where方便后续扩展join后继续复用Wrapper。 -->
<when test="ew.nonEmptyOfWhere">
<where>
${ew.sqlSegment}
</where>
</when>
<!-- 只有排序/分组时不能强行包where否则会生成非法SQL。 -->
<otherwise>
${ew.sqlSegment}
</otherwise>
</choose>
<select id="selectCustomBaseDeviceParamVoList" resultMap="BaseDeviceParamResult">
<include refid="selectBaseDeviceParamVoColumns"/>
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere">
<!-- 公共业务条件统一来自buildQueryWrapper避免XML再维护一套重复筛选条件。 -->
<where>
${ew.sqlSegment}
</where>
</if>
</sql>
<sql id="customBaseDeviceParamWhereSegment">
order by t.obj_id desc
</select>
<select id="selectCustomBaseDeviceParamVoPage" resultMap="BaseDeviceParamResult">
<include refid="selectBaseDeviceParamVoColumns"/>
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere">
<where>
${ew.sqlSegment}
</where>
</if>
</sql>
<select id="selectCustomBaseDeviceParamVoList" resultMap="BaseDeviceParamResult">
<include refid="selectCustomBaseDeviceParamVoColumns"/>
<include refid="customBaseDeviceParamSqlSegment"/>
order by t.obj_id desc
</select>
<select id="selectCustomBaseDeviceParamVoPage" resultMap="BaseDeviceParamResult">
<include refid="selectCustomBaseDeviceParamVoColumns"/>
<include refid="customBaseDeviceParamSqlSegment"/>
</select>
<select id="selectCustomBaseDeviceParamVoById" resultMap="BaseDeviceParamResult">
<include refid="selectCustomBaseDeviceParamVoColumns"/>
<include refid="selectBaseDeviceParamVoColumns"/>
where t.obj_id = #{id}
</select>
<select id="selectCustomBaseDeviceParamVoByIds" resultMap="BaseDeviceParamResult">
<include refid="selectCustomBaseDeviceParamVoColumns"/>
<include refid="selectBaseDeviceParamVoColumns"/>
where t.obj_id in
<foreach collection="coll" item="id" open="(" separator="," close=")">
#{id}
</foreach>
<foreach collection="coll" item="id" open="(" separator="," close=")">#{id}</foreach>
</select>
<select id="countCustomBaseDeviceParam" resultType="java.lang.Long">
select count(1)
from base_device_param t
<include refid="customBaseDeviceParamWhereSegment"/>
select count(1) from base_device_param t
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere">
<where>
${ew.sqlSegment}
</where>
</if>
</select>
</mapper>

@ -1,104 +1,77 @@
<?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">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.dromara.wcs.mapper.BaseLocationInfoMapper">
<resultMap id="BaseLocationInfoResult" type="org.dromara.wcs.domain.vo.BaseLocationInfoVo" autoMapping="true">
<id property="objId" column="obj_id"/>
<result property="locationCode" column="location_code"/>
<result property="locationName" column="location_name"/>
<result property="locationArea" column="location_area"/>
<result property="storeCode" column="store_code"/>
<result property="storeName" column="store_name"/>
<result property="locationRows" column="location_rows"/>
<result property="locationColumns" column="location_columns"/>
<result property="locationLayers" column="location_layers"/>
<result property="agvPosition" column="agv_position"/>
<result property="materialCode" column="material_code"/>
<result property="materialName" column="material_name"/>
<result property="palletBarcode" column="pallet_barcode"/>
<result property="stackCount" column="stack_count"/>
<result property="locationStatus" column="location_status"/>
<result property="isFlag" column="is_flag"/>
<result property="remark" column="remark"/>
<result property="createdTime" column="created_time"/>
<result property="createdBy" column="created_by"/>
<result property="updatedBy" column="updated_by"/>
<result property="createdByName" column="created_by_name"/>
<result property="updatedByName" column="updated_by_name"/>
</resultMap>
<sql id="selectCustomBaseLocationInfoVoColumns">
select
t.obj_id,
t.location_code,
t.location_name,
t.location_area,
t.store_code,
t.location_rows,
t.location_columns,
t.location_layers,
t.agv_position,
t.material_code,
t.pallet_barcode,
t.stack_count,
t.location_status,
t.is_flag,
t.remark,
t.created_by,
t.created_time,
t.create_dept,
t.updated_by,
t.updated_time
<sql id="selectBaseLocationInfoVoColumns">
select t.obj_id, t.location_code, t.location_name, t.location_area, t.store_code,
s.store_name, t.location_rows, t.location_columns, t.location_layers,
t.agv_position, t.material_code, m.material_name,
t.pallet_barcode, t.stack_count, t.location_status, t.is_flag, t.remark,
t.created_by, t.created_time, t.create_dept, t.updated_by, t.updated_time,
cu.user_name as created_by_name, uu.user_name as updated_by_name
from base_location_info t
left join base_store_info s on t.store_code = s.store_code
left join base_material_info m on t.material_code = m.material_code
left join wcs_core_ruoyi.sys_user cu on t.created_by = cu.user_id
left join wcs_core_ruoyi.sys_user uu on t.updated_by = uu.user_id
</sql>
<sql id="customBaseLocationInfoSqlSegment">
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != ''">
<choose>
<!-- 有真实过滤条件时把sqlSegment包进where方便后续扩展join后继续复用Wrapper。 -->
<when test="ew.nonEmptyOfWhere">
<where>
${ew.sqlSegment}
</where>
</when>
<!-- 只有排序/分组时不能强行包where否则会生成非法SQL。 -->
<otherwise>
${ew.sqlSegment}
</otherwise>
</choose>
<select id="selectCustomBaseLocationInfoVoList" resultMap="BaseLocationInfoResult">
<include refid="selectBaseLocationInfoVoColumns"/>
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere">
<!-- 公共业务条件统一来自buildQueryWrapper避免XML再维护一套重复筛选条件。 -->
<where>
${ew.sqlSegment}
</where>
</if>
</sql>
<sql id="customBaseLocationInfoWhereSegment">
order by t.obj_id desc
</select>
<select id="selectCustomBaseLocationInfoVoPage" resultMap="BaseLocationInfoResult">
<include refid="selectBaseLocationInfoVoColumns"/>
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere">
<where>
${ew.sqlSegment}
</where>
</if>
</sql>
<select id="selectCustomBaseLocationInfoVoList" resultMap="BaseLocationInfoResult">
<include refid="selectCustomBaseLocationInfoVoColumns"/>
<include refid="customBaseLocationInfoSqlSegment"/>
order by t.obj_id desc
</select>
<select id="selectCustomBaseLocationInfoVoPage" resultMap="BaseLocationInfoResult">
<include refid="selectCustomBaseLocationInfoVoColumns"/>
<include refid="customBaseLocationInfoSqlSegment"/>
</select>
<select id="selectCustomBaseLocationInfoVoById" resultMap="BaseLocationInfoResult">
<include refid="selectCustomBaseLocationInfoVoColumns"/>
<include refid="selectBaseLocationInfoVoColumns"/>
where t.obj_id = #{id}
</select>
<select id="selectCustomBaseLocationInfoVoByIds" resultMap="BaseLocationInfoResult">
<include refid="selectCustomBaseLocationInfoVoColumns"/>
<include refid="selectBaseLocationInfoVoColumns"/>
where t.obj_id in
<foreach collection="coll" item="id" open="(" separator="," close=")">
#{id}
</foreach>
<foreach collection="coll" item="id" open="(" separator="," close=")">#{id}</foreach>
</select>
<select id="countCustomBaseLocationInfo" resultType="java.lang.Long">
select count(1)
from base_location_info t
<include refid="customBaseLocationInfoWhereSegment"/>
select count(1) from base_location_info t
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere">
<where>
${ew.sqlSegment}
</where>
</if>
</select>
</mapper>

@ -1,9 +1,6 @@
<?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">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.dromara.wcs.mapper.BaseMaterialInfoMapper">
<resultMap id="BaseMaterialInfoResult" type="org.dromara.wcs.domain.vo.BaseMaterialInfoVo" autoMapping="true">
<id property="objId" column="obj_id"/>
<result property="materialCode" column="material_code"/>
@ -15,78 +12,54 @@
<result property="isFlag" column="is_flag"/>
<result property="remark" column="remark"/>
<result property="createdTime" column="created_time"/>
<result property="createdBy" column="created_by"/>
<result property="updatedBy" column="updated_by"/>
<result property="createdByName" column="created_by_name"/>
<result property="updatedByName" column="updated_by_name"/>
</resultMap>
<sql id="selectCustomBaseMaterialInfoVoColumns">
select
t.obj_id,
t.material_code,
t.material_name,
t.material_type,
t.material_barcode,
t.min_storage_cycle,
t.max_storage_cycle,
t.is_flag,
t.remark,
t.created_by,
t.created_time,
t.create_dept,
t.updated_by,
t.updated_time
<sql id="selectBaseMaterialInfoVoColumns">
select t.obj_id, t.material_code, t.material_name, t.material_type, t.material_barcode,
t.min_storage_cycle, t.max_storage_cycle, t.is_flag, t.remark,
t.created_by, t.created_time, t.create_dept, t.updated_by, t.updated_time,
cu.user_name as created_by_name, uu.user_name as updated_by_name
from base_material_info t
left join wcs_core_ruoyi.sys_user cu on t.created_by = cu.user_id
left join wcs_core_ruoyi.sys_user uu on t.updated_by = uu.user_id
</sql>
<sql id="customBaseMaterialInfoSqlSegment">
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != ''">
<choose>
<!-- 有真实过滤条件时把sqlSegment包进where方便后续扩展join后继续复用Wrapper。 -->
<when test="ew.nonEmptyOfWhere">
<where>
${ew.sqlSegment}
</where>
</when>
<!-- 只有排序/分组时不能强行包where否则会生成非法SQL。 -->
<otherwise>
${ew.sqlSegment}
</otherwise>
</choose>
<select id="selectCustomBaseMaterialInfoVoList" resultMap="BaseMaterialInfoResult">
<include refid="selectBaseMaterialInfoVoColumns"/>
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere">
<!-- 公共业务条件统一来自buildQueryWrapper避免XML再维护一套重复筛选条件。 -->
<where>
${ew.sqlSegment}
</where>
</if>
</sql>
<sql id="customBaseMaterialInfoWhereSegment">
order by t.obj_id desc
</select>
<select id="selectCustomBaseMaterialInfoVoPage" resultMap="BaseMaterialInfoResult">
<include refid="selectBaseMaterialInfoVoColumns"/>
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere">
<where>
${ew.sqlSegment}
</where>
</if>
</sql>
<select id="selectCustomBaseMaterialInfoVoList" resultMap="BaseMaterialInfoResult">
<include refid="selectCustomBaseMaterialInfoVoColumns"/>
<include refid="customBaseMaterialInfoSqlSegment"/>
order by t.obj_id desc
</select>
<select id="selectCustomBaseMaterialInfoVoPage" resultMap="BaseMaterialInfoResult">
<include refid="selectCustomBaseMaterialInfoVoColumns"/>
<include refid="customBaseMaterialInfoSqlSegment"/>
</select>
<select id="selectCustomBaseMaterialInfoVoById" resultMap="BaseMaterialInfoResult">
<include refid="selectCustomBaseMaterialInfoVoColumns"/>
<include refid="selectBaseMaterialInfoVoColumns"/>
where t.obj_id = #{id}
</select>
<select id="selectCustomBaseMaterialInfoVoByIds" resultMap="BaseMaterialInfoResult">
<include refid="selectCustomBaseMaterialInfoVoColumns"/>
<include refid="selectBaseMaterialInfoVoColumns"/>
where t.obj_id in
<foreach collection="coll" item="id" open="(" separator="," close=")">
#{id}
</foreach>
<foreach collection="coll" item="id" open="(" separator="," close=")">#{id}</foreach>
</select>
<select id="countCustomBaseMaterialInfo" resultType="java.lang.Long">
select count(1)
from base_material_info t
<include refid="customBaseMaterialInfoWhereSegment"/>
select count(1) from base_material_info t
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere">
<where>
${ew.sqlSegment}
</where>
</if>
</select>
</mapper>

@ -1,9 +1,6 @@
<?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">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.dromara.wcs.mapper.BasePathDetailsMapper">
<resultMap id="BasePathDetailsResult" type="org.dromara.wcs.domain.vo.BasePathDetailsVo" autoMapping="true">
<id property="objId" column="obj_id"/>
<result property="pathCode" column="path_code"/>
@ -12,75 +9,53 @@
<result property="isFlag" column="is_flag"/>
<result property="remark" column="remark"/>
<result property="createdTime" column="created_time"/>
<result property="createdBy" column="created_by"/>
<result property="updatedBy" column="updated_by"/>
<result property="createdByName" column="created_by_name"/>
<result property="updatedByName" column="updated_by_name"/>
</resultMap>
<sql id="selectCustomBasePathDetailsVoColumns">
select
t.obj_id,
t.path_code,
t.start_point,
t.end_point,
t.is_flag,
t.remark,
t.created_by,
t.created_time,
t.create_dept,
t.updated_by,
t.updated_time
<sql id="selectBasePathDetailsVoColumns">
select t.obj_id, t.path_code, t.start_point, t.end_point, t.is_flag, t.remark,
t.created_by, t.created_time, t.create_dept, t.updated_by, t.updated_time,
cu.user_name as created_by_name, uu.user_name as updated_by_name
from base_path_details t
left join wcs_core_ruoyi.sys_user cu on t.created_by = cu.user_id
left join wcs_core_ruoyi.sys_user uu on t.updated_by = uu.user_id
</sql>
<sql id="customBasePathDetailsSqlSegment">
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != ''">
<choose>
<!-- 有真实过滤条件时把sqlSegment包进where方便后续扩展join后继续复用Wrapper。 -->
<when test="ew.nonEmptyOfWhere">
<where>
${ew.sqlSegment}
</where>
</when>
<!-- 只有排序/分组时不能强行包where否则会生成非法SQL。 -->
<otherwise>
${ew.sqlSegment}
</otherwise>
</choose>
<select id="selectCustomBasePathDetailsVoList" resultMap="BasePathDetailsResult">
<include refid="selectBasePathDetailsVoColumns"/>
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere">
<!-- 公共业务条件统一来自buildQueryWrapper避免XML再维护一套重复筛选条件。 -->
<where>
${ew.sqlSegment}
</where>
</if>
</sql>
<sql id="customBasePathDetailsWhereSegment">
order by t.obj_id desc
</select>
<select id="selectCustomBasePathDetailsVoPage" resultMap="BasePathDetailsResult">
<include refid="selectBasePathDetailsVoColumns"/>
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere">
<where>
${ew.sqlSegment}
</where>
</if>
</sql>
<select id="selectCustomBasePathDetailsVoList" resultMap="BasePathDetailsResult">
<include refid="selectCustomBasePathDetailsVoColumns"/>
<include refid="customBasePathDetailsSqlSegment"/>
order by t.obj_id desc
</select>
<select id="selectCustomBasePathDetailsVoPage" resultMap="BasePathDetailsResult">
<include refid="selectCustomBasePathDetailsVoColumns"/>
<include refid="customBasePathDetailsSqlSegment"/>
</select>
<select id="selectCustomBasePathDetailsVoById" resultMap="BasePathDetailsResult">
<include refid="selectCustomBasePathDetailsVoColumns"/>
<include refid="selectBasePathDetailsVoColumns"/>
where t.obj_id = #{id}
</select>
<select id="selectCustomBasePathDetailsVoByIds" resultMap="BasePathDetailsResult">
<include refid="selectCustomBasePathDetailsVoColumns"/>
<include refid="selectBasePathDetailsVoColumns"/>
where t.obj_id in
<foreach collection="coll" item="id" open="(" separator="," close=")">
#{id}
</foreach>
<foreach collection="coll" item="id" open="(" separator="," close=")">#{id}</foreach>
</select>
<select id="countCustomBasePathDetails" resultType="java.lang.Long">
select count(1)
from base_path_details t
<include refid="customBasePathDetailsWhereSegment"/>
select count(1) from base_path_details t
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere">
<where>
${ew.sqlSegment}
</where>
</if>
</select>
</mapper>

@ -1,9 +1,6 @@
<?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">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.dromara.wcs.mapper.BasePathInfoMapper">
<resultMap id="BasePathInfoResult" type="org.dromara.wcs.domain.vo.BasePathInfoVo" autoMapping="true">
<id property="objId" column="obj_id"/>
<result property="pathCode" column="path_code"/>
@ -11,74 +8,61 @@
<result property="isFlag" column="is_flag"/>
<result property="remark" column="remark"/>
<result property="createdTime" column="created_time"/>
<result property="createdBy" column="created_by"/>
<result property="updatedBy" column="updated_by"/>
<result property="createdByName" column="created_by_name"/>
<result property="updatedByName" column="updated_by_name"/>
<collection property="details" ofType="org.dromara.wcs.domain.vo.BasePathDetailsVo" column="{pathCode=path_code}"
select="selectPathDetailsByPathCode"/>
</resultMap>
<sql id="selectCustomBasePathInfoVoColumns">
select
t.obj_id,
t.path_code,
t.path_name,
t.is_flag,
t.remark,
t.created_by,
t.created_time,
t.create_dept,
t.updated_by,
t.updated_time
<select id="selectPathDetailsByPathCode" resultType="org.dromara.wcs.domain.vo.BasePathDetailsVo">
select obj_id, path_code, start_point, end_point, is_flag, remark, created_time
from base_path_details where path_code = #{pathCode} order by created_time asc
</select>
<sql id="selectBasePathInfoVoColumns">
select t.obj_id, t.path_code, t.path_name, t.is_flag, t.remark,
t.created_by, t.created_time, t.create_dept, t.updated_by, t.updated_time,
cu.user_name as created_by_name, uu.user_name as updated_by_name
from base_path_info t
left join wcs_core_ruoyi.sys_user cu on t.created_by = cu.user_id
left join wcs_core_ruoyi.sys_user uu on t.updated_by = uu.user_id
</sql>
<sql id="customBasePathInfoSqlSegment">
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != ''">
<choose>
<!-- 有真实过滤条件时把sqlSegment包进where方便后续扩展join后继续复用Wrapper。 -->
<when test="ew.nonEmptyOfWhere">
<where>
${ew.sqlSegment}
</where>
</when>
<!-- 只有排序/分组时不能强行包where否则会生成非法SQL。 -->
<otherwise>
${ew.sqlSegment}
</otherwise>
</choose>
<select id="selectCustomBasePathInfoVoList" resultMap="BasePathInfoResult">
<include refid="selectBasePathInfoVoColumns"/>
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere">
<!-- 公共业务条件统一来自buildQueryWrapper避免XML再维护一套重复筛选条件。 -->
<where>
${ew.sqlSegment}
</where>
</if>
</sql>
<sql id="customBasePathInfoWhereSegment">
order by t.obj_id desc
</select>
<select id="selectCustomBasePathInfoVoPage" resultMap="BasePathInfoResult">
<include refid="selectBasePathInfoVoColumns"/>
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere">
<where>
${ew.sqlSegment}
</where>
</if>
</sql>
<select id="selectCustomBasePathInfoVoList" resultMap="BasePathInfoResult">
<include refid="selectCustomBasePathInfoVoColumns"/>
<include refid="customBasePathInfoSqlSegment"/>
order by t.obj_id desc
</select>
<select id="selectCustomBasePathInfoVoPage" resultMap="BasePathInfoResult">
<include refid="selectCustomBasePathInfoVoColumns"/>
<include refid="customBasePathInfoSqlSegment"/>
</select>
<select id="selectCustomBasePathInfoVoById" resultMap="BasePathInfoResult">
<include refid="selectCustomBasePathInfoVoColumns"/>
<include refid="selectBasePathInfoVoColumns"/>
where t.obj_id = #{id}
</select>
<select id="selectCustomBasePathInfoVoByIds" resultMap="BasePathInfoResult">
<include refid="selectCustomBasePathInfoVoColumns"/>
<include refid="selectBasePathInfoVoColumns"/>
where t.obj_id in
<foreach collection="coll" item="id" open="(" separator="," close=")">
#{id}
</foreach>
<foreach collection="coll" item="id" open="(" separator="," close=")">#{id}</foreach>
</select>
<select id="countCustomBasePathInfo" resultType="java.lang.Long">
select count(1)
from base_path_info t
<include refid="customBasePathInfoWhereSegment"/>
select count(1) from base_path_info t
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere">
<where>
${ew.sqlSegment}
</where>
</if>
</select>
</mapper>

@ -1,9 +1,6 @@
<?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">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.dromara.wcs.mapper.BaseStoreInfoMapper">
<resultMap id="BaseStoreInfoResult" type="org.dromara.wcs.domain.vo.BaseStoreInfoVo" autoMapping="true">
<id property="objId" column="obj_id"/>
<result property="storeCode" column="store_code"/>
@ -11,74 +8,53 @@
<result property="isFlag" column="is_flag"/>
<result property="remark" column="remark"/>
<result property="createdTime" column="created_time"/>
<result property="createdBy" column="created_by"/>
<result property="updatedBy" column="updated_by"/>
<result property="createdByName" column="created_by_name"/>
<result property="updatedByName" column="updated_by_name"/>
</resultMap>
<sql id="selectCustomBaseStoreInfoVoColumns">
select
t.obj_id,
t.store_code,
t.store_name,
t.is_flag,
t.remark,
t.created_by,
t.created_time,
t.create_dept,
t.updated_by,
t.updated_time
<sql id="selectBaseStoreInfoVoColumns">
select t.obj_id, t.store_code, t.store_name, t.is_flag, t.remark,
t.created_by, t.created_time, t.create_dept, t.updated_by, t.updated_time,
cu.user_name as created_by_name, uu.user_name as updated_by_name
from base_store_info t
left join wcs_core_ruoyi.sys_user cu on t.created_by = cu.user_id
left join wcs_core_ruoyi.sys_user uu on t.updated_by = uu.user_id
</sql>
<sql id="customBaseStoreInfoSqlSegment">
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != ''">
<choose>
<!-- 有真实过滤条件时把sqlSegment包进where方便后续扩展join后继续复用Wrapper。 -->
<when test="ew.nonEmptyOfWhere">
<where>
${ew.sqlSegment}
</where>
</when>
<!-- 只有排序/分组时不能强行包where否则会生成非法SQL。 -->
<otherwise>
${ew.sqlSegment}
</otherwise>
</choose>
<select id="selectCustomBaseStoreInfoVoList" resultMap="BaseStoreInfoResult">
<include refid="selectBaseStoreInfoVoColumns"/>
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere">
<!-- 公共业务条件统一来自buildQueryWrapper避免XML再维护一套重复筛选条件。 -->
<where>
${ew.sqlSegment}
</where>
</if>
</sql>
<sql id="customBaseStoreInfoWhereSegment">
order by t.obj_id desc
</select>
<select id="selectCustomBaseStoreInfoVoPage" resultMap="BaseStoreInfoResult">
<include refid="selectBaseStoreInfoVoColumns"/>
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere">
<where>
${ew.sqlSegment}
</where>
</if>
</sql>
<select id="selectCustomBaseStoreInfoVoList" resultMap="BaseStoreInfoResult">
<include refid="selectCustomBaseStoreInfoVoColumns"/>
<include refid="customBaseStoreInfoSqlSegment"/>
order by t.obj_id desc
</select>
<select id="selectCustomBaseStoreInfoVoPage" resultMap="BaseStoreInfoResult">
<include refid="selectCustomBaseStoreInfoVoColumns"/>
<include refid="customBaseStoreInfoSqlSegment"/>
</select>
<select id="selectCustomBaseStoreInfoVoById" resultMap="BaseStoreInfoResult">
<include refid="selectCustomBaseStoreInfoVoColumns"/>
<include refid="selectBaseStoreInfoVoColumns"/>
where t.obj_id = #{id}
</select>
<select id="selectCustomBaseStoreInfoVoByIds" resultMap="BaseStoreInfoResult">
<include refid="selectCustomBaseStoreInfoVoColumns"/>
<include refid="selectBaseStoreInfoVoColumns"/>
where t.obj_id in
<foreach collection="coll" item="id" open="(" separator="," close=")">
#{id}
</foreach>
<foreach collection="coll" item="id" open="(" separator="," close=")">#{id}</foreach>
</select>
<select id="countCustomBaseStoreInfo" resultType="java.lang.Long">
select count(1)
from base_store_info t
<include refid="customBaseStoreInfoWhereSegment"/>
select count(1) from base_store_info t
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere">
<where>
${ew.sqlSegment}
</where>
</if>
</select>
</mapper>

Loading…
Cancel
Save