初步完成农场分区、菜地划分模块。
This commit is contained in:
@ -16,8 +16,8 @@ import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.jlt.csa.domain.Zone;
|
||||
import com.jlt.csa.service.IZoneService;
|
||||
import com.jlt.csa.domain.FarmZone;
|
||||
import com.jlt.csa.service.IFarmZoneService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
@ -25,24 +25,24 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||
* 农场分区Controller
|
||||
*
|
||||
* @author 郏磊涛
|
||||
* @date 2022-03-27
|
||||
* @date 2022-03-28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/csa/farmzone")
|
||||
public class ZoneController extends BaseController
|
||||
public class FarmZoneController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IZoneService zoneService;
|
||||
private IFarmZoneService farmZoneService;
|
||||
|
||||
/**
|
||||
* 查询农场分区列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('csa:farmzone:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Zone zone)
|
||||
public TableDataInfo list(FarmZone farmZone)
|
||||
{
|
||||
startPage();
|
||||
List<Zone> list = zoneService.selectZoneList(zone);
|
||||
List<FarmZone> list = farmZoneService.selectFarmZoneList(farmZone);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ -52,10 +52,10 @@ public class ZoneController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('csa:farmzone:export')")
|
||||
@Log(title = "农场分区", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Zone zone)
|
||||
public void export(HttpServletResponse response, FarmZone farmZone)
|
||||
{
|
||||
List<Zone> list = zoneService.selectZoneList(zone);
|
||||
ExcelUtil<Zone> util = new ExcelUtil<Zone>(Zone.class);
|
||||
List<FarmZone> list = farmZoneService.selectFarmZoneList(farmZone);
|
||||
ExcelUtil<FarmZone> util = new ExcelUtil<FarmZone>(FarmZone.class);
|
||||
util.exportExcel(response, list, "农场分区数据");
|
||||
}
|
||||
|
||||
@ -63,10 +63,10 @@ public class ZoneController extends BaseController
|
||||
* 获取农场分区详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('csa:farmzone:query')")
|
||||
@GetMapping(value = "/{code}")
|
||||
public AjaxResult getInfo(@PathVariable("code") String code)
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(zoneService.selectZoneByCode(code));
|
||||
return AjaxResult.success(farmZoneService.selectFarmZoneById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -75,9 +75,9 @@ public class ZoneController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('csa:farmzone:add')")
|
||||
@Log(title = "农场分区", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody Zone zone)
|
||||
public AjaxResult add(@RequestBody FarmZone farmZone)
|
||||
{
|
||||
return toAjax(zoneService.insertZone(zone));
|
||||
return toAjax(farmZoneService.insertFarmZone(farmZone));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -86,9 +86,9 @@ public class ZoneController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('csa:farmzone:edit')")
|
||||
@Log(title = "农场分区", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Zone zone)
|
||||
public AjaxResult edit(@RequestBody FarmZone farmZone)
|
||||
{
|
||||
return toAjax(zoneService.updateZone(zone));
|
||||
return toAjax(farmZoneService.updateFarmZone(farmZone));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -96,9 +96,9 @@ public class ZoneController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('csa:farmzone:remove')")
|
||||
@Log(title = "农场分区", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{codes}")
|
||||
public AjaxResult remove(@PathVariable String[] codes)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(zoneService.deleteZoneByCodes(codes));
|
||||
return toAjax(farmZoneService.deleteFarmZoneByIds(ids));
|
||||
}
|
||||
}
|
@ -23,9 +23,9 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 菜地划分Controller
|
||||
*
|
||||
*
|
||||
* @author 郏磊涛
|
||||
* @date 2022-03-24
|
||||
* @date 2022-03-29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/csa/garden")
|
||||
@ -91,12 +91,23 @@ public class GardenController extends BaseController
|
||||
return toAjax(gardenService.updateGarden(garden));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新菜地状态
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('csa:garden:edit')")
|
||||
@Log(title = "农场分区", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{ids}")
|
||||
public AjaxResult updateStatus(@RequestBody Garden garden, @PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(gardenService.updateGardenStatus(garden, ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除菜地划分
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('csa:garden:remove')")
|
||||
@Log(title = "菜地划分", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(gardenService.deleteGardenByIds(ids));
|
||||
|
@ -1,115 +0,0 @@
|
||||
package com.jlt.csa.controller.base;
|
||||
|
||||
import com.jlt.csa.service.base.ICsaDictDataService;
|
||||
import com.jlt.csa.service.base.ICsaDictTypeService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 数据字典信息
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/csa/base/dict/data")
|
||||
public class CsaDictDataController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ICsaDictDataService dictDataService;
|
||||
|
||||
@Autowired
|
||||
private ICsaDictTypeService dictTypeService;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SysDictData dictData)
|
||||
{
|
||||
startPage();
|
||||
List<SysDictData> list = dictDataService.selectDictDataList(dictData);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "字典数据", businessType = BusinessType.EXPORT)
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysDictData dictData)
|
||||
{
|
||||
List<SysDictData> list = dictDataService.selectDictDataList(dictData);
|
||||
ExcelUtil<SysDictData> util = new ExcelUtil<SysDictData>(SysDictData.class);
|
||||
util.exportExcel(response, list, "字典数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询字典数据详细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:query')")
|
||||
@GetMapping(value = "/{dictCode}")
|
||||
public AjaxResult getInfo(@PathVariable Long dictCode)
|
||||
{
|
||||
return AjaxResult.success(dictDataService.selectDictDataById(dictCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据字典类型查询字典数据信息
|
||||
*/
|
||||
@GetMapping(value = "/type/{dictType}")
|
||||
public AjaxResult dictType(@PathVariable String dictType)
|
||||
{
|
||||
List<SysDictData> data = dictTypeService.selectDictDataByType(dictType);
|
||||
if (StringUtils.isNull(data))
|
||||
{
|
||||
data = new ArrayList<SysDictData>();
|
||||
}
|
||||
return AjaxResult.success(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增字典类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:add')")
|
||||
@Log(title = "字典数据", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody SysDictData dict)
|
||||
{
|
||||
dict.setCreateBy(getUsername());
|
||||
return toAjax(dictDataService.insertDictData(dict));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存字典类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:edit')")
|
||||
@Log(title = "字典数据", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody SysDictData dict)
|
||||
{
|
||||
dict.setUpdateBy(getUsername());
|
||||
return toAjax(dictDataService.updateDictData(dict));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除字典类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:remove')")
|
||||
@Log(title = "字典类型", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{dictCodes}")
|
||||
public AjaxResult remove(@PathVariable Long[] dictCodes)
|
||||
{
|
||||
dictDataService.deleteDictDataByIds(dictCodes);
|
||||
return success();
|
||||
}
|
||||
}
|
@ -1,126 +0,0 @@
|
||||
package com.jlt.csa.controller.base;
|
||||
|
||||
import com.jlt.csa.service.base.ICsaDictTypeService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictType;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 数据字典信息
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/csa/base/dict/type")
|
||||
public class CsaDictTypeController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ICsaDictTypeService dictTypeService;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SysDictType dictType)
|
||||
{
|
||||
startPage();
|
||||
List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "字典类型", businessType = BusinessType.EXPORT)
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysDictType dictType)
|
||||
{
|
||||
List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
|
||||
ExcelUtil<SysDictType> util = new ExcelUtil<SysDictType>(SysDictType.class);
|
||||
util.exportExcel(response, list, "字典类型");
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询字典类型详细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:query')")
|
||||
@GetMapping(value = "/{dictId}")
|
||||
public AjaxResult getInfo(@PathVariable Long dictId)
|
||||
{
|
||||
return AjaxResult.success(dictTypeService.selectDictTypeById(dictId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增字典类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:add')")
|
||||
@Log(title = "字典类型", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody SysDictType dict)
|
||||
{
|
||||
if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
|
||||
{
|
||||
return AjaxResult.error("新增字典'" + dict.getDictName() + "'失败,字典类型已存在");
|
||||
}
|
||||
dict.setCreateBy(getUsername());
|
||||
return toAjax(dictTypeService.insertDictType(dict));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改字典类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:edit')")
|
||||
@Log(title = "字典类型", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody SysDictType dict)
|
||||
{
|
||||
if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
|
||||
{
|
||||
return AjaxResult.error("修改字典'" + dict.getDictName() + "'失败,字典类型已存在");
|
||||
}
|
||||
dict.setUpdateBy(getUsername());
|
||||
return toAjax(dictTypeService.updateDictType(dict));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除字典类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:remove')")
|
||||
@Log(title = "字典类型", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{dictIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] dictIds)
|
||||
{
|
||||
dictTypeService.deleteDictTypeByIds(dictIds);
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新字典缓存
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:remove')")
|
||||
@Log(title = "字典类型", businessType = BusinessType.CLEAN)
|
||||
@DeleteMapping("/refreshCache")
|
||||
public AjaxResult refreshCache()
|
||||
{
|
||||
dictTypeService.resetDictCache();
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字典选择框列表
|
||||
*/
|
||||
@GetMapping("/optionselect")
|
||||
public AjaxResult optionselect()
|
||||
{
|
||||
List<SysDictType> dictTypes = dictTypeService.selectDictTypeAll();
|
||||
return AjaxResult.success(dictTypes);
|
||||
}
|
||||
}
|
@ -6,17 +6,17 @@ import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 农场分区对象 csa_zone
|
||||
* 农场分区对象 csa_farm_zone
|
||||
*
|
||||
* @author 郏磊涛
|
||||
* @date 2022-03-27
|
||||
* @date 2022-03-28
|
||||
*/
|
||||
public class Zone extends BaseEntity
|
||||
public class FarmZone extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 分区代码 */
|
||||
private String code;
|
||||
/** 分区id */
|
||||
private Long id;
|
||||
|
||||
/** 分区类型 */
|
||||
@Excel(name = "分区类型")
|
||||
@ -26,21 +26,21 @@ public class Zone extends BaseEntity
|
||||
@Excel(name = "分区名称")
|
||||
private String name;
|
||||
|
||||
/** 状态(0正常 1停用) */
|
||||
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
/** 删除标志 */
|
||||
private String delFlag;
|
||||
|
||||
public void setCode(String code)
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.code = code;
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
public Long getId()
|
||||
{
|
||||
return code;
|
||||
return id;
|
||||
}
|
||||
public void setType(String type)
|
||||
{
|
||||
@ -82,7 +82,7 @@ public class Zone extends BaseEntity
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("code", getCode())
|
||||
.append("id", getId())
|
||||
.append("type", getType())
|
||||
.append("name", getName())
|
||||
.append("status", getStatus())
|
@ -8,25 +8,25 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 菜地划分对象 csa_garden
|
||||
*
|
||||
*
|
||||
* @author 郏磊涛
|
||||
* @date 2022-03-24
|
||||
* @date 2022-03-29
|
||||
*/
|
||||
public class Garden extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
/** 菜地id */
|
||||
private Long id;
|
||||
|
||||
/** 农场分区 */
|
||||
@Excel(name = "农场分区")
|
||||
private Long zoneId;
|
||||
|
||||
/** 菜地编号 */
|
||||
@Excel(name = "菜地编号")
|
||||
private String code;
|
||||
|
||||
/** 分区代码 */
|
||||
@Excel(name = "分区代码")
|
||||
private String zoneCode;
|
||||
|
||||
/** 菜地名称 */
|
||||
@Excel(name = "菜地名称")
|
||||
private String name;
|
||||
@ -35,157 +35,164 @@ public class Garden extends BaseEntity
|
||||
@Excel(name = "平方米")
|
||||
private BigDecimal m2;
|
||||
|
||||
/** 会员id */
|
||||
/** 会员 */
|
||||
@Excel(name = "会员")
|
||||
private Long memberId;
|
||||
|
||||
/** 菜地管理员id */
|
||||
/** 菜地管理员 */
|
||||
@Excel(name = "菜地管理员")
|
||||
private Long managerId;
|
||||
|
||||
/** 工人id */
|
||||
/** 工人 */
|
||||
@Excel(name = "工人")
|
||||
private Long workerId;
|
||||
|
||||
/** 客服人员id */
|
||||
/** 客服人员 */
|
||||
@Excel(name = "客服人员")
|
||||
private Long contacterId;
|
||||
|
||||
/** 耕作状态 */
|
||||
@Excel(name = "耕作状态")
|
||||
private String isFarming;
|
||||
|
||||
/** 售出状态 */
|
||||
@Excel(name = "售出状态")
|
||||
private String isSelled;
|
||||
|
||||
/** 竣工状态 */
|
||||
@Excel(name = "竣工状态")
|
||||
private String isCompleted;
|
||||
|
||||
/** 状态(0正常 1停用) */
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
/** 删除标志 */
|
||||
private String delFlag;
|
||||
|
||||
public void setId(Long id)
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setCode(String code)
|
||||
public void setZoneId(Long zoneId)
|
||||
{
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public Long getZoneId()
|
||||
{
|
||||
return zoneId;
|
||||
}
|
||||
public void setCode(String code)
|
||||
{
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
public void setZoneCode(String zoneCode)
|
||||
{
|
||||
this.zoneCode = zoneCode;
|
||||
}
|
||||
|
||||
public String getZoneCode()
|
||||
{
|
||||
return zoneCode;
|
||||
}
|
||||
public void setName(String name)
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setM2(BigDecimal m2)
|
||||
public void setM2(BigDecimal m2)
|
||||
{
|
||||
this.m2 = m2;
|
||||
}
|
||||
|
||||
public BigDecimal getM2()
|
||||
public BigDecimal getM2()
|
||||
{
|
||||
return m2;
|
||||
}
|
||||
public void setMemberId(Long memberId)
|
||||
public void setMemberId(Long memberId)
|
||||
{
|
||||
this.memberId = memberId;
|
||||
}
|
||||
|
||||
public Long getMemberId()
|
||||
public Long getMemberId()
|
||||
{
|
||||
return memberId;
|
||||
}
|
||||
public void setManagerId(Long managerId)
|
||||
public void setManagerId(Long managerId)
|
||||
{
|
||||
this.managerId = managerId;
|
||||
}
|
||||
|
||||
public Long getManagerId()
|
||||
public Long getManagerId()
|
||||
{
|
||||
return managerId;
|
||||
}
|
||||
public void setWorkerId(Long workerId)
|
||||
public void setWorkerId(Long workerId)
|
||||
{
|
||||
this.workerId = workerId;
|
||||
}
|
||||
|
||||
public Long getWorkerId()
|
||||
public Long getWorkerId()
|
||||
{
|
||||
return workerId;
|
||||
}
|
||||
public void setContacterId(Long contacterId)
|
||||
public void setContacterId(Long contacterId)
|
||||
{
|
||||
this.contacterId = contacterId;
|
||||
}
|
||||
|
||||
public Long getContacterId()
|
||||
public Long getContacterId()
|
||||
{
|
||||
return contacterId;
|
||||
}
|
||||
public void setIsFarming(String isFarming)
|
||||
public void setIsFarming(String isFarming)
|
||||
{
|
||||
this.isFarming = isFarming;
|
||||
}
|
||||
|
||||
public String getIsFarming()
|
||||
public String getIsFarming()
|
||||
{
|
||||
return isFarming;
|
||||
}
|
||||
public void setIsSelled(String isSelled)
|
||||
public void setIsSelled(String isSelled)
|
||||
{
|
||||
this.isSelled = isSelled;
|
||||
}
|
||||
|
||||
public String getIsSelled()
|
||||
public String getIsSelled()
|
||||
{
|
||||
return isSelled;
|
||||
}
|
||||
public void setIsCompleted(String isCompleted)
|
||||
public void setIsCompleted(String isCompleted)
|
||||
{
|
||||
this.isCompleted = isCompleted;
|
||||
}
|
||||
|
||||
public String getIsCompleted()
|
||||
public String getIsCompleted()
|
||||
{
|
||||
return isCompleted;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
@ -193,25 +200,25 @@ public class Garden extends BaseEntity
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("code", getCode())
|
||||
.append("zoneCode", getZoneCode())
|
||||
.append("name", getName())
|
||||
.append("m2", getM2())
|
||||
.append("memberId", getMemberId())
|
||||
.append("managerId", getManagerId())
|
||||
.append("workerId", getWorkerId())
|
||||
.append("contacterId", getContacterId())
|
||||
.append("isFarming", getIsFarming())
|
||||
.append("isSelled", getIsSelled())
|
||||
.append("isCompleted", getIsCompleted())
|
||||
.append("status", getStatus())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
.append("id", getId())
|
||||
.append("zoneId", getZoneId())
|
||||
.append("code", getCode())
|
||||
.append("name", getName())
|
||||
.append("m2", getM2())
|
||||
.append("memberId", getMemberId())
|
||||
.append("managerId", getManagerId())
|
||||
.append("workerId", getWorkerId())
|
||||
.append("contacterId", getContacterId())
|
||||
.append("isFarming", getIsFarming())
|
||||
.append("isSelled", getIsSelled())
|
||||
.append("isCompleted", getIsCompleted())
|
||||
.append("status", getStatus())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,61 @@
|
||||
package com.jlt.csa.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.jlt.csa.domain.FarmZone;
|
||||
|
||||
/**
|
||||
* 农场分区Mapper接口
|
||||
*
|
||||
* @author 郏磊涛
|
||||
* @date 2022-03-28
|
||||
*/
|
||||
public interface FarmZoneMapper
|
||||
{
|
||||
/**
|
||||
* 查询农场分区
|
||||
*
|
||||
* @param id 农场分区主键
|
||||
* @return 农场分区
|
||||
*/
|
||||
public FarmZone selectFarmZoneById(Long id);
|
||||
|
||||
/**
|
||||
* 查询农场分区列表
|
||||
*
|
||||
* @param farmZone 农场分区
|
||||
* @return 农场分区集合
|
||||
*/
|
||||
public List<FarmZone> selectFarmZoneList(FarmZone farmZone);
|
||||
|
||||
/**
|
||||
* 新增农场分区
|
||||
*
|
||||
* @param farmZone 农场分区
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertFarmZone(FarmZone farmZone);
|
||||
|
||||
/**
|
||||
* 修改农场分区
|
||||
*
|
||||
* @param farmZone 农场分区
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateFarmZone(FarmZone farmZone);
|
||||
|
||||
/**
|
||||
* 删除农场分区
|
||||
*
|
||||
* @param id 农场分区主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFarmZoneById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除农场分区
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFarmZoneByIds(Long[] ids);
|
||||
}
|
@ -2,18 +2,19 @@ package com.jlt.csa.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.jlt.csa.domain.Garden;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 菜地划分Mapper接口
|
||||
*
|
||||
*
|
||||
* @author 郏磊涛
|
||||
* @date 2022-03-24
|
||||
* @date 2022-03-29
|
||||
*/
|
||||
public interface GardenMapper
|
||||
public interface GardenMapper
|
||||
{
|
||||
/**
|
||||
* 查询菜地划分
|
||||
*
|
||||
*
|
||||
* @param id 菜地划分主键
|
||||
* @return 菜地划分
|
||||
*/
|
||||
@ -21,7 +22,7 @@ public interface GardenMapper
|
||||
|
||||
/**
|
||||
* 查询菜地划分列表
|
||||
*
|
||||
*
|
||||
* @param garden 菜地划分
|
||||
* @return 菜地划分集合
|
||||
*/
|
||||
@ -29,7 +30,7 @@ public interface GardenMapper
|
||||
|
||||
/**
|
||||
* 新增菜地划分
|
||||
*
|
||||
*
|
||||
* @param garden 菜地划分
|
||||
* @return 结果
|
||||
*/
|
||||
@ -37,15 +38,24 @@ public interface GardenMapper
|
||||
|
||||
/**
|
||||
* 修改菜地划分
|
||||
*
|
||||
*
|
||||
* @param garden 菜地划分
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGarden(Garden garden);
|
||||
|
||||
/**
|
||||
* 更新多个菜地状态
|
||||
*
|
||||
* @param garden 菜地
|
||||
* @param ids 菜地id集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGardenStatus(@Param("garden") Garden garden, @Param("ids") Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除菜地划分
|
||||
*
|
||||
*
|
||||
* @param id 菜地划分主键
|
||||
* @return 结果
|
||||
*/
|
||||
@ -53,7 +63,7 @@ public interface GardenMapper
|
||||
|
||||
/**
|
||||
* 批量删除菜地划分
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -1,61 +0,0 @@
|
||||
package com.jlt.csa.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.jlt.csa.domain.Zone;
|
||||
|
||||
/**
|
||||
* 农场分区Mapper接口
|
||||
*
|
||||
* @author 郏磊涛
|
||||
* @date 2022-03-27
|
||||
*/
|
||||
public interface ZoneMapper
|
||||
{
|
||||
/**
|
||||
* 查询农场分区
|
||||
*
|
||||
* @param code 农场分区主键
|
||||
* @return 农场分区
|
||||
*/
|
||||
public Zone selectZoneByCode(String code);
|
||||
|
||||
/**
|
||||
* 查询农场分区列表
|
||||
*
|
||||
* @param zone 农场分区
|
||||
* @return 农场分区集合
|
||||
*/
|
||||
public List<Zone> selectZoneList(Zone zone);
|
||||
|
||||
/**
|
||||
* 新增农场分区
|
||||
*
|
||||
* @param zone 农场分区
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertZone(Zone zone);
|
||||
|
||||
/**
|
||||
* 修改农场分区
|
||||
*
|
||||
* @param zone 农场分区
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateZone(Zone zone);
|
||||
|
||||
/**
|
||||
* 删除农场分区
|
||||
*
|
||||
* @param code 农场分区主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZoneByCode(String code);
|
||||
|
||||
/**
|
||||
* 批量删除农场分区
|
||||
*
|
||||
* @param codes 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZoneByCodes(String[] codes);
|
||||
}
|
@ -1,96 +0,0 @@
|
||||
package com.jlt.csa.mapper.base;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 字典表 数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public interface CsaDictDataMapper
|
||||
{
|
||||
/**
|
||||
* 根据条件分页查询字典数据
|
||||
*
|
||||
* @param dictData 字典数据信息
|
||||
* @return 字典数据集合信息
|
||||
*/
|
||||
public List<SysDictData> selectDictDataList(SysDictData dictData);
|
||||
|
||||
/**
|
||||
* 根据字典类型查询字典数据
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @return 字典数据集合信息
|
||||
*/
|
||||
public List<SysDictData> selectDictDataByType(String dictType);
|
||||
|
||||
/**
|
||||
* 根据字典类型和字典键值查询字典数据信息
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @param dictValue 字典键值
|
||||
* @return 字典标签
|
||||
*/
|
||||
public String selectDictLabel(@Param("dictType") String dictType, @Param("dictValue") String dictValue);
|
||||
|
||||
/**
|
||||
* 根据字典数据ID查询信息
|
||||
*
|
||||
* @param dictCode 字典数据ID
|
||||
* @return 字典数据
|
||||
*/
|
||||
public SysDictData selectDictDataById(Long dictCode);
|
||||
|
||||
/**
|
||||
* 查询字典数据
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @return 字典数据
|
||||
*/
|
||||
public int countDictDataByType(String dictType);
|
||||
|
||||
/**
|
||||
* 通过字典ID删除字典数据信息
|
||||
*
|
||||
* @param dictCode 字典数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDictDataById(Long dictCode);
|
||||
|
||||
/**
|
||||
* 批量删除字典数据信息
|
||||
*
|
||||
* @param dictCodes 需要删除的字典数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDictDataByIds(Long[] dictCodes);
|
||||
|
||||
/**
|
||||
* 新增字典数据信息
|
||||
*
|
||||
* @param dictData 字典数据信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDictData(SysDictData dictData);
|
||||
|
||||
/**
|
||||
* 修改字典数据信息
|
||||
*
|
||||
* @param dictData 字典数据信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDictData(SysDictData dictData);
|
||||
|
||||
/**
|
||||
* 同步修改字典类型
|
||||
*
|
||||
* @param oldDictType 旧字典类型
|
||||
* @param newDictType 新旧字典类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDictDataType(@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType);
|
||||
}
|
@ -1,86 +0,0 @@
|
||||
package com.jlt.csa.mapper.base;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SysDictType;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 字典表 数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Mapper
|
||||
public interface CsaDictTypeMapper
|
||||
{
|
||||
/**
|
||||
* 根据条件分页查询字典类型
|
||||
*
|
||||
* @param dictType 字典类型信息
|
||||
* @return 字典类型集合信息
|
||||
*/
|
||||
public List<SysDictType> selectDictTypeList(SysDictType dictType);
|
||||
|
||||
/**
|
||||
* 根据所有字典类型
|
||||
*
|
||||
* @return 字典类型集合信息
|
||||
*/
|
||||
public List<SysDictType> selectDictTypeAll();
|
||||
|
||||
/**
|
||||
* 根据字典类型ID查询信息
|
||||
*
|
||||
* @param dictId 字典类型ID
|
||||
* @return 字典类型
|
||||
*/
|
||||
public SysDictType selectDictTypeById(Long dictId);
|
||||
|
||||
/**
|
||||
* 根据字典类型查询信息
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @return 字典类型
|
||||
*/
|
||||
public SysDictType selectDictTypeByType(String dictType);
|
||||
|
||||
/**
|
||||
* 通过字典ID删除字典信息
|
||||
*
|
||||
* @param dictId 字典ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDictTypeById(Long dictId);
|
||||
|
||||
/**
|
||||
* 批量删除字典类型信息
|
||||
*
|
||||
* @param dictIds 需要删除的字典ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDictTypeByIds(Long[] dictIds);
|
||||
|
||||
/**
|
||||
* 新增字典类型信息
|
||||
*
|
||||
* @param dictType 字典类型信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDictType(SysDictType dictType);
|
||||
|
||||
/**
|
||||
* 修改字典类型信息
|
||||
*
|
||||
* @param dictType 字典类型信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDictType(SysDictType dictType);
|
||||
|
||||
/**
|
||||
* 校验字典类型称是否唯一
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @return 结果
|
||||
*/
|
||||
public SysDictType checkDictTypeUnique(String dictType);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.jlt.csa.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.jlt.csa.domain.FarmZone;
|
||||
|
||||
/**
|
||||
* 农场分区Service接口
|
||||
*
|
||||
* @author 郏磊涛
|
||||
* @date 2022-03-28
|
||||
*/
|
||||
public interface IFarmZoneService
|
||||
{
|
||||
/**
|
||||
* 查询农场分区
|
||||
*
|
||||
* @param id 农场分区主键
|
||||
* @return 农场分区
|
||||
*/
|
||||
public FarmZone selectFarmZoneById(Long id);
|
||||
|
||||
/**
|
||||
* 查询农场分区列表
|
||||
*
|
||||
* @param farmZone 农场分区
|
||||
* @return 农场分区集合
|
||||
*/
|
||||
public List<FarmZone> selectFarmZoneList(FarmZone farmZone);
|
||||
|
||||
/**
|
||||
* 新增农场分区
|
||||
*
|
||||
* @param farmZone 农场分区
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertFarmZone(FarmZone farmZone);
|
||||
|
||||
/**
|
||||
* 修改农场分区
|
||||
*
|
||||
* @param farmZone 农场分区
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateFarmZone(FarmZone farmZone);
|
||||
|
||||
/**
|
||||
* 批量删除农场分区
|
||||
*
|
||||
* @param ids 需要删除的农场分区主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFarmZoneByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除农场分区信息
|
||||
*
|
||||
* @param id 农场分区主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFarmZoneById(Long id);
|
||||
}
|
@ -5,15 +5,15 @@ import com.jlt.csa.domain.Garden;
|
||||
|
||||
/**
|
||||
* 菜地划分Service接口
|
||||
*
|
||||
*
|
||||
* @author 郏磊涛
|
||||
* @date 2022-03-24
|
||||
* @date 2022-03-29
|
||||
*/
|
||||
public interface IGardenService
|
||||
public interface IGardenService
|
||||
{
|
||||
/**
|
||||
* 查询菜地划分
|
||||
*
|
||||
*
|
||||
* @param id 菜地划分主键
|
||||
* @return 菜地划分
|
||||
*/
|
||||
@ -21,7 +21,7 @@ public interface IGardenService
|
||||
|
||||
/**
|
||||
* 查询菜地划分列表
|
||||
*
|
||||
*
|
||||
* @param garden 菜地划分
|
||||
* @return 菜地划分集合
|
||||
*/
|
||||
@ -29,23 +29,32 @@ public interface IGardenService
|
||||
|
||||
/**
|
||||
* 新增菜地划分
|
||||
*
|
||||
*
|
||||
* @param garden 菜地划分
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertGarden(Garden garden);
|
||||
|
||||
/**
|
||||
* 修改菜地划分
|
||||
*
|
||||
* @param garden 菜地划分
|
||||
* 修改菜地
|
||||
*
|
||||
* @param garden 菜地
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGarden(Garden garden);
|
||||
|
||||
/**
|
||||
* 批量修改菜地状态
|
||||
*
|
||||
* @param garden 菜地划分
|
||||
* @param ids 需要更改的菜地id集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGardenStatus(Garden garden, Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量删除菜地划分
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的菜地划分主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
@ -53,7 +62,7 @@ public interface IGardenService
|
||||
|
||||
/**
|
||||
* 删除菜地划分信息
|
||||
*
|
||||
*
|
||||
* @param id 菜地划分主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -1,61 +0,0 @@
|
||||
package com.jlt.csa.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.jlt.csa.domain.Zone;
|
||||
|
||||
/**
|
||||
* 农场分区Service接口
|
||||
*
|
||||
* @author 郏磊涛
|
||||
* @date 2022-03-27
|
||||
*/
|
||||
public interface IZoneService
|
||||
{
|
||||
/**
|
||||
* 查询农场分区
|
||||
*
|
||||
* @param code 农场分区主键
|
||||
* @return 农场分区
|
||||
*/
|
||||
public Zone selectZoneByCode(String code);
|
||||
|
||||
/**
|
||||
* 查询农场分区列表
|
||||
*
|
||||
* @param zone 农场分区
|
||||
* @return 农场分区集合
|
||||
*/
|
||||
public List<Zone> selectZoneList(Zone zone);
|
||||
|
||||
/**
|
||||
* 新增农场分区
|
||||
*
|
||||
* @param zone 农场分区
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertZone(Zone zone);
|
||||
|
||||
/**
|
||||
* 修改农场分区
|
||||
*
|
||||
* @param zone 农场分区
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateZone(Zone zone);
|
||||
|
||||
/**
|
||||
* 批量删除农场分区
|
||||
*
|
||||
* @param codes 需要删除的农场分区主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZoneByCodes(String[] codes);
|
||||
|
||||
/**
|
||||
* 删除农场分区信息
|
||||
*
|
||||
* @param code 农场分区主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZoneByCode(String code);
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
package com.jlt.csa.service.base;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 字典 业务层
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public interface ICsaDictDataService
|
||||
{
|
||||
/**
|
||||
* 根据条件分页查询字典数据
|
||||
*
|
||||
* @param dictData 字典数据信息
|
||||
* @return 字典数据集合信息
|
||||
*/
|
||||
public List<SysDictData> selectDictDataList(SysDictData dictData);
|
||||
|
||||
/**
|
||||
* 根据字典类型和字典键值查询字典数据信息
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @param dictValue 字典键值
|
||||
* @return 字典标签
|
||||
*/
|
||||
public String selectDictLabel(String dictType, String dictValue);
|
||||
|
||||
/**
|
||||
* 根据字典数据ID查询信息
|
||||
*
|
||||
* @param dictCode 字典数据ID
|
||||
* @return 字典数据
|
||||
*/
|
||||
public SysDictData selectDictDataById(Long dictCode);
|
||||
|
||||
/**
|
||||
* 批量删除字典数据信息
|
||||
*
|
||||
* @param dictCodes 需要删除的字典数据ID
|
||||
*/
|
||||
public void deleteDictDataByIds(Long[] dictCodes);
|
||||
|
||||
/**
|
||||
* 新增保存字典数据信息
|
||||
*
|
||||
* @param dictData 字典数据信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDictData(SysDictData dictData);
|
||||
|
||||
/**
|
||||
* 修改保存字典数据信息
|
||||
*
|
||||
* @param dictData 字典数据信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDictData(SysDictData dictData);
|
||||
}
|
@ -1,99 +0,0 @@
|
||||
package com.jlt.csa.service.base;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictType;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 字典 业务层
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public interface ICsaDictTypeService
|
||||
{
|
||||
/**
|
||||
* 根据条件分页查询字典类型
|
||||
*
|
||||
* @param dictType 字典类型信息
|
||||
* @return 字典类型集合信息
|
||||
*/
|
||||
public List<SysDictType> selectDictTypeList(SysDictType dictType);
|
||||
|
||||
/**
|
||||
* 根据所有字典类型
|
||||
*
|
||||
* @return 字典类型集合信息
|
||||
*/
|
||||
public List<SysDictType> selectDictTypeAll();
|
||||
|
||||
/**
|
||||
* 根据字典类型查询字典数据
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @return 字典数据集合信息
|
||||
*/
|
||||
public List<SysDictData> selectDictDataByType(String dictType);
|
||||
|
||||
/**
|
||||
* 根据字典类型ID查询信息
|
||||
*
|
||||
* @param dictId 字典类型ID
|
||||
* @return 字典类型
|
||||
*/
|
||||
public SysDictType selectDictTypeById(Long dictId);
|
||||
|
||||
/**
|
||||
* 根据字典类型查询信息
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @return 字典类型
|
||||
*/
|
||||
public SysDictType selectDictTypeByType(String dictType);
|
||||
|
||||
/**
|
||||
* 批量删除字典信息
|
||||
*
|
||||
* @param dictIds 需要删除的字典ID
|
||||
*/
|
||||
public void deleteDictTypeByIds(Long[] dictIds);
|
||||
|
||||
/**
|
||||
* 加载字典缓存数据
|
||||
*/
|
||||
public void loadingDictCache();
|
||||
|
||||
/**
|
||||
* 清空字典缓存数据
|
||||
*/
|
||||
public void clearDictCache();
|
||||
|
||||
/**
|
||||
* 重置字典缓存数据
|
||||
*/
|
||||
public void resetDictCache();
|
||||
|
||||
/**
|
||||
* 新增保存字典类型信息
|
||||
*
|
||||
* @param dictType 字典类型信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDictType(SysDictType dictType);
|
||||
|
||||
/**
|
||||
* 修改保存字典类型信息
|
||||
*
|
||||
* @param dictType 字典类型信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDictType(SysDictType dictType);
|
||||
|
||||
/**
|
||||
* 校验字典类型称是否唯一
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @return 结果
|
||||
*/
|
||||
public String checkDictTypeUnique(SysDictType dictType);
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.jlt.csa.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.jlt.csa.mapper.FarmZoneMapper;
|
||||
import com.jlt.csa.domain.FarmZone;
|
||||
import com.jlt.csa.service.IFarmZoneService;
|
||||
|
||||
/**
|
||||
* 农场分区Service业务层处理
|
||||
*
|
||||
* @author 郏磊涛
|
||||
* @date 2022-03-28
|
||||
*/
|
||||
@Service
|
||||
public class FarmZoneServiceImpl implements IFarmZoneService
|
||||
{
|
||||
@Autowired
|
||||
private FarmZoneMapper farmZoneMapper;
|
||||
|
||||
/**
|
||||
* 查询农场分区
|
||||
*
|
||||
* @param id 农场分区主键
|
||||
* @return 农场分区
|
||||
*/
|
||||
@Override
|
||||
public FarmZone selectFarmZoneById(Long id)
|
||||
{
|
||||
return farmZoneMapper.selectFarmZoneById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询农场分区列表
|
||||
*
|
||||
* @param farmZone 农场分区
|
||||
* @return 农场分区
|
||||
*/
|
||||
@Override
|
||||
public List<FarmZone> selectFarmZoneList(FarmZone farmZone)
|
||||
{
|
||||
return farmZoneMapper.selectFarmZoneList(farmZone);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增农场分区
|
||||
*
|
||||
* @param farmZone 农场分区
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertFarmZone(FarmZone farmZone)
|
||||
{
|
||||
farmZone.setCreateTime(DateUtils.getNowDate());
|
||||
return farmZoneMapper.insertFarmZone(farmZone);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改农场分区
|
||||
*
|
||||
* @param farmZone 农场分区
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateFarmZone(FarmZone farmZone)
|
||||
{
|
||||
farmZone.setUpdateTime(DateUtils.getNowDate());
|
||||
return farmZoneMapper.updateFarmZone(farmZone);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除农场分区
|
||||
*
|
||||
* @param ids 需要删除的农场分区主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteFarmZoneByIds(Long[] ids)
|
||||
{
|
||||
return farmZoneMapper.deleteFarmZoneByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除农场分区信息
|
||||
*
|
||||
* @param id 农场分区主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteFarmZoneById(Long id)
|
||||
{
|
||||
return farmZoneMapper.deleteFarmZoneById(id);
|
||||
}
|
||||
}
|
@ -10,19 +10,19 @@ import com.jlt.csa.service.IGardenService;
|
||||
|
||||
/**
|
||||
* 菜地划分Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author 郏磊涛
|
||||
* @date 2022-03-24
|
||||
* @date 2022-03-29
|
||||
*/
|
||||
@Service
|
||||
public class GardenServiceImpl implements IGardenService
|
||||
public class GardenServiceImpl implements IGardenService
|
||||
{
|
||||
@Autowired
|
||||
private GardenMapper gardenMapper;
|
||||
|
||||
/**
|
||||
* 查询菜地划分
|
||||
*
|
||||
*
|
||||
* @param id 菜地划分主键
|
||||
* @return 菜地划分
|
||||
*/
|
||||
@ -34,7 +34,7 @@ public class GardenServiceImpl implements IGardenService
|
||||
|
||||
/**
|
||||
* 查询菜地划分列表
|
||||
*
|
||||
*
|
||||
* @param garden 菜地划分
|
||||
* @return 菜地划分
|
||||
*/
|
||||
@ -46,7 +46,7 @@ public class GardenServiceImpl implements IGardenService
|
||||
|
||||
/**
|
||||
* 新增菜地划分
|
||||
*
|
||||
*
|
||||
* @param garden 菜地划分
|
||||
* @return 结果
|
||||
*/
|
||||
@ -59,7 +59,7 @@ public class GardenServiceImpl implements IGardenService
|
||||
|
||||
/**
|
||||
* 修改菜地划分
|
||||
*
|
||||
*
|
||||
* @param garden 菜地划分
|
||||
* @return 结果
|
||||
*/
|
||||
@ -70,9 +70,21 @@ public class GardenServiceImpl implements IGardenService
|
||||
return gardenMapper.updateGarden(garden);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量修改菜地状态
|
||||
*
|
||||
* @param garden 菜地划分
|
||||
* @param ids 需要更改的菜地id集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGardenStatus(Garden garden, Long[] ids) {
|
||||
garden.setUpdateTime(DateUtils.getNowDate());
|
||||
return gardenMapper.updateGardenStatus(garden, ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除菜地划分
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的菜地划分主键
|
||||
* @return 结果
|
||||
*/
|
||||
@ -84,7 +96,7 @@ public class GardenServiceImpl implements IGardenService
|
||||
|
||||
/**
|
||||
* 删除菜地划分信息
|
||||
*
|
||||
*
|
||||
* @param id 菜地划分主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -1,96 +0,0 @@
|
||||
package com.jlt.csa.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.jlt.csa.mapper.ZoneMapper;
|
||||
import com.jlt.csa.domain.Zone;
|
||||
import com.jlt.csa.service.IZoneService;
|
||||
|
||||
/**
|
||||
* 农场分区Service业务层处理
|
||||
*
|
||||
* @author 郏磊涛
|
||||
* @date 2022-03-27
|
||||
*/
|
||||
@Service
|
||||
public class ZoneServiceImpl implements IZoneService
|
||||
{
|
||||
@Autowired
|
||||
private ZoneMapper zoneMapper;
|
||||
|
||||
/**
|
||||
* 查询农场分区
|
||||
*
|
||||
* @param code 农场分区主键
|
||||
* @return 农场分区
|
||||
*/
|
||||
@Override
|
||||
public Zone selectZoneByCode(String code)
|
||||
{
|
||||
return zoneMapper.selectZoneByCode(code);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询农场分区列表
|
||||
*
|
||||
* @param zone 农场分区
|
||||
* @return 农场分区
|
||||
*/
|
||||
@Override
|
||||
public List<Zone> selectZoneList(Zone zone)
|
||||
{
|
||||
return zoneMapper.selectZoneList(zone);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增农场分区
|
||||
*
|
||||
* @param zone 农场分区
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertZone(Zone zone)
|
||||
{
|
||||
zone.setCreateTime(DateUtils.getNowDate());
|
||||
return zoneMapper.insertZone(zone);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改农场分区
|
||||
*
|
||||
* @param zone 农场分区
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateZone(Zone zone)
|
||||
{
|
||||
zone.setUpdateTime(DateUtils.getNowDate());
|
||||
return zoneMapper.updateZone(zone);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除农场分区
|
||||
*
|
||||
* @param codes 需要删除的农场分区主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteZoneByCodes(String[] codes)
|
||||
{
|
||||
return zoneMapper.deleteZoneByCodes(codes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除农场分区信息
|
||||
*
|
||||
* @param code 农场分区主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteZoneByCode(String code)
|
||||
{
|
||||
return zoneMapper.deleteZoneByCode(code);
|
||||
}
|
||||
}
|
@ -1,112 +0,0 @@
|
||||
package com.jlt.csa.service.impl.base;
|
||||
|
||||
import com.jlt.csa.mapper.base.CsaDictDataMapper;
|
||||
import com.jlt.csa.service.base.ICsaDictDataService;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.utils.DictUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 字典 业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Service
|
||||
public class CsaDictDataServiceImpl implements ICsaDictDataService
|
||||
{
|
||||
@Autowired
|
||||
private CsaDictDataMapper dictDataMapper;
|
||||
|
||||
/**
|
||||
* 根据条件分页查询字典数据
|
||||
*
|
||||
* @param dictData 字典数据信息
|
||||
* @return 字典数据集合信息
|
||||
*/
|
||||
@Override
|
||||
public List<SysDictData> selectDictDataList(SysDictData dictData)
|
||||
{
|
||||
return dictDataMapper.selectDictDataList(dictData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据字典类型和字典键值查询字典数据信息
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @param dictValue 字典键值
|
||||
* @return 字典标签
|
||||
*/
|
||||
@Override
|
||||
public String selectDictLabel(String dictType, String dictValue)
|
||||
{
|
||||
return dictDataMapper.selectDictLabel(dictType, dictValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据字典数据ID查询信息
|
||||
*
|
||||
* @param dictCode 字典数据ID
|
||||
* @return 字典数据
|
||||
*/
|
||||
@Override
|
||||
public SysDictData selectDictDataById(Long dictCode)
|
||||
{
|
||||
return dictDataMapper.selectDictDataById(dictCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除字典数据信息
|
||||
*
|
||||
* @param dictCodes 需要删除的字典数据ID
|
||||
*/
|
||||
@Override
|
||||
public void deleteDictDataByIds(Long[] dictCodes)
|
||||
{
|
||||
for (Long dictCode : dictCodes)
|
||||
{
|
||||
SysDictData data = selectDictDataById(dictCode);
|
||||
dictDataMapper.deleteDictDataById(dictCode);
|
||||
List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(data.getDictType());
|
||||
DictUtils.setDictCache(data.getDictType(), dictDatas);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存字典数据信息
|
||||
*
|
||||
* @param data 字典数据信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDictData(SysDictData data)
|
||||
{
|
||||
int row = dictDataMapper.insertDictData(data);
|
||||
if (row > 0)
|
||||
{
|
||||
List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(data.getDictType());
|
||||
DictUtils.setDictCache(data.getDictType(), dictDatas);
|
||||
}
|
||||
return row;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存字典数据信息
|
||||
*
|
||||
* @param data 字典数据信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDictData(SysDictData data)
|
||||
{
|
||||
int row = dictDataMapper.updateDictData(data);
|
||||
if (row > 0)
|
||||
{
|
||||
List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(data.getDictType());
|
||||
DictUtils.setDictCache(data.getDictType(), dictDatas);
|
||||
}
|
||||
return row;
|
||||
}
|
||||
}
|
@ -1,224 +0,0 @@
|
||||
package com.jlt.csa.service.impl.base;
|
||||
|
||||
import com.jlt.csa.mapper.base.CsaDictDataMapper;
|
||||
import com.jlt.csa.mapper.base.CsaDictTypeMapper;
|
||||
import com.jlt.csa.service.base.ICsaDictTypeService;
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictType;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.DictUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 字典 业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Service
|
||||
public class CsaDictTypeServiceImpl implements ICsaDictTypeService
|
||||
{
|
||||
@Autowired
|
||||
private CsaDictTypeMapper dictTypeMapper;
|
||||
|
||||
@Autowired
|
||||
private CsaDictDataMapper dictDataMapper;
|
||||
|
||||
/**
|
||||
* 项目启动时,初始化字典到缓存
|
||||
*/
|
||||
@PostConstruct
|
||||
public void init()
|
||||
{
|
||||
loadingDictCache();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据条件分页查询字典类型
|
||||
*
|
||||
* @param dictType 字典类型信息
|
||||
* @return 字典类型集合信息
|
||||
*/
|
||||
@Override
|
||||
public List<SysDictType> selectDictTypeList(SysDictType dictType)
|
||||
{
|
||||
return dictTypeMapper.selectDictTypeList(dictType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据所有字典类型
|
||||
*
|
||||
* @return 字典类型集合信息
|
||||
*/
|
||||
@Override
|
||||
public List<SysDictType> selectDictTypeAll()
|
||||
{
|
||||
return dictTypeMapper.selectDictTypeAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据字典类型查询字典数据
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @return 字典数据集合信息
|
||||
*/
|
||||
@Override
|
||||
public List<SysDictData> selectDictDataByType(String dictType)
|
||||
{
|
||||
List<SysDictData> dictDatas = DictUtils.getDictCache(dictType);
|
||||
if (StringUtils.isNotEmpty(dictDatas))
|
||||
{
|
||||
return dictDatas;
|
||||
}
|
||||
dictDatas = dictDataMapper.selectDictDataByType(dictType);
|
||||
if (StringUtils.isNotEmpty(dictDatas))
|
||||
{
|
||||
DictUtils.setDictCache(dictType, dictDatas);
|
||||
return dictDatas;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据字典类型ID查询信息
|
||||
*
|
||||
* @param dictId 字典类型ID
|
||||
* @return 字典类型
|
||||
*/
|
||||
@Override
|
||||
public SysDictType selectDictTypeById(Long dictId)
|
||||
{
|
||||
return dictTypeMapper.selectDictTypeById(dictId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据字典类型查询信息
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @return 字典类型
|
||||
*/
|
||||
@Override
|
||||
public SysDictType selectDictTypeByType(String dictType)
|
||||
{
|
||||
return dictTypeMapper.selectDictTypeByType(dictType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除字典类型信息
|
||||
*
|
||||
* @param dictIds 需要删除的字典ID
|
||||
*/
|
||||
@Override
|
||||
public void deleteDictTypeByIds(Long[] dictIds)
|
||||
{
|
||||
for (Long dictId : dictIds)
|
||||
{
|
||||
SysDictType dictType = selectDictTypeById(dictId);
|
||||
if (dictDataMapper.countDictDataByType(dictType.getDictType()) > 0)
|
||||
{
|
||||
throw new ServiceException(String.format("%1$s已分配,不能删除", dictType.getDictName()));
|
||||
}
|
||||
dictTypeMapper.deleteDictTypeById(dictId);
|
||||
DictUtils.removeDictCache(dictType.getDictType());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载字典缓存数据
|
||||
*/
|
||||
@Override
|
||||
public void loadingDictCache()
|
||||
{
|
||||
SysDictData dictData = new SysDictData();
|
||||
dictData.setStatus("0");
|
||||
Map<String, List<SysDictData>> dictDataMap = dictDataMapper.selectDictDataList(dictData).stream().collect(Collectors.groupingBy(SysDictData::getDictType));
|
||||
for (Map.Entry<String, List<SysDictData>> entry : dictDataMap.entrySet())
|
||||
{
|
||||
DictUtils.setDictCache(entry.getKey(), entry.getValue().stream().sorted(Comparator.comparing(SysDictData::getDictSort)).collect(Collectors.toList()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空字典缓存数据
|
||||
*/
|
||||
@Override
|
||||
public void clearDictCache()
|
||||
{
|
||||
DictUtils.clearDictCache();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置字典缓存数据
|
||||
*/
|
||||
@Override
|
||||
public void resetDictCache()
|
||||
{
|
||||
clearDictCache();
|
||||
loadingDictCache();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存字典类型信息
|
||||
*
|
||||
* @param dict 字典类型信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDictType(SysDictType dict)
|
||||
{
|
||||
int row = dictTypeMapper.insertDictType(dict);
|
||||
if (row > 0)
|
||||
{
|
||||
DictUtils.setDictCache(dict.getDictType(), null);
|
||||
}
|
||||
return row;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存字典类型信息
|
||||
*
|
||||
* @param dict 字典类型信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateDictType(SysDictType dict)
|
||||
{
|
||||
SysDictType oldDict = dictTypeMapper.selectDictTypeById(dict.getDictId());
|
||||
dictDataMapper.updateDictDataType(oldDict.getDictType(), dict.getDictType());
|
||||
int row = dictTypeMapper.updateDictType(dict);
|
||||
if (row > 0)
|
||||
{
|
||||
List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(dict.getDictType());
|
||||
DictUtils.setDictCache(dict.getDictType(), dictDatas);
|
||||
}
|
||||
return row;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验字典类型称是否唯一
|
||||
*
|
||||
* @param dict 字典类型
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public String checkDictTypeUnique(SysDictType dict)
|
||||
{
|
||||
Long dictId = StringUtils.isNull(dict.getDictId()) ? -1L : dict.getDictId();
|
||||
SysDictType dictType = dictTypeMapper.checkDictTypeUnique(dict.getDictType());
|
||||
if (StringUtils.isNotNull(dictType) && dictType.getDictId().longValue() != dictId.longValue())
|
||||
{
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
}
|
||||
return UserConstants.UNIQUE;
|
||||
}
|
||||
}
|
@ -2,10 +2,10 @@
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jlt.csa.mapper.ZoneMapper">
|
||||
<mapper namespace="com.jlt.csa.mapper.FarmZoneMapper">
|
||||
|
||||
<resultMap type="Zone" id="ZoneResult">
|
||||
<result property="code" column="code" />
|
||||
<resultMap type="FarmZone" id="FarmZoneResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="type" column="type" />
|
||||
<result property="name" column="name" />
|
||||
<result property="status" column="status" />
|
||||
@ -17,28 +17,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZoneVo">
|
||||
select code, type, name, status, del_flag, create_by, create_time, update_by, update_time, remark from csa_zone
|
||||
<sql id="selectFarmZoneVo">
|
||||
select id, type, name, status, del_flag, create_by, create_time, update_by, update_time, remark from csa_farm_zone
|
||||
</sql>
|
||||
|
||||
<select id="selectZoneList" parameterType="Zone" resultMap="ZoneResult">
|
||||
<include refid="selectZoneVo"/>
|
||||
<where>
|
||||
<select id="selectFarmZoneList" parameterType="FarmZone" resultMap="FarmZoneResult">
|
||||
<include refid="selectFarmZoneVo"/>
|
||||
<where>
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
<if test="name != null and name != ''"> and name = #{name}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZoneByCode" parameterType="String" resultMap="ZoneResult">
|
||||
<include refid="selectZoneVo"/>
|
||||
where code = #{code}
|
||||
<select id="selectFarmZoneById" parameterType="Long" resultMap="FarmZoneResult">
|
||||
<include refid="selectFarmZoneVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZone" parameterType="Zone">
|
||||
insert into csa_zone
|
||||
<insert id="insertFarmZone" parameterType="FarmZone" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into csa_farm_zone
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null">code,</if>
|
||||
<if test="type != null and type != ''">type,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="status != null">status,</if>
|
||||
@ -50,7 +49,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null">#{code},</if>
|
||||
<if test="type != null and type != ''">#{type},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
@ -63,8 +61,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZone" parameterType="Zone">
|
||||
update csa_zone
|
||||
<update id="updateFarmZone" parameterType="FarmZone">
|
||||
update csa_farm_zone
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="type != null and type != ''">type = #{type},</if>
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
@ -76,17 +74,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where code = #{code}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZoneByCode" parameterType="String">
|
||||
delete from csa_zone where code = #{code}
|
||||
<delete id="deleteFarmZoneById" parameterType="Long">
|
||||
delete from csa_farm_zone where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZoneByCodes" parameterType="String">
|
||||
delete from csa_zone where code in
|
||||
<foreach item="code" collection="array" open="(" separator="," close=")">
|
||||
#{code}
|
||||
<delete id="deleteFarmZoneByIds" parameterType="String">
|
||||
delete from csa_farm_zone where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -1,13 +1,13 @@
|
||||
<?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">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jlt.csa.mapper.GardenMapper">
|
||||
|
||||
|
||||
<resultMap type="Garden" id="GardenResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="zoneId" column="zone_id" />
|
||||
<result property="code" column="code" />
|
||||
<result property="zoneCode" column="zone_code" />
|
||||
<result property="name" column="name" />
|
||||
<result property="m2" column="m2" />
|
||||
<result property="memberId" column="member_id" />
|
||||
@ -27,15 +27,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectGardenVo">
|
||||
select id, code, zone_code, name, m2, member_id, manager_id, worker_id, contacter_id, is_farming, is_selled, is_completed, status, del_flag, create_by, create_time, update_by, update_time, remark from csa_garden
|
||||
select id, zone_id, code, name, m2, member_id, manager_id, worker_id, contacter_id, is_farming, is_selled, is_completed, status, del_flag, create_by, create_time, update_by, update_time, remark from csa_garden
|
||||
</sql>
|
||||
|
||||
<select id="selectGardenList" parameterType="Garden" resultMap="GardenResult">
|
||||
<include refid="selectGardenVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="zoneId != null "> and zone_id = #{zoneId}</if>
|
||||
<if test="code != null and code != ''"> and code = #{code}</if>
|
||||
<if test="zoneCode != null and zoneCode != ''"> and zone_code = #{zoneCode}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="m2 != null "> and m2 = #{m2}</if>
|
||||
<if test="memberId != null "> and member_id = #{memberId}</if>
|
||||
<if test="managerId != null "> and manager_id = #{managerId}</if>
|
||||
<if test="workerId != null "> and worker_id = #{workerId}</if>
|
||||
@ -43,29 +44,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="isFarming != null and isFarming != ''"> and is_farming = #{isFarming}</if>
|
||||
<if test="isSelled != null and isSelled != ''"> and is_selled = #{isSelled}</if>
|
||||
<if test="isCompleted != null and isCompleted != ''"> and is_completed = #{isCompleted}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectGardenById" parameterType="Long" resultMap="GardenResult">
|
||||
<include refid="selectGardenVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertGarden" parameterType="Garden">
|
||||
insert into csa_garden
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="zoneId != null">zone_id,</if>
|
||||
<if test="code != null and code != ''">code,</if>
|
||||
<if test="zoneCode != null and zoneCode != ''">zone_code,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="m2 != null">m2,</if>
|
||||
<if test="memberId != null">member_id,</if>
|
||||
<if test="managerId != null">manager_id,</if>
|
||||
<if test="workerId != null">worker_id,</if>
|
||||
<if test="contacterId != null">contacter_id,</if>
|
||||
<if test="isFarming != null">is_farming,</if>
|
||||
<if test="isSelled != null">is_selled,</if>
|
||||
<if test="isCompleted != null">is_completed,</if>
|
||||
<if test="isFarming != null and isFarming != ''">is_farming,</if>
|
||||
<if test="isSelled != null and isSelled != ''">is_selled,</if>
|
||||
<if test="isCompleted != null and isCompleted != ''">is_completed,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
@ -73,20 +75,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="zoneId != null">#{zoneId},</if>
|
||||
<if test="code != null and code != ''">#{code},</if>
|
||||
<if test="zoneCode != null and zoneCode != ''">#{zoneCode},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="m2 != null">#{m2},</if>
|
||||
<if test="memberId != null">#{memberId},</if>
|
||||
<if test="managerId != null">#{managerId},</if>
|
||||
<if test="workerId != null">#{workerId},</if>
|
||||
<if test="contacterId != null">#{contacterId},</if>
|
||||
<if test="isFarming != null">#{isFarming},</if>
|
||||
<if test="isSelled != null">#{isSelled},</if>
|
||||
<if test="isCompleted != null">#{isCompleted},</if>
|
||||
<if test="isFarming != null and isFarming != ''">#{isFarming},</if>
|
||||
<if test="isSelled != null and isSelled != ''">#{isSelled},</if>
|
||||
<if test="isCompleted != null and isCompleted != ''">#{isCompleted},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
@ -94,23 +96,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateGarden" parameterType="Garden">
|
||||
update csa_garden
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="zoneId != null">zone_id = #{zoneId},</if>
|
||||
<if test="code != null and code != ''">code = #{code},</if>
|
||||
<if test="zoneCode != null and zoneCode != ''">zone_code = #{zoneCode},</if>
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="m2 != null">m2 = #{m2},</if>
|
||||
<if test="memberId != null">member_id = #{memberId},</if>
|
||||
<if test="managerId != null">manager_id = #{managerId},</if>
|
||||
<if test="workerId != null">worker_id = #{workerId},</if>
|
||||
<if test="contacterId != null">contacter_id = #{contacterId},</if>
|
||||
<if test="isFarming != null">is_farming = #{isFarming},</if>
|
||||
<if test="isSelled != null">is_selled = #{isSelled},</if>
|
||||
<if test="isCompleted != null">is_completed = #{isCompleted},</if>
|
||||
<if test="isFarming != null and isFarming != ''">is_farming = #{isFarming},</if>
|
||||
<if test="isSelled != null and isSelled != ''">is_selled = #{isSelled},</if>
|
||||
<if test="isCompleted != null and isCompleted != ''">is_completed = #{isCompleted},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
@ -122,12 +124,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateGardenStatus">
|
||||
update csa_garden
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="garden.isFarming != null and garden.isFarming != ''">is_farming = #{garden.isFarming},</if>
|
||||
<if test="garden.isSelled != null and garden.isSelled != ''">is_selled = #{garden.isSelled},</if>
|
||||
<if test="garden.isCompleted != null and garden.isCompleted != ''">is_completed = #{garden.isCompleted},</if>
|
||||
<if test="garden.status != null">status = #{garden.status},</if>
|
||||
<if test="garden.delFlag != null">del_flag = #{garden.delFlag},</if>
|
||||
<if test="garden.updateBy != null">update_by = #{garden.updateBy},</if>
|
||||
<if test="garden.updateTime != null">update_time = #{garden.updateTime},</if>
|
||||
</trim>
|
||||
where id in
|
||||
<foreach item="id" collection="ids" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<delete id="deleteGardenById" parameterType="Long">
|
||||
delete from csa_garden where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteGardenByIds" parameterType="String">
|
||||
delete from csa_garden where id in
|
||||
delete from csa_garden where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
@ -1,124 +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.jlt.csa.mapper.base.CsaDictDataMapper">
|
||||
|
||||
<resultMap type="SysDictData" id="SysDictDataResult">
|
||||
<id property="dictCode" column="dict_code" />
|
||||
<result property="dictSort" column="dict_sort" />
|
||||
<result property="dictLabel" column="dict_label" />
|
||||
<result property="dictValue" column="dict_value" />
|
||||
<result property="dictType" column="dict_type" />
|
||||
<result property="cssClass" column="css_class" />
|
||||
<result property="listClass" column="list_class" />
|
||||
<result property="isDefault" column="is_default" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDictDataVo">
|
||||
select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark
|
||||
from csa_dict_data
|
||||
</sql>
|
||||
|
||||
<select id="selectDictDataList" parameterType="SysDictData" resultMap="SysDictDataResult">
|
||||
<include refid="selectDictDataVo"/>
|
||||
<where>
|
||||
<if test="dictType != null and dictType != ''">
|
||||
AND dict_type = #{dictType}
|
||||
</if>
|
||||
<if test="dictLabel != null and dictLabel != ''">
|
||||
AND dict_label like concat('%', #{dictLabel}, '%')
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
order by dict_sort asc
|
||||
</select>
|
||||
|
||||
<select id="selectDictDataByType" parameterType="SysDictData" resultMap="SysDictDataResult">
|
||||
<include refid="selectDictDataVo"/>
|
||||
where status = '0' and dict_type = #{dictType} order by dict_sort asc
|
||||
</select>
|
||||
|
||||
<select id="selectDictLabel" resultType="String">
|
||||
select dict_label from csa_dict_data
|
||||
where dict_type = #{dictType} and dict_value = #{dictValue}
|
||||
</select>
|
||||
|
||||
<select id="selectDictDataById" parameterType="Long" resultMap="SysDictDataResult">
|
||||
<include refid="selectDictDataVo"/>
|
||||
where dict_code = #{dictCode}
|
||||
</select>
|
||||
|
||||
<select id="countDictDataByType" resultType="Integer">
|
||||
select count(1) from csa_dict_data where dict_type=#{dictType}
|
||||
</select>
|
||||
|
||||
<delete id="deleteDictDataById" parameterType="Long">
|
||||
delete from csa_dict_data where dict_code = #{dictCode}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDictDataByIds" parameterType="Long">
|
||||
delete from csa_dict_data where dict_code in
|
||||
<foreach collection="array" item="dictCode" open="(" separator="," close=")">
|
||||
#{dictCode}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<update id="updateDictData" parameterType="SysDictData">
|
||||
update csa_dict_data
|
||||
<set>
|
||||
<if test="dictSort != null">dict_sort = #{dictSort},</if>
|
||||
<if test="dictLabel != null and dictLabel != ''">dict_label = #{dictLabel},</if>
|
||||
<if test="dictValue != null and dictValue != ''">dict_value = #{dictValue},</if>
|
||||
<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
|
||||
<if test="cssClass != null">css_class = #{cssClass},</if>
|
||||
<if test="listClass != null">list_class = #{listClass},</if>
|
||||
<if test="isDefault != null and isDefault != ''">is_default = #{isDefault},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where dict_code = #{dictCode}
|
||||
</update>
|
||||
|
||||
<update id="updateDictDataType" parameterType="String">
|
||||
update csa_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType}
|
||||
</update>
|
||||
|
||||
<insert id="insertDictData" parameterType="SysDictData">
|
||||
insert into csa_dict_data(
|
||||
<if test="dictSort != null">dict_sort,</if>
|
||||
<if test="dictLabel != null and dictLabel != ''">dict_label,</if>
|
||||
<if test="dictValue != null and dictValue != ''">dict_value,</if>
|
||||
<if test="dictType != null and dictType != ''">dict_type,</if>
|
||||
<if test="cssClass != null and cssClass != ''">css_class,</if>
|
||||
<if test="listClass != null and listClass != ''">list_class,</if>
|
||||
<if test="isDefault != null and isDefault != ''">is_default,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="dictSort != null">#{dictSort},</if>
|
||||
<if test="dictLabel != null and dictLabel != ''">#{dictLabel},</if>
|
||||
<if test="dictValue != null and dictValue != ''">#{dictValue},</if>
|
||||
<if test="dictType != null and dictType != ''">#{dictType},</if>
|
||||
<if test="cssClass != null and cssClass != ''">#{cssClass},</if>
|
||||
<if test="listClass != null and listClass != ''">#{listClass},</if>
|
||||
<if test="isDefault != null and isDefault != ''">#{isDefault},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
</mapper>
|
@ -1,105 +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.jlt.csa.mapper.base.CsaDictTypeMapper">
|
||||
|
||||
<resultMap type="SysDictType" id="SysDictTypeResult">
|
||||
<id property="dictId" column="dict_id" />
|
||||
<result property="dictName" column="dict_name" />
|
||||
<result property="dictType" column="dict_type" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDictTypeVo">
|
||||
select dict_id, dict_name, dict_type, status, create_by, create_time, remark
|
||||
from csa_dict_type
|
||||
</sql>
|
||||
|
||||
<select id="selectDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
<where>
|
||||
<if test="dictName != null and dictName != ''">
|
||||
AND dict_name like concat('%', #{dictName}, '%')
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="dictType != null and dictType != ''">
|
||||
AND dict_type like concat('%', #{dictType}, '%')
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDictTypeAll" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
</select>
|
||||
|
||||
<select id="selectDictTypeById" parameterType="Long" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
where dict_id = #{dictId}
|
||||
</select>
|
||||
|
||||
<select id="selectDictTypeByType" parameterType="String" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
where dict_type = #{dictType}
|
||||
</select>
|
||||
|
||||
<select id="checkDictTypeUnique" parameterType="String" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
where dict_type = #{dictType} limit 1
|
||||
</select>
|
||||
|
||||
<delete id="deleteDictTypeById" parameterType="Long">
|
||||
delete from csa_dict_type where dict_id = #{dictId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDictTypeByIds" parameterType="Long">
|
||||
delete from csa_dict_type where dict_id in
|
||||
<foreach collection="array" item="dictId" open="(" separator="," close=")">
|
||||
#{dictId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<update id="updateDictType" parameterType="SysDictType">
|
||||
update csa_dict_type
|
||||
<set>
|
||||
<if test="dictName != null and dictName != ''">dict_name = #{dictName},</if>
|
||||
<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where dict_id = #{dictId}
|
||||
</update>
|
||||
|
||||
<insert id="insertDictType" parameterType="SysDictType">
|
||||
insert into csa_dict_type(
|
||||
<if test="dictName != null and dictName != ''">dict_name,</if>
|
||||
<if test="dictType != null and dictType != ''">dict_type,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="dictName != null and dictName != ''">#{dictName},</if>
|
||||
<if test="dictType != null and dictType != ''">#{dictType},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user