Commit 5d4a3eab by tyk

上传

parent 3e7c2d01
package com.ruoyi.web.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.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.ruoyi.system.domain.YqszhCb;
import com.ruoyi.system.service.IYqszhCbService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 油气数智化-产品Controller
*
* @author ruoyi
* @date 2024-10-23
*/
@RestController
@RequestMapping("/system/cb")
public class YqszhCbController extends BaseController
{
@Autowired
private IYqszhCbService yqszhCbService;
/**
* 查询油气数智化-产品列表
*/
@GetMapping("/list")
public TableDataInfo list(YqszhCb yqszhCb)
{
startPage();
List<YqszhCb> list = yqszhCbService.selectYqszhCbList(yqszhCb);
return getDataTable(list);
}
/**
* 导出油气数智化-产品列表
*/
@Log(title = "油气数智化-产品", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, YqszhCb yqszhCb)
{
List<YqszhCb> list = yqszhCbService.selectYqszhCbList(yqszhCb);
ExcelUtil<YqszhCb> util = new ExcelUtil<YqszhCb>(YqszhCb.class);
util.exportExcel(response, list, "油气数智化-产品数据");
}
/**
* 获取油气数智化-产品详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(yqszhCbService.selectYqszhCbById(id));
}
/**
* 新增油气数智化-产品
*/
@Log(title = "油气数智化-产品", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody YqszhCb yqszhCb)
{
return toAjax(yqszhCbService.insertYqszhCb(yqszhCb));
}
/**
* 修改油气数智化-产品
*/
@Log(title = "油气数智化-产品", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody YqszhCb yqszhCb)
{
return toAjax(yqszhCbService.updateYqszhCb(yqszhCb));
}
/**
* 删除油气数智化-产品
*/
@Log(title = "油气数智化-产品", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(yqszhCbService.deleteYqszhCbByIds(ids));
}
}
package com.ruoyi.web.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.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.ruoyi.system.domain.YqszhZb;
import com.ruoyi.system.service.IYqszhZbService;
import com.ruoyi.common.utils.poi.ExcelUtil;
/**
* 油气数智化-分类Controller
*
* @author ruoyi
* @date 2024-10-23
*/
@RestController
@RequestMapping("/system/zb")
public class YqszhZbController extends BaseController
{
@Autowired
private IYqszhZbService yqszhZbService;
/**
* 查询油气数智化-分类列表
*/
@GetMapping("/list")
public AjaxResult list(YqszhZb yqszhZb)
{
List<YqszhZb> list = yqszhZbService.selectYqszhZbList(yqszhZb);
return success(list);
}
/**
* 查询油气数智化-分类列表下拉框数据
*/
@GetMapping("/listxlk")
public AjaxResult listxlk(YqszhZb yqszhZb)
{
List<YqszhZb> list = yqszhZbService.selectZb(yqszhZb);
return success(list);
}
/**
* 导出油气数智化-分类列表
*/
@Log(title = "油气数智化-分类", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, YqszhZb yqszhZb)
{
List<YqszhZb> list = yqszhZbService.selectYqszhZbList(yqszhZb);
ExcelUtil<YqszhZb> util = new ExcelUtil<YqszhZb>(YqszhZb.class);
util.exportExcel(response, list, "油气数智化-分类数据");
}
/**
* 获取油气数智化-分类详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(yqszhZbService.selectYqszhZbById(id));
}
/**
* 新增油气数智化-分类
*/
@Log(title = "油气数智化-分类", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody YqszhZb yqszhZb)
{
return toAjax(yqszhZbService.insertYqszhZb(yqszhZb));
}
/**
* 修改油气数智化-分类
*/
@Log(title = "油气数智化-分类", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody YqszhZb yqszhZb)
{
return toAjax(yqszhZbService.updateYqszhZb(yqszhZb));
}
/**
* 删除油气数智化-分类
*/
@Log(title = "油气数智化-分类", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(yqszhZbService.deleteYqszhZbByIds(ids));
}
}
...@@ -6,7 +6,7 @@ spring: ...@@ -6,7 +6,7 @@ spring:
druid: druid:
# 主库数据源 # 主库数据源
master: master:
url: jdbc:mysql://localhost:3306/qianhe_ydsj?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 url: jdbc:mysql://localhost:3306/yqszhsy?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root username: root
password: password password: password
# 从库数据源 # 从库数据源
......
...@@ -124,6 +124,6 @@ xss: ...@@ -124,6 +124,6 @@ xss:
# 过滤开关 # 过滤开关
enabled: true enabled: true
# 排除链接(多个用逗号分隔) # 排除链接(多个用逗号分隔)
excludes: /system/notice excludes: /system/notice,/system/zb
# 匹配链接 # 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/* urlPatterns: /system/*,/monitor/*,/tool/*
...@@ -23,6 +23,12 @@ ...@@ -23,6 +23,12 @@
<artifactId>ruoyi-common</artifactId> <artifactId>ruoyi-common</artifactId>
</dependency> </dependency>
<!-- hutool -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.7.16</version>
</dependency>
</dependencies> </dependencies>
</project> </project>
package com.ruoyi.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 油气数智化-产品对象 yqszh_cb
*
* @author ruoyi
* @date 2024-10-23
*/
public class YqszhCb extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** ID */
private Long id;
/** 父id */
@Excel(name = "父id")
private Long fid;
/** 名称 */
@Excel(name = "名称")
private String mc;
/** 父名称 */
@Excel(name = "父名称")
private String fmc;
/** 排序 */
@Excel(name = "排序")
private String px;
/** 发布状态 */
@Excel(name = "发布状态")
private String fbzt;
/** 团队介绍 */
private String tdjs;
/** 产品简介 */
private String cpjj;
/** 功能特点 */
private String gntd;
/** 应用成效 */
private String yycx;
/** 用法介绍 */
private String yfjs;
/** 服务特色 */
private String fwts;
/** 服务案例 */
private String fwal;
public String getFmc() {
return fmc;
}
public void setFmc(String fmc) {
this.fmc = fmc;
}
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setFid(Long fid)
{
this.fid = fid;
}
public Long getFid()
{
return fid;
}
public void setMc(String mc)
{
this.mc = mc;
}
public String getMc()
{
return mc;
}
public void setPx(String px)
{
this.px = px;
}
public String getPx()
{
return px;
}
public void setFbzt(String fbzt)
{
this.fbzt = fbzt;
}
public String getFbzt()
{
return fbzt;
}
public void setTdjs(String tdjs)
{
this.tdjs = tdjs;
}
public String getTdjs()
{
return tdjs;
}
public void setCpjj(String cpjj)
{
this.cpjj = cpjj;
}
public String getCpjj()
{
return cpjj;
}
public void setGntd(String gntd)
{
this.gntd = gntd;
}
public String getGntd()
{
return gntd;
}
public void setYycx(String yycx)
{
this.yycx = yycx;
}
public String getYycx()
{
return yycx;
}
public void setYfjs(String yfjs)
{
this.yfjs = yfjs;
}
public String getYfjs()
{
return yfjs;
}
public void setFwts(String fwts)
{
this.fwts = fwts;
}
public String getFwts()
{
return fwts;
}
public void setFwal(String fwal)
{
this.fwal = fwal;
}
public String getFwal()
{
return fwal;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("fid", getFid())
.append("mc", getMc())
.append("px", getPx())
.append("fbzt", getFbzt())
.append("tdjs", getTdjs())
.append("cpjj", getCpjj())
.append("gntd", getGntd())
.append("yycx", getYycx())
.append("yfjs", getYfjs())
.append("fwts", getFwts())
.append("fwal", getFwal())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}
package com.ruoyi.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.TreeEntity;
/**
* 油气数智化-分类对象 yqszh_zb
*
* @author ruoyi
* @date 2024-10-23
*/
public class YqszhZb extends TreeEntity
{
private static final long serialVersionUID = 1L;
/** ID */
private Long id;
/** 父id */
@Excel(name = "父id")
private Long fid;
/** 名称 */
@Excel(name = "名称")
private String mc;
/** 排序 */
@Excel(name = "排序")
private String px;
/** 类型 */
@Excel(name = "类型")
private String cplx;
/** 删除标志(0代表存在 2代表删除) */
private String delFlag;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setFid(Long fid)
{
this.fid = fid;
}
public Long getFid()
{
return fid;
}
public void setMc(String mc)
{
this.mc = mc;
}
public String getMc()
{
return mc;
}
public void setPx(String px)
{
this.px = px;
}
public String getPx()
{
return px;
}
public void setCplx(String cplx)
{
this.cplx = cplx;
}
public String getCplx()
{
return cplx;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public String getDelFlag()
{
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("fid", getFid())
.append("mc", getMc())
.append("px", getPx())
.append("cplx", getCplx())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("delFlag", getDelFlag())
.toString();
}
}
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.YqszhCb;
/**
* 油气数智化-产品Mapper接口
*
* @author ruoyi
* @date 2024-10-23
*/
public interface YqszhCbMapper
{
/**
* 查询油气数智化-产品
*
* @param id 油气数智化-产品主键
* @return 油气数智化-产品
*/
public YqszhCb selectYqszhCbById(Long id);
/**
* 查询油气数智化-产品列表
*
* @param yqszhCb 油气数智化-产品
* @return 油气数智化-产品集合
*/
public List<YqszhCb> selectYqszhCbList(YqszhCb yqszhCb);
/**
* 新增油气数智化-产品
*
* @param yqszhCb 油气数智化-产品
* @return 结果
*/
public int insertYqszhCb(YqszhCb yqszhCb);
/**
* 修改油气数智化-产品
*
* @param yqszhCb 油气数智化-产品
* @return 结果
*/
public int updateYqszhCb(YqszhCb yqszhCb);
/**
* 删除油气数智化-产品
*
* @param id 油气数智化-产品主键
* @return 结果
*/
public int deleteYqszhCbById(Long id);
/**
* 批量删除油气数智化-产品
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteYqszhCbByIds(Long[] ids);
}
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.YqszhZb;
/**
* 油气数智化-分类Mapper接口
*
* @author ruoyi
* @date 2024-10-23
*/
public interface YqszhZbMapper
{
/**
* 查询油气数智化-分类
*
* @param id 油气数智化-分类主键
* @return 油气数智化-分类
*/
public YqszhZb selectYqszhZbById(Long id);
/**
* 查询油气数智化-分类列表
*
* @param yqszhZb 油气数智化-分类
* @return 油气数智化-分类集合
*/
public List<YqszhZb> selectYqszhZbList(YqszhZb yqszhZb);
/**
* 查询油气数智化-分类列表
*
* @param yqszhZb 油气数智化-分类
* @return 油气数智化-分类集合
*/
public List<YqszhZb> selectZb(YqszhZb yqszhZb);
/**
* 新增油气数智化-分类
*
* @param yqszhZb 油气数智化-分类
* @return 结果
*/
public int insertYqszhZb(YqszhZb yqszhZb);
/**
* 修改油气数智化-分类
*
* @param yqszhZb 油气数智化-分类
* @return 结果
*/
public int updateYqszhZb(YqszhZb yqszhZb);
/**
* 删除油气数智化-分类
*
* @param id 油气数智化-分类主键
* @return 结果
*/
public int deleteYqszhZbById(Long id);
/**
* 批量删除油气数智化-分类
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteYqszhZbByIds(Long[] ids);
}
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.YqszhCb;
/**
* 油气数智化-产品Service接口
*
* @author ruoyi
* @date 2024-10-23
*/
public interface IYqszhCbService
{
/**
* 查询油气数智化-产品
*
* @param id 油气数智化-产品主键
* @return 油气数智化-产品
*/
public YqszhCb selectYqszhCbById(Long id);
/**
* 查询油气数智化-产品列表
*
* @param yqszhCb 油气数智化-产品
* @return 油气数智化-产品集合
*/
public List<YqszhCb> selectYqszhCbList(YqszhCb yqszhCb);
/**
* 新增油气数智化-产品
*
* @param yqszhCb 油气数智化-产品
* @return 结果
*/
public int insertYqszhCb(YqszhCb yqszhCb);
/**
* 修改油气数智化-产品
*
* @param yqszhCb 油气数智化-产品
* @return 结果
*/
public int updateYqszhCb(YqszhCb yqszhCb);
/**
* 批量删除油气数智化-产品
*
* @param ids 需要删除的油气数智化-产品主键集合
* @return 结果
*/
public int deleteYqszhCbByIds(Long[] ids);
/**
* 删除油气数智化-产品信息
*
* @param id 油气数智化-产品主键
* @return 结果
*/
public int deleteYqszhCbById(Long id);
}
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.YqszhZb;
/**
* 油气数智化-分类Service接口
*
* @author ruoyi
* @date 2024-10-23
*/
public interface IYqszhZbService
{
/**
* 查询油气数智化-分类
*
* @param id 油气数智化-分类主键
* @return 油气数智化-分类
*/
public YqszhZb selectYqszhZbById(Long id);
/**
* 查询油气数智化-分类列表
*
* @param yqszhZb 油气数智化-分类
* @return 油气数智化-分类集合
*/
public List<YqszhZb> selectYqszhZbList(YqszhZb yqszhZb);
public List<YqszhZb> selectZb(YqszhZb yqszhZb);
/**
* 新增油气数智化-分类
*
* @param yqszhZb 油气数智化-分类
* @return 结果
*/
public int insertYqszhZb(YqszhZb yqszhZb);
/**
* 修改油气数智化-分类
*
* @param yqszhZb 油气数智化-分类
* @return 结果
*/
public int updateYqszhZb(YqszhZb yqszhZb);
/**
* 批量删除油气数智化-分类
*
* @param ids 需要删除的油气数智化-分类主键集合
* @return 结果
*/
public int deleteYqszhZbByIds(Long[] ids);
/**
* 删除油气数智化-分类信息
*
* @param id 油气数智化-分类主键
* @return 结果
*/
public int deleteYqszhZbById(Long id);
}
package com.ruoyi.system.service.impl;
import java.util.List;
import cn.hutool.core.codec.Base64;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.YqszhCbMapper;
import com.ruoyi.system.domain.YqszhCb;
import com.ruoyi.system.service.IYqszhCbService;
/**
* 油气数智化-产品Service业务层处理
*
* @author ruoyi
* @date 2024-10-23
*/
@Service
public class YqszhCbServiceImpl implements IYqszhCbService
{
@Autowired
private YqszhCbMapper yqszhCbMapper;
/**
* 查询油气数智化-产品
*
* @param id 油气数智化-产品主键
* @return 油气数智化-产品
*/
@Override
public YqszhCb selectYqszhCbById(Long id)
{
return yqszhCbMapper.selectYqszhCbById(id);
}
/**
* 查询油气数智化-产品列表
*
* @param yqszhCb 油气数智化-产品
* @return 油气数智化-产品
*/
@Override
public List<YqszhCb> selectYqszhCbList(YqszhCb yqszhCb)
{
return yqszhCbMapper.selectYqszhCbList(yqszhCb);
}
/**
* 新增油气数智化-产品
*
* @param yqszhCb 油气数智化-产品
* @return 结果
*/
@Override
public int insertYqszhCb(YqszhCb yqszhCb)
{
yqszhCb.setCpjj(new String(Base64.decode(yqszhCb.getCpjj())));
yqszhCb.setGntd(new String(Base64.decode(yqszhCb.getGntd())));
yqszhCb.setYycx(new String(Base64.decode(yqszhCb.getYycx())));
yqszhCb.setYfjs(new String(Base64.decode(yqszhCb.getYfjs())));
yqszhCb.setTdjs(new String(Base64.decode(yqszhCb.getTdjs())));
yqszhCb.setFwts(new String(Base64.decode(yqszhCb.getFwts())));
yqszhCb.setFwal(new String(Base64.decode(yqszhCb.getFwal())));
yqszhCb.setCreateTime(DateUtils.getNowDate());
return yqszhCbMapper.insertYqszhCb(yqszhCb);
}
/**
* 修改油气数智化-产品
*
* @param yqszhCb 油气数智化-产品
* @return 结果
*/
@Override
public int updateYqszhCb(YqszhCb yqszhCb)
{
if(yqszhCb.getCpjj() != null){
yqszhCb.setCpjj(new String(Base64.decode(yqszhCb.getCpjj())));
}
if(yqszhCb.getGntd() != null){
yqszhCb.setGntd(new String(Base64.decode(yqszhCb.getGntd())));
}
if(yqszhCb.getYycx() != null){
yqszhCb.setYycx(new String(Base64.decode(yqszhCb.getYycx())));
}
if(yqszhCb.getYfjs() != null){
yqszhCb.setYfjs(new String(Base64.decode(yqszhCb.getYfjs())));
}
if(yqszhCb.getTdjs() != null){
yqszhCb.setTdjs(new String(Base64.decode(yqszhCb.getTdjs())));
}
if(yqszhCb.getFwts() != null){
yqszhCb.setFwts(new String(Base64.decode(yqszhCb.getFwts())));
}
if(yqszhCb.getFwal() != null){
yqszhCb.setFwal(new String(Base64.decode(yqszhCb.getFwal())));
}
yqszhCb.setUpdateTime(DateUtils.getNowDate());
return yqszhCbMapper.updateYqszhCb(yqszhCb);
}
/**
* 批量删除油气数智化-产品
*
* @param ids 需要删除的油气数智化-产品主键
* @return 结果
*/
@Override
public int deleteYqszhCbByIds(Long[] ids)
{
return yqszhCbMapper.deleteYqszhCbByIds(ids);
}
/**
* 删除油气数智化-产品信息
*
* @param id 油气数智化-产品主键
* @return 结果
*/
@Override
public int deleteYqszhCbById(Long id)
{
return yqszhCbMapper.deleteYqszhCbById(id);
}
}
package com.ruoyi.system.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.ruoyi.system.mapper.YqszhZbMapper;
import com.ruoyi.system.domain.YqszhZb;
import com.ruoyi.system.service.IYqszhZbService;
/**
* 油气数智化-分类Service业务层处理
*
* @author ruoyi
* @date 2024-10-23
*/
@Service
public class YqszhZbServiceImpl implements IYqszhZbService
{
@Autowired
private YqszhZbMapper yqszhZbMapper;
/**
* 查询油气数智化-分类
*
* @param id 油气数智化-分类主键
* @return 油气数智化-分类
*/
@Override
public YqszhZb selectYqszhZbById(Long id)
{
return yqszhZbMapper.selectYqszhZbById(id);
}
/**
* 查询油气数智化-分类列表
*
* @param yqszhZb 油气数智化-分类
* @return 油气数智化-分类
*/
@Override
public List<YqszhZb> selectYqszhZbList(YqszhZb yqszhZb)
{
return yqszhZbMapper.selectYqszhZbList(yqszhZb);
}
@Override
public List<YqszhZb> selectZb(YqszhZb yqszhZb)
{
return yqszhZbMapper.selectZb(yqszhZb);
}
/**
* 新增油气数智化-分类
*
* @param yqszhZb 油气数智化-分类
* @return 结果
*/
@Override
public int insertYqszhZb(YqszhZb yqszhZb)
{
yqszhZb.setCreateTime(DateUtils.getNowDate());
return yqszhZbMapper.insertYqszhZb(yqszhZb);
}
/**
* 修改油气数智化-分类
*
* @param yqszhZb 油气数智化-分类
* @return 结果
*/
@Override
public int updateYqszhZb(YqszhZb yqszhZb)
{
yqszhZb.setUpdateTime(DateUtils.getNowDate());
return yqszhZbMapper.updateYqszhZb(yqszhZb);
}
/**
* 批量删除油气数智化-分类
*
* @param ids 需要删除的油气数智化-分类主键
* @return 结果
*/
@Override
public int deleteYqszhZbByIds(Long[] ids)
{
return yqszhZbMapper.deleteYqszhZbByIds(ids);
}
/**
* 删除油气数智化-分类信息
*
* @param id 油气数智化-分类主键
* @return 结果
*/
@Override
public int deleteYqszhZbById(Long id)
{
return yqszhZbMapper.deleteYqszhZbById(id);
}
}
<?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.ruoyi.system.mapper.YqszhCbMapper">
<resultMap type="YqszhCb" id="YqszhCbResult">
<result property="id" column="id" />
<result property="fid" column="fid" />
<result property="mc" column="mc" />
<result property="fmc" column="fmc" />
<result property="px" column="px" />
<result property="fbzt" column="fbzt" />
<result property="tdjs" column="tdjs" />
<result property="cpjj" column="cpjj" />
<result property="gntd" column="gntd" />
<result property="yycx" column="yycx" />
<result property="yfjs" column="yfjs" />
<result property="fwts" column="fwts" />
<result property="fwal" column="fwal" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectYqszhCbVo">
select a.id, a.fid, a.mc, a.px, a.fbzt, a.tdjs, a.cpjj, a.gntd, a.yycx, a.yfjs, a.fwts, a.fwal, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, b.mc as fmc from yqszh_cb a
left join yqszh_zb b on a.fid = b.id
</sql>
<select id="selectYqszhCbList" parameterType="YqszhCb" resultMap="YqszhCbResult">
<include refid="selectYqszhCbVo"/>
<where>
<if test="fid != null "> and a.fid = #{fid}</if>
<if test="mc != null and mc != ''"> and a.mc = #{mc}</if>
<if test="px != null and px != ''"> and a.px = #{px}</if>
<if test="fbzt != null and fbzt != ''"> and a.fbzt = #{fbzt}</if>
</where>
ORDER BY a.px ASC
</select>
<select id="selectYqszhCbById" parameterType="Long" resultMap="YqszhCbResult">
<include refid="selectYqszhCbVo"/>
where a.id = #{id}
</select>
<insert id="insertYqszhCb" parameterType="YqszhCb" useGeneratedKeys="true" keyProperty="id">
insert into yqszh_cb
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="fid != null">fid,</if>
<if test="mc != null">mc,</if>
<if test="px != null">px,</if>
<if test="fbzt != null">fbzt,</if>
<if test="tdjs != null">tdjs,</if>
<if test="cpjj != null">cpjj,</if>
<if test="gntd != null">gntd,</if>
<if test="yycx != null">yycx,</if>
<if test="yfjs != null">yfjs,</if>
<if test="fwts != null">fwts,</if>
<if test="fwal != null">fwal,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fid != null">#{fid},</if>
<if test="mc != null">#{mc},</if>
<if test="px != null">#{px},</if>
<if test="fbzt != null">#{fbzt},</if>
<if test="tdjs != null">#{tdjs},</if>
<if test="cpjj != null">#{cpjj},</if>
<if test="gntd != null">#{gntd},</if>
<if test="yycx != null">#{yycx},</if>
<if test="yfjs != null">#{yfjs},</if>
<if test="fwts != null">#{fwts},</if>
<if test="fwal != null">#{fwal},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateYqszhCb" parameterType="YqszhCb">
update yqszh_cb
<trim prefix="SET" suffixOverrides=",">
<if test="fid != null">fid = #{fid},</if>
<if test="mc != null">mc = #{mc},</if>
<if test="px != null">px = #{px},</if>
<if test="fbzt != null">fbzt = #{fbzt},</if>
<if test="tdjs != null">tdjs = #{tdjs},</if>
<if test="cpjj != null">cpjj = #{cpjj},</if>
<if test="gntd != null">gntd = #{gntd},</if>
<if test="yycx != null">yycx = #{yycx},</if>
<if test="yfjs != null">yfjs = #{yfjs},</if>
<if test="fwts != null">fwts = #{fwts},</if>
<if test="fwal != null">fwal = #{fwal},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteYqszhCbById" parameterType="Long">
delete from yqszh_cb where id = #{id}
</delete>
<delete id="deleteYqszhCbByIds" parameterType="String">
delete from yqszh_cb where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
<?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.ruoyi.system.mapper.YqszhZbMapper">
<resultMap type="YqszhZb" id="YqszhZbResult">
<result property="id" column="id" />
<result property="fid" column="fid" />
<result property="mc" column="mc" />
<result property="px" column="px" />
<result property="cplx" column="cplx" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectYqszhZbVo">
select id, fid, mc, px, cplx, create_by, create_time, update_by, update_time, remark, del_flag from yqszh_zb
</sql>
<select id="selectYqszhZbList" parameterType="YqszhZb" resultMap="YqszhZbResult">
<include refid="selectYqszhZbVo"/>
<where>
<if test="fid != null "> and fid = #{fid}</if>
<if test="mc != null and mc != ''"> and mc = #{mc}</if>
<if test="px != null and px != ''"> and px = #{px}</if>
<if test="cplx != null and cplx != ''"> and cplx = #{cplx}</if>
</where>
ORDER BY px ASC
</select>
<select id="selectZb" parameterType="YqszhZb" resultMap="YqszhZbResult">
<include refid="selectYqszhZbVo"/>
where cplx = #{cplx} and fid != 0
ORDER BY px ASC
</select>
<select id="selectYqszhZbById" parameterType="Long" resultMap="YqszhZbResult">
<include refid="selectYqszhZbVo"/>
where id = #{id}
</select>
<insert id="insertYqszhZb" parameterType="YqszhZb" useGeneratedKeys="true" keyProperty="id">
insert into yqszh_zb
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="fid != null">fid,</if>
<if test="mc != null">mc,</if>
<if test="px != null">px,</if>
<if test="cplx != null">cplx,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
<if test="delFlag != null">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fid != null">#{fid},</if>
<if test="mc != null">#{mc},</if>
<if test="px != null">#{px},</if>
<if test="cplx != null">#{cplx},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
<if test="delFlag != null">#{delFlag},</if>
</trim>
</insert>
<update id="updateYqszhZb" parameterType="YqszhZb">
update yqszh_zb
<trim prefix="SET" suffixOverrides=",">
<if test="fid != null">fid = #{fid},</if>
<if test="mc != null">mc = #{mc},</if>
<if test="px != null">px = #{px},</if>
<if test="cplx != null">cplx = #{cplx},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteYqszhZbById" parameterType="Long">
delete from yqszh_zb where id = #{id}
</delete>
<delete id="deleteYqszhZbByIds" parameterType="String">
delete from yqszh_zb where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment