移除demo

This commit is contained in:
huangge1199 2024-08-26 13:10:27 +08:00
parent 58a66189a0
commit 9221f64f2e
53 changed files with 45 additions and 3685 deletions

View File

@ -86,21 +86,7 @@ Ruoyi-Flex实行前后端分离仓库本项目是java后端部分前端项
本项目提供保姆级开发文档,零基础手把手入门教程,位于/doc文件夹下面 本项目提供保姆级开发文档,零基础手把手入门教程,位于/doc文件夹下面
入门必读,请下载到本地查看:《[Ruoyi-Flex开发编译手册.docx](https://gitee.com/dataprince/ruoyi-flex/raw/master/doc/Ruoyi-Flex-Guide.docx)》。 入门必读,请下载到本地查看:《[Ruoyi-Flex开发编译手册.docx](https://gitee.com/dataprince/ruoyi-flex/raw/master/doc/Ruoyi-Flex-Guide.docx)》。
## 7、Ruoyi-Flex交流群 ## 7、开源协议
本软件完全开源作者很忙如果您在使用过程中遇到问题请付点小费扫码微信支付199元后申请加入微信群寻求帮助
<table>
<tr>
<td>1、免费QQ交流群</td>
<td>762217712[交流1群]</td>
</tr>
<tr>
<td>2、付费微信交流群</td>
<td><img src="https://gitee.com/dataprince/ruoyi-flex/raw/master/image/dataprince.jpg"/></td>
</tr>
</table>
## 8、开源协议
**为什么推荐使用本项目?** **为什么推荐使用本项目?**
@ -112,7 +98,7 @@ Ruoyi-Flex实行前后端分离仓库本项目是java后端部分前端项
## 9、参与贡献 ## 8、参与贡献
1. Fork 本仓库 1. Fork 本仓库
2. 新建 Feat_xxx 分支 2. 新建 Feat_xxx 分支
@ -120,8 +106,9 @@ Ruoyi-Flex实行前后端分离仓库本项目是java后端部分前端项
4. 新建 Pull Request 4. 新建 Pull Request
## 10、特别鸣谢 ## 9、特别鸣谢
- [RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue) - [RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue)
- [RuoYi-Vue-Plus](https://gitee.com/dromara/RuoYi-Vue-Plus) - [RuoYi-Vue-Plus](https://gitee.com/dromara/RuoYi-Vue-Plus)
- [MyBatis-Flex](https://gitee.com/mybatis-flex/mybatis-flex) - [MyBatis-Flex](https://gitee.com/mybatis-flex/mybatis-flex)
- [Ruoyi-Flex](https://gitee.com/dataprince/ruoyi-flex)

View File

@ -403,14 +403,6 @@
<version>${revision}</version> <version>${revision}</version>
</dependency> </dependency>
<!-- demo模块 -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-demo</artifactId>
<version>${revision}</version>
</dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>

View File

@ -55,12 +55,6 @@
<artifactId>ruoyi-generator</artifactId> <artifactId>ruoyi-generator</artifactId>
</dependency> </dependency>
<!-- demo模块 -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-demo</artifactId>
</dependency>
<!-- spring-boot-admin 监控客户端 --> <!-- spring-boot-admin 监控客户端 -->
<dependency> <dependency>
<groupId>de.codecentric</groupId> <groupId>de.codecentric</groupId>

View File

@ -11,7 +11,6 @@
<packaging>pom</packaging> <packaging>pom</packaging>
<modules> <modules>
<module>ruoyi-demo</module>
<module>ruoyi-generator</module> <module>ruoyi-generator</module>
<module>ruoyi-job</module> <module>ruoyi-job</module>
<module>ruoyi-system</module> <module>ruoyi-system</module>

View File

@ -1,47 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-modules</artifactId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<artifactId>ruoyi-demo</artifactId>
<description>
demo模块
</description>
<dependencies>
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-core</artifactId>
</dependency>
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-web</artifactId>
</dependency>
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-springdoc</artifactId>
</dependency>
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-excel</artifactId>
</dependency>
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-log</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -1,99 +0,0 @@
package com.ruoyi.demo.controller;
import java.util.List;
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.ruoyi.common.orm.core.page.TableDataInfo;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.annotation.Resource;
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.web.core.BaseController;
import com.ruoyi.common.core.core.domain.AjaxResult;
import com.ruoyi.demo.domain.DemoCustomer;
import com.ruoyi.demo.service.IDemoCustomerService;
import com.ruoyi.common.core.utils.poi.ExcelUtil;
/**
* 客户主表(mb)Controller
*
* @author 数据小王子
* 2023-07-11
*/
@RestController
@RequestMapping("/demo/customer")
public class DemoCustomerController extends BaseController
{
@Resource
private IDemoCustomerService demoCustomerService;
/**
* 查询客户主表(mb)列表
*/
@SaCheckPermission("demo:customer:list")
@GetMapping("/list")
public TableDataInfo list(DemoCustomer demoCustomer)
{
startPage();
List<DemoCustomer> list = demoCustomerService.selectDemoCustomerList(demoCustomer);
return getDataTable(list);
}
/**
* 导出客户主表(mb)列表
*/
@SaCheckPermission("demo:customer:export")
@PostMapping("/export")
public void export(HttpServletResponse response, DemoCustomer demoCustomer)
{
List<DemoCustomer> list = demoCustomerService.selectDemoCustomerList(demoCustomer);
ExcelUtil<DemoCustomer> util = new ExcelUtil<>(DemoCustomer.class);
util.exportExcel(response, list, "客户主表(mb)数据");
}
/**
* 获取客户主表(mb)详细信息
*/
@SaCheckPermission("demo:customer:query")
@GetMapping(value = "/{customerId}")
public AjaxResult getInfo(@PathVariable("customerId") Long customerId)
{
return success(demoCustomerService.selectDemoCustomerByCustomerId(customerId));
}
/**
* 新增客户主表(mb)
*/
@SaCheckPermission("demo:customer:add")
@PostMapping
public AjaxResult add(@RequestBody DemoCustomer demoCustomer)
{
return toAjax(demoCustomerService.insertDemoCustomer(demoCustomer));
}
/**
* 修改客户主表(mb)
*/
@SaCheckPermission("demo:customer:edit")
@PutMapping
public AjaxResult edit(@RequestBody DemoCustomer demoCustomer)
{
return toAjax(demoCustomerService.updateDemoCustomer(demoCustomer));
}
/**
* 删除客户主表(mb)
*/
@SaCheckPermission("demo:customer:remove")
@DeleteMapping("/{customerIds}")
public AjaxResult remove(@PathVariable Long[] customerIds)
{
return toAjax(demoCustomerService.deleteDemoCustomerByCustomerIds(customerIds));
}
}

View File

@ -1,98 +0,0 @@
package com.ruoyi.demo.controller;
import java.util.List;
import cn.dev33.satoken.annotation.SaCheckPermission;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.annotation.Resource;
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.web.core.BaseController;
import com.ruoyi.common.core.core.domain.AjaxResult;
import com.ruoyi.demo.domain.DemoProduct;
import com.ruoyi.demo.service.IDemoProductService;
import com.ruoyi.common.core.utils.poi.ExcelUtil;
/**
* 产品树表mbController
*
* @author 数据小王子
* 2023-07-11
*/
@RestController
@RequestMapping("/demo/product")
public class DemoProductController extends BaseController
{
@Resource
private IDemoProductService demoProductService;
/**
* 查询产品树表mb列表
*/
@SaCheckPermission("demo:product:list")
@GetMapping("/list")
public AjaxResult list(DemoProduct demoProduct)
{
List<DemoProduct> list = demoProductService.selectDemoProductList(demoProduct);
return success(list);
}
/**
* 导出产品树表mb列表
*/
@SaCheckPermission("demo:product:export")
@PostMapping("/export")
public void export(HttpServletResponse response, DemoProduct demoProduct)
{
List<DemoProduct> list = demoProductService.selectDemoProductList(demoProduct);
ExcelUtil<DemoProduct> util = new ExcelUtil<>(DemoProduct.class);
util.exportExcel(response, list, "产品树表mb数据");
}
/**
* 获取产品树表mb详细信息
*/
@SaCheckPermission("demo:product:query")
@GetMapping(value = "/{productId}")
public AjaxResult getInfo(@PathVariable("productId") Long productId)
{
return success(demoProductService.selectDemoProductByProductId(productId));
}
/**
* 新增产品树表mb
*/
@SaCheckPermission("demo:product:add")
@PostMapping
public AjaxResult add(@RequestBody DemoProduct demoProduct)
{
return toAjax(demoProductService.insertDemoProduct(demoProduct));
}
/**
* 修改产品树表mb
*/
@SaCheckPermission("demo:product:edit")
@PutMapping
public AjaxResult edit(@RequestBody DemoProduct demoProduct)
{
return toAjax(demoProductService.updateDemoProduct(demoProduct));
}
/**
* 删除产品树表mb
*/
@SaCheckPermission("demo:product:remove")
@DeleteMapping("/{productIds}")
public AjaxResult remove(@PathVariable Long[] productIds)
{
return toAjax(demoProductService.deleteDemoProductByProductIds(productIds));
}
}

View File

@ -1,99 +0,0 @@
package com.ruoyi.demo.controller;
import java.util.List;
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.ruoyi.common.orm.core.page.TableDataInfo;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.annotation.Resource;
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.web.core.BaseController;
import com.ruoyi.common.core.core.domain.AjaxResult;
import com.ruoyi.demo.domain.DemoStudent;
import com.ruoyi.demo.service.IDemoStudentService;
import com.ruoyi.common.core.utils.poi.ExcelUtil;
/**
* 学生信息单表(mb)Controller
*
* @author 数据小王子
* 2023-07-11
*/
@RestController
@RequestMapping("/demo/student")
public class DemoStudentController extends BaseController
{
@Resource
private IDemoStudentService demoStudentService;
/**
* 查询学生信息单表(mb)列表
*/
@SaCheckPermission("demo:student:list")
@GetMapping("/list")
public TableDataInfo list(DemoStudent demoStudent)
{
startPage();
List<DemoStudent> list = demoStudentService.selectDemoStudentList(demoStudent);
return getDataTable(list);
}
/**
* 导出学生信息单表(mb)列表
*/
@SaCheckPermission("demo:student:export")
@PostMapping("/export")
public void export(HttpServletResponse response, DemoStudent demoStudent)
{
List<DemoStudent> list = demoStudentService.selectDemoStudentList(demoStudent);
ExcelUtil<DemoStudent> util = new ExcelUtil<>(DemoStudent.class);
util.exportExcel(response, list, "学生信息单表(mb)数据");
}
/**
* 获取学生信息单表(mb)详细信息
*/
@SaCheckPermission("demo:student:query")
@GetMapping(value = "/{studentId}")
public AjaxResult getInfo(@PathVariable("studentId") Long studentId)
{
return success(demoStudentService.selectDemoStudentByStudentId(studentId));
}
/**
* 新增学生信息单表(mb)
*/
@SaCheckPermission("demo:student:add")
@PostMapping
public AjaxResult add(@RequestBody DemoStudent demoStudent)
{
return toAjax(demoStudentService.insertDemoStudent(demoStudent));
}
/**
* 修改学生信息单表(mb)
*/
@SaCheckPermission("demo:student:edit")
@PutMapping
public AjaxResult edit(@RequestBody DemoStudent demoStudent)
{
return toAjax(demoStudentService.updateDemoStudent(demoStudent));
}
/**
* 删除学生信息单表(mb)
*/
@SaCheckPermission("demo:student:remove")
@DeleteMapping("/{studentIds}")
public AjaxResult remove(@PathVariable Long[] studentIds)
{
return toAjax(demoStudentService.deleteDemoStudentByStudentIds(studentIds));
}
}

View File

@ -1,125 +0,0 @@
package com.ruoyi.demo.domain;
import java.util.List;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.orm.core.domain.BaseEntity;
/**
* 客户主表(mb)对象 demo_customer
*
* @author 数据小王子
* 2023-07-11
*/
public class DemoCustomer extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 客户id */
private Long customerId;
/** 客户姓名 */
@Excel(name = "客户姓名")
private String customerName;
/** 手机号码 */
@Excel(name = "手机号码")
private String phonenumber;
/** 客户性别 */
@Excel(name = "客户性别")
private String sex;
/** 客户生日 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "客户生日", width = 30, dateFormat = "yyyy-MM-dd")
private Date birthday;
/**
* 备注
*/
private String remark;
/** 商品子信息 */
private List<DemoGoods> demoGoodsList;
public void setCustomerId(Long customerId)
{
this.customerId = customerId;
}
public Long getCustomerId()
{
return customerId;
}
public void setCustomerName(String customerName)
{
this.customerName = customerName;
}
public String getCustomerName()
{
return customerName;
}
public void setPhonenumber(String phonenumber)
{
this.phonenumber = phonenumber;
}
public String getPhonenumber()
{
return phonenumber;
}
public void setSex(String sex)
{
this.sex = sex;
}
public String getSex()
{
return sex;
}
public void setBirthday(Date birthday)
{
this.birthday = birthday;
}
public Date getBirthday()
{
return birthday;
}
public List<DemoGoods> getDemoGoodsList()
{
return demoGoodsList;
}
public void setDemoGoodsList(List<DemoGoods> demoGoodsList)
{
this.demoGoodsList = demoGoodsList;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("customerId", getCustomerId())
.append("customerName", getCustomerName())
.append("phonenumber", getPhonenumber())
.append("sex", getSex())
.append("birthday", getBirthday())
.append("remark", getRemark())
.append("demoGoodsList", getDemoGoodsList())
.toString();
}
}

View File

@ -1,138 +0,0 @@
package com.ruoyi.demo.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.orm.core.domain.BaseEntity;
/**
* 商品子对象 demo_goods
*
* @author 数据小王子
* 2023-07-11
*/
public class DemoGoods extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 商品id */
private Long goodsId;
/** 客户id */
@Excel(name = "客户id")
private Long customerId;
/** 商品名称 */
@Excel(name = "商品名称")
private String name;
/** 商品重量 */
@Excel(name = "商品重量")
private Long weight;
/** 商品价格 */
@Excel(name = "商品价格")
private BigDecimal price;
/** 商品时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "商品时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date date;
/** 商品种类 */
@Excel(name = "商品种类")
private String type;
/**
* 备注
*/
private String remark;
public void setGoodsId(Long goodsId)
{
this.goodsId = goodsId;
}
public Long getGoodsId()
{
return goodsId;
}
public void setCustomerId(Long customerId)
{
this.customerId = customerId;
}
public Long getCustomerId()
{
return customerId;
}
public void setName(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
public void setWeight(Long weight)
{
this.weight = weight;
}
public Long getWeight()
{
return weight;
}
public void setPrice(BigDecimal price)
{
this.price = price;
}
public BigDecimal getPrice()
{
return price;
}
public void setDate(Date date)
{
this.date = date;
}
public Date getDate()
{
return date;
}
public void setType(String type)
{
this.type = type;
}
public String getType()
{
return type;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("goodsId", getGoodsId())
.append("customerId", getCustomerId())
.append("name", getName())
.append("weight", getWeight())
.append("price", getPrice())
.append("date", getDate())
.append("type", getType())
.toString();
}
}

View File

@ -1,80 +0,0 @@
package com.ruoyi.demo.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.orm.core.domain.TreeEntity;
/**
* 产品树表mb对象 demo_product
*
* @author 数据小王子
* 2023-07-11
*/
public class DemoProduct extends TreeEntity
{
private static final long serialVersionUID = 1L;
/** 产品id */
private Long productId;
/** 产品名称 */
@Excel(name = "产品名称")
private String productName;
/** 产品状态0正常 1停用 */
@Excel(name = "产品状态", readConverterExp = "0=正常,1=停用")
private String status;
/**
* 备注
*/
private String remark;
public void setProductId(Long productId)
{
this.productId = productId;
}
public Long getProductId()
{
return productId;
}
public void setProductName(String productName)
{
this.productName = productName;
}
public String getProductName()
{
return productName;
}
public void setStatus(String status)
{
this.status = status;
}
public String getStatus()
{
return status;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("productId", getProductId())
.append("parentId", getParentId())
.append("productName", getProductName())
.append("orderNum", getOrderNum())
.append("status", getStatus())
.toString();
}
}

View File

@ -1,140 +0,0 @@
package com.ruoyi.demo.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.orm.core.domain.BaseEntity;
/**
* 学生信息单表(mb)对象 demo_student
*
* @author 数据小王子
* 2023-07-11
*/
public class DemoStudent extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 编号 */
private Long studentId;
/** 学生名称 */
@Excel(name = "学生名称")
private String studentName;
/** 年龄 */
@Excel(name = "年龄")
//@NotBlank
//private int studentAge;
private Long studentAge;
/** 爱好0代码 1音乐 2电影 */
@Excel(name = "爱好", readConverterExp = "0=代码,1=音乐,2=电影")
private String studentHobby;
/** 性别1男 2女 3未知 */
@Excel(name = "性别", readConverterExp = "1=男,2=女,3=未知")
private String studentSex;
/** 状态0正常 1停用 */
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
private String studentStatus;
/** 生日 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "生日", width = 30, dateFormat = "yyyy-MM-dd")
private Date studentBirthday;
/**
* 备注
*/
private String remark;
public void setStudentId(Long studentId)
{
this.studentId = studentId;
}
public Long getStudentId()
{
return studentId;
}
public void setStudentName(String studentName)
{
this.studentName = studentName;
}
public String getStudentName()
{
return studentName;
}
public void setStudentAge(Long studentAge)
{
this.studentAge = studentAge;
}
public Long getStudentAge()
{
return studentAge;
}
public void setStudentHobby(String studentHobby)
{
this.studentHobby = studentHobby;
}
public String getStudentHobby()
{
return studentHobby;
}
public void setStudentSex(String studentSex)
{
this.studentSex = studentSex;
}
public String getStudentSex()
{
return studentSex;
}
public void setStudentStatus(String studentStatus)
{
this.studentStatus = studentStatus;
}
public String getStudentStatus()
{
return studentStatus;
}
public void setStudentBirthday(Date studentBirthday)
{
this.studentBirthday = studentBirthday;
}
public Date getStudentBirthday()
{
return studentBirthday;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("studentId", getStudentId())
.append("studentName", getStudentName())
.append("studentAge", getStudentAge())
.append("studentHobby", getStudentHobby())
.append("studentSex", getStudentSex())
.append("studentStatus", getStudentStatus())
.append("studentBirthday", getStudentBirthday())
.toString();
}
}

View File

@ -1,87 +0,0 @@
package com.ruoyi.demo.mapper;
import java.util.List;
import com.ruoyi.demo.domain.DemoCustomer;
import com.ruoyi.demo.domain.DemoGoods;
/**
* 客户主表(mb)Mapper接口
*
* @author 数据小王子
* 2023-07-11
*/
public interface DemoCustomerMapper
{
/**
* 查询客户主表(mb)
*
* @param customerId 客户主表(mb)主键
* @return 客户主表(mb)
*/
DemoCustomer selectDemoCustomerByCustomerId(Long customerId);
/**
* 查询客户主表(mb)列表
*
* @param demoCustomer 客户主表(mb)
* @return 客户主表(mb)集合
*/
List<DemoCustomer> selectDemoCustomerList(DemoCustomer demoCustomer);
/**
* 新增客户主表(mb)
*
* @param demoCustomer 客户主表(mb)
* @return 结果
*/
int insertDemoCustomer(DemoCustomer demoCustomer);
/**
* 修改客户主表(mb)
*
* @param demoCustomer 客户主表(mb)
* @return 结果
*/
int updateDemoCustomer(DemoCustomer demoCustomer);
/**
* 删除客户主表(mb)
*
* @param customerId 客户主表(mb)主键
* @return 结果
*/
int deleteDemoCustomerByCustomerId(Long customerId);
/**
* 批量删除客户主表(mb)
*
* @param customerIds 需要删除的数据主键集合
* @return 结果
*/
int deleteDemoCustomerByCustomerIds(Long[] customerIds);
/**
* 批量删除商品子
*
* @param customerIds 需要删除的数据主键集合
* @return 结果
*/
int deleteDemoGoodsByCustomerIds(Long[] customerIds);
/**
* 批量新增商品子
*
* @param demoGoodsList 商品子列表
* @return 结果
*/
int batchDemoGoods(List<DemoGoods> demoGoodsList);
/**
* 通过客户主表(mb)主键删除商品子信息
*
* @param customerId 客户主表(mb)ID
* @return 结果
*/
int deleteDemoGoodsByCustomerId(Long customerId);
}

View File

@ -1,61 +0,0 @@
package com.ruoyi.demo.mapper;
import java.util.List;
import com.ruoyi.demo.domain.DemoProduct;
/**
* 产品树表mbMapper接口
*
* @author 数据小王子
* 2023-07-11
*/
public interface DemoProductMapper
{
/**
* 查询产品树表mb
*
* @param productId 产品树表mb主键
* @return 产品树表mb
*/
DemoProduct selectDemoProductByProductId(Long productId);
/**
* 查询产品树表mb列表
*
* @param demoProduct 产品树表mb
* @return 产品树表mb集合
*/
List<DemoProduct> selectDemoProductList(DemoProduct demoProduct);
/**
* 新增产品树表mb
*
* @param demoProduct 产品树表mb
* @return 结果
*/
int insertDemoProduct(DemoProduct demoProduct);
/**
* 修改产品树表mb
*
* @param demoProduct 产品树表mb
* @return 结果
*/
int updateDemoProduct(DemoProduct demoProduct);
/**
* 删除产品树表mb
*
* @param productId 产品树表mb主键
* @return 结果
*/
int deleteDemoProductByProductId(Long productId);
/**
* 批量删除产品树表mb
*
* @param productIds 需要删除的数据主键集合
* @return 结果
*/
int deleteDemoProductByProductIds(Long[] productIds);
}

View File

@ -1,61 +0,0 @@
package com.ruoyi.demo.mapper;
import java.util.List;
import com.ruoyi.demo.domain.DemoStudent;
/**
* 学生信息单表(mb)Mapper接口
*
* @author 数据小王子
* 2023-07-11
*/
public interface DemoStudentMapper
{
/**
* 查询学生信息单表(mb)
*
* @param studentId 学生信息单表(mb)主键
* @return 学生信息单表(mb)
*/
DemoStudent selectDemoStudentByStudentId(Long studentId);
/**
* 查询学生信息单表(mb)列表
*
* @param demoStudent 学生信息单表(mb)
* @return 学生信息单表(mb)集合
*/
List<DemoStudent> selectDemoStudentList(DemoStudent demoStudent);
/**
* 新增学生信息单表(mb)
*
* @param demoStudent 学生信息单表(mb)
* @return 结果
*/
int insertDemoStudent(DemoStudent demoStudent);
/**
* 修改学生信息单表(mb)
*
* @param demoStudent 学生信息单表(mb)
* @return 结果
*/
int updateDemoStudent(DemoStudent demoStudent);
/**
* 删除学生信息单表(mb)
*
* @param studentId 学生信息单表(mb)主键
* @return 结果
*/
int deleteDemoStudentByStudentId(Long studentId);
/**
* 批量删除学生信息单表(mb)
*
* @param studentIds 需要删除的数据主键集合
* @return 结果
*/
int deleteDemoStudentByStudentIds(Long[] studentIds);
}

View File

@ -1,61 +0,0 @@
package com.ruoyi.demo.service;
import java.util.List;
import com.ruoyi.demo.domain.DemoCustomer;
/**
* 客户主表(mb)Service接口
*
* @author 数据小王子
* 2023-07-11
*/
public interface IDemoCustomerService
{
/**
* 查询客户主表(mb)
*
* @param customerId 客户主表(mb)主键
* @return 客户主表(mb)
*/
DemoCustomer selectDemoCustomerByCustomerId(Long customerId);
/**
* 查询客户主表(mb)列表
*
* @param demoCustomer 客户主表(mb)
* @return 客户主表(mb)集合
*/
List<DemoCustomer> selectDemoCustomerList(DemoCustomer demoCustomer);
/**
* 新增客户主表(mb)
*
* @param demoCustomer 客户主表(mb)
* @return 结果
*/
int insertDemoCustomer(DemoCustomer demoCustomer);
/**
* 修改客户主表(mb)
*
* @param demoCustomer 客户主表(mb)
* @return 结果
*/
int updateDemoCustomer(DemoCustomer demoCustomer);
/**
* 批量删除客户主表(mb)
*
* @param customerIds 需要删除的客户主表(mb)主键集合
* @return 结果
*/
int deleteDemoCustomerByCustomerIds(Long[] customerIds);
/**
* 删除客户主表(mb)信息
*
* @param customerId 客户主表(mb)主键
* @return 结果
*/
int deleteDemoCustomerByCustomerId(Long customerId);
}

View File

@ -1,61 +0,0 @@
package com.ruoyi.demo.service;
import java.util.List;
import com.ruoyi.demo.domain.DemoProduct;
/**
* 产品树表mbService接口
*
* @author 数据小王子
* 2023-07-11
*/
public interface IDemoProductService
{
/**
* 查询产品树表mb
*
* @param productId 产品树表mb主键
* @return 产品树表mb
*/
DemoProduct selectDemoProductByProductId(Long productId);
/**
* 查询产品树表mb列表
*
* @param demoProduct 产品树表mb
* @return 产品树表mb集合
*/
List<DemoProduct> selectDemoProductList(DemoProduct demoProduct);
/**
* 新增产品树表mb
*
* @param demoProduct 产品树表mb
* @return 结果
*/
int insertDemoProduct(DemoProduct demoProduct);
/**
* 修改产品树表mb
*
* @param demoProduct 产品树表mb
* @return 结果
*/
int updateDemoProduct(DemoProduct demoProduct);
/**
* 批量删除产品树表mb
*
* @param productIds 需要删除的产品树表mb主键集合
* @return 结果
*/
int deleteDemoProductByProductIds(Long[] productIds);
/**
* 删除产品树表mb信息
*
* @param productId 产品树表mb主键
* @return 结果
*/
int deleteDemoProductByProductId(Long productId);
}

View File

@ -1,61 +0,0 @@
package com.ruoyi.demo.service;
import java.util.List;
import com.ruoyi.demo.domain.DemoStudent;
/**
* 学生信息单表(mb)Service接口
*
* @author 数据小王子
* 2023-07-11
*/
public interface IDemoStudentService
{
/**
* 查询学生信息单表(mb)
*
* @param studentId 学生信息单表(mb)主键
* @return 学生信息单表(mb)
*/
DemoStudent selectDemoStudentByStudentId(Long studentId);
/**
* 查询学生信息单表(mb)列表
*
* @param demoStudent 学生信息单表(mb)
* @return 学生信息单表(mb)集合
*/
List<DemoStudent> selectDemoStudentList(DemoStudent demoStudent);
/**
* 新增学生信息单表(mb)
*
* @param demoStudent 学生信息单表(mb)
* @return 结果
*/
int insertDemoStudent(DemoStudent demoStudent);
/**
* 修改学生信息单表(mb)
*
* @param demoStudent 学生信息单表(mb)
* @return 结果
*/
int updateDemoStudent(DemoStudent demoStudent);
/**
* 批量删除学生信息单表(mb)
*
* @param studentIds 需要删除的学生信息单表(mb)主键集合
* @return 结果
*/
int deleteDemoStudentByStudentIds(Long[] studentIds);
/**
* 删除学生信息单表(mb)信息
*
* @param studentId 学生信息单表(mb)主键
* @return 结果
*/
int deleteDemoStudentByStudentId(Long studentId);
}

View File

@ -1,131 +0,0 @@
package com.ruoyi.demo.service.impl;
import java.util.List;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import com.ruoyi.common.core.utils.StringUtils;
import org.springframework.transaction.annotation.Transactional;
import com.ruoyi.demo.domain.DemoGoods;
import com.ruoyi.demo.mapper.DemoCustomerMapper;
import com.ruoyi.demo.domain.DemoCustomer;
import com.ruoyi.demo.service.IDemoCustomerService;
/**
* 客户主表(mb)Service业务层处理
*
* @author 数据小王子
* 2023-07-11
*/
@Service
public class DemoCustomerServiceImpl implements IDemoCustomerService
{
@Resource
private DemoCustomerMapper demoCustomerMapper;
/**
* 查询客户主表(mb)
*
* @param customerId 客户主表(mb)主键
* @return 客户主表(mb)
*/
@Override
public DemoCustomer selectDemoCustomerByCustomerId(Long customerId)
{
return demoCustomerMapper.selectDemoCustomerByCustomerId(customerId);
}
/**
* 查询客户主表(mb)列表
*
* @param demoCustomer 客户主表(mb)
* @return 客户主表(mb)
*/
@Override
public List<DemoCustomer> selectDemoCustomerList(DemoCustomer demoCustomer)
{
return demoCustomerMapper.selectDemoCustomerList(demoCustomer);
}
/**
* 新增客户主表(mb)
*
* @param demoCustomer 客户主表(mb)
* @return 结果
*/
@Transactional
@Override
public int insertDemoCustomer(DemoCustomer demoCustomer)
{
int rows = demoCustomerMapper.insertDemoCustomer(demoCustomer);
insertDemoGoods(demoCustomer);
return rows;
}
/**
* 修改客户主表(mb)
*
* @param demoCustomer 客户主表(mb)
* @return 结果
*/
@Transactional
@Override
public int updateDemoCustomer(DemoCustomer demoCustomer)
{
demoCustomerMapper.deleteDemoGoodsByCustomerId(demoCustomer.getCustomerId());
insertDemoGoods(demoCustomer);
return demoCustomerMapper.updateDemoCustomer(demoCustomer);
}
/**
* 批量删除客户主表(mb)
*
* @param customerIds 需要删除的客户主表(mb)主键
* @return 结果
*/
@Transactional
@Override
public int deleteDemoCustomerByCustomerIds(Long[] customerIds)
{
demoCustomerMapper.deleteDemoGoodsByCustomerIds(customerIds);
return demoCustomerMapper.deleteDemoCustomerByCustomerIds(customerIds);
}
/**
* 删除客户主表(mb)信息
*
* @param customerId 客户主表(mb)主键
* @return 结果
*/
@Transactional
@Override
public int deleteDemoCustomerByCustomerId(Long customerId)
{
demoCustomerMapper.deleteDemoGoodsByCustomerId(customerId);
return demoCustomerMapper.deleteDemoCustomerByCustomerId(customerId);
}
/**
* 新增商品子信息
*
* @param demoCustomer 客户主表(mb)对象
*/
public void insertDemoGoods(DemoCustomer demoCustomer)
{
List<DemoGoods> demoGoodsList = demoCustomer.getDemoGoodsList();
Long customerId = demoCustomer.getCustomerId();
if (StringUtils.isNotNull(demoGoodsList))
{
List<DemoGoods> list = new ArrayList<>();
for (DemoGoods demoGoods : demoGoodsList)
{
demoGoods.setCustomerId(customerId);
list.add(demoGoods);
}
if (list.size() > 0)
{
demoCustomerMapper.batchDemoGoods(list);
}
}
}
}

View File

@ -1,93 +0,0 @@
package com.ruoyi.demo.service.impl;
import java.util.List;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import com.ruoyi.demo.mapper.DemoProductMapper;
import com.ruoyi.demo.domain.DemoProduct;
import com.ruoyi.demo.service.IDemoProductService;
/**
* 产品树表mbService业务层处理
*
* @author 数据小王子
* 2023-07-11
*/
@Service
public class DemoProductServiceImpl implements IDemoProductService
{
@Resource
private DemoProductMapper demoProductMapper;
/**
* 查询产品树表mb
*
* @param productId 产品树表mb主键
* @return 产品树表mb
*/
@Override
public DemoProduct selectDemoProductByProductId(Long productId)
{
return demoProductMapper.selectDemoProductByProductId(productId);
}
/**
* 查询产品树表mb列表
*
* @param demoProduct 产品树表mb
* @return 产品树表mb
*/
@Override
public List<DemoProduct> selectDemoProductList(DemoProduct demoProduct)
{
return demoProductMapper.selectDemoProductList(demoProduct);
}
/**
* 新增产品树表mb
*
* @param demoProduct 产品树表mb
* @return 结果
*/
@Override
public int insertDemoProduct(DemoProduct demoProduct)
{
return demoProductMapper.insertDemoProduct(demoProduct);
}
/**
* 修改产品树表mb
*
* @param demoProduct 产品树表mb
* @return 结果
*/
@Override
public int updateDemoProduct(DemoProduct demoProduct)
{
return demoProductMapper.updateDemoProduct(demoProduct);
}
/**
* 批量删除产品树表mb
*
* @param productIds 需要删除的产品树表mb主键
* @return 结果
*/
@Override
public int deleteDemoProductByProductIds(Long[] productIds)
{
return demoProductMapper.deleteDemoProductByProductIds(productIds);
}
/**
* 删除产品树表mb信息
*
* @param productId 产品树表mb主键
* @return 结果
*/
@Override
public int deleteDemoProductByProductId(Long productId)
{
return demoProductMapper.deleteDemoProductByProductId(productId);
}
}

View File

@ -1,93 +0,0 @@
package com.ruoyi.demo.service.impl;
import java.util.List;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import com.ruoyi.demo.mapper.DemoStudentMapper;
import com.ruoyi.demo.domain.DemoStudent;
import com.ruoyi.demo.service.IDemoStudentService;
/**
* 学生信息单表(mb)Service业务层处理
*
* @author 数据小王子
* 2023-07-11
*/
@Service
public class DemoStudentServiceImpl implements IDemoStudentService
{
@Resource
private DemoStudentMapper demoStudentMapper;
/**
* 查询学生信息单表(mb)
*
* @param studentId 学生信息单表(mb)主键
* @return 学生信息单表(mb)
*/
@Override
public DemoStudent selectDemoStudentByStudentId(Long studentId)
{
return demoStudentMapper.selectDemoStudentByStudentId(studentId);
}
/**
* 查询学生信息单表(mb)列表
*
* @param demoStudent 学生信息单表(mb)
* @return 学生信息单表(mb)
*/
@Override
public List<DemoStudent> selectDemoStudentList(DemoStudent demoStudent)
{
return demoStudentMapper.selectDemoStudentList(demoStudent);
}
/**
* 新增学生信息单表(mb)
*
* @param demoStudent 学生信息单表(mb)
* @return 结果
*/
@Override
public int insertDemoStudent(DemoStudent demoStudent)
{
return demoStudentMapper.insertDemoStudent(demoStudent);
}
/**
* 修改学生信息单表(mb)
*
* @param demoStudent 学生信息单表(mb)
* @return 结果
*/
@Override
public int updateDemoStudent(DemoStudent demoStudent)
{
return demoStudentMapper.updateDemoStudent(demoStudent);
}
/**
* 批量删除学生信息单表(mb)
*
* @param studentIds 需要删除的学生信息单表(mb)主键
* @return 结果
*/
@Override
public int deleteDemoStudentByStudentIds(Long[] studentIds)
{
return demoStudentMapper.deleteDemoStudentByStudentIds(studentIds);
}
/**
* 删除学生信息单表(mb)信息
*
* @param studentId 学生信息单表(mb)主键
* @return 结果
*/
@Override
public int deleteDemoStudentByStudentId(Long studentId)
{
return demoStudentMapper.deleteDemoStudentByStudentId(studentId);
}
}

View File

@ -1,116 +0,0 @@
package com.ruoyi.mf.controller;
import java.util.List;
import lombok.RequiredArgsConstructor;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.constraints.*;
import cn.dev33.satoken.annotation.SaCheckPermission;
import org.springframework.web.bind.annotation.*;
import org.springframework.validation.annotation.Validated;
import com.ruoyi.common.core.core.domain.R;
import com.ruoyi.common.excel.utils.ExcelUtil;
import com.ruoyi.common.log.annotation.Log;
import com.ruoyi.common.log.enums.BusinessType;
import com.ruoyi.common.web.annotation.RepeatSubmit;
import com.ruoyi.common.web.core.BaseController;
import jakarta.annotation.Resource;
import com.ruoyi.mf.domain.vo.CustomerVo;
import com.ruoyi.mf.domain.bo.CustomerBo;
import com.ruoyi.mf.service.ICustomerService;
import com.ruoyi.common.orm.core.page.TableDataInfo;
/**
* 客户主表Controller
*
* @author 数据小王子
* 2023-12-06
*/
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/mf/customer")
public class CustomerController extends BaseController
{
@Resource
private ICustomerService customerService;
/**
* 查询客户主表列表
*/
@SaCheckPermission("mf:customer:list")
@GetMapping("/list")
public TableDataInfo<CustomerVo> list(CustomerBo customerBo)
{
return customerService.selectPage(customerBo);
}
/**
* 导出客户主表列表
*/
@SaCheckPermission("mf:customer:export")
@Log(title = "客户主表", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, CustomerBo customerBo)
{
List<CustomerVo> list = customerService.selectList(customerBo);
ExcelUtil.exportExcel(list, "客户主表", CustomerVo.class, response);
}
/**
* 获取客户主表详细信息
*/
@SaCheckPermission("mf:customer:query")
@GetMapping(value = "/{customerId}")
public R<CustomerVo> getInfo(@PathVariable Long customerId)
{
return R.ok(customerService.selectById(customerId));
}
/**
* 新增客户主表
*/
@SaCheckPermission("mf:customer:add")
@Log(title = "客户主表", businessType = BusinessType.INSERT)
@RepeatSubmit()
@PostMapping
public R<Void> add(@Validated @RequestBody CustomerBo customerBo)
{
boolean inserted = customerService.insert(customerBo);
if (!inserted) {
return R.fail("新增客户主表记录失败!");
}
return R.ok();
}
/**
* 修改客户主表
*/
@SaCheckPermission("mf:customer:edit")
@Log(title = "客户主表", businessType = BusinessType.UPDATE)
@RepeatSubmit()
@PutMapping
public R<Void> edit(@Validated @RequestBody CustomerBo customerBo)
{
Boolean updated = customerService.update(customerBo);
if (!updated) {
R.fail("修改客户主表记录失败!");
}
return R.ok();
}
/**
* 删除客户主表
*/
@SaCheckPermission("mf:customer:remove")
@Log(title = "客户主表", businessType = BusinessType.DELETE)
@DeleteMapping("/{customerIds}")
public R<Void> remove(@PathVariable Long[] customerIds)
{
boolean deleted = customerService.deleteByIds(customerIds);
if (!deleted) {
R.fail("删除客户主表记录失败!");
}
return R.ok();
}
}

View File

@ -1,116 +0,0 @@
package com.ruoyi.mf.controller;
import java.util.List;
import lombok.RequiredArgsConstructor;
import jakarta.servlet.http.HttpServletResponse;
import cn.dev33.satoken.annotation.SaCheckPermission;
import org.springframework.web.bind.annotation.*;
import org.springframework.validation.annotation.Validated;
import com.ruoyi.common.core.core.domain.R;
import com.ruoyi.common.excel.utils.ExcelUtil;
import com.ruoyi.common.log.annotation.Log;
import com.ruoyi.common.log.enums.BusinessType;
import com.ruoyi.common.web.annotation.RepeatSubmit;
import com.ruoyi.common.web.core.BaseController;
import jakarta.annotation.Resource;
import com.ruoyi.mf.domain.vo.MfProductVo;
import com.ruoyi.mf.domain.bo.MfProductBo;
import com.ruoyi.mf.service.IMfProductService;
/**
* 产品树Controller
*
* @author 数据小王子
* 2023-11-23
*/
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/mf/product")
public class MfProductController extends BaseController
{
@Resource
private IMfProductService mfProductService;
/**
* 查询产品树列表
*/
@SaCheckPermission("mf:product:list")
@GetMapping("/list")
public R<List<MfProductVo>> list(MfProductBo mfProductBo)
{
List<MfProductVo> list = mfProductService.selectList(mfProductBo);
return R.ok(list);
}
/**
* 导出产品树列表
*/
@SaCheckPermission("mf:product:export")
@Log(title = "产品树", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, MfProductBo mfProductBo)
{
List<MfProductVo> list = mfProductService.selectList(mfProductBo);
ExcelUtil.exportExcel(list, "产品树", MfProductVo.class, response);
}
/**
* 获取产品树详细信息
*/
@SaCheckPermission("mf:product:query")
@GetMapping(value = "/{productId}")
public R<MfProductVo> getInfo(@PathVariable Long productId)
{
return R.ok(mfProductService.selectById(productId));
}
/**
* 新增产品树
*/
@SaCheckPermission("mf:product:add")
@Log(title = "产品树", businessType = BusinessType.INSERT)
@RepeatSubmit()
@PostMapping
public R<Void> add(@Validated @RequestBody MfProductBo mfProductBo)
{
boolean inserted = mfProductService.insert(mfProductBo);
if (!inserted) {
return R.fail("新增产品树记录失败!");
}
return R.ok();
}
/**
* 修改产品树
*/
@SaCheckPermission("mf:product:edit")
@Log(title = "产品树", businessType = BusinessType.UPDATE)
@RepeatSubmit()
@PutMapping
public R<Void> edit(@Validated @RequestBody MfProductBo mfProductBo)
{
Boolean updated = mfProductService.update(mfProductBo);
if (!updated) {
R.fail("修改产品树记录失败!");
}
return R.ok();
}
/**
* 删除产品树
*/
@SaCheckPermission("mf:product:remove")
@Log(title = "产品树", businessType = BusinessType.DELETE)
@DeleteMapping("/{productIds}")
public R<Void> remove(@PathVariable Long[] productIds)
{
boolean deleted = mfProductService.deleteByIds(productIds);
if (!deleted) {
R.fail("删除产品树记录失败!");
}
return R.ok();
}
}

View File

@ -1,116 +0,0 @@
package com.ruoyi.mf.controller;
import java.util.List;
import lombok.RequiredArgsConstructor;
import jakarta.servlet.http.HttpServletResponse;
import cn.dev33.satoken.annotation.SaCheckPermission;
import org.springframework.web.bind.annotation.*;
import org.springframework.validation.annotation.Validated;
import com.ruoyi.common.core.core.domain.R;
import com.ruoyi.common.excel.utils.ExcelUtil;
import com.ruoyi.common.log.annotation.Log;
import com.ruoyi.common.log.enums.BusinessType;
import com.ruoyi.common.web.annotation.RepeatSubmit;
import com.ruoyi.common.web.core.BaseController;
import jakarta.annotation.Resource;
import com.ruoyi.mf.domain.vo.MfStudentVo;
import com.ruoyi.mf.domain.bo.MfStudentBo;
import com.ruoyi.mf.service.IMfStudentService;
import com.ruoyi.common.orm.core.page.TableDataInfo;
/**
* 学生信息表Controller
*
* @author 数据小王子
* 2023-11-22
*/
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/mf/student")
public class MfStudentController extends BaseController
{
@Resource
private IMfStudentService mfStudentService;
/**
* 查询学生信息表列表
*/
@SaCheckPermission("mf:student:list")
@GetMapping("/list")
public TableDataInfo<MfStudentVo> list(MfStudentBo mfStudentBo)
{
return mfStudentService.selectPage(mfStudentBo);
}
/**
* 导出学生信息表列表
*/
@SaCheckPermission("mf:student:export")
@Log(title = "学生信息表", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, MfStudentBo mfStudentBo)
{
List<MfStudentVo> list = mfStudentService.selectList(mfStudentBo);
ExcelUtil.exportExcel(list, "学生信息表", MfStudentVo.class, response);
}
/**
* 获取学生信息表详细信息
*/
@SaCheckPermission("mf:student:query")
@GetMapping(value = "/{studentId}")
public R<MfStudentVo> getInfo(@PathVariable Long studentId)
{
return R.ok(mfStudentService.selectById(studentId));
}
/**
* 新增学生信息表
*/
@SaCheckPermission("mf:student:add")
@Log(title = "学生信息表", businessType = BusinessType.INSERT)
@RepeatSubmit()
@PostMapping
public R<Void> add(@Validated @RequestBody MfStudentBo mfStudentBo)
{
boolean inserted = mfStudentService.insert(mfStudentBo);
if (!inserted) {
return R.fail("新增学生信息表记录失败!");
}
return R.ok();
}
/**
* 修改学生信息表
*/
@SaCheckPermission("mf:student:edit")
@Log(title = "学生信息表", businessType = BusinessType.UPDATE)
@RepeatSubmit()
@PutMapping
public R<Void> edit(@Validated @RequestBody MfStudentBo mfStudentBo)
{
Boolean updated = mfStudentService.update(mfStudentBo);
if (!updated) {
R.fail("修改学生信息表记录失败!");
}
return R.ok();
}
/**
* 删除学生信息表
*/
@SaCheckPermission("mf:student:remove")
@Log(title = "学生信息表", businessType = BusinessType.DELETE)
@DeleteMapping("/{studentIds}")
public R<Void> remove(@PathVariable Long[] studentIds)
{
boolean deleted = mfStudentService.deleteByIds(studentIds);
if (!deleted) {
R.fail("删除学生信息表记录失败!");
}
return R.ok();
}
}

View File

@ -1,46 +0,0 @@
package com.ruoyi.mf.domain;
import java.util.List;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.mf.domain.Goods;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.ruoyi.common.orm.core.domain.BaseEntity;
/**
* 客户主表对象 mf_customer
*
* @author 数据小王子
* 2023-12-06
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Table(value = "mf_customer")
public class Customer extends BaseEntity
{
/** 客户id */
@Id
private Long customerId;
/** 客户姓名 */
private String customerName;
/** 手机号码 */
private String phonenumber;
/** 客户性别 */
private String gender;
/** 客户生日 */
private Date birthday;
/** 客户描述 */
private String remark;
/** 商品子表信息 */
private List<Goods> goodsList;
}

View File

@ -1,52 +0,0 @@
package com.ruoyi.mf.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.io.Serializable;
import com.ruoyi.common.orm.core.domain.BaseEntity;
/**
* 商品子表对象 mf_goods
*
* @author 数据小王子
* 2023-12-06
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Table(value = "mf_goods")
public class Goods extends BaseEntity
{
@Serial
private static final long serialVersionUID = 1L;
/** 商品id */
@Id
private Long goodsId;
/** 客户id */
private Long customerId;
/** 商品名称 */
private String name;
/** 商品重量 */
private Long weight;
/** 商品价格 */
private BigDecimal price;
/** 商品时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
private Date date;
/** 商品种类 */
private String type;
}

View File

@ -1,30 +0,0 @@
package com.ruoyi.mf.domain;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.ruoyi.common.orm.core.domain.TreeEntity;
/**
* 产品树对象 mf_product
*
* @author 数据小王子
* 2023-11-23
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Table(value = "mf_product")
public class MfProduct extends TreeEntity
{
/** 产品id */
@Id
private Long productId;
/** 产品名称 */
private String productName;
/** 产品状态0正常 1停用 */
private String status;
}

View File

@ -1,44 +0,0 @@
package com.ruoyi.mf.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.ruoyi.common.orm.core.domain.BaseEntity;
/**
* 学生信息表对象 mf_student
*
* @author 数据小王子
* 2023-11-22
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Table(value = "mf_student")
public class MfStudent extends BaseEntity
{
/** 编号 */
@Id
private Long studentId;
/** 学生名称 */
private String studentName;
/** 年龄 */
private Long studentAge;
/** 爱好0代码 1音乐 2电影 */
private String studentHobby;
/** 性别1男 2女 3未知 */
private String studentGender;
/** 状态0正常 1停用 */
private String studentStatus;
/** 生日 */
private Date studentBirthday;
}

View File

@ -1,60 +0,0 @@
package com.ruoyi.mf.domain.bo;
import com.ruoyi.mf.domain.Customer;
import com.ruoyi.mf.domain.Goods;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.List;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.orm.core.domain.BaseEntity;
/**
* 客户主表业务对象 mf_customer
*
* @author 数据小王子
* @date 2023-12-06
*/
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = Customer.class, reverseConvertGenerate = false)
public class CustomerBo extends BaseEntity
{
/**
* 客户id
*/
private Long customerId;
/**
* 客户姓名
*/
private String customerName;
/**
* 手机号码
*/
private String phonenumber;
/**
* 客户性别
*/
private String gender;
/**
* 客户生日
*/
@JsonFormat(pattern = "yyyy-MM-dd")
private Date birthday;
/**
* 客户描述
*/
private String remark;
/** 商品子表信息 */
private List<Goods> goodsList;
}

View File

@ -1,40 +0,0 @@
package com.ruoyi.mf.domain.bo;
import com.ruoyi.mf.domain.MfProduct;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import com.ruoyi.common.orm.core.domain.TreeEntity;
/**
* 产品树业务对象 mf_product
*
* @author 数据小王子
* @date 2023-11-23
*/
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = MfProduct.class, reverseConvertGenerate = false)
public class MfProductBo extends TreeEntity
{
/**
* 产品id
*/
private Long productId;
/**
* 产品名称
*/
@NotBlank(message = "产品名称不能为空")
private String productName;
/**
* 产品状态0正常 1停用
*/
@NotBlank(message = "产品状态0正常 1停用不能为空")
private String status;
}

View File

@ -1,66 +0,0 @@
package com.ruoyi.mf.domain.bo;
import com.ruoyi.mf.domain.MfStudent;
import com.ruoyi.common.orm.core.domain.BaseEntity;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
* 学生信息表业务对象 mf_student
*
* @author 数据小王子
* @date 2023-11-22
*/
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = MfStudent.class, reverseConvertGenerate = false)
public class MfStudentBo extends BaseEntity {
/**
* 编号
*/
private Long studentId;
/**
* 学生名称
*/
@NotBlank(message = "学生名称不能为空")
private String studentName;
/**
* 年龄
*/
@NotNull(message = "年龄不能为空")
private Long studentAge;
/**
* 爱好0代码 1音乐 2电影
*/
@NotBlank(message = "爱好0代码 1音乐 2电影不能为空")
private String studentHobby;
/**
* 性别1男 2女 3未知
*/
@NotBlank(message = "性别1男 2女 3未知不能为空")
private String studentGender;
/**
* 状态0正常 1停用
*/
@NotBlank(message = "状态0正常 1停用不能为空")
private String studentStatus;
/**
* 生日
*/
@NotNull(message = "生日不能为空")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date studentBirthday;
}

View File

@ -1,67 +0,0 @@
package com.ruoyi.mf.domain.vo;
import java.util.List;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.mf.domain.Customer;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.ruoyi.common.excel.annotation.ExcelDictFormat;
import com.ruoyi.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.mybatisflex.annotation.RelationOneToMany;
import com.ruoyi.mf.domain.Goods;
import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import com.ruoyi.common.orm.core.domain.BaseEntity;
/**
* 客户主表视图对象 mf_customer
*
* @author 数据小王子
* @date 2023-12-06
*/
@Data
@ExcelIgnoreUnannotated
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = Customer.class)
public class CustomerVo extends BaseEntity implements Serializable
{
@Serial
private static final long serialVersionUID = 1L;
/** 客户id */
@ExcelProperty(value = "客户id")
private Long customerId;
/** 客户姓名 */
@ExcelProperty(value = "客户姓名")
private String customerName;
/** 手机号码 */
@ExcelProperty(value = "手机号码")
private String phonenumber;
/** 客户性别 */
@ExcelProperty(value = "客户性别", converter = ExcelDictConvert.class)
@ExcelDictFormat(dictType = "sys_user_gender")
private String gender;
/** 客户生日 */
@ExcelProperty(value = "客户生日")
private Date birthday;
/** 客户描述 */
@ExcelProperty(value = "客户描述")
private String remark;
/** 商品子表信息 */
@RelationOneToMany(selfField = "customerId", targetField = "customerId")
private List<Goods> goodsList;
}

View File

@ -1,46 +0,0 @@
package com.ruoyi.mf.domain.vo;
import com.ruoyi.mf.domain.MfProduct;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.ruoyi.common.excel.annotation.ExcelDictFormat;
import com.ruoyi.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import com.ruoyi.common.orm.core.domain.TreeEntity;
/**
* 产品树视图对象 mf_product
*
* @author 数据小王子
* @date 2023-11-23
*/
@Data
@ExcelIgnoreUnannotated
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = MfProduct.class)
public class MfProductVo extends TreeEntity implements Serializable
{
@Serial
private static final long serialVersionUID = 1L;
/** 产品id */
@ExcelProperty(value = "产品id")
private Long productId;
/** 产品名称 */
@ExcelProperty(value = "产品名称")
private String productName;
/** 产品状态0正常 1停用 */
@ExcelProperty(value = "产品状态", converter = ExcelDictConvert.class)
@ExcelDictFormat(dictType = "sys_student_status")
private String status;
}

View File

@ -1,67 +0,0 @@
package com.ruoyi.mf.domain.vo;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.mf.domain.MfStudent;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.ruoyi.common.excel.annotation.ExcelDictFormat;
import com.ruoyi.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import com.ruoyi.common.orm.core.domain.BaseEntity;
import lombok.EqualsAndHashCode;
/**
* 学生信息表视图对象 mf_student
*
* @author 数据小王子
* @date 2023-11-22
*/
@Data
@ExcelIgnoreUnannotated
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = MfStudent.class)
public class MfStudentVo extends BaseEntity implements Serializable
{
@Serial
private static final long serialVersionUID = 1L;
/** 编号 */
@ExcelProperty(value = "编号")
private Long studentId;
/** 学生名称 */
@ExcelProperty(value = "学生名称")
private String studentName;
/** 年龄 */
@ExcelProperty(value = "年龄")
private Long studentAge;
/** 爱好0代码 1音乐 2电影 */
@ExcelProperty(value = "爱好", converter = ExcelDictConvert.class)
@ExcelDictFormat(dictType = "sys_student_hobby")
private String studentHobby;
/** 性别1男 2女 3未知 */
@ExcelProperty(value = "性别", converter = ExcelDictConvert.class)
@ExcelDictFormat(dictType = "sys_user_gender")
private String studentGender;
/** 状态0正常 1停用 */
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
@ExcelDictFormat(dictType = "sys_student_status")
private String studentStatus;
/** 生日 */
@ExcelProperty(value = "生日")
private Date studentBirthday;
}

View File

@ -1,18 +0,0 @@
package com.ruoyi.mf.mapper;
import com.mybatisflex.core.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import com.ruoyi.mf.domain.Customer;
import com.ruoyi.mf.domain.Goods;
/**
* 客户主表Mapper接口
*
* @author 数据小王子
* 2023-12-06
*/
@Mapper
public interface CustomerMapper extends BaseMapper<Customer>
{
}

View File

@ -1,17 +0,0 @@
package com.ruoyi.mf.mapper;
import com.mybatisflex.core.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import com.ruoyi.mf.domain.Goods;
/**
* 商品子表Mapper接口
*
* @author 数据小王子
* 2023-12-06
*/
@Mapper
public interface GoodsMapper extends BaseMapper<Goods>
{
}

View File

@ -1,17 +0,0 @@
package com.ruoyi.mf.mapper;
import com.mybatisflex.core.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import com.ruoyi.mf.domain.MfProduct;
/**
* 产品树Mapper接口
*
* @author 数据小王子
* 2023-11-23
*/
@Mapper
public interface MfProductMapper extends BaseMapper<MfProduct>
{
}

View File

@ -1,17 +0,0 @@
package com.ruoyi.mf.mapper;
import com.mybatisflex.core.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import com.ruoyi.mf.domain.MfStudent;
/**
* 学生信息表Mapper接口
*
* @author 数据小王子
* 2023-11-22
*/
@Mapper
public interface MfStudentMapper extends BaseMapper<MfStudent>
{
}

View File

@ -1,66 +0,0 @@
package com.ruoyi.mf.service;
import java.util.List;
import com.ruoyi.mf.domain.Customer;
import com.ruoyi.mf.domain.vo.CustomerVo;
import com.ruoyi.mf.domain.bo.CustomerBo;
import com.ruoyi.common.orm.core.service.IBaseService;
import com.ruoyi.common.orm.core.page.TableDataInfo;
/**
* 客户主表Service接口
*
* @author 数据小王子
* 2023-12-06
*/
public interface ICustomerService extends IBaseService<Customer>
{
/**
* 查询客户主表
*
* @param customerId 客户主表主键
* @return 客户主表
*/
CustomerVo selectById(Long customerId);
/**
* 查询客户主表列表
*
* @param customerBo 客户主表Bo
* @return 客户主表集合
*/
List<CustomerVo> selectList(CustomerBo customerBo);
/**
* 分页查询客户主表列表
*
* @param customerBo 客户主表Bo
* @return 分页客户主表集合
*/
TableDataInfo<CustomerVo> selectPage(CustomerBo customerBo);
/**
* 新增客户主表
*
* @param customerBo 客户主表Bo
* @return 结果:true 操作成功false 操作失败
*/
boolean insert(CustomerBo customerBo);
/**
* 修改客户主表
*
* @param customerBo 客户主表Bo
* @return 结果:true 更新成功false 更新失败
*/
boolean update(CustomerBo customerBo);
/**
* 批量删除客户主表
*
* @param customerIds 需要删除的客户主表主键集合
* @return 结果:true 删除成功false 删除失败
*/
boolean deleteByIds(Long[] customerIds);
}

View File

@ -1,58 +0,0 @@
package com.ruoyi.mf.service;
import java.util.List;
import com.ruoyi.mf.domain.MfProduct;
import com.ruoyi.mf.domain.vo.MfProductVo;
import com.ruoyi.mf.domain.bo.MfProductBo;
import com.ruoyi.common.orm.core.service.IBaseService;
/**
* 产品树Service接口
*
* @author 数据小王子
* 2023-11-23
*/
public interface IMfProductService extends IBaseService<MfProduct>
{
/**
* 查询产品树
*
* @param productId 产品树主键
* @return 产品树
*/
MfProductVo selectById(Long productId);
/**
* 查询产品树列表
*
* @param mfProductBo 产品树Bo
* @return 产品树集合
*/
List<MfProductVo> selectList(MfProductBo mfProductBo);
/**
* 新增产品树
*
* @param mfProductBo 产品树Bo
* @return 结果:true 操作成功false 操作失败
*/
boolean insert(MfProductBo mfProductBo);
/**
* 修改产品树
*
* @param mfProductBo 产品树Bo
* @return 结果:true 更新成功false 更新失败
*/
boolean update(MfProductBo mfProductBo);
/**
* 批量删除产品树
*
* @param productIds 需要删除的产品树主键集合
* @return 结果:true 删除成功false 删除失败
*/
boolean deleteByIds(Long[] productIds);
}

View File

@ -1,66 +0,0 @@
package com.ruoyi.mf.service;
import java.util.List;
import com.ruoyi.mf.domain.MfStudent;
import com.ruoyi.mf.domain.vo.MfStudentVo;
import com.ruoyi.mf.domain.bo.MfStudentBo;
import com.ruoyi.common.orm.core.service.IBaseService;
import com.ruoyi.common.orm.core.page.TableDataInfo;
/**
* 学生信息表Service接口
*
* @author 数据小王子
* 2023-11-22
*/
public interface IMfStudentService extends IBaseService<MfStudent>
{
/**
* 查询学生信息表
*
* @param studentId 学生信息表主键
* @return 学生信息表
*/
MfStudentVo selectById(Long studentId);
/**
* 查询学生信息表列表
*
* @param mfStudentBo 学生信息表Bo
* @return 学生信息表集合
*/
List<MfStudentVo> selectList(MfStudentBo mfStudentBo);
/**
* 分页查询学生信息表列表
*
* @param mfStudentBo 学生信息表Bo
* @return 分页学生信息表集合
*/
TableDataInfo<MfStudentVo> selectPage(MfStudentBo mfStudentBo);
/**
* 新增学生信息表
*
* @param mfStudentBo 学生信息表Bo
* @return 结果:true 操作成功false 操作失败
*/
boolean insert(MfStudentBo mfStudentBo);
/**
* 修改学生信息表
*
* @param mfStudentBo 学生信息表Bo
* @return 结果:true 更新成功false 更新失败
*/
boolean update(MfStudentBo mfStudentBo);
/**
* 批量删除学生信息表
*
* @param studentIds 需要删除的学生信息表主键集合
* @return 结果:true 删除成功false 删除失败
*/
boolean deleteByIds(Long[] studentIds);
}

View File

@ -1,185 +0,0 @@
package com.ruoyi.mf.service.impl;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import cn.hutool.core.util.ObjectUtil;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import com.ruoyi.common.core.utils.MapstructUtils;
import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.common.orm.core.page.PageQuery;
import com.ruoyi.common.orm.core.page.TableDataInfo;
import com.ruoyi.common.orm.core.service.impl.BaseServiceImpl;
import com.ruoyi.common.core.utils.DateUtils;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Arrays;
import com.ruoyi.mf.domain.Goods;
import com.ruoyi.mf.mapper.GoodsMapper;
import static com.ruoyi.mf.domain.table.GoodsTableDef.GOODS;
import com.ruoyi.mf.mapper.CustomerMapper;
import com.ruoyi.mf.domain.Customer;
import com.ruoyi.mf.domain.bo.CustomerBo;
import com.ruoyi.mf.domain.vo.CustomerVo;
import com.ruoyi.mf.service.ICustomerService;
import static com.ruoyi.mf.domain.table.CustomerTableDef.CUSTOMER;
/**
* 客户主表Service业务层处理
*
* @author 数据小王子
* 2023-12-06
*/
@Service
public class CustomerServiceImpl extends BaseServiceImpl<CustomerMapper, Customer> implements ICustomerService
{
@Resource
private CustomerMapper customerMapper;
@Resource
private GoodsMapper goodsMapper;
@Override
public QueryWrapper query() {
return super.query().from(CUSTOMER);
}
private QueryWrapper buildQueryWrapper(CustomerBo customerBo) {
QueryWrapper queryWrapper = super.buildBaseQueryWrapper();
if (StringUtils.isNotBlank(customerBo.getCustomerName())) {
queryWrapper.and(CUSTOMER.CUSTOMER_NAME.like(customerBo.getCustomerName()));
}
if (StringUtils.isNotBlank(customerBo.getPhonenumber())) {
queryWrapper.and(CUSTOMER.PHONENUMBER.eq(customerBo.getPhonenumber()));
}
if (StringUtils.isNotBlank(customerBo.getGender())) {
queryWrapper.and(CUSTOMER.GENDER.eq(customerBo.getGender()));
}
return queryWrapper;
}
/**
* 查询客户主表
*
* @param customerId 客户主表主键
* @return 客户主表
*/
@Override
public CustomerVo selectById(Long customerId)
{
return customerMapper.selectOneWithRelationsByQueryAs(query().where(CUSTOMER.CUSTOMER_ID.eq(customerId)), CustomerVo.class);
}
/**
* 查询客户主表列表
*
* @param customerBo 客户主表Bo
* @return 客户主表集合
*/
@Override
public List<CustomerVo> selectList(CustomerBo customerBo)
{
QueryWrapper queryWrapper = buildQueryWrapper(customerBo);
return customerMapper.selectListWithRelationsByQueryAs(queryWrapper, CustomerVo.class);
}
/**
* 分页查询客户主表列表
*
* @param customerBo 客户主表Bo
* @return 分页客户主表集合
*/
@Override
public TableDataInfo<CustomerVo> selectPage(CustomerBo customerBo)
{
QueryWrapper queryWrapper = buildQueryWrapper(customerBo);
Page<CustomerVo> page = customerMapper.paginateWithRelationsAs(PageQuery.build(), queryWrapper, CustomerVo.class);
return TableDataInfo.build(page);
}
/**
* 新增客户主表
*
* @param customerBo 客户主表Bo
* @return 结果:true 操作成功false 操作失败
*/
@Transactional
@Override
public boolean insert(CustomerBo customerBo)
{
Customer customer = MapstructUtils.convert(customerBo, Customer.class);
boolean inserted = this.save(customer);//使用全局配置的雪花算法主键生成器生成ID值
if (inserted && ObjectUtil.isNotNull(customer)) {
return insertGoods(customer);
}
return false;
}
/**
* 修改客户主表
*
* @param customerBo 客户主表Bo
* @return 结果:true 更新成功false 更新失败
*/
@Transactional
@Override
public boolean update(CustomerBo customerBo)
{
Customer customer = MapstructUtils.convert(customerBo, Customer.class);
if(ObjectUtil.isNotNull(customer) && ObjectUtil.isNotNull(customer.getCustomerId())) {
boolean updated = this.updateById(customer);
if (updated) {
QueryWrapper queryWrapper = QueryWrapper.create().from(GOODS).where(GOODS.CUSTOMER_ID.eq(customer.getCustomerId()));
goodsMapper.deleteByQuery(queryWrapper);
return insertGoods(customer);
}
}
return false;
}
/**
* 批量删除客户主表
*
* @param customerIds 需要删除的客户主表主键集合
* @return 结果:true 删除成功false 删除失败
*/
@Transactional
@Override
public boolean deleteByIds(Long[] customerIds)
{
QueryWrapper queryWrapper = QueryWrapper.create().from(GOODS).where(GOODS.CUSTOMER_ID.in(Arrays.asList(customerIds)));
goodsMapper.deleteByQuery(queryWrapper);
return this.removeByIds(Arrays.asList(customerIds));
}
/**
* 新增商品子表信息
*
* @param customer 客户主表对象
*/
private boolean insertGoods(Customer customer)
{
List<Goods> goodsList = customer.getGoodsList();
Long customerId = customer.getCustomerId();
if (StringUtils.isNotNull(goodsList))
{
List<Goods> list = new ArrayList<>();
for (Goods goods : goodsList)
{
goods.setCustomerId(customerId);
list.add(goods);
}
if (list.size() > 0)
{
return goodsMapper.insertBatch(list)>0;
}
}
return true;
}
}

View File

@ -1,127 +0,0 @@
package com.ruoyi.mf.service.impl;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import cn.hutool.core.util.ObjectUtil;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import com.ruoyi.common.core.utils.MapstructUtils;
import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.common.orm.core.page.PageQuery;
import com.ruoyi.common.orm.core.page.TableDataInfo;
import com.ruoyi.common.orm.core.service.impl.BaseServiceImpl;
import com.ruoyi.common.core.utils.DateUtils;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.ruoyi.mf.mapper.MfProductMapper;
import com.ruoyi.mf.domain.MfProduct;
import com.ruoyi.mf.domain.bo.MfProductBo;
import com.ruoyi.mf.domain.vo.MfProductVo;
import com.ruoyi.mf.service.IMfProductService;
import static com.ruoyi.mf.domain.table.MfProductTableDef.MF_PRODUCT;
/**
* 产品树Service业务层处理
*
* @author 数据小王子
* 2023-11-23
*/
@Service
public class MfProductServiceImpl extends BaseServiceImpl<MfProductMapper, MfProduct> implements IMfProductService
{
@Resource
private MfProductMapper mfProductMapper;
@Override
public QueryWrapper query() {
return super.query().from(MF_PRODUCT);
}
private QueryWrapper buildQueryWrapper(MfProductBo mfProductBo) {
QueryWrapper queryWrapper = super.buildBaseQueryWrapper();
if (StringUtils.isNotBlank(mfProductBo.getProductName())) {
queryWrapper.and(MF_PRODUCT.PRODUCT_NAME.like(mfProductBo.getProductName()));
}
if (mfProductBo.getOrderNum() != null) {
queryWrapper.and(MF_PRODUCT.ORDER_NUM.eq(mfProductBo.getOrderNum()));
}
if (StringUtils.isNotBlank(mfProductBo.getStatus())) {
queryWrapper.and(MF_PRODUCT.STATUS.eq(mfProductBo.getStatus()));
}
return queryWrapper;
}
/**
* 查询产品树
*
* @param productId 产品树主键
* @return 产品树
*/
@Override
public MfProductVo selectById(Long productId)
{
return this.getOneAs(query().where(MF_PRODUCT.PRODUCT_ID.eq(productId)), MfProductVo.class);
}
/**
* 查询产品树列表
*
* @param mfProductBo 产品树Bo
* @return 产品树集合
*/
@Override
public List<MfProductVo> selectList(MfProductBo mfProductBo)
{
QueryWrapper queryWrapper = buildQueryWrapper(mfProductBo);
return this.listAs(queryWrapper, MfProductVo.class);
}
/**
* 新增产品树
*
* @param mfProductBo 产品树Bo
* @return 结果:true 操作成功false 操作失败
*/
@Override
public boolean insert(MfProductBo mfProductBo)
{
MfProduct mfProduct = MapstructUtils.convert(mfProductBo, MfProduct.class);
return this.save(mfProduct);//使用全局配置的雪花算法主键生成器生成ID值
}
/**
* 修改产品树
*
* @param mfProductBo 产品树Bo
* @return 结果:true 更新成功false 更新失败
*/
@Override
public boolean update(MfProductBo mfProductBo)
{
MfProduct mfProduct = MapstructUtils.convert(mfProductBo, MfProduct.class);
boolean updated = this.updateById(mfProduct);
return updated;
}
/**
* 批量删除产品树
*
* @param productIds 需要删除的产品树主键集合
* @return 结果:true 删除成功false 删除失败
*/
@Transactional
@Override
public boolean deleteByIds(Long[] productIds)
{
return this.removeByIds(Arrays.asList(productIds));
}
}

View File

@ -1,136 +0,0 @@
package com.ruoyi.mf.service.impl;
import java.util.Arrays;
import java.util.List;
import com.mybatisflex.annotation.UseDataSource;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import com.ruoyi.common.core.utils.MapstructUtils;
import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.common.orm.core.page.PageQuery;
import com.ruoyi.common.orm.core.page.TableDataInfo;
import com.ruoyi.common.orm.core.service.impl.BaseServiceImpl;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.ruoyi.mf.mapper.MfStudentMapper;
import com.ruoyi.mf.domain.MfStudent;
import com.ruoyi.mf.domain.bo.MfStudentBo;
import com.ruoyi.mf.domain.vo.MfStudentVo;
import com.ruoyi.mf.service.IMfStudentService;
import static com.ruoyi.mf.domain.table.MfStudentTableDef.MF_STUDENT;
/**
* 学生信息表Service业务层处理
*
* @author 数据小王子
* 2023-11-22
*/
@Service
public class MfStudentServiceImpl extends BaseServiceImpl<MfStudentMapper, MfStudent> implements IMfStudentService
{
@Resource
private MfStudentMapper mfStudentMapper;
@Override
public QueryWrapper query() {
return super.query().from(MF_STUDENT);
}
private QueryWrapper buildQueryWrapper(MfStudentBo mfStudentBo) {
QueryWrapper queryWrapper = super.buildBaseQueryWrapper();
if (StringUtils.isNotBlank(mfStudentBo.getStudentName())) {
queryWrapper.and(MF_STUDENT.STUDENT_NAME.like(mfStudentBo.getStudentName()));
}
if (StringUtils.isNotBlank(mfStudentBo.getStudentStatus())) {
queryWrapper.and(MF_STUDENT.STUDENT_STATUS.eq(mfStudentBo.getStudentStatus()));
}
return queryWrapper;
}
/**
* 查询学生信息表
*
* @param studentId 学生信息表主键
* @return 学生信息表
*/
@Override
public MfStudentVo selectById(Long studentId)
{
return this.getOneAs(query().where(MF_STUDENT.STUDENT_ID.eq(studentId)), MfStudentVo.class);
}
/**
* 查询学生信息表列表
*
* @param mfStudentBo 学生信息表Bo
* @return 学生信息表集合
*/
@Override
public List<MfStudentVo> selectList(MfStudentBo mfStudentBo)
{
QueryWrapper queryWrapper = buildQueryWrapper(mfStudentBo);
return this.listAs(queryWrapper, MfStudentVo.class);
}
/**
* 分页查询学生信息表列表
*
* @param mfStudentBo 学生信息表Bo
* @return 分页学生信息表集合
*/
@Override
//@UseDataSource("ds2")
public TableDataInfo<MfStudentVo> selectPage(MfStudentBo mfStudentBo)
{
QueryWrapper queryWrapper = buildQueryWrapper(mfStudentBo);
Page<MfStudentVo> page = this.pageAs(PageQuery.build(), queryWrapper, MfStudentVo.class);
return TableDataInfo.build(page);
}
/**
* 新增学生信息表
*
* @param mfStudentBo 学生信息表Bo
* @return 结果:true 操作成功false 操作失败
*/
@Override
public boolean insert(MfStudentBo mfStudentBo)
{
MfStudent mfStudent = MapstructUtils.convert(mfStudentBo, MfStudent.class);
return this.save(mfStudent);//使用全局配置的雪花算法主键生成器生成ID值
}
/**
* 修改学生信息表
*
* @param mfStudentBo 学生信息表Bo
* @return 结果:true 更新成功false 更新失败
*/
@Override
public boolean update(MfStudentBo mfStudentBo)
{
MfStudent mfStudent = MapstructUtils.convert(mfStudentBo, MfStudent.class);
boolean updated = this.updateById(mfStudent);
return updated;
}
/**
* 批量删除学生信息表
*
* @param studentIds 需要删除的学生信息表主键集合
* @return 结果:true 删除成功false 删除失败
*/
@Transactional
@Override
public boolean deleteByIds(Long[] studentIds)
{
return this.removeByIds(Arrays.asList(studentIds));
}
}

View File

@ -1,110 +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.ruoyi.demo.mapper.DemoCustomerMapper">
<resultMap type="DemoCustomer" id="DemoCustomerResult">
<result property="customerId" column="customer_id" />
<result property="customerName" column="customer_name" />
<result property="phonenumber" column="phonenumber" />
<result property="sex" column="sex" />
<result property="birthday" column="birthday" />
<result property="remark" column="remark" />
</resultMap>
<resultMap id="DemoCustomerDemoGoodsResult" type="DemoCustomer" extends="DemoCustomerResult">
<collection property="demoGoodsList" notNullColumn="sub_goods_id" javaType="java.util.List" resultMap="DemoGoodsResult" />
</resultMap>
<resultMap type="DemoGoods" id="DemoGoodsResult">
<result property="goodsId" column="sub_goods_id" />
<result property="customerId" column="sub_customer_id" />
<result property="name" column="sub_name" />
<result property="weight" column="sub_weight" />
<result property="price" column="sub_price" />
<result property="date" column="sub_date" />
<result property="type" column="sub_type" />
</resultMap>
<sql id="selectDemoCustomerVo">
select customer_id, customer_name, phonenumber, sex, birthday, remark from demo_customer
</sql>
<select id="selectDemoCustomerList" parameterType="DemoCustomer" resultMap="DemoCustomerResult">
<include refid="selectDemoCustomerVo"/>
<where>
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
<if test="phonenumber != null and phonenumber != ''"> and phonenumber = #{phonenumber}</if>
<if test="sex != null and sex != ''"> and sex = #{sex}</if>
<if test="birthday != null "> and birthday = #{birthday}</if>
</where>
</select>
<select id="selectDemoCustomerByCustomerId" parameterType="Long" resultMap="DemoCustomerDemoGoodsResult">
select a.customer_id, a.customer_name, a.phonenumber, a.sex, a.birthday, a.remark,
b.goods_id as sub_goods_id, b.customer_id as sub_customer_id, b.name as sub_name, b.weight as sub_weight, b.price as sub_price, b.date as sub_date, b.type as sub_type
from demo_customer a
left join demo_goods b on b.customer_id = a.customer_id
where a.customer_id = #{customerId}
</select>
<insert id="insertDemoCustomer" parameterType="DemoCustomer" useGeneratedKeys="true" keyProperty="customerId">
insert into demo_customer
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="customerName != null">customer_name,</if>
<if test="phonenumber != null">phonenumber,</if>
<if test="sex != null">sex,</if>
<if test="birthday != null">birthday,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="customerName != null">#{customerName},</if>
<if test="phonenumber != null">#{phonenumber},</if>
<if test="sex != null">#{sex},</if>
<if test="birthday != null">#{birthday},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateDemoCustomer" parameterType="DemoCustomer">
update demo_customer
<trim prefix="SET" suffixOverrides=",">
<if test="customerName != null">customer_name = #{customerName},</if>
<if test="phonenumber != null">phonenumber = #{phonenumber},</if>
<if test="sex != null">sex = #{sex},</if>
<if test="birthday != null">birthday = #{birthday},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where customer_id = #{customerId}
</update>
<delete id="deleteDemoCustomerByCustomerId" parameterType="Long">
delete from demo_customer where customer_id = #{customerId}
</delete>
<delete id="deleteDemoCustomerByCustomerIds" parameterType="String">
delete from demo_customer where customer_id in
<foreach item="customerId" collection="array" open="(" separator="," close=")">
#{customerId}
</foreach>
</delete>
<delete id="deleteDemoGoodsByCustomerIds" parameterType="String">
delete from demo_goods where customer_id in
<foreach item="customerId" collection="array" open="(" separator="," close=")">
#{customerId}
</foreach>
</delete>
<delete id="deleteDemoGoodsByCustomerId" parameterType="Long">
delete from demo_goods where customer_id = #{customerId}
</delete>
<insert id="batchDemoGoods">
insert into demo_goods( customer_id, name, weight, price, date, type) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.customerId}, #{item.name}, #{item.weight}, #{item.price}, #{item.date}, #{item.type})
</foreach>
</insert>
</mapper>

View File

@ -1,69 +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.ruoyi.demo.mapper.DemoProductMapper">
<resultMap type="DemoProduct" id="DemoProductResult">
<result property="productId" column="product_id" />
<result property="parentId" column="parent_id" />
<result property="productName" column="product_name" />
<result property="orderNum" column="order_num" />
<result property="status" column="status" />
</resultMap>
<sql id="selectDemoProductVo">
select product_id, parent_id, product_name, order_num, status from demo_product
</sql>
<select id="selectDemoProductList" parameterType="DemoProduct" resultMap="DemoProductResult">
<include refid="selectDemoProductVo"/>
<where>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
<if test="status != null and status != ''"> and status = #{status}</if>
</where>
</select>
<select id="selectDemoProductByProductId" parameterType="Long" resultMap="DemoProductResult">
<include refid="selectDemoProductVo"/>
where product_id = #{productId}
</select>
<insert id="insertDemoProduct" parameterType="DemoProduct" useGeneratedKeys="true" keyProperty="productId">
insert into demo_product
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="parentId != null">parent_id,</if>
<if test="productName != null">product_name,</if>
<if test="orderNum != null">order_num,</if>
<if test="status != null">status,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="parentId != null">#{parentId},</if>
<if test="productName != null">#{productName},</if>
<if test="orderNum != null">#{orderNum},</if>
<if test="status != null">#{status},</if>
</trim>
</insert>
<update id="updateDemoProduct" parameterType="DemoProduct">
update demo_product
<trim prefix="SET" suffixOverrides=",">
<if test="parentId != null">parent_id = #{parentId},</if>
<if test="productName != null">product_name = #{productName},</if>
<if test="orderNum != null">order_num = #{orderNum},</if>
<if test="status != null">status = #{status},</if>
</trim>
where product_id = #{productId}
</update>
<delete id="deleteDemoProductByProductId" parameterType="Long">
delete from demo_product where product_id = #{productId}
</delete>
<delete id="deleteDemoProductByProductIds" parameterType="String">
delete from demo_product where product_id in
<foreach item="productId" collection="array" open="(" separator="," close=")">
#{productId}
</foreach>
</delete>
</mapper>

View File

@ -1,77 +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.ruoyi.demo.mapper.DemoStudentMapper">
<resultMap type="DemoStudent" id="DemoStudentResult">
<result property="studentId" column="student_id" />
<result property="studentName" column="student_name" />
<result property="studentAge" column="student_age" />
<result property="studentHobby" column="student_hobby" />
<result property="studentSex" column="student_sex" />
<result property="studentStatus" column="student_status" />
<result property="studentBirthday" column="student_birthday" />
</resultMap>
<sql id="selectDemoStudentVo">
select student_id, student_name, student_age, student_hobby, student_sex, student_status, student_birthday from demo_student
</sql>
<select id="selectDemoStudentList" parameterType="DemoStudent" resultMap="DemoStudentResult">
<include refid="selectDemoStudentVo"/>
<where>
<if test="studentName != null and studentName != ''"> and student_name like concat('%', #{studentName}, '%')</if>
<if test="studentAge != null "> and student_age = #{studentAge}</if>
</where>
</select>
<select id="selectDemoStudentByStudentId" parameterType="Long" resultMap="DemoStudentResult">
<include refid="selectDemoStudentVo"/>
where student_id = #{studentId}
</select>
<insert id="insertDemoStudent" parameterType="DemoStudent" useGeneratedKeys="true" keyProperty="studentId">
insert into demo_student
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="studentName != null and studentName != ''">student_name,</if>
<if test="studentAge != null">student_age,</if>
<if test="studentHobby != null and studentHobby != ''">student_hobby,</if>
<if test="studentSex != null and studentSex != ''">student_sex,</if>
<if test="studentStatus != null and studentStatus != ''">student_status,</if>
<if test="studentBirthday != null">student_birthday,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="studentName != null and studentName != ''">#{studentName},</if>
<if test="studentAge != null">#{studentAge},</if>
<if test="studentHobby != null and studentHobby != ''">#{studentHobby},</if>
<if test="studentSex != null and studentSex != ''">#{studentSex},</if>
<if test="studentStatus != null and studentStatus != ''">#{studentStatus},</if>
<if test="studentBirthday != null">#{studentBirthday},</if>
</trim>
</insert>
<update id="updateDemoStudent" parameterType="DemoStudent">
update demo_student
<trim prefix="SET" suffixOverrides=",">
<if test="studentName != null and studentName != ''">student_name = #{studentName},</if>
<if test="studentAge != null">student_age = #{studentAge},</if>
<if test="studentHobby != null and studentHobby != ''">student_hobby = #{studentHobby},</if>
<if test="studentSex != null and studentSex != ''">student_sex = #{studentSex},</if>
<if test="studentStatus != null and studentStatus != ''">student_status = #{studentStatus},</if>
<if test="studentBirthday != null">student_birthday = #{studentBirthday},</if>
</trim>
where student_id = #{studentId}
</update>
<delete id="deleteDemoStudentByStudentId" parameterType="Long">
delete from demo_student where student_id = #{studentId}
</delete>
<delete id="deleteDemoStudentByStudentIds" parameterType="String">
delete from demo_student where student_id in
<foreach item="studentId" collection="array" open="(" separator="," close=")">
#{studentId}
</foreach>
</delete>
</mapper>

View File

@ -1,7 +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.ruoyi.mf.mapper.CustomerMapper">
</mapper>

View File

@ -1,7 +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.ruoyi.mf.mapper.GoodsMapper">
</mapper>

View File

@ -1,7 +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.ruoyi.mf.mapper.MfProductMapper">
</mapper>

View File

@ -1,7 +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.ruoyi.mf.mapper.MfStudentMapper">
</mapper>

View File

@ -14,84 +14,6 @@
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-- 导出 表 ruoyi-flex.demo_customer 结构
DROP TABLE IF EXISTS `demo_customer`;
CREATE TABLE IF NOT EXISTS `demo_customer` (
`customer_id` bigint NOT NULL AUTO_INCREMENT COMMENT '客户id',
`customer_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '' COMMENT '客户姓名',
`phonenumber` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '' COMMENT '手机号码',
`sex` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '客户性别',
`birthday` datetime DEFAULT NULL COMMENT '客户生日',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '客户描述',
PRIMARY KEY (`customer_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='客户主表';
-- 正在导出表 ruoyi-flex.demo_customer 的数据:~2 rows (大约)
INSERT INTO `demo_customer` (`customer_id`, `customer_name`, `phonenumber`, `sex`, `birthday`, `remark`) VALUES
(1, '哪吒三太子', '188888888', '0', '2023-07-06 00:00:00', '托塔李天王李靖三子啊'),
(4, '李天', '1898989898', '1', '2023-07-03 00:00:00', '总裁');
-- 导出 表 ruoyi-flex.demo_goods 结构
DROP TABLE IF EXISTS `demo_goods`;
CREATE TABLE IF NOT EXISTS `demo_goods` (
`goods_id` bigint NOT NULL AUTO_INCREMENT COMMENT '商品id',
`customer_id` bigint NOT NULL COMMENT '客户id',
`name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '' COMMENT '商品名称',
`weight` int DEFAULT NULL COMMENT '商品重量',
`price` decimal(6,2) DEFAULT NULL COMMENT '商品价格',
`date` datetime DEFAULT NULL COMMENT '商品时间',
`type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '商品种类',
PRIMARY KEY (`goods_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='商品子表';
-- 正在导出表 ruoyi-flex.demo_goods 的数据:~4 rows (大约)
INSERT INTO `demo_goods` (`goods_id`, `customer_id`, `name`, `weight`, `price`, `date`, `type`) VALUES
(1, 1, '乾坤圈', 22, 8000.00, '2023-07-04 00:00:00', '1'),
(2, 1, '风火轮', 10, 90.00, '2023-07-10 00:00:00', '2'),
(4, 4, '华为电脑', 8, 9000.00, '2023-07-03 00:00:00', '1'),
(5, 1, '红缨枪', 10, 60.50, '2023-09-04 00:00:00', '3');
-- 导出 表 ruoyi-flex.demo_product 结构
DROP TABLE IF EXISTS `demo_product`;
CREATE TABLE IF NOT EXISTS `demo_product` (
`product_id` bigint NOT NULL AUTO_INCREMENT COMMENT '产品id',
`parent_id` bigint DEFAULT '0' COMMENT '父产品id',
`product_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '' COMMENT '产品名称',
`order_num` int DEFAULT '0' COMMENT '显示顺序',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '0' COMMENT '产品状态0正常 1停用',
PRIMARY KEY (`product_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='产品表';
-- 正在导出表 ruoyi-flex.demo_product 的数据:~7 rows (大约)
INSERT INTO `demo_product` (`product_id`, `parent_id`, `product_name`, `order_num`, `status`) VALUES
(1, 0, '计算机', 1, '0'),
(2, 1, '台式机', 1, '0'),
(3, 1, '笔记本', 2, '0'),
(5, 0, '图书', 5, '0'),
(6, 5, '小说', 2, '0'),
(8, 5, '小人书', 3, '0'),
(10, 1, '平板电脑', 3, '0');
-- 导出 表 ruoyi-flex.demo_student 结构
DROP TABLE IF EXISTS `demo_student`;
CREATE TABLE IF NOT EXISTS `demo_student` (
`student_id` int NOT NULL AUTO_INCREMENT COMMENT '编号',
`student_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '' COMMENT '学生名称',
`student_age` int DEFAULT NULL COMMENT '年龄',
`student_hobby` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '' COMMENT '爱好0代码 1音乐 2电影',
`student_sex` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '1' COMMENT '性别1男 2女 3未知',
`student_status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '0' COMMENT '状态0正常 1停用',
`student_birthday` datetime DEFAULT NULL COMMENT '生日',
PRIMARY KEY (`student_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='学生信息单表';
-- 正在导出表 ruoyi-flex.demo_student 的数据:~3 rows (大约)
INSERT INTO `demo_student` (`student_id`, `student_name`, `student_age`, `student_hobby`, `student_sex`, `student_status`, `student_birthday`) VALUES
(1, '陈长安', 19, '2', '1', '1', '2023-07-06 00:00:00'),
(2, '李白', 28, '0', '0', '0', '2023-07-01 00:00:00'),
(5, '白居易', 0, '2', '0', '0', '2023-09-12 00:00:00'),
(6, '王五', 65, '1', '0', '0', '1940-12-04 00:00:00');
-- 导出 表 ruoyi-flex.gen_table 结构 -- 导出 表 ruoyi-flex.gen_table 结构
DROP TABLE IF EXISTS `gen_table`; DROP TABLE IF EXISTS `gen_table`;
CREATE TABLE IF NOT EXISTS `gen_table` ( CREATE TABLE IF NOT EXISTS `gen_table` (
@ -118,13 +40,6 @@ CREATE TABLE IF NOT EXISTS `gen_table` (
PRIMARY KEY (`table_id`) PRIMARY KEY (`table_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='代码生成业务表'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='代码生成业务表';
-- 正在导出表 ruoyi-flex.gen_table 的数据:~5 rows (大约)
INSERT INTO `gen_table` (`table_id`, `table_name`, `table_comment`, `sub_table_name`, `sub_table_fk_name`, `class_name`, `tpl_category`, `package_name`, `module_name`, `business_name`, `function_name`, `function_author`, `gen_type`, `gen_path`, `options`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
(13, 'mf_student', '学生信息单表', NULL, NULL, 'Student', 'crud', 'com.ruoyi.mf', 'mf', 'student', '学生信息表', '数据小王子', '0', '/', '{"parentMenuId":"2018"}', 1, '2023-11-17 14:12:07', 0, '2023-12-04 15:59:36', 'mybatis-flex版本的学生信息单表演示'),
(15, 'mf_product', '产品树表', '', '', 'MfProduct', 'tree', 'com.ruoyi.mf', 'mf', 'product', '产品树', '数据小王子', '0', '/', '{"treeCode":"product_id","treeName":"product_name","treeParentCode":"parent_id","parentMenuId":"2018"}', 1, '2023-11-22 22:44:33', 0, '2023-11-23 10:57:43', 'mybatis-flex版本的产品树表演示'),
(16, 'mf_customer', '客户主表', 'mf_goods', 'customer_id', 'Customer', 'sub', 'com.ruoyi.mf', 'mf', 'customer', '客户主表', '数据小王子', '0', '/', '{"parentMenuId":"2018"}', 1, '2023-12-04 22:19:16', 0, '2023-12-05 09:41:57', 'mybatis-flex格式的主子表测试'),
(17, 'mf_goods', '商品子表', NULL, NULL, 'Goods', 'crud', 'com.ruoyi.demo', 'demo', 'goods', '商品子表', '数据小王子', '0', '/', '{}', 1, '2023-12-04 22:22:22', 0, '2023-12-05 10:50:30', NULL);
-- 导出 表 ruoyi-flex.gen_table_column 结构 -- 导出 表 ruoyi-flex.gen_table_column 结构
DROP TABLE IF EXISTS `gen_table_column`; DROP TABLE IF EXISTS `gen_table_column`;
CREATE TABLE IF NOT EXISTS `gen_table_column` ( CREATE TABLE IF NOT EXISTS `gen_table_column` (
@ -531,7 +446,7 @@ CREATE TABLE IF NOT EXISTS `sys_client` (
`active_timeout` int DEFAULT '1800' COMMENT 'token活跃超时时间', `active_timeout` int DEFAULT '1800' COMMENT 'token活跃超时时间',
`timeout` int DEFAULT '604800' COMMENT 'token固定超时', `timeout` int DEFAULT '604800' COMMENT 'token固定超时',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '0' COMMENT '状态0正常 1停用', `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '0' COMMENT '状态0正常 1停用',
`del_flag` smallint DEFAULT '0' COMMENT '删除标志0代表存在 1代表删除', `del_flag` smallint DEFAULT '0' COMMENT '删除标志0代表存在 1代表删除',
`create_by` bigint DEFAULT NULL COMMENT '创建者', `create_by` bigint DEFAULT NULL COMMENT '创建者',
`create_time` datetime DEFAULT NULL COMMENT '创建时间', `create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` bigint DEFAULT NULL COMMENT '更新者', `update_by` bigint DEFAULT NULL COMMENT '更新者',
@ -568,9 +483,9 @@ INSERT INTO `sys_config` (`config_id`, `config_name`, `config_key`, `config_valu
(3, '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 1, '2023-06-03 21:32:30', 1, NULL, '深色主题theme-dark浅色主题theme-light'), (3, '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 1, '2023-06-03 21:32:30', 1, NULL, '深色主题theme-dark浅色主题theme-light'),
(4, '账号自助-验证码开关', 'sys.account.captchaEnabled', 'true', 'Y', 1, '2023-06-03 21:32:30', 1, '2023-09-13 16:49:39', '是否开启验证码功能true开启false关闭'), (4, '账号自助-验证码开关', 'sys.account.captchaEnabled', 'true', 'Y', 1, '2023-06-03 21:32:30', 1, '2023-09-13 16:49:39', '是否开启验证码功能true开启false关闭'),
(5, '账号自助-是否开启用户注册功能', 'sys.account.registerUser', 'false', 'N', 1, '2023-06-03 21:32:30', 1, '2023-09-13 17:16:25', '是否开启注册用户功能true开启false关闭'), (5, '账号自助-是否开启用户注册功能', 'sys.account.registerUser', 'false', 'N', 1, '2023-06-03 21:32:30', 1, '2023-09-13 17:16:25', '是否开启注册用户功能true开启false关闭'),
(6, '用户登录-黑名单列表', 'sys.login.blackIPList', '', 'Y', 1, '2023-06-03 21:32:30', 1, NULL, '设置登录IP黑名单限制多个匹配项以;分隔,支持匹配(*通配、网段)'), (6, '用户登录-黑名单列表', 'sys.login.blackIPList', '', 'Y', 1, '2023-06-03 21:32:30', 1, NULL, '设置登录IP黑名单限制多个匹配项以;分隔,支持匹配(*通配、网段)'),
(11, 'OSS预览列表资源开关', 'sys.oss.previewListResource', 'true', 'Y', 1, '2023-09-30 21:55:15', 1, '2023-12-10 19:49:53', 'true:开启, false:关闭'); (11, 'OSS预览列表资源开关', 'sys.oss.previewListResource', 'true', 'Y', 1, '2023-09-30 21:55:15', 1, '2023-12-10 19:49:53', 'true:开启, false:关闭');
-- 导出 表 ruoyi-flex.sys_dept 结构 -- 导出 表 ruoyi-flex.sys_dept 结构
DROP TABLE IF EXISTS `sys_dept`; DROP TABLE IF EXISTS `sys_dept`;
@ -847,44 +762,7 @@ INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`
(1057, '生成删除', 116, 3, '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:remove', '#', 1, '2023-06-03 21:32:29', 1, NULL, ''), (1057, '生成删除', 116, 3, '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:remove', '#', 1, '2023-06-03 21:32:29', 1, NULL, ''),
(1058, '导入代码', 116, 4, '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:import', '#', 1, '2023-06-03 21:32:29', 1, NULL, ''), (1058, '导入代码', 116, 4, '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:import', '#', 1, '2023-06-03 21:32:29', 1, NULL, ''),
(1059, '预览代码', 116, 5, '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:preview', '#', 1, '2023-06-03 21:32:29', 1, NULL, ''), (1059, '预览代码', 116, 5, '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:preview', '#', 1, '2023-06-03 21:32:29', 1, NULL, ''),
(1060, '生成代码', 116, 6, '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:code', '#', 1, '2023-06-03 21:32:29', 1, NULL, ''), (1060, '生成代码', 116, 6, '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:code', '#', 1, '2023-06-03 21:32:29', 1, NULL, '');
(2018, '演示模块', 0, 99, 'demo', NULL, NULL, 1, 0, 'M', '0', '0', '', 'people', 1, '2023-07-04 11:08:44', 1, '2023-09-02 20:09:55', ''),
(2050, '学生信息单表(mb)', 2018, 1, 'student', 'demo/student/index', NULL, 1, 0, 'C', '0', '0', 'demo:student:list', 'component', 1, '2023-07-09 12:17:40', 1, '2023-11-17 09:21:30', '学生信息单表(mb)菜单'),
(2051, '学生信息单表(mb)查询', 2050, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:student:query', '#', 1, '2023-07-09 12:17:40', 1, NULL, ''),
(2052, '学生信息单表(mb)新增', 2050, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:student:add', '#', 1, '2023-07-09 12:17:40', 1, NULL, ''),
(2053, '学生信息单表(mb)修改', 2050, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:student:edit', '#', 1, '2023-07-09 12:17:40', 1, NULL, ''),
(2054, '学生信息单表(mb)删除', 2050, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:student:remove', '#', 1, '2023-07-09 12:17:40', 1, NULL, ''),
(2055, '学生信息单表(mb)导出', 2050, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:student:export', '#', 1, '2023-07-09 12:17:40', 1, NULL, ''),
(2056, '产品树表mb', 2018, 2, 'product', 'demo/product/index', NULL, 1, 0, 'C', '0', '0', 'demo:product:list', '#', 1, '2023-07-09 20:59:25', 1, NULL, '产品树表mb菜单'),
(2057, '产品树表mb查询', 2056, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:product:query', '#', 1, '2023-07-09 20:59:25', 1, NULL, ''),
(2058, '产品树表mb新增', 2056, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:product:add', '#', 1, '2023-07-09 20:59:25', 1, NULL, ''),
(2059, '产品树表mb修改', 2056, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:product:edit', '#', 1, '2023-07-09 20:59:25', 1, NULL, ''),
(2060, '产品树表mb删除', 2056, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:product:remove', '#', 1, '2023-07-09 20:59:25', 1, NULL, ''),
(2061, '产品树表mb导出', 2056, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:product:export', '#', 1, '2023-07-09 20:59:25', 1, NULL, ''),
(2062, '客户主表(mb)', 2018, 3, 'customer', 'demo/customer/index', NULL, 1, 0, 'C', '0', '0', 'demo:customer:list', '#', 1, '2023-07-11 16:06:23', 1, NULL, '客户主表(mb)菜单'),
(2063, '客户主表(mb)查询', 2062, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:customer:query', '#', 1, '2023-07-11 16:06:23', 1, NULL, ''),
(2064, '客户主表(mb)新增', 2062, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:customer:add', '#', 1, '2023-07-11 16:06:23', 1, NULL, ''),
(2065, '客户主表(mb)修改', 2062, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:customer:edit', '#', 1, '2023-07-11 16:06:23', 1, NULL, ''),
(2066, '客户主表(mb)删除', 2062, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:customer:remove', '#', 1, '2023-07-11 16:06:23', 1, NULL, ''),
(2067, '客户主表(mb)导出', 2062, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:customer:export', '#', 1, '2023-07-11 16:06:23', 1, NULL, ''),
(2071, '学生信息表', 2018, 4, 'mfstudent', 'mf/student/index', NULL, 1, 0, 'C', '0', '0', 'mf:student:list', '#', 1, '2023-11-22 17:30:46', 1, '2023-12-07 14:35:16', '学生信息表菜单'),
(2072, '学生信息表查询', 2071, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'mf:student:query', '#', 1, '2023-11-22 17:30:46', 1, NULL, ''),
(2073, '学生信息表新增', 2071, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'mf:student:add', '#', 1, '2023-11-22 17:30:46', 1, NULL, ''),
(2074, '学生信息表修改', 2071, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'mf:student:edit', '#', 1, '2023-11-22 17:30:46', 1, NULL, ''),
(2075, '学生信息表删除', 2071, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'mf:student:remove', '#', 1, '2023-11-22 17:30:46', 1, NULL, ''),
(2076, '学生信息表导出', 2071, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'mf:student:export', '#', 1, '2023-11-22 17:30:46', 1, NULL, ''),
(2077, '产品树表', 2018, 5, 'mfproduct', 'mf/product/index', NULL, 1, 0, 'C', '0', '0', 'mf:product:list', '#', 1, '2023-11-23 10:53:54', 1, '2023-12-07 14:35:12', '产品树菜单'),
(2078, '产品树查询', 2077, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'mf:product:query', '#', 1, '2023-11-23 10:53:54', 1, NULL, ''),
(2079, '产品树新增', 2077, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'mf:product:add', '#', 1, '2023-11-23 10:53:54', 1, NULL, ''),
(2080, '产品树修改', 2077, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'mf:product:edit', '#', 1, '2023-11-23 10:53:54', 1, NULL, ''),
(2081, '产品树删除', 2077, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'mf:product:remove', '#', 1, '2023-11-23 10:53:54', 1, NULL, ''),
(2082, '产品树导出', 2077, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'mf:product:export', '#', 1, '2023-11-23 10:53:54', 1, NULL, ''),
(2023121511351900, '客户主表', 2018, 6, 'mfcustomer', 'mf/customer/index', NULL, 1, 0, 'C', '0', '0', 'mf:customer:list', '#', 1, '2023-12-15 11:36:19', 1, NULL, '客户主表菜单'),
(2023121511351901, '客户主表查询', 2023121511351900, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'mf:customer:query', '#', 1, '2023-12-15 11:36:19', 1, NULL, ''),
(2023121511351902, '客户主表新增', 2023121511351900, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'mf:customer:add', '#', 1, '2023-12-15 11:36:19', 1, NULL, ''),
(2023121511351903, '客户主表修改', 2023121511351900, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'mf:customer:edit', '#', 1, '2023-12-15 11:36:19', 1, NULL, ''),
(2023121511351904, '客户主表删除', 2023121511351900, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'mf:customer:remove', '#', 1, '2023-12-15 11:36:19', 1, NULL, ''),
(2023121511351905, '客户主表导出', 2023121511351900, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'mf:customer:export', '#', 1, '2023-12-15 11:36:19', 1, NULL, '');
-- 导出 表 ruoyi-flex.sys_notice 结构 -- 导出 表 ruoyi-flex.sys_notice 结构
DROP TABLE IF EXISTS `sys_notice`; DROP TABLE IF EXISTS `sys_notice`;

View File

@ -1,81 +1,8 @@
drop table if exists demo_student;
create table if not exists demo_student (
student_id BIGSERIAL,
student_name varchar(30) not null,
student_age integer,
student_hobby varchar(30) not null,
student_sex char not null,
student_status char default '0'::bpchar,
student_birthday timestamp,
constraint "demo_student_pk" primary key (student_id)
);
comment on table demo_student is '学生信息单表(mb)';
comment on column demo_student.student_id is '编号';
comment on column demo_student.student_name is '学生名称';
comment on column demo_student.student_age is '年龄';
comment on column demo_student.student_hobby is '爱好0代码 1音乐 2电影';
comment on column demo_student.student_sex is '性别1男 2女 3未知';
comment on column demo_student.student_status is '状态0正常 1停用';
comment on column demo_student.student_birthday is '生日';
drop table if exists demo_product;
create table if not exists demo_product (
product_id BIGSERIAL NOT NULL,
parent_id bigint NULL DEFAULT 0,
product_name varchar(30) NOT NULL,
order_num INTEGER DEFAULT 0,
status char(1) NULL DEFAULT '0',
constraint "demo_product_pk" PRIMARY KEY (product_id)
);
comment on table demo_product is '产品树表(mb)';
comment on column demo_product.product_id is '产品id';
comment on column demo_product.parent_id is '父产品id';
comment on column demo_product.product_name is '产品名称';
comment on column demo_product.order_num is '显示顺序';
comment on column demo_product.status is '产品状态0正常 1停用';
drop table if exists demo_customer;
create table if not exists demo_customer (
customer_id BIGSERIAL NOT NULL,
customer_name varchar(30) not null DEFAULT '',
phonenumber varchar(11) NULL DEFAULT NULL,
sex char(1) NULL DEFAULT NULL,
birthday TIMESTAMP NULL DEFAULT NULL,
remark varchar(500) NULL DEFAULT NULL,
constraint "demo_customer_pk" PRIMARY KEY (customer_id)
);
comment on table demo_customer is '客户主表(mb)';
comment on column demo_customer.customer_id is '客户id';
comment on column demo_customer.customer_name is '客户姓名';
comment on column demo_customer.phonenumber is '手机号码';
comment on column demo_customer.sex is '客户性别';
comment on column demo_customer.birthday is '客户生日';
comment on column demo_customer.remark is '客户描述';
DROP TABLE IF EXISTS demo_goods;
CREATE TABLE IF NOT EXISTS demo_goods (
goods_id BIGSERIAL NOT NULL,
customer_id bigint NOT NULL,
name varchar(30) NULL DEFAULT NULL,
weight INTEGER NULL DEFAULT 0,
price decimal(6,2) NULL DEFAULT NULL,
"date" timestamp NULL DEFAULT NULL,
"type" char(1) NULL DEFAULT NULL,
constraint "demo_goods_pk" PRIMARY KEY (goods_id)
);
comment on table demo_goods is '商品子表(mb)';
comment on column demo_goods.goods_id is '商品id';
comment on column demo_goods.customer_id is '客户id';
comment on column demo_goods.name is '商品名称';
comment on column demo_goods.weight is '商品重量';
comment on column demo_goods.price is '商品价格';
comment on column demo_goods."date" is '商品时间';
comment on column demo_goods."type" is '商品种类';
drop table if exists gen_table; drop table if exists gen_table;
create table if not exists gen_table create table if not exists gen_table
( (
table_id bigint, table_id bigint,
table_name varchar(200) default ''::varchar, table_name varchar(200) default ''::varchar,
table_comment varchar(500) default ''::varchar, table_comment varchar(500) default ''::varchar,
sub_table_name varchar(64) default ''::varchar, sub_table_name varchar(64) default ''::varchar,
@ -89,7 +16,7 @@ create table if not exists gen_table
function_author varchar(50) default null::varchar, function_author varchar(50) default null::varchar,
gen_type char default '0'::bpchar not null, gen_type char default '0'::bpchar not null,
gen_path varchar(200) default '/'::varchar, gen_path varchar(200) default '/'::varchar,
options varchar(1000) default null::varchar, options varchar(1000) default null::varchar,
create_by bigint, create_by bigint,
create_time timestamp, create_time timestamp,
update_by bigint, update_by bigint,
@ -120,12 +47,6 @@ comment on column gen_table.update_by is '更新者';
comment on column gen_table.update_time is '更新时间'; comment on column gen_table.update_time is '更新时间';
comment on column gen_table.remark is '备注'; comment on column gen_table.remark is '备注';
INSERT INTO gen_table VALUES
(13, 'mf_student', '学生信息单表', NULL, NULL, 'Student', 'crud', 'com.ruoyi.mf', 'mf', 'student', '学生信息表', '数据小王子', '0', '/', '{"parentMenuId":"2018"}', 1, '2023-11-17 14:12:07', 0, '2023-12-04 15:59:36', 'mybatis-flex版本的学生信息单表演示'),
(15, 'mf_product', '产品树表', '', '', 'MfProduct', 'tree', 'com.ruoyi.mf', 'mf', 'product', '产品树', '数据小王子', '0', '/', '{"treeCode":"product_id","treeName":"product_name","treeParentCode":"parent_id","parentMenuId":"2018"}', 1, '2023-11-22 22:44:33', 0, '2023-11-23 10:57:43', 'mybatis-flex版本的产品树表演示'),
(16, 'mf_customer', '客户主表', 'mf_goods', 'customer_id', 'Customer', 'sub', 'com.ruoyi.mf', 'mf', 'customer', '客户主表', '数据小王子', '0', '/', '{"parentMenuId":"2018"}', 1, '2023-12-04 22:19:16', 0, '2023-12-05 09:41:57', 'mybatis-flex格式的主子表测试'),
(17, 'mf_goods', '商品子表', NULL, NULL, 'Goods', 'crud', 'com.ruoyi.demo', 'demo', 'goods', '商品子表', '数据小王子', '0', '/', '{}', 1, '2023-12-04 22:22:22', 0, '2023-12-05 10:50:30', NULL);
drop table if exists gen_table_column; drop table if exists gen_table_column;
create table if not exists gen_table_column create table if not exists gen_table_column
( (
@ -146,7 +67,7 @@ create table if not exists gen_table_column
query_type varchar(200) default 'EQ'::varchar, query_type varchar(200) default 'EQ'::varchar,
html_type varchar(200) default null::varchar, html_type varchar(200) default null::varchar,
dict_type varchar(200) default ''::varchar, dict_type varchar(200) default ''::varchar,
sort int4, sort int4,
create_by bigint, create_by bigint,
create_time timestamp, create_time timestamp,
update_by bigint, update_by bigint,
@ -229,12 +150,12 @@ create table if not exists mf_student (
student_hobby varchar(30) not null, student_hobby varchar(30) not null,
student_gender char not null, student_gender char not null,
student_status char default '0'::bpchar, student_status char default '0'::bpchar,
student_birthday timestamp, student_birthday timestamp,
create_by bigint, create_by bigint,
create_time timestamp, create_time timestamp,
update_by bigint, update_by bigint,
update_time timestamp, update_time timestamp,
constraint "mf_student_pk" primary key (student_id) constraint "mf_student_pk" primary key (student_id)
); );
comment on table mf_student is '学生信息单表'; comment on table mf_student is '学生信息单表';
comment on column mf_student.student_id is '编号'; comment on column mf_student.student_id is '编号';
@ -260,7 +181,7 @@ create table if not exists mf_product (
create_time TIMESTAMP NULL DEFAULT NULL, create_time TIMESTAMP NULL DEFAULT NULL,
update_by BIGINT NULL DEFAULT NULL, update_by BIGINT NULL DEFAULT NULL,
update_time TIMESTAMP NULL DEFAULT NULL, update_time TIMESTAMP NULL DEFAULT NULL,
constraint "mf_product_pk" PRIMARY KEY (product_id) constraint "mf_product_pk" PRIMARY KEY (product_id)
); );
comment on table mf_product is '产品树表'; comment on table mf_product is '产品树表';
comment on column mf_product.product_id is '产品id'; comment on column mf_product.product_id is '产品id';
@ -285,7 +206,7 @@ create table if not exists mf_customer (
create_time TIMESTAMP NULL DEFAULT NULL, create_time TIMESTAMP NULL DEFAULT NULL,
update_by BIGINT NULL DEFAULT NULL, update_by BIGINT NULL DEFAULT NULL,
update_time TIMESTAMP NULL DEFAULT NULL, update_time TIMESTAMP NULL DEFAULT NULL,
constraint "mf_customer_pk" PRIMARY KEY (customer_id) constraint "mf_customer_pk" PRIMARY KEY (customer_id)
); );
comment on table mf_customer is '客户主表'; comment on table mf_customer is '客户主表';
comment on column mf_customer.customer_id is '客户id'; comment on column mf_customer.customer_id is '客户id';
@ -312,7 +233,7 @@ CREATE TABLE IF NOT EXISTS mf_goods (
create_time TIMESTAMP NULL DEFAULT NULL, create_time TIMESTAMP NULL DEFAULT NULL,
update_by BIGINT NULL DEFAULT NULL, update_by BIGINT NULL DEFAULT NULL,
update_time TIMESTAMP NULL DEFAULT NULL, update_time TIMESTAMP NULL DEFAULT NULL,
constraint "mf_goods_pk" PRIMARY KEY (goods_id) constraint "mf_goods_pk" PRIMARY KEY (goods_id)
); );
comment on table mf_goods is '商品子表'; comment on table mf_goods is '商品子表';
comment on column mf_goods.goods_id is '商品id'; comment on column mf_goods.goods_id is '商品id';
@ -537,7 +458,7 @@ create table sys_client (
active_timeout int4 default 1800, active_timeout int4 default 1800,
timeout int4 default 604800, timeout int4 default 604800,
status char(1) default '0'::bpchar, status char(1) default '0'::bpchar,
del_flag smallint default 0, del_flag smallint default 0,
create_by bigint, create_by bigint,
create_time timestamp, create_time timestamp,
update_by bigint, update_by bigint,
@ -567,11 +488,11 @@ insert into sys_client values (2, '428a8310cd442757ae699df5d894f051', 'app', 'ap
drop table if exists sys_config; drop table if exists sys_config;
create table if not exists sys_config create table if not exists sys_config
( (
config_id bigint, config_id bigint,
config_name varchar(100) default ''::varchar, config_name varchar(100) default ''::varchar,
config_key varchar(100) default ''::varchar, config_key varchar(100) default ''::varchar,
config_value varchar(500) default ''::varchar, config_value varchar(500) default ''::varchar,
config_type char default 'N'::bpchar, config_type char default 'N'::bpchar,
create_by bigint, create_by bigint,
create_time timestamp, create_time timestamp,
update_by bigint, update_by bigint,
@ -601,7 +522,7 @@ insert into sys_config values(11, 'OSS预览列表资源开关', 'sys.o
drop table if exists sys_dept; drop table if exists sys_dept;
create table if not exists sys_dept create table if not exists sys_dept
( (
dept_id bigint, dept_id bigint,
parent_id bigint default 0, parent_id bigint default 0,
ancestors varchar(760) default ''::varchar, ancestors varchar(760) default ''::varchar,
dept_name varchar(30) default ''::varchar, dept_name varchar(30) default ''::varchar,
@ -610,7 +531,7 @@ create table if not exists sys_dept
phone varchar(11) default null::varchar, phone varchar(11) default null::varchar,
email varchar(50) default null::varchar, email varchar(50) default null::varchar,
status char default '0'::bpchar, status char default '0'::bpchar,
del_flag smallint default 0, del_flag smallint default 0,
create_by bigint, create_by bigint,
create_time timestamp, create_time timestamp,
update_by bigint, update_by bigint,
@ -658,14 +579,14 @@ INSERT INTO sys_dept VALUES
drop table if exists sys_dict_data; drop table if exists sys_dict_data;
create table if not exists sys_dict_data create table if not exists sys_dict_data
( (
dict_code bigint, dict_code bigint,
dict_sort int4 default 0, dict_sort int4 default 0,
dict_label varchar(100) default ''::varchar, dict_label varchar(100) default ''::varchar,
dict_value varchar(100) default ''::varchar, dict_value varchar(100) default ''::varchar,
dict_type varchar(100) default ''::varchar, dict_type varchar(100) default ''::varchar,
css_class varchar(100) default null::varchar, css_class varchar(100) default null::varchar,
list_class varchar(100) default null::varchar, list_class varchar(100) default null::varchar,
is_default char default 'N'::bpchar, is_default char default 'N'::bpchar,
create_by bigint, create_by bigint,
create_time timestamp, create_time timestamp,
update_by bigint, update_by bigint,
@ -744,9 +665,9 @@ INSERT INTO sys_dict_data VALUES
drop table if exists sys_dict_type; drop table if exists sys_dict_type;
create table if not exists sys_dict_type create table if not exists sys_dict_type
( (
dict_id bigint, dict_id bigint,
dict_name varchar(100) default ''::varchar, dict_name varchar(100) default ''::varchar,
dict_type varchar(100) default ''::varchar, dict_type varchar(100) default ''::varchar,
create_by bigint, create_by bigint,
create_time timestamp, create_time timestamp,
update_by bigint, update_by bigint,
@ -788,8 +709,8 @@ INSERT INTO sys_dict_type VALUES
drop table if exists sys_logininfor; drop table if exists sys_logininfor;
create table if not exists sys_logininfor create table if not exists sys_logininfor
( (
info_id bigint, info_id bigint,
user_name varchar(50) default ''::varchar, user_name varchar(50) default ''::varchar,
ipaddr varchar(128) default ''::varchar, ipaddr varchar(128) default ''::varchar,
login_location varchar(255) default ''::varchar, login_location varchar(255) default ''::varchar,
browser varchar(50) default ''::varchar, browser varchar(50) default ''::varchar,
@ -830,7 +751,7 @@ create table if not exists sys_menu
visible char default '0'::bpchar, visible char default '0'::bpchar,
status char default '0'::bpchar, status char default '0'::bpchar,
perms varchar(100) default null::varchar, perms varchar(100) default null::varchar,
icon varchar(100) default '#'::varchar, icon varchar(100) default '#'::varchar,
create_by bigint, create_by bigint,
create_time timestamp, create_time timestamp,
update_by bigint, update_by bigint,
@ -945,25 +866,6 @@ INSERT INTO sys_menu VALUES
(1058, '导入代码', 116, 4, '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:import', '#', 1, '2023-06-03 21:32:29', 1, NULL, ''), (1058, '导入代码', 116, 4, '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:import', '#', 1, '2023-06-03 21:32:29', 1, NULL, ''),
(1059, '预览代码', 116, 5, '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:preview', '#', 1, '2023-06-03 21:32:29', 1, NULL, ''), (1059, '预览代码', 116, 5, '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:preview', '#', 1, '2023-06-03 21:32:29', 1, NULL, ''),
(1060, '生成代码', 116, 6, '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:code', '#', 1, '2023-06-03 21:32:29', 1, NULL, ''), (1060, '生成代码', 116, 6, '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:code', '#', 1, '2023-06-03 21:32:29', 1, NULL, ''),
(2018, '演示模块', 0, 99, 'demo', NULL, NULL, 1, 0, 'M', '0', '0', '', 'people', 1, '2023-07-04 11:08:44', 1, '2023-09-02 20:09:55', ''),
(2050, '学生信息单表(mb)', 2018, 1, 'student', 'demo/student/index', NULL, 1, 0, 'C', '0', '0', 'demo:student:list', 'component', 1, '2023-07-09 12:17:40', 1, '2023-11-17 09:21:30', '学生信息单表(mb)菜单'),
(2051, '学生信息单表(mb)查询', 2050, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:student:query', '#', 1, '2023-07-09 12:17:40', 1, NULL, ''),
(2052, '学生信息单表(mb)新增', 2050, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:student:add', '#', 1, '2023-07-09 12:17:40', 1, NULL, ''),
(2053, '学生信息单表(mb)修改', 2050, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:student:edit', '#', 1, '2023-07-09 12:17:40', 1, NULL, ''),
(2054, '学生信息单表(mb)删除', 2050, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:student:remove', '#', 1, '2023-07-09 12:17:40', 1, NULL, ''),
(2055, '学生信息单表(mb)导出', 2050, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:student:export', '#', 1, '2023-07-09 12:17:40', 1, NULL, ''),
(2056, '产品树表mb', 2018, 2, 'product', 'demo/product/index', NULL, 1, 0, 'C', '0', '0', 'demo:product:list', '#', 1, '2023-07-09 20:59:25', 1, NULL, '产品树表mb菜单'),
(2057, '产品树表mb查询', 2056, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:product:query', '#', 1, '2023-07-09 20:59:25', 1, NULL, ''),
(2058, '产品树表mb新增', 2056, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:product:add', '#', 1, '2023-07-09 20:59:25', 1, NULL, ''),
(2059, '产品树表mb修改', 2056, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:product:edit', '#', 1, '2023-07-09 20:59:25', 1, NULL, ''),
(2060, '产品树表mb删除', 2056, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:product:remove', '#', 1, '2023-07-09 20:59:25', 1, NULL, ''),
(2061, '产品树表mb导出', 2056, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:product:export', '#', 1, '2023-07-09 20:59:25', 1, NULL, ''),
(2062, '客户主表(mb)', 2018, 3, 'customer', 'demo/customer/index', NULL, 1, 0, 'C', '0', '0', 'demo:customer:list', '#', 1, '2023-07-11 16:06:23', 1, NULL, '客户主表(mb)菜单'),
(2063, '客户主表(mb)查询', 2062, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:customer:query', '#', 1, '2023-07-11 16:06:23', 1, NULL, ''),
(2064, '客户主表(mb)新增', 2062, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:customer:add', '#', 1, '2023-07-11 16:06:23', 1, NULL, ''),
(2065, '客户主表(mb)修改', 2062, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:customer:edit', '#', 1, '2023-07-11 16:06:23', 1, NULL, ''),
(2066, '客户主表(mb)删除', 2062, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:customer:remove', '#', 1, '2023-07-11 16:06:23', 1, NULL, ''),
(2067, '客户主表(mb)导出', 2062, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'demo:customer:export', '#', 1, '2023-07-11 16:06:23', 1, NULL, ''),
(2071, '学生信息表', 2018, 4, 'mfstudent', 'mf/student/index', NULL, 1, 0, 'C', '0', '0', 'mf:student:list', '#', 1, '2023-11-22 17:30:46', 1, '2023-12-07 14:35:16', '学生信息表菜单'), (2071, '学生信息表', 2018, 4, 'mfstudent', 'mf/student/index', NULL, 1, 0, 'C', '0', '0', 'mf:student:list', '#', 1, '2023-11-22 17:30:46', 1, '2023-12-07 14:35:16', '学生信息表菜单'),
(2072, '学生信息表查询', 2071, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'mf:student:query', '#', 1, '2023-11-22 17:30:46', 1, NULL, ''), (2072, '学生信息表查询', 2071, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'mf:student:query', '#', 1, '2023-11-22 17:30:46', 1, NULL, ''),
(2073, '学生信息表新增', 2071, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'mf:student:add', '#', 1, '2023-11-22 17:30:46', 1, NULL, ''), (2073, '学生信息表新增', 2071, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'mf:student:add', '#', 1, '2023-11-22 17:30:46', 1, NULL, ''),
@ -986,11 +888,11 @@ INSERT INTO sys_menu VALUES
drop table if exists sys_notice; drop table if exists sys_notice;
create table if not exists sys_notice create table if not exists sys_notice
( (
notice_id bigint, notice_id bigint,
notice_title varchar(50) not null, notice_title varchar(50) not null,
notice_type char not null, notice_type char not null,
notice_content text, notice_content text,
status char default '0'::bpchar, status char default '0'::bpchar,
create_by bigint, create_by bigint,
create_time timestamp, create_time timestamp,
update_by bigint, update_by bigint,
@ -1014,7 +916,7 @@ comment on column sys_notice.remark is '备注';
drop table if exists sys_oper_log; drop table if exists sys_oper_log;
create table if not exists sys_oper_log create table if not exists sys_oper_log
( (
oper_id bigint, oper_id bigint,
title varchar(50) default ''::varchar, title varchar(50) default ''::varchar,
business_type int4 default 0, business_type int4 default 0,
method varchar(100) default ''::varchar, method varchar(100) default ''::varchar,
@ -1060,7 +962,7 @@ comment on column sys_oper_log.cost_time is '消耗时间';
drop table if exists sys_oss; drop table if exists sys_oss;
create table if not exists sys_oss create table if not exists sys_oss
( (
oss_id bigint, oss_id bigint,
file_name varchar(255) default ''::varchar not null, file_name varchar(255) default ''::varchar not null,
original_name varchar(255) default ''::varchar not null, original_name varchar(255) default ''::varchar not null,
file_suffix varchar(10) default ''::varchar not null, file_suffix varchar(10) default ''::varchar not null,
@ -1069,7 +971,7 @@ create table if not exists sys_oss
create_by bigint, create_by bigint,
create_time timestamp, create_time timestamp,
update_by bigint, update_by bigint,
update_time timestamp, update_time timestamp,
constraint sys_oss_pk primary key (oss_id) constraint sys_oss_pk primary key (oss_id)
); );
@ -1088,7 +990,7 @@ comment on column sys_oss.update_time is '更新时间';
drop table if exists sys_oss_config; drop table if exists sys_oss_config;
create table if not exists sys_oss_config create table if not exists sys_oss_config
( (
oss_config_id bigint, oss_config_id bigint,
config_key varchar(20) default ''::varchar not null, config_key varchar(20) default ''::varchar not null,
access_key varchar(255) default ''::varchar, access_key varchar(255) default ''::varchar,
secret_key varchar(255) default ''::varchar, secret_key varchar(255) default ''::varchar,
@ -1100,7 +1002,7 @@ create table if not exists sys_oss_config
region varchar(255) default ''::varchar, region varchar(255) default ''::varchar,
access_policy char(1) default '1'::bpchar not null, access_policy char(1) default '1'::bpchar not null,
status char default '1'::bpchar, status char default '1'::bpchar,
ext1 varchar(255) default ''::varchar, ext1 varchar(255) default ''::varchar,
create_by bigint, create_by bigint,
create_time timestamp, create_time timestamp,
update_by bigint, update_by bigint,
@ -1138,11 +1040,11 @@ INSERT INTO sys_oss_config VALUES
drop table if exists sys_post; drop table if exists sys_post;
create table if not exists sys_post create table if not exists sys_post
( (
post_id bigint, post_id bigint,
post_code varchar(64) not null, post_code varchar(64) not null,
post_name varchar(50) not null, post_name varchar(50) not null,
post_sort int4 not null, post_sort int4 not null,
status char not null, status char not null,
create_by bigint, create_by bigint,
create_time timestamp, create_time timestamp,
update_by bigint, update_by bigint,
@ -1173,7 +1075,7 @@ INSERT INTO sys_post VALUES
drop table if exists sys_role; drop table if exists sys_role;
create table if not exists sys_role create table if not exists sys_role
( (
role_id bigint, role_id bigint,
role_name varchar(30) not null, role_name varchar(30) not null,
role_key varchar(100) not null, role_key varchar(100) not null,
role_sort int4 not null, role_sort int4 not null,
@ -1181,7 +1083,7 @@ create table if not exists sys_role
menu_check_strictly bool default true, menu_check_strictly bool default true,
dept_check_strictly bool default true, dept_check_strictly bool default true,
status char not null, status char not null,
del_flag smallint default 0, del_flag smallint default 0,
create_by bigint, create_by bigint,
create_time timestamp, create_time timestamp,
update_by bigint, update_by bigint,
@ -1716,7 +1618,7 @@ INSERT INTO sys_role_menu VALUES
(65652406490345472, 2065), (65652406490345472, 2065),
(65652406490345472, 2066), (65652406490345472, 2066),
(65652406490345472, 2067); (65652406490345472, 2067);
drop table if exists sys_tenant; drop table if exists sys_tenant;
create table if not exists sys_tenant create table if not exists sys_tenant
( (
@ -1734,7 +1636,7 @@ create table if not exists sys_tenant
expire_time timestamp, expire_time timestamp,
account_count int4 default -1, account_count int4 default -1,
status char default '0'::bpchar, status char default '0'::bpchar,
del_flag smallint default 0, del_flag smallint default 0,
create_by bigint, create_by bigint,
create_time timestamp, create_time timestamp,
update_by bigint, update_by bigint,
@ -1764,7 +1666,7 @@ comment on column sys_tenant.update_time is '更新时间';
insert into sys_tenant values insert into sys_tenant values
(1, 1, '租户管理组', '18888888888', 'XXX有限公司', NULL, NULL, 'RuoYi-Flex多租户通用后台管理管理系统', NULL, NULL, NULL, NULL, -1, '0', 0, 1, '2023-08-13 08:08:08', NULL, NULL); (1, 1, '租户管理组', '18888888888', 'XXX有限公司', NULL, NULL, 'RuoYi-Flex多租户通用后台管理管理系统', NULL, NULL, NULL, NULL, -1, '0', 0, 1, '2023-08-13 08:08:08', NULL, NULL);
drop table if exists sys_user; drop table if exists sys_user;
create table if not exists sys_user create table if not exists sys_user
( (
@ -1782,7 +1684,7 @@ create table if not exists sys_user
status char default '0'::bpchar, status char default '0'::bpchar,
del_flag smallint default 0, del_flag smallint default 0,
login_ip varchar(128) default ''::varchar, login_ip varchar(128) default ''::varchar,
login_date timestamp, login_date timestamp,
create_by bigint, create_by bigint,
create_time timestamp, create_time timestamp,
update_by bigint, update_by bigint,
@ -1876,11 +1778,11 @@ INSERT INTO sys_user_role VALUES
(71500938010955776, 2), (71500938010955776, 2),
(75077525943939072, 2), (75077525943939072, 2),
(75081100715675648, 65643961968087040); (75081100715675648, 65643961968087040);
-- 字符串自动转时间 避免框架时间查询报错问题 -- 字符串自动转时间 避免框架时间查询报错问题
create or replace function cast_varchar_to_timestamp(varchar) returns timestamptz as $$ create or replace function cast_varchar_to_timestamp(varchar) returns timestamptz as $$
select to_timestamp($1, 'yyyy-mm-dd hh24:mi:ss'); select to_timestamp($1, 'yyyy-mm-dd hh24:mi:ss');
$$ language sql strict ; $$ language sql strict ;
create cast (varchar as timestamptz) with function cast_varchar_to_timestamp as IMPLICIT; create cast (varchar as timestamptz) with function cast_varchar_to_timestamp as IMPLICIT;