Compare commits
No commits in common. "134f3fcf4044be426ff87dbc120140ee1ac550f9" and "c7aa6007f529c884acc12a8710da825abbfb0ec9" have entirely different histories.
134f3fcf40
...
c7aa6007f5
@ -1,18 +1,24 @@
|
||||
package com.zhyc.module.fileManagement.controller;
|
||||
package com.zhyc.module.group_management.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.module.group_management.domain.BasSheepGroup;
|
||||
import com.zhyc.module.group_management.service.IBasSheepGroupService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.module.fileManagement.domain.BasSheepGroup;
|
||||
import com.zhyc.module.fileManagement.service.IBasSheepGroupService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 分组管理Controller
|
||||
@ -93,5 +99,4 @@ public class BasSheepGroupController extends BaseController
|
||||
{
|
||||
return toAjax(basSheepGroupService.deleteBasSheepGroupByGroupIds(groupIds));
|
||||
}
|
||||
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
package com.zhyc.module.fileManagement.domain;
|
||||
package com.zhyc.module.group_management.domain;
|
||||
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.TreeEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.TreeEntity;
|
||||
|
||||
/**
|
||||
* 分组管理对象 bas_sheep_group
|
||||
@ -27,45 +27,7 @@ public class BasSheepGroup extends TreeEntity
|
||||
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
||||
private String status;
|
||||
|
||||
/** 状态(0正常 1停用) */
|
||||
@Excel(name = "祖级列表")
|
||||
private String ancestors;
|
||||
|
||||
/** 祖级列表名称 */
|
||||
@Excel(name = "祖级列表名称")
|
||||
private String ancestorNames;
|
||||
|
||||
public void setAncestorNames(String ancestorNames) {
|
||||
this.ancestorNames = ancestorNames;
|
||||
}
|
||||
|
||||
public String getAncestorNames() {
|
||||
return ancestorNames;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAncestors() {
|
||||
return ancestors;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAncestors(String ancestors) {
|
||||
this.ancestors = ancestors;
|
||||
}
|
||||
|
||||
/** 是否为叶子节点 */
|
||||
private Boolean isLeaf;
|
||||
|
||||
// ... getter 和 setter
|
||||
public Boolean getIsLeaf() {
|
||||
return isLeaf;
|
||||
}
|
||||
|
||||
public void setIsLeaf(Boolean isLeaf) {
|
||||
this.isLeaf = isLeaf;
|
||||
}
|
||||
|
||||
public void setGroupId(Long groupId)
|
||||
public void setGroupId(Long groupId)
|
||||
{
|
||||
this.groupId = groupId;
|
||||
}
|
||||
@ -102,7 +64,6 @@ public class BasSheepGroup extends TreeEntity
|
||||
.append("parentId", getParentId())
|
||||
.append("groupName", getGroupName())
|
||||
.append("ancestors", getAncestors())
|
||||
.append("ancestorNames", getAncestorNames()) // 新增这一行
|
||||
.append("status", getStatus())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
@ -1,8 +1,7 @@
|
||||
package com.zhyc.module.fileManagement.mapper;
|
||||
|
||||
import com.zhyc.module.fileManagement.domain.BasSheepGroup;
|
||||
package com.zhyc.module.group_management.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.group_management.domain.BasSheepGroup;
|
||||
|
||||
/**
|
||||
* 分组管理Mapper接口
|
||||
@ -59,5 +58,4 @@ public interface BasSheepGroupMapper
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasSheepGroupByGroupIds(Long[] groupIds);
|
||||
|
||||
}
|
@ -1,8 +1,7 @@
|
||||
package com.zhyc.module.fileManagement.service;
|
||||
|
||||
import com.zhyc.module.fileManagement.domain.BasSheepGroup;
|
||||
package com.zhyc.module.group_management.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.group_management.domain.BasSheepGroup;
|
||||
|
||||
/**
|
||||
* 分组管理Service接口
|
||||
@ -59,6 +58,4 @@ public interface IBasSheepGroupService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasSheepGroupByGroupId(Long groupId);
|
||||
|
||||
|
||||
}
|
@ -1,13 +1,12 @@
|
||||
package com.zhyc.module.fileManagement.service.impl;
|
||||
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
import com.zhyc.module.fileManagement.domain.BasSheepGroup;
|
||||
import com.zhyc.module.fileManagement.mapper.BasSheepGroupMapper;
|
||||
import com.zhyc.module.fileManagement.service.IBasSheepGroupService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
package com.zhyc.module.group_management.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.group_management.mapper.BasSheepGroupMapper;
|
||||
import com.zhyc.module.group_management.domain.BasSheepGroup;
|
||||
import com.zhyc.module.group_management.service.IBasSheepGroupService;
|
||||
|
||||
/**
|
||||
* 分组管理Service业务层处理
|
||||
@ -39,24 +38,10 @@ public class BasSheepGroupServiceImpl implements IBasSheepGroupService
|
||||
* @param basSheepGroup 分组管理
|
||||
* @return 分组管理
|
||||
*/
|
||||
// @Override
|
||||
// public List<BasSheepGroup> selectBasSheepGroupList(BasSheepGroup basSheepGroup)
|
||||
// {
|
||||
// return basSheepGroupMapper.selectBasSheepGroupList(basSheepGroup);
|
||||
// }
|
||||
@Override
|
||||
public List<BasSheepGroup> selectBasSheepGroupList(BasSheepGroup basSheepGroup) {
|
||||
List<BasSheepGroup> groups = basSheepGroupMapper.selectBasSheepGroupList(basSheepGroup);
|
||||
|
||||
// 处理祖先名称显示格式
|
||||
groups.forEach(group -> {
|
||||
if (group.getAncestorNames() != null) {
|
||||
String formattedNames = group.getAncestorNames().replace(",", " / ");
|
||||
group.setAncestorNames(formattedNames);
|
||||
}
|
||||
});
|
||||
|
||||
return groups;
|
||||
public List<BasSheepGroup> selectBasSheepGroupList(BasSheepGroup basSheepGroup)
|
||||
{
|
||||
return basSheepGroupMapper.selectBasSheepGroupList(basSheepGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -99,7 +84,7 @@ public class BasSheepGroupServiceImpl implements IBasSheepGroupService
|
||||
|
||||
/**
|
||||
* 删除分组管理信息
|
||||
*
|
||||
*
|
||||
* @param groupId 分组管理主键
|
||||
* @return 结果
|
||||
*/
|
@ -1,19 +1,25 @@
|
||||
package com.zhyc.module.fileManagement.controller;
|
||||
package com.zhyc.module.sheep_file.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.module.sheep_file.domain.SheepFile;
|
||||
import com.zhyc.module.sheep_file.service.ISheepFileService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.module.fileManagement.domain.SheepFile;
|
||||
import com.zhyc.module.fileManagement.service.ISheepFileService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 羊只档案Controller
|
@ -1,12 +1,11 @@
|
||||
package com.zhyc.module.fileManagement.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
package com.zhyc.module.sheep_file.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 羊只档案对象 sheep_file
|
@ -1,8 +1,7 @@
|
||||
package com.zhyc.module.fileManagement.mapper;
|
||||
|
||||
import com.zhyc.module.fileManagement.domain.SheepFile;
|
||||
package com.zhyc.module.sheep_file.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.sheep_file.domain.SheepFile;
|
||||
|
||||
/**
|
||||
* 羊只档案Mapper接口
|
@ -1,8 +1,7 @@
|
||||
package com.zhyc.module.fileManagement.service;
|
||||
|
||||
import com.zhyc.module.fileManagement.domain.SheepFile;
|
||||
package com.zhyc.module.sheep_file.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.sheep_file.domain.SheepFile;
|
||||
|
||||
/**
|
||||
* 羊只档案Service接口
|
@ -1,13 +1,12 @@
|
||||
package com.zhyc.module.fileManagement.service.impl;
|
||||
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
import com.zhyc.module.fileManagement.domain.SheepFile;
|
||||
import com.zhyc.module.fileManagement.mapper.SheepFileMapper;
|
||||
import com.zhyc.module.fileManagement.service.ISheepFileService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
package com.zhyc.module.sheep_file.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.sheep_file.mapper.SheepFileMapper;
|
||||
import com.zhyc.module.sheep_file.domain.SheepFile;
|
||||
import com.zhyc.module.sheep_file.service.ISheepFileService;
|
||||
|
||||
/**
|
||||
* 羊只档案Service业务层处理
|
@ -1,19 +1,25 @@
|
||||
package com.zhyc.module.fileManagement.controller;
|
||||
package com.zhyc.module.sheepfold_management.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.module.sheepfold_management.domain.DaSheepfold;
|
||||
import com.zhyc.module.sheepfold_management.service.IDaSheepfoldService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.module.fileManagement.domain.DaSheepfold;
|
||||
import com.zhyc.module.fileManagement.service.IDaSheepfoldService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 羊舍管理Controller
|
||||
@ -95,16 +101,4 @@ public class DaSheepfoldController extends BaseController
|
||||
{
|
||||
return toAjax(daSheepfoldService.deleteDaSheepfoldByIds(ids));
|
||||
}
|
||||
/**
|
||||
* 检查羊舍编号是否已存在
|
||||
*/
|
||||
@GetMapping("/checkSheepfoldNoExist")
|
||||
public AjaxResult checkSheepfoldNoExist(
|
||||
@RequestParam Long ranchId,
|
||||
@RequestParam Long sheepfoldTypeId,
|
||||
@RequestParam String sheepfoldNo
|
||||
) {
|
||||
boolean exist = daSheepfoldService.checkSheepfoldNoExist(ranchId, sheepfoldTypeId, sheepfoldNo);
|
||||
return AjaxResult.success(exist);
|
||||
}
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
package com.zhyc.module.fileManagement.domain;
|
||||
package com.zhyc.module.sheepfold_management.domain;
|
||||
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 羊舍管理对象 da_sheepfold
|
@ -1,8 +1,7 @@
|
||||
package com.zhyc.module.fileManagement.mapper;
|
||||
|
||||
import com.zhyc.module.fileManagement.domain.DaSheepfold;
|
||||
package com.zhyc.module.sheepfold_management.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.sheepfold_management.domain.DaSheepfold;
|
||||
|
||||
/**
|
||||
* 羊舍管理Mapper接口
|
||||
@ -59,7 +58,5 @@ public interface DaSheepfoldMapper
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDaSheepfoldByIds(Long[] ids);
|
||||
|
||||
public int selectCount(DaSheepfold daSheepfold);
|
||||
|
||||
}
|
@ -1,8 +1,7 @@
|
||||
package com.zhyc.module.fileManagement.service;
|
||||
|
||||
import com.zhyc.module.fileManagement.domain.DaSheepfold;
|
||||
package com.zhyc.module.sheepfold_management.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.sheepfold_management.domain.DaSheepfold;
|
||||
|
||||
/**
|
||||
* 羊舍管理Service接口
|
||||
@ -59,14 +58,4 @@ public interface IDaSheepfoldService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDaSheepfoldById(Long id);
|
||||
|
||||
/**
|
||||
* 检查羊舍编号是否已存在
|
||||
*
|
||||
* @param ranchId 羊舍所属牧场ID
|
||||
* @param sheepfoldTypeId 羊舍类型ID
|
||||
* @param sheepfoldNo 羊舍编号
|
||||
* @return 是否已存在
|
||||
*/
|
||||
boolean checkSheepfoldNoExist(Long ranchId, Long sheepfoldTypeId, String sheepfoldNo);
|
||||
}
|
@ -1,12 +1,11 @@
|
||||
package com.zhyc.module.fileManagement.service.impl;
|
||||
|
||||
import com.zhyc.module.fileManagement.domain.DaSheepfold;
|
||||
import com.zhyc.module.fileManagement.mapper.DaSheepfoldMapper;
|
||||
import com.zhyc.module.fileManagement.service.IDaSheepfoldService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
package com.zhyc.module.sheepfold_management.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.sheepfold_management.mapper.DaSheepfoldMapper;
|
||||
import com.zhyc.module.sheepfold_management.domain.DaSheepfold;
|
||||
import com.zhyc.module.sheepfold_management.service.IDaSheepfoldService;
|
||||
|
||||
/**
|
||||
* 羊舍管理Service业务层处理
|
||||
@ -91,14 +90,4 @@ public class DaSheepfoldServiceImpl implements IDaSheepfoldService
|
||||
{
|
||||
return daSheepfoldMapper.deleteDaSheepfoldById(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean checkSheepfoldNoExist(Long ranchId, Long sheepfoldTypeId, String sheepfoldNo) {
|
||||
DaSheepfold query = new DaSheepfold();
|
||||
query.setRanchId(ranchId);
|
||||
query.setSheepfoldTypeId(sheepfoldTypeId);
|
||||
query.setSheepfoldNo(sheepfoldNo);
|
||||
return daSheepfoldMapper.selectCount(query) > 0;
|
||||
}
|
||||
}
|
@ -2,15 +2,13 @@
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhyc.module.fileManagement.mapper.BasSheepGroupMapper">
|
||||
<mapper namespace="com.zhyc.module.group_management.mapper.BasSheepGroupMapper">
|
||||
|
||||
<resultMap type="BasSheepGroup" id="BasSheepGroupResult">
|
||||
<result property="groupId" column="group_id" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="groupName" column="group_name" />
|
||||
<result property="ancestors" column="ancestors" />
|
||||
<result property="ancestorNames" column="ancestor_names"/>
|
||||
<result property="isLeaf" column="is_leaf"/>
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
@ -18,36 +16,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<!-- <sql id="selectBasSheepGroupVo">-->
|
||||
<!-- select group_id, parent_id, group_name, ancestors, status, create_by, create_time, update_by, update_time from bas_sheep_group-->
|
||||
<!-- </sql>-->
|
||||
<!-- 修改基础查询语句 -->
|
||||
<sql id="selectBasSheepGroupVo">
|
||||
SELECT
|
||||
g.group_id,
|
||||
g.parent_id,
|
||||
g.group_name,
|
||||
g.ancestors,
|
||||
g.status,
|
||||
g.create_by,
|
||||
g.create_time,
|
||||
g.update_by,
|
||||
g.update_time,
|
||||
<!-- 新增祖先名称查询 -->
|
||||
(SELECT GROUP_CONCAT(parent.group_name ORDER BY FIND_IN_SET(parent.group_id, g.ancestors))
|
||||
FROM bas_sheep_group parent
|
||||
WHERE FIND_IN_SET(parent.group_id, g.ancestors) > 0
|
||||
) AS ancestor_names,
|
||||
(CASE WHEN (SELECT COUNT(1) FROM bas_sheep_group child WHERE child.parent_id = g.group_id) > 0 THEN 0 ELSE 1 END) AS is_leaf
|
||||
FROM bas_sheep_group g
|
||||
select group_id, parent_id, group_name, ancestors, status, create_by, create_time, update_by, update_time from bas_sheep_group
|
||||
</sql>
|
||||
|
||||
<select id="selectBasSheepGroupList" parameterType="BasSheepGroup" resultMap="BasSheepGroupResult">
|
||||
<include refid="selectBasSheepGroupVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="groupName != null and groupName != ''"> and group_name like concat('%', #{groupName}, '%')</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>ORDER BY g.group_id <!-- 确保正确排序 -->
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasSheepGroupByGroupId" parameterType="Long" resultMap="BasSheepGroupResult">
|
||||
@ -99,11 +77,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasSheepGroupByGroupIds" parameterType="String">
|
||||
delete from bas_sheep_group where group_id in
|
||||
delete from bas_sheep_group where group_id in
|
||||
<foreach item="groupId" collection="array" open="(" separator="," close=")">
|
||||
#{groupId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhyc.module.fileManagement.mapper.SheepFileMapper">
|
||||
<mapper namespace="com.zhyc.module.sheep_file.mapper.SheepFileMapper">
|
||||
|
||||
<resultMap type="SheepFile" id="SheepFileResult">
|
||||
<result property="id" column="id" />
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhyc.module.fileManagement.mapper.DaSheepfoldMapper">
|
||||
<mapper namespace="com.zhyc.module.sheepfold_management.mapper.DaSheepfoldMapper">
|
||||
|
||||
<resultMap type="DaSheepfold" id="DaSheepfoldResult">
|
||||
<result property="id" column="id" />
|
||||
@ -78,12 +78,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectCount" parameterType="DaSheepfold" resultType="int">
|
||||
SELECT COUNT(*)
|
||||
FROM da_sheepfold
|
||||
WHERE ranch_id = #{ranchId}
|
||||
AND sheepfold_type_id = #{sheepfoldTypeId}
|
||||
AND sheepfold_no = #{sheepfoldNo}
|
||||
</select>
|
||||
</mapper>
|
Loading…
x
Reference in New Issue
Block a user