药品信息 lombok依赖 使用@Data注解省略getset方法书写
This commit is contained in:
parent
138449b870
commit
347364ecd6
7
pom.xml
7
pom.xml
@ -175,13 +175,6 @@
|
||||
<artifactId>jjwt</artifactId>
|
||||
<version>${jwt.version}</version>
|
||||
</dependency>
|
||||
<!--热部署-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<version>3.4.0</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- 验证码 -->
|
||||
<dependency>
|
||||
|
@ -17,6 +17,10 @@
|
||||
<groupId>zhyc</groupId>
|
||||
<artifactId>zhyc-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@ -0,0 +1,105 @@
|
||||
package com.zhyc.module.biosafety.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.SwMedicType;
|
||||
import com.zhyc.module.biosafety.service.ISwMedicTypeService;
|
||||
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.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 药品类型Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/biosafety/type")
|
||||
public class SwMedicTypeController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISwMedicTypeService swMedicTypeService;
|
||||
|
||||
/**
|
||||
* 查询药品类型列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:type:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SwMedicType swMedicType)
|
||||
{
|
||||
startPage();
|
||||
List<SwMedicType> list = swMedicTypeService.selectSwMedicTypeList(swMedicType);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出药品类型列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:type:export')")
|
||||
@Log(title = "药品类型", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SwMedicType swMedicType)
|
||||
{
|
||||
List<SwMedicType> list = swMedicTypeService.selectSwMedicTypeList(swMedicType);
|
||||
ExcelUtil<SwMedicType> util = new ExcelUtil<SwMedicType>(SwMedicType.class);
|
||||
util.exportExcel(response, list, "药品类型数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取药品类型详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:type:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(swMedicTypeService.selectSwMedicTypeById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增药品类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:type:add')")
|
||||
@Log(title = "药品类型", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SwMedicType swMedicType)
|
||||
{
|
||||
return toAjax(swMedicTypeService.insertSwMedicType(swMedicType));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改药品类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:type:edit')")
|
||||
@Log(title = "药品类型", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SwMedicType swMedicType)
|
||||
{
|
||||
return toAjax(swMedicTypeService.updateSwMedicType(swMedicType));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除药品类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:type:remove')")
|
||||
@Log(title = "药品类型", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(swMedicTypeService.deleteSwMedicTypeByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
package com.zhyc.module.biosafety.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.SwMedicine;
|
||||
import com.zhyc.module.biosafety.service.ISwMedicineService;
|
||||
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.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 药品Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/medicine")
|
||||
public class SwMedicineController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISwMedicineService swMedicineService;
|
||||
|
||||
/**
|
||||
* 查询药品列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:medicine:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SwMedicine swMedicine)
|
||||
{
|
||||
startPage();
|
||||
List<SwMedicine> list = swMedicineService.selectSwMedicineList(swMedicine);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出药品列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:medicine:export')")
|
||||
@Log(title = "药品", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SwMedicine swMedicine)
|
||||
{
|
||||
List<SwMedicine> list = swMedicineService.selectSwMedicineList(swMedicine);
|
||||
ExcelUtil<SwMedicine> util = new ExcelUtil<SwMedicine>(SwMedicine.class);
|
||||
util.exportExcel(response, list, "药品数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取药品详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:medicine:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(swMedicineService.selectSwMedicineById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增药品
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:medicine:add')")
|
||||
@Log(title = "药品", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SwMedicine swMedicine)
|
||||
{
|
||||
return toAjax(swMedicineService.insertSwMedicine(swMedicine));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改药品
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:medicine:edit')")
|
||||
@Log(title = "药品", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SwMedicine swMedicine)
|
||||
{
|
||||
return toAjax(swMedicineService.updateSwMedicine(swMedicine));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除药品
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:medicine:remove')")
|
||||
@Log(title = "药品", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(swMedicineService.deleteSwMedicineByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
package com.zhyc.module.biosafety.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.SwUsage;
|
||||
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.biosafety.service.ISwUsageService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 药品使用方法Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/biosafety/usage")
|
||||
public class SwUsageController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISwUsageService swUsageService;
|
||||
|
||||
/**
|
||||
* 查询药品使用方法列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:usage:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SwUsage swUsage)
|
||||
{
|
||||
startPage();
|
||||
List<SwUsage> list = swUsageService.selectSwUsageList(swUsage);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出药品使用方法列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:usage:export')")
|
||||
@Log(title = "药品使用方法", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SwUsage swUsage)
|
||||
{
|
||||
List<SwUsage> list = swUsageService.selectSwUsageList(swUsage);
|
||||
ExcelUtil<SwUsage> util = new ExcelUtil<SwUsage>(SwUsage.class);
|
||||
util.exportExcel(response, list, "药品使用方法数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取药品使用方法详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:usage:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(swUsageService.selectSwUsageById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增药品使用方法
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:usage:add')")
|
||||
@Log(title = "药品使用方法", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SwUsage swUsage)
|
||||
{
|
||||
return toAjax(swUsageService.insertSwUsage(swUsage));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改药品使用方法
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:usage:edit')")
|
||||
@Log(title = "药品使用方法", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SwUsage swUsage)
|
||||
{
|
||||
return toAjax(swUsageService.updateSwUsage(swUsage));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除药品使用方法
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:usage:remove')")
|
||||
@Log(title = "药品使用方法", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(swUsageService.deleteSwUsageByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package com.zhyc.module.biosafety.domain;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 药品类型对象 sw_medic_type
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public class SwMedicType extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 编号 */
|
||||
private Long id;
|
||||
|
||||
/** 药品类型 */
|
||||
@Excel(name = "药品类型")
|
||||
private String name;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package com.zhyc.module.biosafety.domain;
|
||||
|
||||
import lombok.Data;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 药品对象 sw_medicine
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class SwMedicine extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** */
|
||||
private Long id;
|
||||
|
||||
/** 药品编号 */
|
||||
@Excel(name = "药品编号")
|
||||
private String medica;
|
||||
|
||||
/** 药品名称 */
|
||||
@Excel(name = "药品名称")
|
||||
private String name;
|
||||
|
||||
/** 药品类型 */
|
||||
@Excel(name = "药品类型")
|
||||
private Long medicType;
|
||||
|
||||
/** 使用方法 */
|
||||
@Excel(name = "使用方法")
|
||||
private Long usageId;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String comment;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package com.zhyc.module.biosafety.domain;
|
||||
|
||||
import lombok.Data;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 药品使用方法对象 sw_usage
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Data
|
||||
public class SwUsage extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 编号 */
|
||||
private Long id;
|
||||
|
||||
/** 使用方法 */
|
||||
@Excel(name = "使用方法")
|
||||
private String name;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.zhyc.module.biosafety.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.SwMedicType;
|
||||
|
||||
/**
|
||||
* 药品类型Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface SwMedicTypeMapper
|
||||
{
|
||||
/**
|
||||
* 查询药品类型
|
||||
*
|
||||
* @param id 药品类型主键
|
||||
* @return 药品类型
|
||||
*/
|
||||
public SwMedicType selectSwMedicTypeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询药品类型列表
|
||||
*
|
||||
* @param swMedicType 药品类型
|
||||
* @return 药品类型集合
|
||||
*/
|
||||
public List<SwMedicType> selectSwMedicTypeList(SwMedicType swMedicType);
|
||||
|
||||
/**
|
||||
* 新增药品类型
|
||||
*
|
||||
* @param swMedicType 药品类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSwMedicType(SwMedicType swMedicType);
|
||||
|
||||
/**
|
||||
* 修改药品类型
|
||||
*
|
||||
* @param swMedicType 药品类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSwMedicType(SwMedicType swMedicType);
|
||||
|
||||
/**
|
||||
* 删除药品类型
|
||||
*
|
||||
* @param id 药品类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwMedicTypeById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除药品类型
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwMedicTypeByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.biosafety.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.biosafety.domain.SwMedicine;
|
||||
|
||||
/**
|
||||
* 药品Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface SwMedicineMapper
|
||||
{
|
||||
/**
|
||||
* 查询药品
|
||||
*
|
||||
* @param id 药品主键
|
||||
* @return 药品
|
||||
*/
|
||||
public SwMedicine selectSwMedicineById(Long id);
|
||||
|
||||
/**
|
||||
* 查询药品列表
|
||||
*
|
||||
* @param swMedicine 药品
|
||||
* @return 药品集合
|
||||
*/
|
||||
public List<SwMedicine> selectSwMedicineList(SwMedicine swMedicine);
|
||||
|
||||
/**
|
||||
* 新增药品
|
||||
*
|
||||
* @param swMedicine 药品
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSwMedicine(SwMedicine swMedicine);
|
||||
|
||||
/**
|
||||
* 修改药品
|
||||
*
|
||||
* @param swMedicine 药品
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSwMedicine(SwMedicine swMedicine);
|
||||
|
||||
/**
|
||||
* 删除药品
|
||||
*
|
||||
* @param id 药品主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwMedicineById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除药品
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwMedicineByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.biosafety.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.biosafety.domain.SwUsage;
|
||||
|
||||
/**
|
||||
* 药品使用方法Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface SwUsageMapper
|
||||
{
|
||||
/**
|
||||
* 查询药品使用方法
|
||||
*
|
||||
* @param id 药品使用方法主键
|
||||
* @return 药品使用方法
|
||||
*/
|
||||
public SwUsage selectSwUsageById(Long id);
|
||||
|
||||
/**
|
||||
* 查询药品使用方法列表
|
||||
*
|
||||
* @param swUsage 药品使用方法
|
||||
* @return 药品使用方法集合
|
||||
*/
|
||||
public List<SwUsage> selectSwUsageList(SwUsage swUsage);
|
||||
|
||||
/**
|
||||
* 新增药品使用方法
|
||||
*
|
||||
* @param swUsage 药品使用方法
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSwUsage(SwUsage swUsage);
|
||||
|
||||
/**
|
||||
* 修改药品使用方法
|
||||
*
|
||||
* @param swUsage 药品使用方法
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSwUsage(SwUsage swUsage);
|
||||
|
||||
/**
|
||||
* 删除药品使用方法
|
||||
*
|
||||
* @param id 药品使用方法主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwUsageById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除药品使用方法
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwUsageByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.zhyc.module.biosafety.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.SwMedicType;
|
||||
|
||||
/**
|
||||
* 药品类型Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface ISwMedicTypeService
|
||||
{
|
||||
/**
|
||||
* 查询药品类型
|
||||
*
|
||||
* @param id 药品类型主键
|
||||
* @return 药品类型
|
||||
*/
|
||||
public SwMedicType selectSwMedicTypeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询药品类型列表
|
||||
*
|
||||
* @param swMedicType 药品类型
|
||||
* @return 药品类型集合
|
||||
*/
|
||||
public List<SwMedicType> selectSwMedicTypeList(SwMedicType swMedicType);
|
||||
|
||||
/**
|
||||
* 新增药品类型
|
||||
*
|
||||
* @param swMedicType 药品类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSwMedicType(SwMedicType swMedicType);
|
||||
|
||||
/**
|
||||
* 修改药品类型
|
||||
*
|
||||
* @param swMedicType 药品类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSwMedicType(SwMedicType swMedicType);
|
||||
|
||||
/**
|
||||
* 批量删除药品类型
|
||||
*
|
||||
* @param ids 需要删除的药品类型主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwMedicTypeByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除药品类型信息
|
||||
*
|
||||
* @param id 药品类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwMedicTypeById(Long id);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.zhyc.module.biosafety.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.SwMedicine;
|
||||
|
||||
/**
|
||||
* 药品Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface ISwMedicineService
|
||||
{
|
||||
/**
|
||||
* 查询药品
|
||||
*
|
||||
* @param id 药品主键
|
||||
* @return 药品
|
||||
*/
|
||||
public SwMedicine selectSwMedicineById(Long id);
|
||||
|
||||
/**
|
||||
* 查询药品列表
|
||||
*
|
||||
* @param swMedicine 药品
|
||||
* @return 药品集合
|
||||
*/
|
||||
public List<SwMedicine> selectSwMedicineList(SwMedicine swMedicine);
|
||||
|
||||
/**
|
||||
* 新增药品
|
||||
*
|
||||
* @param swMedicine 药品
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSwMedicine(SwMedicine swMedicine);
|
||||
|
||||
/**
|
||||
* 修改药品
|
||||
*
|
||||
* @param swMedicine 药品
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSwMedicine(SwMedicine swMedicine);
|
||||
|
||||
/**
|
||||
* 批量删除药品
|
||||
*
|
||||
* @param ids 需要删除的药品主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwMedicineByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除药品信息
|
||||
*
|
||||
* @param id 药品主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwMedicineById(Long id);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.biosafety.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.biosafety.domain.SwUsage;
|
||||
|
||||
/**
|
||||
* 药品使用方法Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface ISwUsageService
|
||||
{
|
||||
/**
|
||||
* 查询药品使用方法
|
||||
*
|
||||
* @param id 药品使用方法主键
|
||||
* @return 药品使用方法
|
||||
*/
|
||||
public SwUsage selectSwUsageById(Long id);
|
||||
|
||||
/**
|
||||
* 查询药品使用方法列表
|
||||
*
|
||||
* @param swUsage 药品使用方法
|
||||
* @return 药品使用方法集合
|
||||
*/
|
||||
public List<SwUsage> selectSwUsageList(SwUsage swUsage);
|
||||
|
||||
/**
|
||||
* 新增药品使用方法
|
||||
*
|
||||
* @param swUsage 药品使用方法
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSwUsage(SwUsage swUsage);
|
||||
|
||||
/**
|
||||
* 修改药品使用方法
|
||||
*
|
||||
* @param swUsage 药品使用方法
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSwUsage(SwUsage swUsage);
|
||||
|
||||
/**
|
||||
* 批量删除药品使用方法
|
||||
*
|
||||
* @param ids 需要删除的药品使用方法主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwUsageByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除药品使用方法信息
|
||||
*
|
||||
* @param id 药品使用方法主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwUsageById(Long id);
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
package com.zhyc.module.biosafety.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.SwMedicType;
|
||||
import com.zhyc.module.biosafety.mapper.SwMedicTypeMapper;
|
||||
import com.zhyc.module.biosafety.service.ISwMedicTypeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 药品类型Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Service
|
||||
public class SwMedicTypeServiceImpl implements ISwMedicTypeService
|
||||
{
|
||||
@Autowired
|
||||
private SwMedicTypeMapper swMedicTypeMapper;
|
||||
|
||||
/**
|
||||
* 查询药品类型
|
||||
*
|
||||
* @param id 药品类型主键
|
||||
* @return 药品类型
|
||||
*/
|
||||
@Override
|
||||
public SwMedicType selectSwMedicTypeById(Long id)
|
||||
{
|
||||
return swMedicTypeMapper.selectSwMedicTypeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询药品类型列表
|
||||
*
|
||||
* @param swMedicType 药品类型
|
||||
* @return 药品类型
|
||||
*/
|
||||
@Override
|
||||
public List<SwMedicType> selectSwMedicTypeList(SwMedicType swMedicType)
|
||||
{
|
||||
return swMedicTypeMapper.selectSwMedicTypeList(swMedicType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增药品类型
|
||||
*
|
||||
* @param swMedicType 药品类型
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSwMedicType(SwMedicType swMedicType)
|
||||
{
|
||||
return swMedicTypeMapper.insertSwMedicType(swMedicType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改药品类型
|
||||
*
|
||||
* @param swMedicType 药品类型
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSwMedicType(SwMedicType swMedicType)
|
||||
{
|
||||
return swMedicTypeMapper.updateSwMedicType(swMedicType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除药品类型
|
||||
*
|
||||
* @param ids 需要删除的药品类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSwMedicTypeByIds(Long[] ids)
|
||||
{
|
||||
return swMedicTypeMapper.deleteSwMedicTypeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除药品类型信息
|
||||
*
|
||||
* @param id 药品类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSwMedicTypeById(Long id)
|
||||
{
|
||||
return swMedicTypeMapper.deleteSwMedicTypeById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
package com.zhyc.module.biosafety.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.SwMedicine;
|
||||
import com.zhyc.module.biosafety.mapper.SwMedicineMapper;
|
||||
import com.zhyc.module.biosafety.service.ISwMedicineService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 药品Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Service
|
||||
public class SwMedicineServiceImpl implements ISwMedicineService
|
||||
{
|
||||
@Autowired
|
||||
private SwMedicineMapper swMedicineMapper;
|
||||
|
||||
/**
|
||||
* 查询药品
|
||||
*
|
||||
* @param id 药品主键
|
||||
* @return 药品
|
||||
*/
|
||||
@Override
|
||||
public SwMedicine selectSwMedicineById(Long id)
|
||||
{
|
||||
return swMedicineMapper.selectSwMedicineById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询药品列表
|
||||
*
|
||||
* @param swMedicine 药品
|
||||
* @return 药品
|
||||
*/
|
||||
@Override
|
||||
public List<SwMedicine> selectSwMedicineList(SwMedicine swMedicine)
|
||||
{
|
||||
return swMedicineMapper.selectSwMedicineList(swMedicine);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增药品
|
||||
*
|
||||
* @param swMedicine 药品
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSwMedicine(SwMedicine swMedicine)
|
||||
{
|
||||
return swMedicineMapper.insertSwMedicine(swMedicine);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改药品
|
||||
*
|
||||
* @param swMedicine 药品
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSwMedicine(SwMedicine swMedicine)
|
||||
{
|
||||
return swMedicineMapper.updateSwMedicine(swMedicine);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除药品
|
||||
*
|
||||
* @param ids 需要删除的药品主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSwMedicineByIds(Long[] ids)
|
||||
{
|
||||
return swMedicineMapper.deleteSwMedicineByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除药品信息
|
||||
*
|
||||
* @param id 药品主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSwMedicineById(Long id)
|
||||
{
|
||||
return swMedicineMapper.deleteSwMedicineById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
package com.zhyc.module.biosafety.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.SwUsage;
|
||||
import com.zhyc.module.biosafety.mapper.SwUsageMapper;
|
||||
import com.zhyc.module.biosafety.service.ISwUsageService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 药品使用方法Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Service
|
||||
public class SwUsageServiceImpl implements ISwUsageService
|
||||
{
|
||||
@Autowired
|
||||
private SwUsageMapper swUsageMapper;
|
||||
|
||||
/**
|
||||
* 查询药品使用方法
|
||||
*
|
||||
* @param id 药品使用方法主键
|
||||
* @return 药品使用方法
|
||||
*/
|
||||
@Override
|
||||
public SwUsage selectSwUsageById(Long id)
|
||||
{
|
||||
return swUsageMapper.selectSwUsageById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询药品使用方法列表
|
||||
*
|
||||
* @param swUsage 药品使用方法
|
||||
* @return 药品使用方法
|
||||
*/
|
||||
@Override
|
||||
public List<SwUsage> selectSwUsageList(SwUsage swUsage)
|
||||
{
|
||||
return swUsageMapper.selectSwUsageList(swUsage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增药品使用方法
|
||||
*
|
||||
* @param swUsage 药品使用方法
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSwUsage(SwUsage swUsage)
|
||||
{
|
||||
return swUsageMapper.insertSwUsage(swUsage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改药品使用方法
|
||||
*
|
||||
* @param swUsage 药品使用方法
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSwUsage(SwUsage swUsage)
|
||||
{
|
||||
return swUsageMapper.updateSwUsage(swUsage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除药品使用方法
|
||||
*
|
||||
* @param ids 需要删除的药品使用方法主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSwUsageByIds(Long[] ids)
|
||||
{
|
||||
return swUsageMapper.deleteSwUsageByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除药品使用方法信息
|
||||
*
|
||||
* @param id 药品使用方法主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSwUsageById(Long id)
|
||||
{
|
||||
return swUsageMapper.deleteSwUsageById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
<?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.zhyc.module.biosafety.mapper.SwMedicTypeMapper">
|
||||
|
||||
<resultMap type="SwMedicType" id="SwMedicTypeResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSwMedicTypeVo">
|
||||
select id, name from sw_medic_type
|
||||
</sql>
|
||||
|
||||
<select id="selectSwMedicTypeList" parameterType="SwMedicType" resultMap="SwMedicTypeResult">
|
||||
<include refid="selectSwMedicTypeVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSwMedicTypeById" parameterType="Long" resultMap="SwMedicTypeResult">
|
||||
<include refid="selectSwMedicTypeVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSwMedicType" parameterType="SwMedicType" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_medic_type
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">#{name},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSwMedicType" parameterType="SwMedicType">
|
||||
update sw_medic_type
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSwMedicTypeById" parameterType="Long">
|
||||
delete from sw_medic_type where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSwMedicTypeByIds" parameterType="String">
|
||||
delete from sw_medic_type where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,76 @@
|
||||
<?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.zhyc.module.biosafety.mapper.SwMedicineMapper">
|
||||
|
||||
<resultMap type="SwMedicine" id="SwMedicineResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="medica" column="medica" />
|
||||
<result property="name" column="name" />
|
||||
<result property="medicType" column="medic_type" />
|
||||
<result property="usageId" column="usage_id" />
|
||||
<result property="comment" column="comment" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSwMedicineVo">
|
||||
select id, medica, name, medic_type, usage_id, comment from sw_medicine
|
||||
</sql>
|
||||
|
||||
<select id="selectSwMedicineList" parameterType="SwMedicine" resultMap="SwMedicineResult">
|
||||
<include refid="selectSwMedicineVo"/>
|
||||
<where>
|
||||
<if test="medica != null and medica != ''"> and medica = #{medica}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="medicType != null "> and medic_type = #{medicType}</if>
|
||||
<if test="usageId != null "> and usage_id = #{usageId}</if>
|
||||
<if test="comment != null and comment != ''"> and comment = #{comment}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSwMedicineById" parameterType="Long" resultMap="SwMedicineResult">
|
||||
<include refid="selectSwMedicineVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSwMedicine" parameterType="SwMedicine" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_medicine
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="medica != null">medica,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="medicType != null">medic_type,</if>
|
||||
<if test="usageId != null">usage_id,</if>
|
||||
<if test="comment != null">comment,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="medica != null">#{medica},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="medicType != null">#{medicType},</if>
|
||||
<if test="usageId != null">#{usageId},</if>
|
||||
<if test="comment != null">#{comment},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSwMedicine" parameterType="SwMedicine">
|
||||
update sw_medicine
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="medica != null">medica = #{medica},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="medicType != null">medic_type = #{medicType},</if>
|
||||
<if test="usageId != null">usage_id = #{usageId},</if>
|
||||
<if test="comment != null">comment = #{comment},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSwMedicineById" parameterType="Long">
|
||||
delete from sw_medicine where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSwMedicineByIds" parameterType="String">
|
||||
delete from sw_medicine where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,56 @@
|
||||
<?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.zhyc.module.biosafety.mapper.SwUsageMapper">
|
||||
|
||||
<resultMap type="SwUsage" id="SwUsageResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSwUsageVo">
|
||||
select id, name from sw_usage
|
||||
</sql>
|
||||
|
||||
<select id="selectSwUsageList" parameterType="SwUsage" resultMap="SwUsageResult">
|
||||
<include refid="selectSwUsageVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSwUsageById" parameterType="Long" resultMap="SwUsageResult">
|
||||
<include refid="selectSwUsageVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSwUsage" parameterType="SwUsage" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_usage
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">#{name},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSwUsage" parameterType="SwUsage">
|
||||
update sw_usage
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSwUsageById" parameterType="Long">
|
||||
delete from sw_usage where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSwUsageByIds" parameterType="String">
|
||||
delete from sw_usage where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
x
Reference in New Issue
Block a user