From de3fe9b95c67c065e5e6ec53e3074c1a086226fa Mon Sep 17 00:00:00 2001 From: caixiang <939387484@qq.com> Date: Fri, 9 Dec 2022 09:06:52 +0800 Subject: [PATCH] mark --- .../controller/ProductFeaturesController.java | 116 ++++++++++++++++++ .../controller/ProductTypeController.java | 116 ++++++++++++++++++ .../code/controller/UnitController.java | 116 ++++++++++++++++++ .../code/controller/UserController.java | 116 ++++++++++++++++++ .../code/dto/ProductFeaturesDTO.java | 113 +++++++++++++++++ .../generator/code/dto/ProductTypeDTO.java | 68 ++++++++++ .../com/cnbm/generator/code/dto/UnitDTO.java | 68 ++++++++++ .../com/cnbm/generator/code/dto/UserDTO.java | 71 +++++++++++ .../code/entity/ProductFeatures.java | 105 ++++++++++++++++ .../generator/code/entity/ProductType.java | 67 ++++++++++ .../com/cnbm/generator/code/entity/Unit.java | 67 ++++++++++ .../com/cnbm/generator/code/entity/User.java | 71 +++++++++++ .../code/excel/ProductFeaturesExcel.java | 78 ++++++++++++ .../code/excel/ProductTypeExcel.java | 48 ++++++++ .../cnbm/generator/code/excel/UnitExcel.java | 48 ++++++++ .../cnbm/generator/code/excel/UserExcel.java | 50 ++++++++ .../code/mapper/ProductFeaturesMapper.java | 16 +++ .../code/mapper/ProductFeaturesMapper.xml | 36 ++++++ .../code/mapper/ProductTypeMapper.java | 16 +++ .../code/mapper/ProductTypeMapper.xml | 21 ++++ .../generator/code/mapper/UnitMapper.java | 16 +++ .../cnbm/generator/code/mapper/UnitMapper.xml | 5 + .../generator/code/mapper/UserMapper.java | 16 +++ .../cnbm/generator/code/mapper/UserMapper.xml | 22 ++++ .../generator/code/mysql/ProductTypemysql.sql | 7 ++ .../cnbm/generator/code/mysql/Usermysql.sql | 7 ++ .../code/service/IProductFeaturesService.java | 15 +++ .../code/service/IProductTypeService.java | 15 +++ .../generator/code/service/IUnitService.java | 15 +++ .../generator/code/service/IUserService.java | 15 +++ .../impl/ProductFeaturesServiceImpl.java | 34 +++++ .../service/impl/ProductTypeServiceImpl.java | 34 +++++ .../code/service/impl/UnitServiceImpl.java | 34 +++++ .../code/service/impl/UserServiceImpl.java | 34 +++++ 34 files changed, 1676 insertions(+) create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/controller/ProductFeaturesController.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/controller/ProductTypeController.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/controller/UnitController.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/controller/UserController.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/dto/ProductFeaturesDTO.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/dto/ProductTypeDTO.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/dto/UnitDTO.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/dto/UserDTO.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/entity/ProductFeatures.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/entity/ProductType.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/entity/Unit.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/entity/User.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/excel/ProductFeaturesExcel.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/excel/ProductTypeExcel.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/excel/UnitExcel.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/excel/UserExcel.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductFeaturesMapper.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductFeaturesMapper.xml create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductTypeMapper.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductTypeMapper.xml create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/mapper/UnitMapper.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/mapper/UnitMapper.xml create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/mapper/UserMapper.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/mapper/UserMapper.xml create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/mysql/ProductTypemysql.sql create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/mysql/Usermysql.sql create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/service/IProductFeaturesService.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/service/IProductTypeService.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/service/IUnitService.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/service/IUserService.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/service/impl/ProductFeaturesServiceImpl.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/service/impl/ProductTypeServiceImpl.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/service/impl/UnitServiceImpl.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/service/impl/UserServiceImpl.java diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/controller/ProductFeaturesController.java b/ym-generator/src/main/java/com/cnbm/generator/code/controller/ProductFeaturesController.java new file mode 100644 index 0000000..87e0f91 --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/controller/ProductFeaturesController.java @@ -0,0 +1,116 @@ +package com.cnbm.generator.code.controller; + +import com.cnbm.admin.annotation.LogOperation; +import com.cnbm.common.constant.Constant; +import com.cnbm.common.page.PageData; +import com.cnbm.common.utils.ExcelUtils; +import com.cnbm.common.utils.Result; +import com.cnbm.common.validator.AssertUtils; +import com.cnbm.common.validator.ValidatorUtils; +import com.cnbm.common.validator.group.AddGroup; +import com.cnbm.common.validator.group.DefaultGroup; +import com.cnbm.common.validator.group.UpdateGroup; +import com.cnbm.generator.code.dto.ProductFeaturesDTO; +import com.cnbm.generator.code.excel.ProductFeaturesExcel; +import com.cnbm.generator.code.service.IProductFeaturesService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 产品特性 表 前端控制器 + * + * @author why + * @since 2022-08-23 + */ +@RestController +@RequestMapping("/code/productFeatures") +@Api(tags="产品特性 表") +public class ProductFeaturesController { + @Autowired + private IProductFeaturesService productFeaturesService; + + @GetMapping("page") + @ApiOperation("分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , + @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , + @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , + @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) + }) + @PreAuthorize("@ex.hasAuthority('code:productFeatures:page')") + public Result> page(@ApiIgnore @RequestParam Map params){ + PageData page = productFeaturesService.page(params); + + return new Result>().ok(page); + } + + @GetMapping("{id}") + @ApiOperation("信息") + @PreAuthorize("@ex.hasAuthority('code:productFeatures:info')") + public Result get(@PathVariable("id") Long id){ + ProductFeaturesDTO data = productFeaturesService.get(id); + + return new Result().ok(data); + } + + @PostMapping + @ApiOperation("保存") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('code:productFeatures:save')") + public Result save(@RequestBody ProductFeaturesDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + + productFeaturesService.save(dto); + + return new Result().ok(dto.getId()); + } + + @PutMapping + @ApiOperation("修改") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('code:productFeatures:update')") + public Result update(@RequestBody ProductFeaturesDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + + productFeaturesService.update(dto); + + return new Result().ok(dto.getId()); + } + + @DeleteMapping + @ApiOperation("删除") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('code:productFeatures:delete')") + public Result delete(@RequestBody Long[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + productFeaturesService.delete(ids); + + return new Result(); + } + + @GetMapping("export") + @ApiOperation("导出") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('code:productFeatures:export')") + public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { + List list = productFeaturesService.list(params); + + ExcelUtils.exportExcelToTarget(response, null, list, ProductFeaturesExcel.class); + } + +} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/controller/ProductTypeController.java b/ym-generator/src/main/java/com/cnbm/generator/code/controller/ProductTypeController.java new file mode 100644 index 0000000..e6918c4 --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/controller/ProductTypeController.java @@ -0,0 +1,116 @@ +package com.cnbm.generator.code.controller; + +import com.cnbm.admin.annotation.LogOperation; +import com.cnbm.common.constant.Constant; +import com.cnbm.common.page.PageData; +import com.cnbm.common.utils.ExcelUtils; +import com.cnbm.common.utils.Result; +import com.cnbm.common.validator.AssertUtils; +import com.cnbm.common.validator.ValidatorUtils; +import com.cnbm.common.validator.group.AddGroup; +import com.cnbm.common.validator.group.DefaultGroup; +import com.cnbm.common.validator.group.UpdateGroup; +import com.cnbm.generator.code.dto.ProductTypeDTO; +import com.cnbm.generator.code.excel.ProductTypeExcel; +import com.cnbm.generator.code.service.IProductTypeService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 产品类型 表 前端控制器 + * + * @author why + * @since 2022-08-23 + */ +@RestController +@RequestMapping("/code/productType") +@Api(tags="产品类型 表") +public class ProductTypeController { + @Autowired + private IProductTypeService productTypeService; + + @GetMapping("page") + @ApiOperation("分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , + @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , + @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , + @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) + }) + @PreAuthorize("@ex.hasAuthority('code:productType:page')") + public Result> page(@ApiIgnore @RequestParam Map params){ + PageData page = productTypeService.page(params); + + return new Result>().ok(page); + } + + @GetMapping("{id}") + @ApiOperation("信息") + @PreAuthorize("@ex.hasAuthority('code:productType:info')") + public Result get(@PathVariable("id") Long id){ + ProductTypeDTO data = productTypeService.get(id); + + return new Result().ok(data); + } + + @PostMapping + @ApiOperation("保存") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('code:productType:save')") + public Result save(@RequestBody ProductTypeDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + + productTypeService.save(dto); + + return new Result().ok(dto.getId()); + } + + @PutMapping + @ApiOperation("修改") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('code:productType:update')") + public Result update(@RequestBody ProductTypeDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + + productTypeService.update(dto); + + return new Result().ok(dto.getId()); + } + + @DeleteMapping + @ApiOperation("删除") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('code:productType:delete')") + public Result delete(@RequestBody Long[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + productTypeService.delete(ids); + + return new Result(); + } + + @GetMapping("export") + @ApiOperation("导出") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('code:productType:export')") + public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { + List list = productTypeService.list(params); + + ExcelUtils.exportExcelToTarget(response, null, list, ProductTypeExcel.class); + } + +} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/controller/UnitController.java b/ym-generator/src/main/java/com/cnbm/generator/code/controller/UnitController.java new file mode 100644 index 0000000..a617f93 --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/controller/UnitController.java @@ -0,0 +1,116 @@ +package com.cnbm.generator.code.controller; + +import com.cnbm.admin.annotation.LogOperation; +import com.cnbm.common.constant.Constant; +import com.cnbm.common.page.PageData; +import com.cnbm.common.utils.ExcelUtils; +import com.cnbm.common.utils.Result; +import com.cnbm.common.validator.AssertUtils; +import com.cnbm.common.validator.ValidatorUtils; +import com.cnbm.common.validator.group.AddGroup; +import com.cnbm.common.validator.group.DefaultGroup; +import com.cnbm.common.validator.group.UpdateGroup; +import com.cnbm.generator.code.dto.UnitDTO; +import com.cnbm.generator.code.excel.UnitExcel; +import com.cnbm.generator.code.service.IUnitService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 单位 表 前端控制器 + * + * @author why + * @since 2022-06-30 + */ +@RestController +@RequestMapping("/code/unit") +@Api(tags="单位 表") +public class UnitController { + @Autowired + private IUnitService unitService; + + @GetMapping("page") + @ApiOperation("分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , + @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , + @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , + @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) + }) + @PreAuthorize("@ex.hasAuthority('code:unit:page')") + public Result> page(@ApiIgnore @RequestParam Map params){ + PageData page = unitService.page(params); + + return new Result>().ok(page); + } + + @GetMapping("{id}") + @ApiOperation("信息") + @PreAuthorize("@ex.hasAuthority('code:unit:info')") + public Result get(@PathVariable("id") Long id){ + UnitDTO data = unitService.get(id); + + return new Result().ok(data); + } + + @PostMapping + @ApiOperation("保存") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('code:unit:save')") + public Result save(@RequestBody UnitDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + + unitService.save(dto); + + return new Result(); + } + + @PutMapping + @ApiOperation("修改") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('code:unit:update')") + public Result update(@RequestBody UnitDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + + unitService.update(dto); + + return new Result(); + } + + @DeleteMapping + @ApiOperation("删除") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('code:unit:delete')") + public Result delete(@RequestBody Long[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + unitService.delete(ids); + + return new Result(); + } + + @GetMapping("export") + @ApiOperation("导出") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('code:unit:export')") + public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { + List list = unitService.list(params); + + ExcelUtils.exportExcelToTarget(response, null, list, UnitExcel.class); + } + +} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/controller/UserController.java b/ym-generator/src/main/java/com/cnbm/generator/code/controller/UserController.java new file mode 100644 index 0000000..aeb69f2 --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/controller/UserController.java @@ -0,0 +1,116 @@ +package com.cnbm.generator.code.controller; + +import com.cnbm.admin.annotation.LogOperation; +import com.cnbm.common.constant.Constant; +import com.cnbm.common.page.PageData; +import com.cnbm.common.utils.ExcelUtils; +import com.cnbm.common.utils.Result; +import com.cnbm.common.validator.AssertUtils; +import com.cnbm.common.validator.ValidatorUtils; +import com.cnbm.common.validator.group.AddGroup; +import com.cnbm.common.validator.group.DefaultGroup; +import com.cnbm.common.validator.group.UpdateGroup; +import com.cnbm.generator.code.dto.UserDTO; +import com.cnbm.generator.code.excel.UserExcel; +import com.cnbm.generator.code.service.IUserService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 系统用户 前端控制器 + * + * @author why + * @since 2022-08-23 + */ +@RestController +@RequestMapping("/code/user") +@Api(tags="系统用户") +public class UserController { + @Autowired + private IUserService userService; + + @GetMapping("page") + @ApiOperation("分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , + @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , + @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , + @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) + }) + @PreAuthorize("@ex.hasAuthority('code:user:page')") + public Result> page(@ApiIgnore @RequestParam Map params){ + PageData page = userService.page(params); + + return new Result>().ok(page); + } + + @GetMapping("{id}") + @ApiOperation("信息") + @PreAuthorize("@ex.hasAuthority('code:user:info')") + public Result get(@PathVariable("id") Long id){ + UserDTO data = userService.get(id); + + return new Result().ok(data); + } + + @PostMapping + @ApiOperation("保存") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('code:user:save')") + public Result save(@RequestBody UserDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + + userService.save(dto); + + return new Result().ok(dto.getId()); + } + + @PutMapping + @ApiOperation("修改") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('code:user:update')") + public Result update(@RequestBody UserDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + + userService.update(dto); + + return new Result().ok(dto.getId()); + } + + @DeleteMapping + @ApiOperation("删除") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('code:user:delete')") + public Result delete(@RequestBody Long[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + userService.delete(ids); + + return new Result(); + } + + @GetMapping("export") + @ApiOperation("导出") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('code:user:export')") + public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { + List list = userService.list(params); + + ExcelUtils.exportExcelToTarget(response, null, list, UserExcel.class); + } + +} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/dto/ProductFeaturesDTO.java b/ym-generator/src/main/java/com/cnbm/generator/code/dto/ProductFeaturesDTO.java new file mode 100644 index 0000000..d85e387 --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/dto/ProductFeaturesDTO.java @@ -0,0 +1,113 @@ +package com.cnbm.generator.code.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +import java.math.BigDecimal; + + +/** + * 产品特性 表 + * + * @author why + * @since 2022-08-23 + */ +@Data +@ApiModel(value = "产品特性 表DTO对象") +public class ProductFeaturesDTO implements Serializable { + private static final long serialVersionUID = 1L; + + + + @ApiModelProperty(value = "") + private Long id; + + @ApiModelProperty(value = "") + private Long productId; + + @ApiModelProperty(value = "") + private Long measureToolId; + + @ApiModelProperty(value = "") + private Long unitId; + + @ApiModelProperty(value = "产品特性 名") + private String name; + + @ApiModelProperty(value = "产品特性 编码") + private String code; + + @ApiModelProperty(value = "产品特性类型:1 计量型;2 计数型") + private Integer type; + + @ApiModelProperty(value = "缺陷等级:1 致命缺陷;2 严重缺陷;3.轻微缺陷") + private Integer defectLevel; + + @ApiModelProperty(value = "产品特性 规格") + private String specifications; + + @ApiModelProperty(value = "检验参数 规格下线") + private Float lsl; + + @ApiModelProperty(value = "检验参数 规格中心线") + private Float sl; + + @ApiModelProperty(value = "检验参数 规格上线") + private Float usl; + + @ApiModelProperty(value = "") + private Long workingProcedureId; + + @ApiModelProperty(value = "") + private Long controlGraphId; + + @ApiModelProperty(value = "是否需要spc分析,1 yes;0 no") + private Integer isSpc; + + @ApiModelProperty(value = "样本大小,一般2-25之间。 会依据这个size 把所有待分析的数据 组成一个一个样本") + private Integer sampleSize; + + @ApiModelProperty(value = "采样频率,只用于展示") + private String samplingFrequency; + + @ApiModelProperty(value = "小数位数(限制 检验参数小数点后面位数),这个先放着后续再说。") + private Integer decimalPlaces; + + @ApiModelProperty(value = "目标cpk") + private Float targetCpk; + + @ApiModelProperty(value = "目标cpk") + private Float targetPpk; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") + private Integer valid; + + @ApiModelProperty(value = "") + private Long creatorId; + + @ApiModelProperty(value = "创建人姓名") + private String creatorName; + + @ApiModelProperty(value = "创建时间") + private LocalDateTime createTime; + + @ApiModelProperty(value = "") + private Long updaterId; + + @ApiModelProperty(value = "更新人姓名") + private String updaterName; + + @ApiModelProperty(value = "更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty(value = "版本号") + private Integer version; + +} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/dto/ProductTypeDTO.java b/ym-generator/src/main/java/com/cnbm/generator/code/dto/ProductTypeDTO.java new file mode 100644 index 0000000..736934e --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/dto/ProductTypeDTO.java @@ -0,0 +1,68 @@ +package com.cnbm.generator.code.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +import java.math.BigDecimal; + + +/** + * 产品类型 表 + * + * @author why + * @since 2022-08-23 + */ +@Data +@ApiModel(value = "产品类型 表DTO对象") +public class ProductTypeDTO implements Serializable { + private static final long serialVersionUID = 1L; + + + + @ApiModelProperty(value = "") + private Long id; + + @ApiModelProperty(value = "产品类型 名") + private String name; + + @ApiModelProperty(value = "产品类型 编码") + private String code; + + @ApiModelProperty(value = "描述") + private String descs; + + @ApiModelProperty(value = "1 可用,0 不可用") + private Integer status; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") + private Integer valid; + + @ApiModelProperty(value = "") + private Long creatorId; + + @ApiModelProperty(value = "创建人姓名") + private String creatorName; + + @ApiModelProperty(value = "创建时间") + private LocalDateTime createTime; + + @ApiModelProperty(value = "") + private Long updaterId; + + @ApiModelProperty(value = "更新人姓名") + private String updaterName; + + @ApiModelProperty(value = "更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty(value = "版本号") + private Integer version; + +} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/dto/UnitDTO.java b/ym-generator/src/main/java/com/cnbm/generator/code/dto/UnitDTO.java new file mode 100644 index 0000000..73789dd --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/dto/UnitDTO.java @@ -0,0 +1,68 @@ +package com.cnbm.generator.code.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +import java.math.BigDecimal; + + +/** + * 单位 表 + * + * @author why + * @since 2022-06-30 + */ +@Data +@ApiModel(value = "单位 表DTO对象") +public class UnitDTO implements Serializable { + private static final long serialVersionUID = 1L; + + + + @ApiModelProperty(value = "ID") + private BigDecimal id; + + @ApiModelProperty(value = "单位 名") + private String name; + + @ApiModelProperty(value = "单位 编码") + private String code; + + @ApiModelProperty(value = "单位类型,1 可计数,2 不可计数") + private BigDecimal type; + + @ApiModelProperty(value = "1 可用,0 不可用") + private BigDecimal status; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + + @ApiModelProperty(value = "创建人") + private BigDecimal creatorId; + + @ApiModelProperty(value = "创建人姓名") + private String creatorName; + + @ApiModelProperty(value = "创建时间") + private LocalDateTime createTime; + + @ApiModelProperty(value = "更新人") + private BigDecimal updaterId; + + @ApiModelProperty(value = "更新人姓名") + private String updaterName; + + @ApiModelProperty(value = "更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty(value = "版本号") + private BigDecimal version; + +} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/dto/UserDTO.java b/ym-generator/src/main/java/com/cnbm/generator/code/dto/UserDTO.java new file mode 100644 index 0000000..52737bd --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/dto/UserDTO.java @@ -0,0 +1,71 @@ +package com.cnbm.generator.code.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +import java.math.BigDecimal; + + +/** + * 系统用户 + * + * @author why + * @since 2022-08-23 + */ +@Data +@ApiModel(value = "系统用户DTO对象") +public class UserDTO implements Serializable { + private static final long serialVersionUID = 1L; + + + + @ApiModelProperty(value = "id") + private Long id; + + @ApiModelProperty(value = "用户名") + private String username; + + @ApiModelProperty(value = "密码") + private String password; + + @ApiModelProperty(value = "姓名") + private String realName; + + @ApiModelProperty(value = "头像") + private String headUrl; + + @ApiModelProperty(value = "性别 0:男 1:女 2:保密") + private Integer gender; + + @ApiModelProperty(value = "邮箱") + private String email; + + @ApiModelProperty(value = "手机号") + private String mobile; + + @ApiModelProperty(value = "部门ID") + private Long deptId; + + @ApiModelProperty(value = "超级管理员 0:否 1:是") + private Integer superAdmin; + + @ApiModelProperty(value = "状态 0:停用 1:正常") + private Integer status; + + @ApiModelProperty(value = "创建者") + private Long creator; + + @ApiModelProperty(value = "创建时间") + private LocalDateTime createDate; + + @ApiModelProperty(value = "更新者") + private Long updater; + + @ApiModelProperty(value = "更新时间") + private LocalDateTime updateDate; + +} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/entity/ProductFeatures.java b/ym-generator/src/main/java/com/cnbm/generator/code/entity/ProductFeatures.java new file mode 100644 index 0000000..cd05a01 --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/entity/ProductFeatures.java @@ -0,0 +1,105 @@ +package com.cnbm.generator.code.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; +import java.time.LocalDateTime; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + *

+ * 产品特性 表 + *

+ * + * @author why + * @since 2022-08-23 + */ +@Data +@TableName("product_features") +@ApiModel(value = "ProductFeatures对象", description = "产品特性 表") +public class ProductFeatures implements Serializable { + + private static final long serialVersionUID = 1L; + + private Long id; + + private Long productId; + + private Long measureToolId; + + private Long unitId; + + @ApiModelProperty("产品特性 名") + private String name; + + @ApiModelProperty("产品特性 编码") + private String code; + + @ApiModelProperty("产品特性类型:1 计量型;2 计数型") + private Integer type; + + @ApiModelProperty("缺陷等级:1 致命缺陷;2 严重缺陷;3.轻微缺陷") + private Integer defectLevel; + + @ApiModelProperty("产品特性 规格") + private String specifications; + + @ApiModelProperty("检验参数 规格下线") + private Float lsl; + + @ApiModelProperty("检验参数 规格中心线") + private Float sl; + + @ApiModelProperty("检验参数 规格上线") + private Float usl; + + private Long workingProcedureId; + + private Long controlGraphId; + + @ApiModelProperty("是否需要spc分析,1 yes;0 no") + private Integer isSpc; + + @ApiModelProperty("样本大小,一般2-25之间。 会依据这个size 把所有待分析的数据 组成一个一个样本") + private Integer sampleSize; + + @ApiModelProperty("采样频率,只用于展示") + private String samplingFrequency; + + @ApiModelProperty("小数位数(限制 检验参数小数点后面位数),这个先放着后续再说。") + private Integer decimalPlaces; + + @ApiModelProperty("目标cpk") + private Float targetCpk; + + @ApiModelProperty("目标cpk") + private Float targetPpk; + + @ApiModelProperty("备注") + private String remark; + + @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") + private Integer valid; + + private Long creatorId; + + @ApiModelProperty("创建人姓名") + private String creatorName; + + @ApiModelProperty("创建时间") + private LocalDateTime createTime; + + private Long updaterId; + + @ApiModelProperty("更新人姓名") + private String updaterName; + + @ApiModelProperty("更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty("版本号") + private Integer version; + + +} diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/entity/ProductType.java b/ym-generator/src/main/java/com/cnbm/generator/code/entity/ProductType.java new file mode 100644 index 0000000..2eb6677 --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/entity/ProductType.java @@ -0,0 +1,67 @@ +package com.cnbm.generator.code.entity; + +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; +import java.time.LocalDateTime; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + *

+ * 产品类型 表 + *

+ * + * @author why + * @since 2022-08-23 + */ +@Data +@TableName("product_type") +@ApiModel(value = "ProductType对象", description = "产品类型 表") +public class ProductType implements Serializable { + + private static final long serialVersionUID = 1L; + + private Long id; + + @ApiModelProperty("产品类型 名") + private String name; + + @ApiModelProperty("产品类型 编码") + private String code; + + @ApiModelProperty("描述") + private String descs; + + @ApiModelProperty("1 可用,0 不可用") + private Integer status; + + @ApiModelProperty("备注") + private String remark; + + @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") + @TableLogic + private Integer valid; + + private Long creatorId; + + @ApiModelProperty("创建人姓名") + private String creatorName; + + @ApiModelProperty("创建时间") + private LocalDateTime createTime; + + private Long updaterId; + + @ApiModelProperty("更新人姓名") + private String updaterName; + + @ApiModelProperty("更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty("版本号") + private Integer version; + + +} diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/entity/Unit.java b/ym-generator/src/main/java/com/cnbm/generator/code/entity/Unit.java new file mode 100644 index 0000000..17f9f8d --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/entity/Unit.java @@ -0,0 +1,67 @@ +package com.cnbm.generator.code.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + *

+ * 单位 表 + *

+ * + * @author why + * @since 2022-06-30 + */ +@Data +@ApiModel(value = "Unit对象", description = "单位 表") +public class Unit implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("ID") + private BigDecimal id; + + @ApiModelProperty("单位 名") + private String name; + + @ApiModelProperty("单位 编码") + private String code; + + @ApiModelProperty("单位类型,1 可计数,2 不可计数") + private BigDecimal type; + + @ApiModelProperty("1 可用,0 不可用") + private BigDecimal status; + + @ApiModelProperty("备注") + private String remark; + + @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + + @ApiModelProperty("创建人") + private BigDecimal creatorId; + + @ApiModelProperty("创建人姓名") + private String creatorName; + + @ApiModelProperty("创建时间") + private LocalDateTime createTime; + + @ApiModelProperty("更新人") + private BigDecimal updaterId; + + @ApiModelProperty("更新人姓名") + private String updaterName; + + @ApiModelProperty("更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty("版本号") + private BigDecimal version; + + +} diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/entity/User.java b/ym-generator/src/main/java/com/cnbm/generator/code/entity/User.java new file mode 100644 index 0000000..5e1f0ef --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/entity/User.java @@ -0,0 +1,71 @@ +package com.cnbm.generator.code.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; +import java.time.LocalDateTime; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + *

+ * 系统用户 + *

+ * + * @author why + * @since 2022-08-23 + */ +@Data +@TableName("sys_user") +@ApiModel(value = "User对象", description = "系统用户") +public class User implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("id") + private Long id; + + @ApiModelProperty("用户名") + private String username; + + @ApiModelProperty("密码") + private String password; + + @ApiModelProperty("姓名") + private String realName; + + @ApiModelProperty("头像") + private String headUrl; + + @ApiModelProperty("性别 0:男 1:女 2:保密") + private Integer gender; + + @ApiModelProperty("邮箱") + private String email; + + @ApiModelProperty("手机号") + private String mobile; + + @ApiModelProperty("部门ID") + private Long deptId; + + @ApiModelProperty("超级管理员 0:否 1:是") + private Integer superAdmin; + + @ApiModelProperty("状态 0:停用 1:正常") + private Integer status; + + @ApiModelProperty("创建者") + private Long creator; + + @ApiModelProperty("创建时间") + private LocalDateTime createDate; + + @ApiModelProperty("更新者") + private Long updater; + + @ApiModelProperty("更新时间") + private LocalDateTime updateDate; + + +} diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/excel/ProductFeaturesExcel.java b/ym-generator/src/main/java/com/cnbm/generator/code/excel/ProductFeaturesExcel.java new file mode 100644 index 0000000..75591ed --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/excel/ProductFeaturesExcel.java @@ -0,0 +1,78 @@ +package com.cnbm.generator.code.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.time.LocalDateTime; +import java.math.BigDecimal; + +import java.util.Date; + +/** + * 产品特性 表 + * + * @author why + * @since 2022-08-23 + */ +@Data +public class ProductFeaturesExcel { + @Excel(name = "") + private Long id; + @Excel(name = "") + private Long productId; + @Excel(name = "") + private Long measureToolId; + @Excel(name = "") + private Long unitId; + @Excel(name = "产品特性 名") + private String name; + @Excel(name = "产品特性 编码") + private String code; + @Excel(name = "产品特性类型:1 计量型;2 计数型") + private Integer type; + @Excel(name = "缺陷等级:1 致命缺陷;2 严重缺陷;3.轻微缺陷") + private Integer defectLevel; + @Excel(name = "产品特性 规格") + private String specifications; + @Excel(name = "检验参数 规格下线") + private Float lsl; + @Excel(name = "检验参数 规格中心线") + private Float sl; + @Excel(name = "检验参数 规格上线") + private Float usl; + @Excel(name = "") + private Long workingProcedureId; + @Excel(name = "") + private Long controlGraphId; + @Excel(name = "是否需要spc分析,1 yes;0 no") + private Integer isSpc; + @Excel(name = "样本大小,一般2-25之间。 会依据这个size 把所有待分析的数据 组成一个一个样本") + private Integer sampleSize; + @Excel(name = "采样频率,只用于展示") + private String samplingFrequency; + @Excel(name = "小数位数(限制 检验参数小数点后面位数),这个先放着后续再说。") + private Integer decimalPlaces; + @Excel(name = "目标cpk") + private Float targetCpk; + @Excel(name = "目标cpk") + private Float targetPpk; + @Excel(name = "备注") + private String remark; + @Excel(name = "删除标志,是否有效:1 可用 0不可用") + private Integer valid; + @Excel(name = "") + private Long creatorId; + @Excel(name = "创建人姓名") + private String creatorName; + @Excel(name = "创建时间") + private LocalDateTime createTime; + @Excel(name = "") + private Long updaterId; + @Excel(name = "更新人姓名") + private String updaterName; + @Excel(name = "更新时间") + private LocalDateTime updateTime; + @Excel(name = "版本号") + private Integer version; + +} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/excel/ProductTypeExcel.java b/ym-generator/src/main/java/com/cnbm/generator/code/excel/ProductTypeExcel.java new file mode 100644 index 0000000..12e9fae --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/excel/ProductTypeExcel.java @@ -0,0 +1,48 @@ +package com.cnbm.generator.code.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.time.LocalDateTime; +import java.math.BigDecimal; + +import java.util.Date; + +/** + * 产品类型 表 + * + * @author why + * @since 2022-08-23 + */ +@Data +public class ProductTypeExcel { + @Excel(name = "") + private Long id; + @Excel(name = "产品类型 名") + private String name; + @Excel(name = "产品类型 编码") + private String code; + @Excel(name = "描述") + private String descs; + @Excel(name = "1 可用,0 不可用") + private Integer status; + @Excel(name = "备注") + private String remark; + @Excel(name = "删除标志,是否有效:1 可用 0不可用") + private Integer valid; + @Excel(name = "") + private Long creatorId; + @Excel(name = "创建人姓名") + private String creatorName; + @Excel(name = "创建时间") + private LocalDateTime createTime; + @Excel(name = "") + private Long updaterId; + @Excel(name = "更新人姓名") + private String updaterName; + @Excel(name = "更新时间") + private LocalDateTime updateTime; + @Excel(name = "版本号") + private Integer version; + +} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/excel/UnitExcel.java b/ym-generator/src/main/java/com/cnbm/generator/code/excel/UnitExcel.java new file mode 100644 index 0000000..0772fea --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/excel/UnitExcel.java @@ -0,0 +1,48 @@ +package com.cnbm.generator.code.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.time.LocalDateTime; +import java.math.BigDecimal; + +import java.util.Date; + +/** + * 单位 表 + * + * @author why + * @since 2022-06-30 + */ +@Data +public class UnitExcel { + @Excel(name = "ID") + private BigDecimal id; + @Excel(name = "单位 名") + private String name; + @Excel(name = "单位 编码") + private String code; + @Excel(name = "单位类型,1 可计数,2 不可计数") + private BigDecimal type; + @Excel(name = "1 可用,0 不可用") + private BigDecimal status; + @Excel(name = "备注") + private String remark; + @Excel(name = "删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + @Excel(name = "创建人") + private BigDecimal creatorId; + @Excel(name = "创建人姓名") + private String creatorName; + @Excel(name = "创建时间") + private LocalDateTime createTime; + @Excel(name = "更新人") + private BigDecimal updaterId; + @Excel(name = "更新人姓名") + private String updaterName; + @Excel(name = "更新时间") + private LocalDateTime updateTime; + @Excel(name = "版本号") + private BigDecimal version; + +} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/excel/UserExcel.java b/ym-generator/src/main/java/com/cnbm/generator/code/excel/UserExcel.java new file mode 100644 index 0000000..b9c4011 --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/excel/UserExcel.java @@ -0,0 +1,50 @@ +package com.cnbm.generator.code.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.time.LocalDateTime; +import java.math.BigDecimal; + +import java.util.Date; + +/** + * 系统用户 + * + * @author why + * @since 2022-08-23 + */ +@Data +public class UserExcel { + @Excel(name = "id") + private Long id; + @Excel(name = "用户名") + private String username; + @Excel(name = "密码") + private String password; + @Excel(name = "姓名") + private String realName; + @Excel(name = "头像") + private String headUrl; + @Excel(name = "性别 0:男 1:女 2:保密") + private Integer gender; + @Excel(name = "邮箱") + private String email; + @Excel(name = "手机号") + private String mobile; + @Excel(name = "部门ID") + private Long deptId; + @Excel(name = "超级管理员 0:否 1:是") + private Integer superAdmin; + @Excel(name = "状态 0:停用 1:正常") + private Integer status; + @Excel(name = "创建者") + private Long creator; + @Excel(name = "创建时间") + private LocalDateTime createDate; + @Excel(name = "更新者") + private Long updater; + @Excel(name = "更新时间") + private LocalDateTime updateDate; + +} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductFeaturesMapper.java b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductFeaturesMapper.java new file mode 100644 index 0000000..2ceef27 --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductFeaturesMapper.java @@ -0,0 +1,16 @@ +package com.cnbm.generator.code.mapper; + +import com.cnbm.common.dao.BaseDao; +import com.cnbm.generator.code.entity.ProductFeatures; +import org.apache.ibatis.annotations.Mapper; + +/** + * 产品特性 表 + * + * @author why + * @since 2022-08-23 + */ +@Mapper +public interface ProductFeaturesMapper extends BaseDao { + +} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductFeaturesMapper.xml b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductFeaturesMapper.xml new file mode 100644 index 0000000..f31c034 --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductFeaturesMapper.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductTypeMapper.java b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductTypeMapper.java new file mode 100644 index 0000000..4e27f50 --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductTypeMapper.java @@ -0,0 +1,16 @@ +package com.cnbm.generator.code.mapper; + +import com.cnbm.common.dao.BaseDao; +import com.cnbm.generator.code.entity.ProductType; +import org.apache.ibatis.annotations.Mapper; + +/** + * 产品类型 表 + * + * @author why + * @since 2022-08-23 + */ +@Mapper +public interface ProductTypeMapper extends BaseDao { + +} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductTypeMapper.xml b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductTypeMapper.xml new file mode 100644 index 0000000..9e17c6a --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductTypeMapper.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/mapper/UnitMapper.java b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/UnitMapper.java new file mode 100644 index 0000000..f4fa7cd --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/UnitMapper.java @@ -0,0 +1,16 @@ +package com.cnbm.generator.code.mapper; + +import com.cnbm.common.dao.BaseDao; +import com.cnbm.generator.code.entity.Unit; +import org.apache.ibatis.annotations.Mapper; + +/** + * 单位 表 + * + * @author why + * @since 2022-06-30 + */ +@Mapper +public interface UnitMapper extends BaseDao { + +} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/mapper/UnitMapper.xml b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/UnitMapper.xml new file mode 100644 index 0000000..42c18b6 --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/UnitMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/mapper/UserMapper.java b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/UserMapper.java new file mode 100644 index 0000000..e938420 --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/UserMapper.java @@ -0,0 +1,16 @@ +package com.cnbm.generator.code.mapper; + +import com.cnbm.common.dao.BaseDao; +import com.cnbm.generator.code.entity.User; +import org.apache.ibatis.annotations.Mapper; + +/** + * 系统用户 + * + * @author why + * @since 2022-08-23 + */ +@Mapper +public interface UserMapper extends BaseDao { + +} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/mapper/UserMapper.xml b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/UserMapper.xml new file mode 100644 index 0000000..f53b3e6 --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/UserMapper.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/mysql/ProductTypemysql.sql b/ym-generator/src/main/java/com/cnbm/generator/code/mysql/ProductTypemysql.sql new file mode 100644 index 0000000..00fb5af --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/mysql/ProductTypemysql.sql @@ -0,0 +1,7 @@ +-- 菜单初始SQL +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1561967925485420546, 1067246875800000035, '产品类型 表', 'code/productType', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561967925485420547, 1561967925485420546, '查看', NULL, 'code:productType:page,code:productType:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561967925485420548, 1561967925485420546, '新增', NULL, 'code:productType:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561967925485420549, 1561967925485420546, '修改', NULL, 'code:productType:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561967925485420550, 1561967925485420546, '删除', NULL, 'code:productType:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561967925485420551, 1561967925485420546, '导出', NULL, 'code:productType:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now()); diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/mysql/Usermysql.sql b/ym-generator/src/main/java/com/cnbm/generator/code/mysql/Usermysql.sql new file mode 100644 index 0000000..12b0a17 --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/mysql/Usermysql.sql @@ -0,0 +1,7 @@ +-- 菜单初始SQL +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1561967818685841409, 1067246875800000035, '系统用户', 'code/user', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561967818685841410, 1561967818685841409, '查看', NULL, 'code:user:page,code:user:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561967818685841411, 1561967818685841409, '新增', NULL, 'code:user:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561967818685841412, 1561967818685841409, '修改', NULL, 'code:user:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561967818685841413, 1561967818685841409, '删除', NULL, 'code:user:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561967818685841414, 1561967818685841409, '导出', NULL, 'code:user:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now()); diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/service/IProductFeaturesService.java b/ym-generator/src/main/java/com/cnbm/generator/code/service/IProductFeaturesService.java new file mode 100644 index 0000000..a99c635 --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/service/IProductFeaturesService.java @@ -0,0 +1,15 @@ +package com.cnbm.generator.code.service; + +import com.cnbm.common.service.CrudService; +import com.cnbm.generator.code.dto.ProductFeaturesDTO; +import com.cnbm.generator.code.entity.ProductFeatures; + +/** + * 产品特性 表 + * + * @author why + * @since 2022-08-23 + */ +public interface IProductFeaturesService extends CrudService { + +} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/service/IProductTypeService.java b/ym-generator/src/main/java/com/cnbm/generator/code/service/IProductTypeService.java new file mode 100644 index 0000000..39f94de --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/service/IProductTypeService.java @@ -0,0 +1,15 @@ +package com.cnbm.generator.code.service; + +import com.cnbm.common.service.CrudService; +import com.cnbm.generator.code.dto.ProductTypeDTO; +import com.cnbm.generator.code.entity.ProductType; + +/** + * 产品类型 表 + * + * @author why + * @since 2022-08-23 + */ +public interface IProductTypeService extends CrudService { + +} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/service/IUnitService.java b/ym-generator/src/main/java/com/cnbm/generator/code/service/IUnitService.java new file mode 100644 index 0000000..bc12537 --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/service/IUnitService.java @@ -0,0 +1,15 @@ +package com.cnbm.generator.code.service; + +import com.cnbm.common.service.CrudService; +import com.cnbm.generator.code.dto.UnitDTO; +import com.cnbm.generator.code.entity.Unit; + +/** + * 单位 表 + * + * @author why + * @since 2022-06-30 + */ +public interface IUnitService extends CrudService { + +} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/service/IUserService.java b/ym-generator/src/main/java/com/cnbm/generator/code/service/IUserService.java new file mode 100644 index 0000000..06a8e20 --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/service/IUserService.java @@ -0,0 +1,15 @@ +package com.cnbm.generator.code.service; + +import com.cnbm.common.service.CrudService; +import com.cnbm.generator.code.dto.UserDTO; +import com.cnbm.generator.code.entity.User; + +/** + * 系统用户 + * + * @author why + * @since 2022-08-23 + */ +public interface IUserService extends CrudService { + +} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/ProductFeaturesServiceImpl.java b/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/ProductFeaturesServiceImpl.java new file mode 100644 index 0000000..5533a06 --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/ProductFeaturesServiceImpl.java @@ -0,0 +1,34 @@ +package com.cnbm.generator.code.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.cnbm.common.service.impl.CrudServiceImpl; +import com.cnbm.generator.code.dto.ProductFeaturesDTO; +import com.cnbm.generator.code.mapper.ProductFeaturesMapper; +import com.cnbm.generator.code.entity.ProductFeatures; +import com.cnbm.generator.code.service.IProductFeaturesService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +import java.util.Map; + +/** + * 产品特性 表 + * + * @author why + * @since 2022-08-23 + */ +@Service +public class ProductFeaturesServiceImpl extends CrudServiceImpl implements IProductFeaturesService { + + @Override + public QueryWrapper getWrapper(Map params){ + String id = (String)params.get("id"); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), "id", id); + + return wrapper; + } + + +} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/ProductTypeServiceImpl.java b/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/ProductTypeServiceImpl.java new file mode 100644 index 0000000..71b9f0c --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/ProductTypeServiceImpl.java @@ -0,0 +1,34 @@ +package com.cnbm.generator.code.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.cnbm.common.service.impl.CrudServiceImpl; +import com.cnbm.generator.code.dto.ProductTypeDTO; +import com.cnbm.generator.code.mapper.ProductTypeMapper; +import com.cnbm.generator.code.entity.ProductType; +import com.cnbm.generator.code.service.IProductTypeService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +import java.util.Map; + +/** + * 产品类型 表 + * + * @author why + * @since 2022-08-23 + */ +@Service +public class ProductTypeServiceImpl extends CrudServiceImpl implements IProductTypeService { + + @Override + public QueryWrapper getWrapper(Map params){ + String id = (String)params.get("id"); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), "id", id); + + return wrapper; + } + + +} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/UnitServiceImpl.java b/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/UnitServiceImpl.java new file mode 100644 index 0000000..05263d4 --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/UnitServiceImpl.java @@ -0,0 +1,34 @@ +package com.cnbm.generator.code.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.cnbm.common.service.impl.CrudServiceImpl; +import com.cnbm.generator.code.dto.UnitDTO; +import com.cnbm.generator.code.mapper.UnitMapper; +import com.cnbm.generator.code.entity.Unit; +import com.cnbm.generator.code.service.IUnitService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +import java.util.Map; + +/** + * 单位 表 + * + * @author why + * @since 2022-06-30 + */ +@Service +public class UnitServiceImpl extends CrudServiceImpl implements IUnitService { + + @Override + public QueryWrapper getWrapper(Map params){ + String id = (String)params.get("id"); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), "id", id); + + return wrapper; + } + + +} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/UserServiceImpl.java b/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/UserServiceImpl.java new file mode 100644 index 0000000..6a8c4f7 --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/UserServiceImpl.java @@ -0,0 +1,34 @@ +package com.cnbm.generator.code.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.cnbm.common.service.impl.CrudServiceImpl; +import com.cnbm.generator.code.dto.UserDTO; +import com.cnbm.generator.code.mapper.UserMapper; +import com.cnbm.generator.code.entity.User; +import com.cnbm.generator.code.service.IUserService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +import java.util.Map; + +/** + * 系统用户 + * + * @author why + * @since 2022-08-23 + */ +@Service +public class UserServiceImpl extends CrudServiceImpl implements IUserService { + + @Override + public QueryWrapper getWrapper(Map params){ + String id = (String)params.get("id"); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), "id", id); + + return wrapper; + } + + +} \ No newline at end of file