商品管理初始化
parent
f162408a04
commit
6b8fc1c19b
|
@ -0,0 +1,65 @@
|
|||
package com.muyu.common.core.utils;
|
||||
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author DongZl
|
||||
* @description: 对象工具类
|
||||
* @Date 2023-10-9 下午 04:56
|
||||
*/
|
||||
public class ObjUtils {
|
||||
|
||||
/**
|
||||
* 兼容
|
||||
* CharSequence: 如果长度为零,则认为为空。
|
||||
* Array: 如果长度为零,则认为为空。
|
||||
* Collection: 如果元素为零,则认为为空。
|
||||
* Map: 如果键值映射为零,则认为为空。
|
||||
* @param o 对象
|
||||
* @return 如果对象具有受支持的类型并且为空或null,则为true,否则为false
|
||||
*/
|
||||
public static boolean notNull(Object o){
|
||||
return ObjectUtils.isNotEmpty(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断long类型不为0
|
||||
* @param val 值
|
||||
* @return 返回值不为0
|
||||
*/
|
||||
public static boolean notNull(Long val){
|
||||
return ObjectUtils.isNotEmpty(val) && val != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断Integer类型不为0
|
||||
* @param val 值
|
||||
* @return 返回值不为0
|
||||
*/
|
||||
public static boolean notNull(Integer val){
|
||||
return ObjectUtils.isNotEmpty(val) && val != 0;
|
||||
}
|
||||
/**
|
||||
* 判断BigDecimal类型不为0
|
||||
* @param val 值
|
||||
* @return 返回值不为0
|
||||
*/
|
||||
public static boolean notNull(BigDecimal val){
|
||||
return ObjectUtils.isNotEmpty(val) && val.doubleValue() == 0.00;
|
||||
}
|
||||
/**
|
||||
* 判断BigDecimal类型不为0
|
||||
* @param val 值
|
||||
* @return 返回值不为0
|
||||
*/
|
||||
public static boolean notChildNull(Object[] val){
|
||||
for (Object o : val) {
|
||||
if (!notNull(o)){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package com.muyu.common.core.web.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
@ -25,6 +26,7 @@ public class TreeEntity extends BaseEntity {
|
|||
/**
|
||||
* 父菜单名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String parentName;
|
||||
|
||||
/**
|
||||
|
@ -35,55 +37,19 @@ public class TreeEntity extends BaseEntity {
|
|||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Integer orderNum;
|
||||
|
||||
/**
|
||||
* 祖级列表
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String ancestors;
|
||||
|
||||
/**
|
||||
* 子部门
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private List<?> children = new ArrayList<>();
|
||||
|
||||
public String getParentName () {
|
||||
return parentName;
|
||||
}
|
||||
|
||||
public void setParentName (String parentName) {
|
||||
this.parentName = parentName;
|
||||
}
|
||||
|
||||
public Long getParentId () {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId (Long parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public Integer getOrderNum () {
|
||||
return orderNum;
|
||||
}
|
||||
|
||||
public void setOrderNum (Integer orderNum) {
|
||||
this.orderNum = orderNum;
|
||||
}
|
||||
|
||||
public String getAncestors () {
|
||||
return ancestors;
|
||||
}
|
||||
|
||||
public void setAncestors (String ancestors) {
|
||||
this.ancestors = ancestors;
|
||||
}
|
||||
|
||||
public List<?> getChildren () {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren (List<?> children) {
|
||||
this.children = children;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import com.muyu.common.log.enums.BusinessType;
|
|||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.gen.domain.GenTable;
|
||||
import com.muyu.gen.domain.GenTableColumn;
|
||||
import com.muyu.gen.domain.req.ImportTableReq;
|
||||
import com.muyu.gen.service.IGenTableColumnService;
|
||||
import com.muyu.gen.service.IGenTableService;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
|
@ -94,11 +95,13 @@ public class GenController extends BaseController {
|
|||
@RequiresPermissions("tool:gen:import")
|
||||
@Log(title = "代码生成", businessType = BusinessType.IMPORT)
|
||||
@PostMapping("/importTable")
|
||||
public Result importTableSave (String tables) {
|
||||
public Result importTableSave ( ImportTableReq importTableReq) {
|
||||
String tables = importTableReq.getTables();
|
||||
String databaseName = importTableReq.getDatabaseName();
|
||||
String[] tableNames = Convert.toStrArray(tables);
|
||||
// 查询表信息
|
||||
List<GenTable> tableList = genTableService.selectDbTableListByNames(tableNames);
|
||||
genTableService.importGenTable(tableList);
|
||||
List<GenTable> tableList = genTableService.selectDbTableListByNames(databaseName,tableNames);
|
||||
genTableService.importGenTable(databaseName,tableList);
|
||||
return success();
|
||||
}
|
||||
|
||||
|
@ -156,15 +159,14 @@ public class GenController extends BaseController {
|
|||
genTableService.generatorCode(tableName);
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 同步数据库
|
||||
*/
|
||||
@RequiresPermissions("tool:gen:edit")
|
||||
@Log(title = "代码生成", businessType = BusinessType.UPDATE)
|
||||
@GetMapping("/synchDb/{tableName}")
|
||||
public Result synchDb (@PathVariable("tableName") String tableName) {
|
||||
genTableService.synchDb(tableName);
|
||||
@GetMapping("/synchDb/{tableName}/{databaseName}")
|
||||
public Result synchDb (@PathVariable("tableName") String tableName, @PathVariable("databaseName") String databaseName) {
|
||||
genTableService.synchDb(databaseName,tableName);
|
||||
return success();
|
||||
}
|
||||
|
||||
|
@ -190,4 +192,21 @@ public class GenController extends BaseController {
|
|||
response.setContentType("application/octet-stream; charset=UTF-8");
|
||||
IOUtils.write(data, response.getOutputStream());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询数据库列表
|
||||
*/
|
||||
@RequiresPermissions("tool:gen:getDataBaseList")
|
||||
@GetMapping("/db/getDataBaseList")
|
||||
public Result<List<String>> getDataBaseList () {
|
||||
Result<List<String>> retuenResult = Result.success();
|
||||
List<String> list = null;
|
||||
try {
|
||||
list = genTableService.getDataBaseList();
|
||||
retuenResult.setData(list);
|
||||
} catch (Exception e) {
|
||||
retuenResult = Result.error(e.getMessage());
|
||||
}
|
||||
return retuenResult;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,6 +35,12 @@ public class GenTable extends BaseEntity {
|
|||
*/
|
||||
private Long tableId;
|
||||
|
||||
|
||||
/**
|
||||
* 数据库名称
|
||||
*/
|
||||
private String databaseName;
|
||||
|
||||
/**
|
||||
* 表名称
|
||||
*/
|
||||
|
@ -154,6 +160,11 @@ public class GenTable extends BaseEntity {
|
|||
*/
|
||||
private String parentMenuName;
|
||||
|
||||
public String getDatabaseName() {
|
||||
return databaseName;
|
||||
}
|
||||
|
||||
|
||||
public static boolean isSub (String tplCategory) {
|
||||
return tplCategory != null && StringUtils.equals(GenConstants.TPL_SUB, tplCategory);
|
||||
}
|
||||
|
@ -373,4 +384,11 @@ public class GenTable extends BaseEntity {
|
|||
public boolean isSuperColumn (String javaField) {
|
||||
return isSuperColumn(this.tplCategory, javaField);
|
||||
}
|
||||
|
||||
public void setDatabaseName(String databaseName) {
|
||||
this.databaseName = databaseName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
package com.muyu.gen.domain.req;
|
||||
|
||||
/**
|
||||
* @author: HuFangMing
|
||||
* @version: 1.0.0
|
||||
* @ClassName: ImportTableReq
|
||||
* @Description: TODO
|
||||
* @createTime: 2024/2/29 10:22
|
||||
*/
|
||||
|
||||
public class ImportTableReq {
|
||||
//多个表
|
||||
private String tables;
|
||||
//数据库名称
|
||||
private String databaseName;
|
||||
|
||||
public String getTables() {
|
||||
return tables;
|
||||
}
|
||||
|
||||
public void setTables(String tables) {
|
||||
this.tables = tables;
|
||||
}
|
||||
|
||||
public String getDatabaseName() {
|
||||
return databaseName;
|
||||
}
|
||||
|
||||
public void setDatabaseName(String databaseName) {
|
||||
this.databaseName = databaseName;
|
||||
}
|
||||
}
|
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
import com.muyu.gen.domain.GenTableColumn;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 业务字段 数据层
|
||||
|
@ -14,11 +15,13 @@ public interface GenTableColumnMapper extends BaseMapper<GenTableColumn> {
|
|||
/**
|
||||
* 根据表名称查询列信息
|
||||
*
|
||||
* @param tableName 表名称
|
||||
*
|
||||
* @param databaseName
|
||||
* @param tableName 表名称
|
||||
* @return 列信息
|
||||
*/
|
||||
List<GenTableColumn> selectDbTableColumnsByName (String tableName);
|
||||
List<GenTableColumn> selectDbTableColumnsByName (
|
||||
@Param("databaseName") String databaseName, @Param("tableName") String tableName);
|
||||
|
||||
|
||||
/**
|
||||
* 查询业务字段列表
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
import com.muyu.gen.domain.GenTable;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 业务 数据层
|
||||
|
@ -32,11 +33,12 @@ public interface GenTableMapper extends BaseMapper<GenTable> {
|
|||
/**
|
||||
* 查询据库列表
|
||||
*
|
||||
* @param tableNames 表名称组
|
||||
*
|
||||
* @param databaseName
|
||||
* @param tableNames 表名称组
|
||||
* @return 数据库表集合
|
||||
*/
|
||||
List<GenTable> selectDbTableListByNames (String[] tableNames);
|
||||
List<GenTable> selectDbTableListByNames (@Param("databaseName") String databaseName, @Param("array") String[] tableNames);
|
||||
|
||||
|
||||
/**
|
||||
* 查询所有表信息
|
||||
|
@ -89,4 +91,6 @@ public interface GenTableMapper extends BaseMapper<GenTable> {
|
|||
* @return 结果
|
||||
*/
|
||||
int deleteGenTableByIds (Long[] ids);
|
||||
|
||||
List<String> getDataBaseList();
|
||||
}
|
||||
|
|
|
@ -110,13 +110,13 @@ public class GenTableServiceImpl implements IGenTableService {
|
|||
/**
|
||||
* 查询据库列表
|
||||
*
|
||||
* @param tableNames 表名称组
|
||||
*
|
||||
* @param databaseName
|
||||
* @param tableNames 表名称组
|
||||
* @return 数据库表集合
|
||||
*/
|
||||
@Override
|
||||
public List<GenTable> selectDbTableListByNames (String[] tableNames) {
|
||||
return genTableMapper.selectDbTableListByNames(tableNames);
|
||||
public List<GenTable> selectDbTableListByNames (String databaseName, String[] tableNames) {
|
||||
return genTableMapper.selectDbTableListByNames(databaseName,tableNames);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -166,20 +166,22 @@ public class GenTableServiceImpl implements IGenTableService {
|
|||
/**
|
||||
* 导入表结构
|
||||
*
|
||||
* @param tableList 导入表列表
|
||||
* @param databaseName
|
||||
* @param tableList 导入表列表
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void importGenTable (List<GenTable> tableList) {
|
||||
public void importGenTable (String databaseName, List<GenTable> tableList) {
|
||||
String operName = SecurityUtils.getUsername();
|
||||
try {
|
||||
for (GenTable table : tableList) {
|
||||
String tableName = table.getTableName();
|
||||
GenUtils.initTable(table, operName);
|
||||
table.setDatabaseName(databaseName);
|
||||
int row = genTableMapper.insertGenTable(table);
|
||||
if (row > 0) {
|
||||
// 保存列信息
|
||||
List<GenTableColumn> genTableColumns = genTableColumnMapper.selectDbTableColumnsByName(tableName);
|
||||
List<GenTableColumn> genTableColumns = genTableColumnMapper.selectDbTableColumnsByName(databaseName,tableName);
|
||||
for (GenTableColumn column : genTableColumns) {
|
||||
GenUtils.initColumnField(column, table);
|
||||
genTableColumnMapper.insertGenTableColumn(column);
|
||||
|
@ -282,12 +284,12 @@ public class GenTableServiceImpl implements IGenTableService {
|
|||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void synchDb (String tableName) {
|
||||
public void synchDb (String databaseName,String tableName) {
|
||||
GenTable table = genTableMapper.selectGenTableByName(tableName);
|
||||
List<GenTableColumn> tableColumns = table.getColumns();
|
||||
Map<String, GenTableColumn> tableColumnMap = tableColumns.stream().collect(Collectors.toMap(GenTableColumn::getColumnName, Function.identity()));
|
||||
|
||||
List<GenTableColumn> dbTableColumns = genTableColumnMapper.selectDbTableColumnsByName(tableName);
|
||||
List<GenTableColumn> dbTableColumns = genTableColumnMapper.selectDbTableColumnsByName(databaseName, tableName);
|
||||
if (StringUtils.isEmpty(dbTableColumns)) {
|
||||
throw new ServiceException("同步数据失败,原表结构不存在");
|
||||
}
|
||||
|
@ -304,8 +306,8 @@ public class GenTableServiceImpl implements IGenTableService {
|
|||
column.setQueryType(prevColumn.getQueryType());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(prevColumn.getIsRequired()) && !column.isPk()
|
||||
&& (column.isInsert() || column.isEdit())
|
||||
&& ((column.isUsableColumn()) || (!column.isSuperColumn()))) {
|
||||
&& (column.isInsert() || column.isEdit())
|
||||
&& ((column.isUsableColumn()) || (!column.isSuperColumn()))) {
|
||||
// 如果是(新增/修改&非主键/非忽略及父属性),继续保留必填/显示类型选项
|
||||
column.setIsRequired(prevColumn.getIsRequired());
|
||||
column.setHtmlType(prevColumn.getHtmlType());
|
||||
|
@ -462,4 +464,8 @@ public class GenTableServiceImpl implements IGenTableService {
|
|||
genTable.setParentMenuName(parentMenuName);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public List<String> getDataBaseList() {
|
||||
return genTableMapper.getDataBaseList();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,11 +32,12 @@ public interface IGenTableService {
|
|||
/**
|
||||
* 查询据库列表
|
||||
*
|
||||
* @param tableNames 表名称组
|
||||
*
|
||||
* @param databaseName
|
||||
* @param tableNames 表名称组
|
||||
* @return 数据库表集合
|
||||
*/
|
||||
List<GenTable> selectDbTableListByNames (String[] tableNames);
|
||||
List<GenTable> selectDbTableListByNames (String databaseName, String[] tableNames);
|
||||
|
||||
|
||||
/**
|
||||
* 查询所有表信息
|
||||
|
@ -75,9 +76,11 @@ public interface IGenTableService {
|
|||
/**
|
||||
* 导入表结构
|
||||
*
|
||||
* @param tableList 导入表列表
|
||||
* @param databaseName
|
||||
* @param tableList 导入表列表
|
||||
*/
|
||||
void importGenTable (List<GenTable> tableList);
|
||||
void importGenTable (String databaseName, List<GenTable> tableList);
|
||||
|
||||
|
||||
/**
|
||||
* 预览代码
|
||||
|
@ -111,7 +114,7 @@ public interface IGenTableService {
|
|||
*
|
||||
* @param tableName 表名称
|
||||
*/
|
||||
void synchDb (String tableName);
|
||||
void synchDb (String databaseName,String tableName);
|
||||
|
||||
/**
|
||||
* 批量生成代码(下载方式)
|
||||
|
@ -128,4 +131,7 @@ public interface IGenTableService {
|
|||
* @param genTable 业务信息
|
||||
*/
|
||||
void validateEdit (GenTable genTable);
|
||||
|
||||
|
||||
List<String> getDataBaseList();
|
||||
}
|
||||
|
|
|
@ -15,9 +15,9 @@ import java.util.List;
|
|||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 模板工具类
|
||||
* 模板处理工具类
|
||||
*
|
||||
* @author muyu
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class VelocityUtils {
|
||||
/**
|
||||
|
@ -70,9 +70,6 @@ public class VelocityUtils {
|
|||
if (GenConstants.TPL_TREE.equals(tplCategory)) {
|
||||
setTreeVelocityContext(velocityContext, genTable);
|
||||
}
|
||||
if (GenConstants.TPL_SUB.equals(tplCategory)) {
|
||||
setSubVelocityContext(velocityContext, genTable);
|
||||
}
|
||||
return velocityContext;
|
||||
}
|
||||
|
||||
|
@ -102,22 +99,6 @@ public class VelocityUtils {
|
|||
}
|
||||
}
|
||||
|
||||
public static void setSubVelocityContext (VelocityContext context, GenTable genTable) {
|
||||
GenTable subTable = genTable.getSubTable();
|
||||
String subTableName = genTable.getSubTableName();
|
||||
String subTableFkName = genTable.getSubTableFkName();
|
||||
String subClassName = genTable.getSubTable().getClassName();
|
||||
String subTableFkClassName = StringUtils.convertToCamelCase(subTableFkName);
|
||||
|
||||
context.put("subTable", subTable);
|
||||
context.put("subTableName", subTableName);
|
||||
context.put("subTableFkName", subTableFkName);
|
||||
context.put("subTableFkClassName", subTableFkClassName);
|
||||
context.put("subTableFkclassName", StringUtils.uncapitalize(subTableFkClassName));
|
||||
context.put("subClassName", subClassName);
|
||||
context.put("subclassName", StringUtils.uncapitalize(subClassName));
|
||||
context.put("subImportList", getImportList(genTable.getSubTable()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取模板信息
|
||||
|
@ -127,10 +108,13 @@ public class VelocityUtils {
|
|||
public static List<String> getTemplateList (String tplCategory) {
|
||||
List<String> templates = new ArrayList<String>();
|
||||
templates.add("vm/java/domain.java.vm");
|
||||
templates.add("vm/java/mapper.java.vm");
|
||||
templates.add("vm/java/query.java.vm");
|
||||
templates.add("vm/java/save.java.vm");
|
||||
templates.add("vm/java/edit.java.vm");
|
||||
templates.add("vm/java/controller.java.vm");
|
||||
templates.add("vm/java/service.java.vm");
|
||||
templates.add("vm/java/serviceImpl.java.vm");
|
||||
templates.add("vm/java/controller.java.vm");
|
||||
templates.add("vm/java/mapper.java.vm");
|
||||
templates.add("vm/xml/mapper.xml.vm");
|
||||
templates.add("vm/sql/sql.vm");
|
||||
templates.add("vm/js/api.js.vm");
|
||||
|
@ -138,9 +122,6 @@ public class VelocityUtils {
|
|||
templates.add("vm/vue/index.vue.vm");
|
||||
} else if (GenConstants.TPL_TREE.equals(tplCategory)) {
|
||||
templates.add("vm/vue/index-tree.vue.vm");
|
||||
} else if (GenConstants.TPL_SUB.equals(tplCategory)) {
|
||||
templates.add("vm/vue/index.vue.vm");
|
||||
templates.add("vm/java/sub-domain.java.vm");
|
||||
}
|
||||
return templates;
|
||||
}
|
||||
|
@ -167,12 +148,19 @@ public class VelocityUtils {
|
|||
if (template.contains("domain.java.vm")) {
|
||||
fileName = StringUtils.format("{}/domain/{}.java", javaPath, className);
|
||||
}
|
||||
if (template.contains("sub-domain.java.vm") && StringUtils.equals(GenConstants.TPL_SUB, genTable.getTplCategory())) {
|
||||
fileName = StringUtils.format("{}/domain/{}.java", javaPath, genTable.getSubTable().getClassName());
|
||||
} else if (template.contains("mapper.java.vm")) {
|
||||
if (template.contains("query.java.vm")) {
|
||||
fileName = StringUtils.format("{}/domain/req/{}QueryReq.java", javaPath, className);
|
||||
}
|
||||
if (template.contains("save.java.vm")) {
|
||||
fileName = StringUtils.format("{}/domain/req/{}SaveReq.java", javaPath, className);
|
||||
}
|
||||
if (template.contains("edit.java.vm")) {
|
||||
fileName = StringUtils.format("{}/domain/req/{}EditReq.java", javaPath, className);
|
||||
}
|
||||
if (template.contains("mapper.java.vm")) {
|
||||
fileName = StringUtils.format("{}/mapper/{}Mapper.java", javaPath, className);
|
||||
} else if (template.contains("service.java.vm")) {
|
||||
fileName = StringUtils.format("{}/service/I{}Service.java", javaPath, className);
|
||||
fileName = StringUtils.format("{}/service/{}Service.java", javaPath, className);
|
||||
} else if (template.contains("serviceImpl.java.vm")) {
|
||||
fileName = StringUtils.format("{}/service/impl/{}ServiceImpl.java", javaPath, className);
|
||||
} else if (template.contains("controller.java.vm")) {
|
||||
|
@ -212,11 +200,7 @@ public class VelocityUtils {
|
|||
*/
|
||||
public static HashSet<String> getImportList (GenTable genTable) {
|
||||
List<GenTableColumn> columns = genTable.getColumns();
|
||||
GenTable subGenTable = genTable.getSubTable();
|
||||
HashSet<String> importList = new HashSet<String>();
|
||||
if (StringUtils.isNotNull(subGenTable)) {
|
||||
importList.add("java.util.List");
|
||||
}
|
||||
for (GenTableColumn column : columns) {
|
||||
if (!column.isSuperColumn() && GenConstants.TYPE_DATE.equals(column.getJavaType())) {
|
||||
importList.add("java.util.Date");
|
||||
|
@ -239,10 +223,6 @@ public class VelocityUtils {
|
|||
List<GenTableColumn> columns = genTable.getColumns();
|
||||
Set<String> dicts = new HashSet<String>();
|
||||
addDicts(dicts, columns);
|
||||
if (StringUtils.isNotNull(genTable.getSubTable())) {
|
||||
List<GenTableColumn> subColumns = genTable.getSubTable().getColumns();
|
||||
addDicts(dicts, subColumns);
|
||||
}
|
||||
return StringUtils.join(dicts, ", ");
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,8 @@
|
|||
(case when extra = 'auto_increment' then '1' else '0' end) as is_increment,
|
||||
column_type
|
||||
from information_schema.columns
|
||||
where table_schema = (select database())
|
||||
where
|
||||
<include refid="com.muyu.gen.mapper.GenTableMapper.databaseNameCommon"/>
|
||||
and table_name = (#{tableName})
|
||||
order by ordinal_position
|
||||
</select>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
<resultMap type="com.muyu.gen.domain.GenTable" id="GenTableResult">
|
||||
<id property="tableId" column="table_id"/>
|
||||
<result property="databaseName" column="database_name"/>
|
||||
<result property="tableName" column="table_name"/>
|
||||
<result property="tableComment" column="table_comment"/>
|
||||
<result property="subTableName" column="sub_table_name"/>
|
||||
|
@ -55,6 +56,7 @@
|
|||
|
||||
<sql id="selectGenTableVo">
|
||||
select table_id,
|
||||
database_name,
|
||||
table_name,
|
||||
table_comment,
|
||||
sub_table_name,
|
||||
|
@ -77,9 +79,21 @@
|
|||
from gen_table
|
||||
</sql>
|
||||
|
||||
<sql id="databaseNameCommon">
|
||||
<if test="databaseName!=null and databaseName!=''">
|
||||
table_schema =#{databaseName}
|
||||
</if>
|
||||
<if test="databaseName==null or databaseName==''">
|
||||
table_schema = (select database())
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectGenTableList" parameterType="com.muyu.gen.domain.GenTable" resultMap="GenTableResult">
|
||||
<include refid="selectGenTableVo"/>
|
||||
<where>
|
||||
<if test="databaseName!=null and databaseName!=''">
|
||||
AND lower(database_name) like lower(concat('%', #{databaseName}, '%'))
|
||||
</if>
|
||||
<if test="tableName != null and tableName != ''">
|
||||
AND lower(table_name) like lower(concat('%', #{tableName}, '%'))
|
||||
</if>
|
||||
|
@ -96,8 +110,9 @@
|
|||
</select>
|
||||
|
||||
<select id="selectDbTableList" parameterType="com.muyu.gen.domain.GenTable" resultMap="GenTableResult">
|
||||
select table_name, table_comment, create_time, update_time from information_schema.tables
|
||||
where table_schema = (select database())
|
||||
select table_name database_name, table_name, table_comment, create_time, update_time from information_schema.tables
|
||||
where
|
||||
<include refid="databaseNameCommon"/>
|
||||
AND table_name NOT LIKE 'qrtz_%' AND table_name NOT LIKE 'gen_%'
|
||||
AND table_name NOT IN (select table_name from gen_table)
|
||||
<if test="tableName != null and tableName != ''">
|
||||
|
@ -117,7 +132,8 @@
|
|||
|
||||
<select id="selectDbTableListByNames" resultMap="GenTableResult">
|
||||
select table_name, table_comment, create_time, update_time from information_schema.tables
|
||||
where table_name NOT LIKE 'qrtz_%' and table_name NOT LIKE 'gen_%' and table_schema = (select database())
|
||||
where table_name NOT LIKE 'qrtz_%' and table_name NOT LIKE 'gen_%' and <include refid="databaseNameCommon"/>
|
||||
-- table_schema = (select database())
|
||||
and table_name in
|
||||
<foreach collection="array" item="name" open="(" separator="," close=")">
|
||||
#{name}
|
||||
|
@ -212,6 +228,12 @@
|
|||
order by c.sort
|
||||
</select>
|
||||
|
||||
<!--获取所有的数据库名称-->
|
||||
<select id="getDataBaseList" resultType="java.lang.String">
|
||||
SELECT schema_name FROM information_schema.SCHEMATA
|
||||
where schema_name not in ('information_schema', 'mysql', 'performance_schema', 'sys')
|
||||
</select>
|
||||
|
||||
<select id="selectGenTableAll" parameterType="String" resultMap="GenTableResult">
|
||||
SELECT t.table_id,
|
||||
t.table_name,
|
||||
|
@ -251,6 +273,7 @@
|
|||
|
||||
<insert id="insertGenTable" parameterType="com.muyu.gen.domain.GenTable" useGeneratedKeys="true" keyProperty="tableId">
|
||||
insert into gen_table (
|
||||
<if test="databaseName != null">database_name,</if>
|
||||
<if test="tableName != null">table_name,</if>
|
||||
<if test="tableComment != null and tableComment != ''">table_comment,</if>
|
||||
<if test="className != null and className != ''">class_name,</if>
|
||||
|
@ -266,6 +289,7 @@
|
|||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="databaseName != null">#{databaseName},</if>
|
||||
<if test="tableName != null">#{tableName},</if>
|
||||
<if test="tableComment != null and tableComment != ''">#{tableComment},</if>
|
||||
<if test="className != null and className != ''">#{className},</if>
|
||||
|
@ -286,6 +310,7 @@
|
|||
<update id="updateGenTable" parameterType="com.muyu.gen.domain.GenTable">
|
||||
update gen_table
|
||||
<set>
|
||||
<if test="databaseName != null">database_name = #{databaseName},</if>
|
||||
<if test="tableName != null">table_name = #{tableName},</if>
|
||||
<if test="tableComment != null and tableComment != ''">table_comment = #{tableComment},</if>
|
||||
<if test="subTableName != null">sub_table_name = #{subTableName},</if>
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package ${packageName}.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
@ -12,15 +13,18 @@ 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.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.common.log.annotation.Log;
|
||||
import com.muyu.common.log.enums.BusinessType;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import ${packageName}.domain.${ClassName};
|
||||
import ${packageName}.service.I${ClassName}Service;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
#if($table.crud || $table.sub)
|
||||
import ${packageName}.domain.req.${ClassName}QueryReq;
|
||||
import ${packageName}.domain.req.${ClassName}SaveReq;
|
||||
import ${packageName}.domain.req.${ClassName}EditReq;
|
||||
import ${packageName}.service.${ClassName}Service;
|
||||
#if($table.crud)
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
#elseif($table.tree)
|
||||
#end
|
||||
|
@ -31,42 +35,41 @@ import com.muyu.common.core.web.page.TableDataInfo;
|
|||
* @author ${author}
|
||||
* @date ${datetime}
|
||||
*/
|
||||
@Api(tags = "${functionName}")
|
||||
@RestController
|
||||
@RequestMapping("/${businessName}")
|
||||
public class ${ClassName}Controller extends BaseController
|
||||
{
|
||||
public class ${ClassName}Controller extends BaseController {
|
||||
@Autowired
|
||||
private I${ClassName}Service ${className}Service;
|
||||
private ${ClassName}Service ${className}Service;
|
||||
|
||||
/**
|
||||
* 查询${functionName}列表
|
||||
*/
|
||||
@ApiOperation("获取${functionName}列表")
|
||||
@RequiresPermissions("${permissionPrefix}:list")
|
||||
@GetMapping("/list")
|
||||
#if($table.crud || $table.sub)
|
||||
public Result<TableDataInfo> list(${ClassName} ${className})
|
||||
{
|
||||
#if($table.crud)
|
||||
public Result<TableDataInfo<${ClassName}>> list(${ClassName}QueryReq ${className}QueryReq) {
|
||||
startPage();
|
||||
List<${ClassName}> list = ${className}Service.select${ClassName}List(${className});
|
||||
List<${ClassName}> list = ${className}Service.list(${ClassName}.queryBuild(${className}QueryReq));
|
||||
return getDataTable(list);
|
||||
}
|
||||
#elseif($table.tree)
|
||||
public Result list(${ClassName} ${className})
|
||||
{
|
||||
List<${ClassName}> list = ${className}Service.select${ClassName}List(${className});
|
||||
return success(list);
|
||||
public Result<List<${ClassName}>> list(${ClassName} ${className}) {
|
||||
List<${ClassName}> list = ${className}Service.list(${className});
|
||||
return Result.success(list);
|
||||
}
|
||||
#end
|
||||
|
||||
/**
|
||||
* 导出${functionName}列表
|
||||
*/
|
||||
@ApiOperation("导出${functionName}列表")
|
||||
@RequiresPermissions("${permissionPrefix}:export")
|
||||
@Log(title = "${functionName}", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ${ClassName} ${className})
|
||||
{
|
||||
List<${ClassName}> list = ${className}Service.select${ClassName}List(${className});
|
||||
public void export(HttpServletResponse response, ${ClassName} ${className}) {
|
||||
List<${ClassName}> list = ${className}Service.list(${className});
|
||||
ExcelUtil<${ClassName}> util = new ExcelUtil<${ClassName}>(${ClassName}.class);
|
||||
util.exportExcel(response, list, "${functionName}数据");
|
||||
}
|
||||
|
@ -74,11 +77,12 @@ public class ${ClassName}Controller extends BaseController
|
|||
/**
|
||||
* 获取${functionName}详细信息
|
||||
*/
|
||||
@ApiOperation("获取${functionName}详细信息")
|
||||
@RequiresPermissions("${permissionPrefix}:query")
|
||||
@GetMapping(value = "/{${pkColumn.javaField}}")
|
||||
public Result getInfo(@PathVariable("${pkColumn.javaField}") ${pkColumn.javaType} ${pkColumn.javaField})
|
||||
{
|
||||
return success(${className}Service.select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaField}));
|
||||
@ApiImplicitParam(name = "${pkColumn.javaField}", value = "${pkColumn.javaField}", required = true, dataType = "${pkColumn.javaType}", paramType = "path", dataTypeClass = ${pkColumn.javaType}.class)
|
||||
public Result<${ClassName}> getInfo(@PathVariable("${pkColumn.javaField}") ${pkColumn.javaType} ${pkColumn.javaField}) {
|
||||
return Result.success(${className}Service.getById(${pkColumn.javaField}));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -87,9 +91,9 @@ public class ${ClassName}Controller extends BaseController
|
|||
@RequiresPermissions("${permissionPrefix}:add")
|
||||
@Log(title = "${functionName}", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public Result add(@RequestBody ${ClassName} ${className})
|
||||
{
|
||||
return toAjax(${className}Service.insert${ClassName}(${className}));
|
||||
@ApiOperation("新增${functionName}")
|
||||
public Result<String> add(@RequestBody ${ClassName}SaveReq ${className}SaveReq) {
|
||||
return toAjax(${className}Service.save(${ClassName}.saveBuild(${className}SaveReq)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -97,10 +101,10 @@ public class ${ClassName}Controller extends BaseController
|
|||
*/
|
||||
@RequiresPermissions("${permissionPrefix}:edit")
|
||||
@Log(title = "${functionName}", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public Result edit(@RequestBody ${ClassName} ${className})
|
||||
{
|
||||
return toAjax(${className}Service.update${ClassName}(${className}));
|
||||
@PutMapping("/{${pkColumn.javaField}}")
|
||||
@ApiOperation("修改${functionName}")
|
||||
public Result<String> edit(@PathVariable ${pkColumn.javaType} ${pkColumn.javaField}, @RequestBody ${ClassName}EditReq ${className}EditReq) {
|
||||
return toAjax(${className}Service.updateById(${ClassName}.editBuild(${pkColumn.javaField},${className}EditReq)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -109,8 +113,9 @@ public class ${ClassName}Controller extends BaseController
|
|||
@RequiresPermissions("${permissionPrefix}:remove")
|
||||
@Log(title = "${functionName}", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{${pkColumn.javaField}s}")
|
||||
public Result remove(@PathVariable ${pkColumn.javaType}[] ${pkColumn.javaField}s)
|
||||
{
|
||||
return toAjax(${className}Service.delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaField}s));
|
||||
@ApiOperation("删除${functionName}")
|
||||
@ApiImplicitParam(name = "${pkColumn.javaField}", value = "${pkColumn.javaField}", required = true, dataType = "${pkColumn.javaType}", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
|
||||
public Result<String> remove(@PathVariable List<${pkColumn.javaType}> ${pkColumn.javaField}s) {
|
||||
return toAjax(${className}Service.removeBatchByIds(${pkColumn.javaField}s));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,10 +3,20 @@ package ${packageName}.domain;
|
|||
#foreach ($import in $importList)
|
||||
import ${import};
|
||||
#end
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
#if($table.crud || $table.sub)
|
||||
import ${packageName}.domain.req.${ClassName}QueryReq;
|
||||
import ${packageName}.domain.req.${ClassName}SaveReq;
|
||||
import ${packageName}.domain.req.${ClassName}EditReq;
|
||||
#if($table.crud)
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
#elseif($table.tree)
|
||||
import com.muyu.common.core.web.domain.TreeEntity;
|
||||
|
@ -18,13 +28,20 @@ import com.muyu.common.core.web.domain.TreeEntity;
|
|||
* @author ${author}
|
||||
* @date ${datetime}
|
||||
*/
|
||||
#if($table.crud || $table.sub)
|
||||
#if($table.crud)
|
||||
#set($Entity="BaseEntity")
|
||||
#elseif($table.tree)
|
||||
#set($Entity="TreeEntity")
|
||||
#end
|
||||
public class ${ClassName} extends ${Entity}
|
||||
{
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("${tableName}")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "${ClassName}", description = "${functionName}")
|
||||
public class ${ClassName} extends ${Entity} {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
#foreach ($column in $columns)
|
||||
|
@ -46,60 +63,77 @@ public class ${ClassName} extends ${Entity}
|
|||
@Excel(name = "${comment}")
|
||||
#end
|
||||
#end
|
||||
#if($column.javaField == $pkColumn.javaField)
|
||||
@TableId(value = "${pkColumn.columnName}",type = IdType.AUTO)
|
||||
#end
|
||||
#set($comment='')
|
||||
#if($column.isRequired == '1')
|
||||
#set($comment=', required = true')
|
||||
#end
|
||||
@ApiModelProperty(name = "${column.columnComment}", value = "${column.columnComment}"$comment)
|
||||
private $column.javaType $column.javaField;
|
||||
|
||||
#end
|
||||
#end
|
||||
#if($table.sub)
|
||||
/** $table.subTable.functionName信息 */
|
||||
private List<${subClassName}> ${subclassName}List;
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
public static ${ClassName} queryBuild( ${ClassName}QueryReq ${className}QueryReq){
|
||||
return ${ClassName}.builder()
|
||||
#foreach ($column in $columns)
|
||||
#if($column.isQuery == '1')
|
||||
#if(!$table.isSuperColumn($column.javaField))
|
||||
#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]"))
|
||||
#set($AttrName=$column.javaField)
|
||||
#else
|
||||
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
||||
#end
|
||||
.${column.javaField}(${className}QueryReq.get${AttrName}())
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
.build();
|
||||
}
|
||||
|
||||
#end
|
||||
/**
|
||||
* 添加构造器
|
||||
*/
|
||||
public static ${ClassName} saveBuild(${ClassName}SaveReq ${className}SaveReq){
|
||||
return ${ClassName}.builder()
|
||||
#foreach ($column in $columns)
|
||||
#if($column.isEdit == '1')
|
||||
#if(!$table.isSuperColumn($column.javaField))
|
||||
#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]"))
|
||||
#set($AttrName=$column.javaField)
|
||||
#else
|
||||
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
||||
#end
|
||||
.${column.javaField}(${className}SaveReq.get${AttrName}())
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改构造器
|
||||
*/
|
||||
public static ${ClassName} editBuild(${pkColumn.javaType} ${pkColumn.javaField}, ${ClassName}EditReq ${className}EditReq){
|
||||
return ${ClassName}.builder()
|
||||
.${pkColumn.javaField}(${pkColumn.javaField})
|
||||
#foreach ($column in $columns)
|
||||
#if(!$table.isSuperColumn($column.javaField))
|
||||
#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]"))
|
||||
#set($AttrName=$column.javaField)
|
||||
#else
|
||||
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
||||
#if($column.isEdit == '1')
|
||||
#if(!$table.isSuperColumn($column.javaField))
|
||||
#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]"))
|
||||
#set($AttrName=$column.javaField)
|
||||
#else
|
||||
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
||||
#end
|
||||
.${column.javaField}(${className}EditReq.get${AttrName}())
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
public void set${AttrName}($column.javaType $column.javaField)
|
||||
{
|
||||
this.$column.javaField = $column.javaField;
|
||||
.build();
|
||||
}
|
||||
|
||||
public $column.javaType get${AttrName}()
|
||||
{
|
||||
return $column.javaField;
|
||||
}
|
||||
#end
|
||||
#end
|
||||
|
||||
#if($table.sub)
|
||||
public List<${subClassName}> get${subClassName}List()
|
||||
{
|
||||
return ${subclassName}List;
|
||||
}
|
||||
|
||||
public void set${subClassName}List(List<${subClassName}> ${subclassName}List)
|
||||
{
|
||||
this.${subclassName}List = ${subclassName}List;
|
||||
}
|
||||
|
||||
#end
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
#foreach ($column in $columns)
|
||||
#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]"))
|
||||
#set($AttrName=$column.javaField)
|
||||
#else
|
||||
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
||||
#end
|
||||
.append("${column.javaField}", get${AttrName}())
|
||||
#end
|
||||
#if($table.sub)
|
||||
.append("${subclassName}List", get${subClassName}List())
|
||||
#end
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
package ${packageName}.domain.req;
|
||||
|
||||
#foreach ($import in $importList)
|
||||
import ${import};
|
||||
#end
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
#if($table.crud)
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
#elseif($table.tree)
|
||||
import com.muyu.common.core.web.domain.TreeEntity;
|
||||
#end
|
||||
|
||||
/**
|
||||
* ${functionName}对象 ${tableName}
|
||||
*
|
||||
* @author ${author}
|
||||
* @date ${datetime}
|
||||
*/
|
||||
#if($table.crud)
|
||||
#set($Entity="BaseEntity")
|
||||
#elseif($table.tree)
|
||||
#set($Entity="TreeEntity")
|
||||
#end
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "${ClassName}EditReq", description = "${functionName}")
|
||||
public class ${ClassName}EditReq extends ${Entity} {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
#foreach ($column in $columns)
|
||||
#if(!$table.isSuperColumn($column.javaField))
|
||||
#if($column.isEdit == '1')
|
||||
/** $column.columnComment */
|
||||
#if($column.list)
|
||||
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||
#if($parentheseIndex != -1)
|
||||
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
||||
#else
|
||||
#set($comment=$column.columnComment)
|
||||
#end
|
||||
#if($column.javaType == 'Date')
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
#end
|
||||
#end
|
||||
#set($isRequired='')
|
||||
#if($column.isRequired == '1')
|
||||
#set($isRequired=', required = true')
|
||||
#end
|
||||
@ApiModelProperty(name = "${column.columnComment}", value = "${column.columnComment}"$isRequired)
|
||||
private $column.javaType $column.javaField;
|
||||
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
}
|
|
@ -1,91 +1,15 @@
|
|||
package ${packageName}.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import ${packageName}.domain.${ClassName};
|
||||
#if($table.sub)
|
||||
import ${packageName}.domain.${subClassName};
|
||||
#end
|
||||
|
||||
/**
|
||||
* ${functionName}Mapper接口
|
||||
*
|
||||
*
|
||||
* @author ${author}
|
||||
* @date ${datetime}
|
||||
*/
|
||||
public interface ${ClassName}Mapper
|
||||
{
|
||||
/**
|
||||
* 查询${functionName}
|
||||
*
|
||||
* @param ${pkColumn.javaField} ${functionName}主键
|
||||
* @return ${functionName}
|
||||
*/
|
||||
public ${ClassName} select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField});
|
||||
public interface ${ClassName}Mapper extends BaseMapper<${ClassName}> {
|
||||
|
||||
/**
|
||||
* 查询${functionName}列表
|
||||
*
|
||||
* @param ${className} ${functionName}
|
||||
* @return ${functionName}集合
|
||||
*/
|
||||
public List<${ClassName}> select${ClassName}List(${ClassName} ${className});
|
||||
|
||||
/**
|
||||
* 新增${functionName}
|
||||
*
|
||||
* @param ${className} ${functionName}
|
||||
* @return 结果
|
||||
*/
|
||||
public int insert${ClassName}(${ClassName} ${className});
|
||||
|
||||
/**
|
||||
* 修改${functionName}
|
||||
*
|
||||
* @param ${className} ${functionName}
|
||||
* @return 结果
|
||||
*/
|
||||
public int update${ClassName}(${ClassName} ${className});
|
||||
|
||||
/**
|
||||
* 删除${functionName}
|
||||
*
|
||||
* @param ${pkColumn.javaField} ${functionName}主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField});
|
||||
|
||||
/**
|
||||
* 批量删除${functionName}
|
||||
*
|
||||
* @param ${pkColumn.javaField}s 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s);
|
||||
#if($table.sub)
|
||||
|
||||
/**
|
||||
* 批量删除${subTable.functionName}
|
||||
*
|
||||
* @param ${pkColumn.javaField}s 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int delete${subClassName}By${subTableFkClassName}s(${pkColumn.javaType}[] ${pkColumn.javaField}s);
|
||||
|
||||
/**
|
||||
* 批量新增${subTable.functionName}
|
||||
*
|
||||
* @param ${subclassName}List ${subTable.functionName}列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batch${subClassName}(List<${subClassName}> ${subclassName}List);
|
||||
|
||||
|
||||
/**
|
||||
* 通过${functionName}主键删除${subTable.functionName}信息
|
||||
*
|
||||
* @param ${pkColumn.javaField} ${functionName}ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int delete${subClassName}By${subTableFkClassName}(${pkColumn.javaType} ${pkColumn.javaField});
|
||||
#end
|
||||
}
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
package ${packageName}.domain.req;
|
||||
|
||||
#foreach ($import in $importList)
|
||||
import ${import};
|
||||
#end
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
#if($table.crud)
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
#elseif($table.tree)
|
||||
import com.muyu.common.core.web.domain.TreeEntity;
|
||||
#end
|
||||
|
||||
/**
|
||||
* ${functionName}对象 ${tableName}
|
||||
*
|
||||
* @author ${author}
|
||||
* @date ${datetime}
|
||||
*/
|
||||
#if($table.crud)
|
||||
#set($Entity="BaseEntity")
|
||||
#elseif($table.tree)
|
||||
#set($Entity="TreeEntity")
|
||||
#end
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "${ClassName}QueryReq", description = "${functionName}")
|
||||
public class ${ClassName}QueryReq extends ${Entity} {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
#foreach ($column in $columns)
|
||||
#if(!$table.isSuperColumn($column.javaField))
|
||||
#if($column.isQuery == '1')
|
||||
/** $column.columnComment */
|
||||
#if($column.list)
|
||||
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||
#if($parentheseIndex != -1)
|
||||
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
||||
#else
|
||||
#set($comment=$column.columnComment)
|
||||
#end
|
||||
#if($column.javaType == 'Date')
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
#end
|
||||
#end
|
||||
#if($column.javaField == $pkColumn.javaField)
|
||||
@TableId(value = "${pkColumn.javaField}",type = IdType.AUTO)
|
||||
#end
|
||||
@ApiModelProperty(name = "${column.columnComment}", value = "${column.columnComment}")
|
||||
private $column.javaType $column.javaField;
|
||||
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
package ${packageName}.domain.req;
|
||||
|
||||
#foreach ($import in $importList)
|
||||
import ${import};
|
||||
#end
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
#if($table.crud || $table.sub)
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
#elseif($table.tree)
|
||||
import com.muyu.common.core.web.domain.TreeEntity;
|
||||
#end
|
||||
|
||||
/**
|
||||
* ${functionName}对象 ${tableName}
|
||||
*
|
||||
* @author ${author}
|
||||
* @date ${datetime}
|
||||
*/
|
||||
#if($table.crud || $table.sub)
|
||||
#set($Entity="BaseEntity")
|
||||
#elseif($table.tree)
|
||||
#set($Entity="TreeEntity")
|
||||
#end
|
||||
public class ${ClassName}Req
|
||||
{
|
||||
|
||||
|
||||
#foreach ($column in $columns)
|
||||
#if(!$table.isSuperColumn($column.javaField))
|
||||
/** $column.columnComment */
|
||||
#if($column.list)
|
||||
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||
#if($parentheseIndex != -1)
|
||||
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
||||
#else
|
||||
#set($comment=$column.columnComment)
|
||||
#end
|
||||
#if($parentheseIndex != -1)
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
#elseif($column.javaType == 'Date')
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
#else
|
||||
@Excel(name = "${comment}")
|
||||
#end
|
||||
#end
|
||||
private $column.javaType $column.javaField;
|
||||
|
||||
#end
|
||||
#end
|
||||
#if($table.sub)
|
||||
/** $table.subTable.functionName信息 */
|
||||
private List<${subClassName}> ${subclassName}List;
|
||||
|
||||
#end
|
||||
#foreach ($column in $columns)
|
||||
#if(!$table.isSuperColumn($column.javaField))
|
||||
#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]"))
|
||||
#set($AttrName=$column.javaField)
|
||||
#else
|
||||
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
||||
#end
|
||||
public void set${AttrName}($column.javaType $column.javaField)
|
||||
{
|
||||
this.$column.javaField = $column.javaField;
|
||||
}
|
||||
|
||||
public $column.javaType get${AttrName}()
|
||||
{
|
||||
return $column.javaField;
|
||||
}
|
||||
#end
|
||||
#end
|
||||
|
||||
#if($table.sub)
|
||||
public List<${subClassName}> get${subClassName}List()
|
||||
{
|
||||
return ${subclassName}List;
|
||||
}
|
||||
|
||||
public void set${subClassName}List(List<${subClassName}> ${subclassName}List)
|
||||
{
|
||||
this.${subclassName}List = ${subclassName}List;
|
||||
}
|
||||
|
||||
#end
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
#foreach ($column in $columns)
|
||||
#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]"))
|
||||
#set($AttrName=$column.javaField)
|
||||
#else
|
||||
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
||||
#end
|
||||
.append("${column.javaField}", get${AttrName}())
|
||||
#end
|
||||
#if($table.sub)
|
||||
.append("${subclassName}List", get${subClassName}List())
|
||||
#end
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
package ${packageName}.domain.req;
|
||||
|
||||
#foreach ($import in $importList)
|
||||
import ${import};
|
||||
#end
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
#if($table.crud)
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
#elseif($table.tree)
|
||||
import com.muyu.common.core.web.domain.TreeEntity;
|
||||
#end
|
||||
|
||||
/**
|
||||
* ${functionName}对象 ${tableName}
|
||||
*
|
||||
* @author ${author}
|
||||
* @date ${datetime}
|
||||
*/
|
||||
#if($table.crud)
|
||||
#set($Entity="BaseEntity")
|
||||
#elseif($table.tree)
|
||||
#set($Entity="TreeEntity")
|
||||
#end
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "${ClassName}SaveReq", description = "${functionName}")
|
||||
public class ${ClassName}SaveReq extends ${Entity} {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
#foreach ($column in $columns)
|
||||
#if(!$table.isSuperColumn($column.javaField))
|
||||
#if($column.isInsert == '1')
|
||||
/** $column.columnComment */
|
||||
#if($column.list)
|
||||
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||
#if($parentheseIndex != -1)
|
||||
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
||||
#else
|
||||
#set($comment=$column.columnComment)
|
||||
#end
|
||||
#if($column.javaType == 'Date')
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
#end
|
||||
#end
|
||||
|
||||
#set($isRequired='')
|
||||
#if($column.isRequired == '1')
|
||||
#set($isRequired=', required = true')
|
||||
#end
|
||||
@ApiModelProperty(name = "${column.columnComment}", value = "${column.columnComment}"$isRequired)
|
||||
private $column.javaType $column.javaField;
|
||||
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
}
|
|
@ -2,60 +2,21 @@ package ${packageName}.service;
|
|||
|
||||
import java.util.List;
|
||||
import ${packageName}.domain.${ClassName};
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* ${functionName}Service接口
|
||||
*
|
||||
*
|
||||
* @author ${author}
|
||||
* @date ${datetime}
|
||||
*/
|
||||
public interface I${ClassName}Service
|
||||
{
|
||||
/**
|
||||
* 查询${functionName}
|
||||
*
|
||||
* @param ${pkColumn.javaField} ${functionName}主键
|
||||
* @return ${functionName}
|
||||
*/
|
||||
public ${ClassName} select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField});
|
||||
|
||||
public interface ${ClassName}Service extends IService<${ClassName}> {
|
||||
/**
|
||||
* 查询${functionName}列表
|
||||
*
|
||||
*
|
||||
* @param ${className} ${functionName}
|
||||
* @return ${functionName}集合
|
||||
*/
|
||||
public List<${ClassName}> select${ClassName}List(${ClassName} ${className});
|
||||
public List<${ClassName}> list(${ClassName} ${className});
|
||||
|
||||
/**
|
||||
* 新增${functionName}
|
||||
*
|
||||
* @param ${className} ${functionName}
|
||||
* @return 结果
|
||||
*/
|
||||
public int insert${ClassName}(${ClassName} ${className});
|
||||
|
||||
/**
|
||||
* 修改${functionName}
|
||||
*
|
||||
* @param ${className} ${functionName}
|
||||
* @return 结果
|
||||
*/
|
||||
public int update${ClassName}(${ClassName} ${className});
|
||||
|
||||
/**
|
||||
* 批量删除${functionName}
|
||||
*
|
||||
* @param ${pkColumn.javaField}s 需要删除的${functionName}主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s);
|
||||
|
||||
/**
|
||||
* 删除${functionName}信息
|
||||
*
|
||||
* @param ${pkColumn.javaField} ${functionName}主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField});
|
||||
}
|
||||
|
|
|
@ -1,23 +1,15 @@
|
|||
package ${packageName}.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
#foreach ($column in $columns)
|
||||
#if($column.javaField == 'createTime' || $column.javaField == 'updateTime')
|
||||
import com.muyu.common.core.utils.DateUtils;
|
||||
#break
|
||||
#end
|
||||
#end
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import com.muyu.common.core.utils.ObjUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
#if($table.sub)
|
||||
import java.util.ArrayList;
|
||||
import com.muyu.common.core.utils.StringUtils;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import ${packageName}.domain.${subClassName};
|
||||
#end
|
||||
import ${packageName}.mapper.${ClassName}Mapper;
|
||||
import ${packageName}.domain.${ClassName};
|
||||
import ${packageName}.service.I${ClassName}Service;
|
||||
import ${packageName}.service.${ClassName}Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
|
||||
/**
|
||||
* ${functionName}Service业务层处理
|
||||
|
@ -25,23 +17,9 @@ import ${packageName}.service.I${ClassName}Service;
|
|||
* @author ${author}
|
||||
* @date ${datetime}
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class ${ClassName}ServiceImpl implements I${ClassName}Service
|
||||
{
|
||||
@Autowired
|
||||
private ${ClassName}Mapper ${className}Mapper;
|
||||
|
||||
/**
|
||||
* 查询${functionName}
|
||||
*
|
||||
* @param ${pkColumn.javaField} ${functionName}主键
|
||||
* @return ${functionName}
|
||||
*/
|
||||
@Override
|
||||
public ${ClassName} select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField})
|
||||
{
|
||||
return ${className}Mapper.select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaField});
|
||||
}
|
||||
public class ${ClassName}ServiceImpl extends ServiceImpl<${ClassName}Mapper, ${ClassName}> implements ${ClassName}Service {
|
||||
|
||||
/**
|
||||
* 查询${functionName}列表
|
||||
|
@ -50,120 +28,49 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service
|
|||
* @return ${functionName}
|
||||
*/
|
||||
@Override
|
||||
public List<${ClassName}> select${ClassName}List(${ClassName} ${className})
|
||||
{
|
||||
return ${className}Mapper.select${ClassName}List(${className});
|
||||
}
|
||||
public List<${ClassName}> list(${ClassName} ${className}) {
|
||||
LambdaQueryWrapper<${ClassName}> queryWrapper = new LambdaQueryWrapper<>();
|
||||
#foreach($column in $columns)
|
||||
#set($queryType=$column.queryType)
|
||||
#set($javaField=$column.javaField)
|
||||
#set($JavaField=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
||||
|
||||
/**
|
||||
* 新增${functionName}
|
||||
*
|
||||
* @param ${className} ${functionName}
|
||||
* @return 结果
|
||||
*/
|
||||
#if($table.sub)
|
||||
@Transactional
|
||||
#end
|
||||
@Override
|
||||
public int insert${ClassName}(${ClassName} ${className})
|
||||
{
|
||||
#foreach ($column in $columns)
|
||||
#if($column.javaField == 'createTime')
|
||||
${className}.setCreateTime(DateUtils.getNowDate());
|
||||
#end
|
||||
#end
|
||||
#if($table.sub)
|
||||
int rows = ${className}Mapper.insert${ClassName}(${className});
|
||||
insert${subClassName}(${className});
|
||||
return rows;
|
||||
#else
|
||||
return ${className}Mapper.insert${ClassName}(${className});
|
||||
#end
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改${functionName}
|
||||
*
|
||||
* @param ${className} ${functionName}
|
||||
* @return 结果
|
||||
*/
|
||||
#if($table.sub)
|
||||
@Transactional
|
||||
#end
|
||||
@Override
|
||||
public int update${ClassName}(${ClassName} ${className})
|
||||
{
|
||||
#foreach ($column in $columns)
|
||||
#if($column.javaField == 'updateTime')
|
||||
${className}.setUpdateTime(DateUtils.getNowDate());
|
||||
#end
|
||||
#end
|
||||
#if($table.sub)
|
||||
${className}Mapper.delete${subClassName}By${subTableFkClassName}(${className}.get${pkColumn.capJavaField}());
|
||||
insert${subClassName}(${className});
|
||||
#end
|
||||
return ${className}Mapper.update${ClassName}(${className});
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除${functionName}
|
||||
*
|
||||
* @param ${pkColumn.javaField}s 需要删除的${functionName}主键
|
||||
* @return 结果
|
||||
*/
|
||||
#if($table.sub)
|
||||
@Transactional
|
||||
#end
|
||||
@Override
|
||||
public int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s)
|
||||
{
|
||||
#if($table.sub)
|
||||
${className}Mapper.delete${subClassName}By${subTableFkClassName}s(${pkColumn.javaField}s);
|
||||
#end
|
||||
return ${className}Mapper.delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaField}s);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除${functionName}信息
|
||||
*
|
||||
* @param ${pkColumn.javaField} ${functionName}主键
|
||||
* @return 结果
|
||||
*/
|
||||
#if($table.sub)
|
||||
@Transactional
|
||||
#end
|
||||
@Override
|
||||
public int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField})
|
||||
{
|
||||
#if($table.sub)
|
||||
${className}Mapper.delete${subClassName}By${subTableFkClassName}(${pkColumn.javaField});
|
||||
#end
|
||||
return ${className}Mapper.delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaField});
|
||||
}
|
||||
#if($table.sub)
|
||||
|
||||
/**
|
||||
* 新增${subTable.functionName}信息
|
||||
*
|
||||
* @param ${className} ${functionName}对象
|
||||
*/
|
||||
public void insert${subClassName}(${ClassName} ${className})
|
||||
{
|
||||
List<${subClassName}> ${subclassName}List = ${className}.get${subClassName}List();
|
||||
${pkColumn.javaType} ${pkColumn.javaField} = ${className}.get${pkColumn.capJavaField}();
|
||||
if (StringUtils.isNotNull(${subclassName}List))
|
||||
{
|
||||
List<${subClassName}> list = new ArrayList<${subClassName}>();
|
||||
for (${subClassName} ${subclassName} : ${subclassName}List)
|
||||
{
|
||||
${subclassName}.set${subTableFkClassName}(${pkColumn.javaField});
|
||||
list.add(${subclassName});
|
||||
}
|
||||
if (list.size() > 0)
|
||||
{
|
||||
${className}Mapper.batch${subClassName}(list);
|
||||
}
|
||||
#if($column.query)
|
||||
#if($queryType == "EQ")
|
||||
if (ObjUtils.notNull(${className}.get$JavaField())){
|
||||
queryWrapper.eq(${ClassName}::get$JavaField, ${className}.get$JavaField());
|
||||
}
|
||||
}
|
||||
#elseif($queryType == "NE")
|
||||
if (ObjUtils.notNull(${className}.get$JavaField())){
|
||||
queryWrapper.ne(${ClassName}::get$JavaField, ${className}.get$JavaField());
|
||||
}
|
||||
#elseif($queryType == "GT")
|
||||
if (ObjUtils.notNull(${className}.get$JavaField())){
|
||||
queryWrapper.gt(${ClassName}::get$JavaField, ${className}.get$JavaField());
|
||||
}
|
||||
#elseif($queryType == "GTE")
|
||||
if (ObjUtils.notNull(${className}.get$JavaField())){
|
||||
queryWrapper.ge(${ClassName}::get$JavaField, ${className}.get$JavaField());
|
||||
}
|
||||
#elseif($queryType == "LT")
|
||||
if (ObjUtils.notNull(${className}.get$JavaField())){
|
||||
queryWrapper.lt()${ClassName}::get$JavaField, ${className}.get$JavaField());
|
||||
}
|
||||
#elseif($queryType == "LTE")
|
||||
if (ObjUtils.notNull(${className}.get$JavaField())){
|
||||
queryWrapper.le()${ClassName}::get$JavaField, ${className}.get$JavaField());
|
||||
}
|
||||
#elseif($queryType == "LIKE")
|
||||
if (ObjUtils.notNull(${className}.get$JavaField())){
|
||||
queryWrapper.like(${ClassName}::get$JavaField, ${className}.get$JavaField());
|
||||
}
|
||||
#elseif($queryType == "BETWEEN")
|
||||
if (ObjUtils.notChildNull(${className}.getBetween("$JavaField"))){
|
||||
queryWrapper.between(${ClassName}::get$JavaField, ${className}.getBeginParam("$JavaField"),${className}.getEndParam("$JavaField"));
|
||||
}
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
return list(queryWrapper);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ export function add${BusinessName}(data) {
|
|||
// 修改${functionName}
|
||||
export function update${BusinessName}(data) {
|
||||
return request({
|
||||
url: '/${moduleName}/${businessName}',
|
||||
url: '/${moduleName}/${businessName}/'+data.${pkColumn.javaField},
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('${functionName}', '${parentMenuId}', '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 0, 'C', '0', '0', '${permissionPrefix}:list', '#', 'admin', sysdate(), '', null, '${functionName}菜单');
|
||||
values('${functionName}', '${parentMenuId}', '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 0, 'C', '0', '0', '${permissionPrefix}:list', '#', 1, sysdate(), null, null, '${functionName}菜单');
|
||||
|
||||
-- 按钮父菜单ID
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('${functionName}查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:query', '#', 'admin', sysdate(), '', null, '');
|
||||
values('${functionName}查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:query', '#', 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('${functionName}新增', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:add', '#', 'admin', sysdate(), '', null, '');
|
||||
values('${functionName}新增', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:add', '#', 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('${functionName}修改', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
values('${functionName}修改', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:edit', '#', 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('${functionName}删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:remove', '#', 'admin', sysdate(), '', null, '');
|
||||
values('${functionName}删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:remove', '#', 1, sysdate(), null, null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('${functionName}导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:export', '#', 'admin', sysdate(), '', null, '');
|
||||
values('${functionName}导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:export', '#', 1, sysdate(), null, null, '');
|
|
@ -348,7 +348,7 @@ export default {
|
|||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
created1() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
|
@ -453,7 +453,7 @@ export default {
|
|||
this.reset();
|
||||
this.getTreeselect();
|
||||
if (row != null) {
|
||||
this.form.${treeParentCode} = row.${treeCode};
|
||||
this.form.${treeParentCode} = row.${treeParentCode};
|
||||
}
|
||||
get${BusinessName}(row.${pkColumn.javaField}).then(response => {
|
||||
this.form = response.data;
|
||||
|
|
|
@ -170,7 +170,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
|
@ -283,65 +283,6 @@
|
|||
#end
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
#if($table.sub)
|
||||
<el-divider content-position="center">${subTable.functionName}信息</el-divider>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd${subClassName}">添加</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDelete${subClassName}">删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table :data="${subclassName}List" :row-class-name="row${subClassName}Index" @selection-change="handle${subClassName}SelectionChange" ref="${subclassName}">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="序号" align="center" prop="index" width="50"/>
|
||||
#foreach($column in $subTable.columns)
|
||||
#set($javaField=$column.javaField)
|
||||
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||
#if($parentheseIndex != -1)
|
||||
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
||||
#else
|
||||
#set($comment=$column.columnComment)
|
||||
#end
|
||||
#if($column.pk || $javaField == ${subTableFkclassName})
|
||||
#elseif($column.list && $column.htmlType == "input")
|
||||
<el-table-column label="$comment" prop="${javaField}" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.$javaField" placeholder="请输入$comment" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
#elseif($column.list && $column.htmlType == "datetime")
|
||||
<el-table-column label="$comment" prop="${javaField}" width="240">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker clearable v-model="scope.row.$javaField" type="date" value-format="yyyy-MM-dd" placeholder="请选择$comment" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
#elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && "" != $column.dictType)
|
||||
<el-table-column label="$comment" prop="${javaField}" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.$javaField" placeholder="请选择$comment">
|
||||
<el-option
|
||||
v-for="dict in dict.type.$column.dictType"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
#elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && "" == $column.dictType)
|
||||
<el-table-column label="$comment" prop="${javaField}" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.$javaField" placeholder="请选择$comment">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
#end
|
||||
#end
|
||||
</el-table>
|
||||
#end
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
|
@ -366,10 +307,6 @@ export default {
|
|||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
#if($table.sub)
|
||||
// 子表选中数据
|
||||
checked${subClassName}: [],
|
||||
#end
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
|
@ -380,10 +317,6 @@ export default {
|
|||
total: 0,
|
||||
// ${functionName}表格数据
|
||||
${businessName}List: [],
|
||||
#if($table.sub)
|
||||
// ${subTable.functionName}表格数据
|
||||
${subclassName}List: [],
|
||||
#end
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
|
@ -425,7 +358,7 @@ export default {
|
|||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
created1() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
|
@ -448,8 +381,8 @@ export default {
|
|||
#end
|
||||
#end
|
||||
list${BusinessName}(this.queryParams).then(response => {
|
||||
this.${businessName}List = response.rows;
|
||||
this.total = response.total;
|
||||
this.${businessName}List = response.data.rows;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
@ -469,9 +402,6 @@ export default {
|
|||
#end
|
||||
#end
|
||||
};
|
||||
#if($table.sub)
|
||||
this.${subclassName}List = [];
|
||||
#end
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
|
@ -512,9 +442,6 @@ export default {
|
|||
#if($column.htmlType == "checkbox")
|
||||
this.form.$column.javaField = this.form.${column.javaField}.split(",");
|
||||
#end
|
||||
#end
|
||||
#if($table.sub)
|
||||
this.${subclassName}List = response.data.${subclassName}List;
|
||||
#end
|
||||
this.open = true;
|
||||
this.title = "修改${functionName}";
|
||||
|
@ -528,9 +455,6 @@ export default {
|
|||
#if($column.htmlType == "checkbox")
|
||||
this.form.$column.javaField = this.form.${column.javaField}.join(",");
|
||||
#end
|
||||
#end
|
||||
#if($table.sub)
|
||||
this.form.${subclassName}List = this.${subclassName}List;
|
||||
#end
|
||||
if (this.form.${pkColumn.javaField} != null) {
|
||||
update${BusinessName}(this.form).then(response => {
|
||||
|
@ -558,39 +482,6 @@ export default {
|
|||
this.#[[$modal]]#.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
#if($table.sub)
|
||||
/** ${subTable.functionName}序号 */
|
||||
row${subClassName}Index({ row, rowIndex }) {
|
||||
row.index = rowIndex + 1;
|
||||
},
|
||||
/** ${subTable.functionName}添加按钮操作 */
|
||||
handleAdd${subClassName}() {
|
||||
let obj = {};
|
||||
#foreach($column in $subTable.columns)
|
||||
#if($column.pk || $column.javaField == ${subTableFkclassName})
|
||||
#elseif($column.list && "" != $javaField)
|
||||
obj.$column.javaField = "";
|
||||
#end
|
||||
#end
|
||||
this.${subclassName}List.push(obj);
|
||||
},
|
||||
/** ${subTable.functionName}删除按钮操作 */
|
||||
handleDelete${subClassName}() {
|
||||
if (this.checked${subClassName}.length == 0) {
|
||||
this.#[[$modal]]#.msgError("请先选择要删除的${subTable.functionName}数据");
|
||||
} else {
|
||||
const ${subclassName}List = this.${subclassName}List;
|
||||
const checked${subClassName} = this.checked${subClassName};
|
||||
this.${subclassName}List = ${subclassName}List.filter(function(item) {
|
||||
return checked${subClassName}.indexOf(item.index) == -1
|
||||
});
|
||||
}
|
||||
},
|
||||
/** 复选框选中数据 */
|
||||
handle${subClassName}SelectionChange(selection) {
|
||||
this.checked${subClassName} = selection.map(item => item.index)
|
||||
},
|
||||
#end
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('${moduleName}/${businessName}/export', {
|
||||
|
|
|
@ -3,133 +3,14 @@
|
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="${packageName}.mapper.${ClassName}Mapper">
|
||||
|
||||
<resultMap type="${ClassName}" id="${ClassName}Result">
|
||||
|
||||
<resultMap type="${packageName}.domain.${ClassName}" id="${ClassName}Result">
|
||||
#foreach ($column in $columns)
|
||||
<result property="${column.javaField}" column="${column.columnName}" />
|
||||
#end
|
||||
</resultMap>
|
||||
#if($table.sub)
|
||||
|
||||
<resultMap id="${ClassName}${subClassName}Result" type="${ClassName}" extends="${ClassName}Result">
|
||||
<collection property="${subclassName}List" notNullColumn="sub_${subTable.pkColumn.columnName}" javaType="java.util.List" resultMap="${subClassName}Result" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="${subClassName}" id="${subClassName}Result">
|
||||
#foreach ($column in $subTable.columns)
|
||||
<result property="${column.javaField}" column="sub_${column.columnName}" />
|
||||
#end
|
||||
</resultMap>
|
||||
#end
|
||||
|
||||
<sql id="select${ClassName}Vo">
|
||||
select#foreach($column in $columns) $column.columnName#if($foreach.count != $columns.size()),#end#end from ${tableName}
|
||||
</sql>
|
||||
|
||||
<select id="select${ClassName}List" parameterType="${ClassName}" resultMap="${ClassName}Result">
|
||||
<include refid="select${ClassName}Vo"/>
|
||||
<where>
|
||||
#foreach($column in $columns)
|
||||
#set($queryType=$column.queryType)
|
||||
#set($javaField=$column.javaField)
|
||||
#set($javaType=$column.javaType)
|
||||
#set($columnName=$column.columnName)
|
||||
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
||||
#if($column.query)
|
||||
#if($column.queryType == "EQ")
|
||||
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName = #{$javaField}</if>
|
||||
#elseif($queryType == "NE")
|
||||
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName != #{$javaField}</if>
|
||||
#elseif($queryType == "GT")
|
||||
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName > #{$javaField}</if>
|
||||
#elseif($queryType == "GTE")
|
||||
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName >= #{$javaField}</if>
|
||||
#elseif($queryType == "LT")
|
||||
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName < #{$javaField}</if>
|
||||
#elseif($queryType == "LTE")
|
||||
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName <= #{$javaField}</if>
|
||||
#elseif($queryType == "LIKE")
|
||||
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName like concat('%', #{$javaField}, '%')</if>
|
||||
#elseif($queryType == "BETWEEN")
|
||||
<if test="params.begin$AttrName != null and params.begin$AttrName != '' and params.end$AttrName != null and params.end$AttrName != ''"> and $columnName between #{params.begin$AttrName} and #{params.end$AttrName}</if>
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="select${ClassName}By${pkColumn.capJavaField}" parameterType="${pkColumn.javaType}" resultMap="#if($table.sub)${ClassName}${subClassName}Result#else${ClassName}Result#end">
|
||||
#if($table.crud || $table.tree)
|
||||
<include refid="select${ClassName}Vo"/>
|
||||
where ${pkColumn.columnName} = #{${pkColumn.javaField}}
|
||||
#elseif($table.sub)
|
||||
select#foreach($column in $columns) a.$column.columnName#if($foreach.count != $columns.size()),#end#end,
|
||||
#foreach($column in $subTable.columns) b.$column.columnName as sub_$column.columnName#if($foreach.count != $subTable.columns.size()),#end#end
|
||||
|
||||
from ${tableName} a
|
||||
left join ${subTableName} b on b.${subTableFkName} = a.${pkColumn.columnName}
|
||||
where a.${pkColumn.columnName} = #{${pkColumn.javaField}}
|
||||
#end
|
||||
</select>
|
||||
|
||||
<insert id="insert${ClassName}" parameterType="${ClassName}"#if($pkColumn.increment) useGeneratedKeys="true" keyProperty="$pkColumn.javaField"#end>
|
||||
insert into ${tableName}
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#foreach($column in $columns)
|
||||
#if($column.columnName != $pkColumn.columnName || !$pkColumn.increment)
|
||||
<if test="$column.javaField != null#if($column.javaType == 'String' && $column.required) and $column.javaField != ''#end">$column.columnName,</if>
|
||||
#end
|
||||
#end
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
#foreach($column in $columns)
|
||||
#if($column.columnName != $pkColumn.columnName || !$pkColumn.increment)
|
||||
<if test="$column.javaField != null#if($column.javaType == 'String' && $column.required) and $column.javaField != ''#end">#{$column.javaField},</if>
|
||||
#end
|
||||
#end
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="update${ClassName}" parameterType="${ClassName}">
|
||||
update ${tableName}
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
#foreach($column in $columns)
|
||||
#if($column.columnName != $pkColumn.columnName)
|
||||
<if test="$column.javaField != null#if($column.javaType == 'String' && $column.required) and $column.javaField != ''#end">$column.columnName = #{$column.javaField},</if>
|
||||
#end
|
||||
#end
|
||||
</trim>
|
||||
where ${pkColumn.columnName} = #{${pkColumn.javaField}}
|
||||
</update>
|
||||
|
||||
<delete id="delete${ClassName}By${pkColumn.capJavaField}" parameterType="${pkColumn.javaType}">
|
||||
delete from ${tableName} where ${pkColumn.columnName} = #{${pkColumn.javaField}}
|
||||
</delete>
|
||||
|
||||
<delete id="delete${ClassName}By${pkColumn.capJavaField}s" parameterType="String">
|
||||
delete from ${tableName} where ${pkColumn.columnName} in
|
||||
<foreach item="${pkColumn.javaField}" collection="array" open="(" separator="," close=")">
|
||||
#{${pkColumn.javaField}}
|
||||
</foreach>
|
||||
</delete>
|
||||
#if($table.sub)
|
||||
|
||||
<delete id="delete${subClassName}By${subTableFkClassName}s" parameterType="String">
|
||||
delete from ${subTableName} where ${subTableFkName} in
|
||||
<foreach item="${subTableFkclassName}" collection="array" open="(" separator="," close=")">
|
||||
#{${subTableFkclassName}}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="delete${subClassName}By${subTableFkClassName}" parameterType="${pkColumn.javaType}">
|
||||
delete from ${subTableName} where ${subTableFkName} = #{${subTableFkclassName}}
|
||||
</delete>
|
||||
|
||||
<insert id="batch${subClassName}">
|
||||
insert into ${subTableName}(#foreach($column in $subTable.columns) $column.columnName#if($foreach.count != $subTable.columns.size()),#end#end) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(#foreach($column in $subTable.columns) #{item.$column.javaField}#if($foreach.count != $subTable.columns.size()),#end#end)
|
||||
</foreach>
|
||||
</insert>
|
||||
#end
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
<?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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-product</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>muyu-product-common</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<!--系統公共核心包-->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,72 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 品牌商品中间对象 as_brand_project
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("as_brand_project")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "AsBrandProject", description = "品牌商品中间")
|
||||
public class AsBrandProject extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 品牌id */
|
||||
@Excel(name = "品牌id")
|
||||
@ApiModelProperty(name = "品牌id", value = "品牌id",required = true)
|
||||
private Long brandId;
|
||||
|
||||
/** 商品id */
|
||||
@Excel(name = "商品id")
|
||||
@ApiModelProperty(name = "商品id", value = "商品id",required = true)
|
||||
private Long projectId;
|
||||
|
||||
/** 创建人 */
|
||||
@Excel(name = "创建人")
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
@Excel(name = "更新人")
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 品类属性中间对象 as_category_attribute
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("as_category_attribute")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "AsCategoryAttribute", description = "品类属性中间")
|
||||
public class AsCategoryAttribute extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 品类id */
|
||||
@Excel(name = "品类id")
|
||||
@ApiModelProperty(name = "品类id", value = "品类id", required = true)
|
||||
private Long categoryId;
|
||||
|
||||
/** 属性id */
|
||||
@Excel(name = "属性id")
|
||||
@ApiModelProperty(name = "属性id", value = "属性id", required = true)
|
||||
private Long attributeId;
|
||||
|
||||
/** 创建人 */
|
||||
@Excel(name = "创建人")
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
@Excel(name = "更新人")
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 品类属性组中间对象 as_category_attribute_group
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("as_category_attribute_group")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "AsCategoryAttributeGroup", description = "品类属性组中间")
|
||||
public class AsCategoryAttributeGroup extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 品类id */
|
||||
@Excel(name = "品类id")
|
||||
@ApiModelProperty(name = "品类id", value = "品类id", required = true)
|
||||
private Long categoryId;
|
||||
|
||||
/** 属性组 */
|
||||
@Excel(name = "属性组")
|
||||
@ApiModelProperty(name = "属性组", value = "属性组", required = true)
|
||||
private Long attributeGroupId;
|
||||
|
||||
/** 创建人 */
|
||||
@Excel(name = "创建人")
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
@Excel(name = "更新人")
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 品类品牌中间对象 as_category_brand
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("as_category_brand")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "AsCategoryBrand", description = "品类品牌中间")
|
||||
public class AsCategoryBrand extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 品类id */
|
||||
@Excel(name = "品类id")
|
||||
@ApiModelProperty(name = "品类id", value = "品类id", required = true)
|
||||
private Long categoryId;
|
||||
|
||||
/** 品牌id */
|
||||
@Excel(name = "品牌id")
|
||||
@ApiModelProperty(name = "品牌id", value = "品牌id", required = true)
|
||||
private Long brandId;
|
||||
|
||||
/** 创建人 */
|
||||
@Excel(name = "创建人")
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
@Excel(name = "更新人")
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品属性对象 as_product_attribute_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("as_product_attribute_info")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "AsProductAttributeInfo", description = "商品属性")
|
||||
public class AsProductAttributeInfo extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 属性编号 */
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "属性编号", value = "属性编号")
|
||||
private Long id;
|
||||
|
||||
/** 商品 */
|
||||
@Excel(name = "商品")
|
||||
@ApiModelProperty(name = "商品", value = "商品", required = true)
|
||||
private Long productId;
|
||||
|
||||
/** 属性 */
|
||||
@Excel(name = "属性")
|
||||
@ApiModelProperty(name = "属性", value = "属性", required = true)
|
||||
private Long attributeId;
|
||||
|
||||
/** 属性值 */
|
||||
@Excel(name = "属性值")
|
||||
@ApiModelProperty(name = "属性值", value = "属性值", required = true)
|
||||
private String value;
|
||||
|
||||
/** 创建人 */
|
||||
@Excel(name = "创建人")
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private Long createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
@Excel(name = "更新人")
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.product.domain.req.AttributeGroupQueryReq;
|
||||
import com.muyu.product.domain.req.AttributeGroupSaveReq;
|
||||
import com.muyu.product.domain.req.AttributeGroupEditReq;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 属性组对象 attribute_group
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("attribute_group")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "AttributeGroup", description = "属性组")
|
||||
public class AttributeGroup extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 属性组编号 */
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "属性组编号", value = "属性组编号")
|
||||
private Long id;
|
||||
|
||||
/** 组名称 */
|
||||
@Excel(name = "组名称")
|
||||
@ApiModelProperty(name = "组名称", value = "组名称", required = true)
|
||||
private String name;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
@ApiModelProperty(name = "状态", value = "状态", required = true)
|
||||
private String states;
|
||||
|
||||
/** 创建人 */
|
||||
@ApiModelProperty(name = "创建人", value = "创建人")
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间")
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
@Excel(name = "更新人")
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
public static AttributeGroup queryBuild( AttributeGroupQueryReq attributeGroupQueryReq){
|
||||
return AttributeGroup.builder()
|
||||
.name(attributeGroupQueryReq.getName())
|
||||
.states(attributeGroupQueryReq.getStates())
|
||||
.updatedBy(attributeGroupQueryReq.getUpdatedBy())
|
||||
.updatedTime(attributeGroupQueryReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加构造器
|
||||
*/
|
||||
public static AttributeGroup saveBuild(AttributeGroupSaveReq attributeGroupSaveReq){
|
||||
return AttributeGroup.builder()
|
||||
.name(attributeGroupSaveReq.getName())
|
||||
.states(attributeGroupSaveReq.getStates())
|
||||
.updatedBy(attributeGroupSaveReq.getUpdatedBy())
|
||||
.updatedTime(attributeGroupSaveReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改构造器
|
||||
*/
|
||||
public static AttributeGroup editBuild(Long id, AttributeGroupEditReq attributeGroupEditReq){
|
||||
return AttributeGroup.builder()
|
||||
.id(id)
|
||||
.name(attributeGroupEditReq.getName())
|
||||
.states(attributeGroupEditReq.getStates())
|
||||
.updatedBy(attributeGroupEditReq.getUpdatedBy())
|
||||
.updatedTime(attributeGroupEditReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.product.domain.req.AttributeInfoQueryReq;
|
||||
import com.muyu.product.domain.req.AttributeInfoSaveReq;
|
||||
import com.muyu.product.domain.req.AttributeInfoEditReq;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品属性对象 attribute_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("attribute_info")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "AttributeInfo", description = "商品属性")
|
||||
public class AttributeInfo extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 属性编号 */
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "属性编号", value = "属性编号")
|
||||
private Long id;
|
||||
|
||||
/** 属性名 */
|
||||
@Excel(name = "属性名")
|
||||
@ApiModelProperty(name = "属性名", value = "属性名", required = true)
|
||||
private String name;
|
||||
|
||||
/** 分组 */
|
||||
@Excel(name = "分组")
|
||||
@ApiModelProperty(name = "分组", value = "分组")
|
||||
private Long groupId;
|
||||
|
||||
/** 创建人 */
|
||||
@ApiModelProperty(name = "创建人", value = "创建人")
|
||||
private Long createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
@Excel(name = "更新人")
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
public static AttributeInfo queryBuild( AttributeInfoQueryReq attributeInfoQueryReq){
|
||||
return AttributeInfo.builder()
|
||||
.name(attributeInfoQueryReq.getName())
|
||||
.groupId(attributeInfoQueryReq.getGroupId())
|
||||
.updatedBy(attributeInfoQueryReq.getUpdatedBy())
|
||||
.updatedTime(attributeInfoQueryReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加构造器
|
||||
*/
|
||||
public static AttributeInfo saveBuild(AttributeInfoSaveReq attributeInfoSaveReq){
|
||||
return AttributeInfo.builder()
|
||||
.name(attributeInfoSaveReq.getName())
|
||||
.groupId(attributeInfoSaveReq.getGroupId())
|
||||
.updatedBy(attributeInfoSaveReq.getUpdatedBy())
|
||||
.updatedTime(attributeInfoSaveReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改构造器
|
||||
*/
|
||||
public static AttributeInfo editBuild(Long id, AttributeInfoEditReq attributeInfoEditReq){
|
||||
return AttributeInfo.builder()
|
||||
.id(id)
|
||||
.name(attributeInfoEditReq.getName())
|
||||
.groupId(attributeInfoEditReq.getGroupId())
|
||||
.updatedBy(attributeInfoEditReq.getUpdatedBy())
|
||||
.updatedTime(attributeInfoEditReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.product.domain.req.BrandInfoQueryReq;
|
||||
import com.muyu.product.domain.req.BrandInfoSaveReq;
|
||||
import com.muyu.product.domain.req.BrandInfoEditReq;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 品牌信息对象 brand_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("brand_info")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "BrandInfo", description = "品牌信息")
|
||||
public class BrandInfo extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 品牌名称 */
|
||||
@Excel(name = "品牌名称")
|
||||
@ApiModelProperty(name = "品牌名称", value = "品牌名称")
|
||||
private String name;
|
||||
|
||||
/** Logo */
|
||||
@Excel(name = "Logo")
|
||||
@ApiModelProperty(name = "Logo", value = "Logo")
|
||||
private String logo;
|
||||
|
||||
/** 介绍 */
|
||||
@Excel(name = "介绍")
|
||||
@ApiModelProperty(name = "介绍", value = "介绍")
|
||||
private String introduction;
|
||||
|
||||
/** 是否启用 */
|
||||
@Excel(name = "是否启用")
|
||||
@ApiModelProperty(name = "是否启用", value = "是否启用")
|
||||
private String stauts;
|
||||
|
||||
/** 创建人 */
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
public static BrandInfo queryBuild( BrandInfoQueryReq brandInfoQueryReq){
|
||||
return BrandInfo.builder()
|
||||
.name(brandInfoQueryReq.getName())
|
||||
.logo(brandInfoQueryReq.getLogo())
|
||||
.introduction(brandInfoQueryReq.getIntroduction())
|
||||
.stauts(brandInfoQueryReq.getStauts())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加构造器
|
||||
*/
|
||||
public static BrandInfo saveBuild(BrandInfoSaveReq brandInfoSaveReq){
|
||||
return BrandInfo.builder()
|
||||
.name(brandInfoSaveReq.getName())
|
||||
.logo(brandInfoSaveReq.getLogo())
|
||||
.introduction(brandInfoSaveReq.getIntroduction())
|
||||
.stauts(brandInfoSaveReq.getStauts())
|
||||
.updatedBy(brandInfoSaveReq.getUpdatedBy())
|
||||
.updatedTime(brandInfoSaveReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改构造器
|
||||
*/
|
||||
public static BrandInfo editBuild(Long id, BrandInfoEditReq brandInfoEditReq){
|
||||
return BrandInfo.builder()
|
||||
.id(id)
|
||||
.name(brandInfoEditReq.getName())
|
||||
.logo(brandInfoEditReq.getLogo())
|
||||
.introduction(brandInfoEditReq.getIntroduction())
|
||||
.stauts(brandInfoEditReq.getStauts())
|
||||
.updatedBy(brandInfoEditReq.getUpdatedBy())
|
||||
.updatedTime(brandInfoEditReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.product.domain.req.CategoryInfoQueryReq;
|
||||
import com.muyu.product.domain.req.CategoryInfoSaveReq;
|
||||
import com.muyu.product.domain.req.CategoryInfoEditReq;
|
||||
import com.muyu.common.core.web.domain.TreeEntity;
|
||||
|
||||
/**
|
||||
* 品类信息对象 category_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("category_info")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "CategoryInfo", description = "品类信息")
|
||||
public class CategoryInfo extends TreeEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 品类名称 */
|
||||
@Excel(name = "品类名称")
|
||||
@ApiModelProperty(name = "品类名称", value = "品类名称", required = true)
|
||||
private String name;
|
||||
|
||||
/** 图片 */
|
||||
@Excel(name = "图片")
|
||||
@ApiModelProperty(name = "图片", value = "图片", required = true)
|
||||
private String image;
|
||||
|
||||
/** 是否启用 */
|
||||
@Excel(name = "是否启用")
|
||||
@ApiModelProperty(name = "是否启用", value = "是否启用", required = true)
|
||||
private String stauts;
|
||||
|
||||
/** 介绍 */
|
||||
@Excel(name = "介绍")
|
||||
@ApiModelProperty(name = "介绍", value = "介绍")
|
||||
private String introduction;
|
||||
|
||||
/** 创建人 */
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createTime;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
public static CategoryInfo queryBuild( CategoryInfoQueryReq categoryInfoQueryReq){
|
||||
return CategoryInfo.builder()
|
||||
.name(categoryInfoQueryReq.getName())
|
||||
.image(categoryInfoQueryReq.getImage())
|
||||
.stauts(categoryInfoQueryReq.getStauts())
|
||||
.introduction(categoryInfoQueryReq.getIntroduction())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加构造器
|
||||
*/
|
||||
public static CategoryInfo saveBuild(CategoryInfoSaveReq categoryInfoSaveReq){
|
||||
return CategoryInfo.builder()
|
||||
.name(categoryInfoSaveReq.getName())
|
||||
.image(categoryInfoSaveReq.getImage())
|
||||
.stauts(categoryInfoSaveReq.getStauts())
|
||||
.introduction(categoryInfoSaveReq.getIntroduction())
|
||||
.updateBy(categoryInfoSaveReq.getUpdateBy())
|
||||
.updateTime(categoryInfoSaveReq.getUpdateTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改构造器
|
||||
*/
|
||||
public static CategoryInfo editBuild(Long id, CategoryInfoEditReq categoryInfoEditReq){
|
||||
return CategoryInfo.builder()
|
||||
.id(id)
|
||||
.name(categoryInfoEditReq.getName())
|
||||
.image(categoryInfoEditReq.getImage())
|
||||
.stauts(categoryInfoEditReq.getStauts())
|
||||
.introduction(categoryInfoEditReq.getIntroduction())
|
||||
.updateBy(categoryInfoEditReq.getUpdateBy())
|
||||
.updateTime(categoryInfoEditReq.getUpdateTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,126 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.product.domain.req.CommentInfoQueryReq;
|
||||
import com.muyu.product.domain.req.CommentInfoSaveReq;
|
||||
import com.muyu.product.domain.req.CommentInfoEditReq;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品评论对象 comment_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("comment_info")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "CommentInfo", description = "商品评论")
|
||||
public class CommentInfo extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 商品id */
|
||||
@Excel(name = "商品id")
|
||||
@ApiModelProperty(name = "商品id", value = "商品id", required = true)
|
||||
private Long projectId;
|
||||
|
||||
/** 评论 */
|
||||
@Excel(name = "评论")
|
||||
@ApiModelProperty(name = "评论", value = "评论")
|
||||
private String comment;
|
||||
|
||||
/** 图片 */
|
||||
@Excel(name = "图片")
|
||||
@ApiModelProperty(name = "图片", value = "图片")
|
||||
private String images;
|
||||
|
||||
/** 父类id */
|
||||
@Excel(name = "父类id")
|
||||
@ApiModelProperty(name = "父类id", value = "父类id", required = true)
|
||||
private String parentId;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
@ApiModelProperty(name = "备注", value = "备注")
|
||||
private String rmark;
|
||||
|
||||
/** 创建人 */
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
public static CommentInfo queryBuild( CommentInfoQueryReq commentInfoQueryReq){
|
||||
return CommentInfo.builder()
|
||||
.projectId(commentInfoQueryReq.getProjectId())
|
||||
.comment(commentInfoQueryReq.getComment())
|
||||
.images(commentInfoQueryReq.getImages())
|
||||
.parentId(commentInfoQueryReq.getParentId())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加构造器
|
||||
*/
|
||||
public static CommentInfo saveBuild(CommentInfoSaveReq commentInfoSaveReq){
|
||||
return CommentInfo.builder()
|
||||
.projectId(commentInfoSaveReq.getProjectId())
|
||||
.comment(commentInfoSaveReq.getComment())
|
||||
.images(commentInfoSaveReq.getImages())
|
||||
.parentId(commentInfoSaveReq.getParentId())
|
||||
.rmark(commentInfoSaveReq.getRmark())
|
||||
.updatedBy(commentInfoSaveReq.getUpdatedBy())
|
||||
.updatedTime(commentInfoSaveReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改构造器
|
||||
*/
|
||||
public static CommentInfo editBuild(Long id, CommentInfoEditReq commentInfoEditReq){
|
||||
return CommentInfo.builder()
|
||||
.id(id)
|
||||
.projectId(commentInfoEditReq.getProjectId())
|
||||
.comment(commentInfoEditReq.getComment())
|
||||
.images(commentInfoEditReq.getImages())
|
||||
.parentId(commentInfoEditReq.getParentId())
|
||||
.rmark(commentInfoEditReq.getRmark())
|
||||
.updatedBy(commentInfoEditReq.getUpdatedBy())
|
||||
.updatedTime(commentInfoEditReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.product.domain.req.CommentLikeInfoQueryReq;
|
||||
import com.muyu.product.domain.req.CommentLikeInfoSaveReq;
|
||||
import com.muyu.product.domain.req.CommentLikeInfoEditReq;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 评论点赞对象 comment_like_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("comment_like_info")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "CommentLikeInfo", description = "评论点赞")
|
||||
public class CommentLikeInfo extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 评论id */
|
||||
@Excel(name = "评论id")
|
||||
@ApiModelProperty(name = "评论id", value = "评论id", required = true)
|
||||
private Long commentId;
|
||||
|
||||
/** 点赞人id */
|
||||
@Excel(name = "点赞人id")
|
||||
@ApiModelProperty(name = "点赞人id", value = "点赞人id", required = true)
|
||||
private Long userId;
|
||||
|
||||
/** 创建人 */
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
public static CommentLikeInfo queryBuild( CommentLikeInfoQueryReq commentLikeInfoQueryReq){
|
||||
return CommentLikeInfo.builder()
|
||||
.commentId(commentLikeInfoQueryReq.getCommentId())
|
||||
.userId(commentLikeInfoQueryReq.getUserId())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加构造器
|
||||
*/
|
||||
public static CommentLikeInfo saveBuild(CommentLikeInfoSaveReq commentLikeInfoSaveReq){
|
||||
return CommentLikeInfo.builder()
|
||||
.commentId(commentLikeInfoSaveReq.getCommentId())
|
||||
.userId(commentLikeInfoSaveReq.getUserId())
|
||||
.updatedBy(commentLikeInfoSaveReq.getUpdatedBy())
|
||||
.updatedTime(commentLikeInfoSaveReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改构造器
|
||||
*/
|
||||
public static CommentLikeInfo editBuild(Long id, CommentLikeInfoEditReq commentLikeInfoEditReq){
|
||||
return CommentLikeInfo.builder()
|
||||
.id(id)
|
||||
.commentId(commentLikeInfoEditReq.getCommentId())
|
||||
.userId(commentLikeInfoEditReq.getUserId())
|
||||
.updatedBy(commentLikeInfoEditReq.getUpdatedBy())
|
||||
.updatedTime(commentLikeInfoEditReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,167 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.product.domain.req.ProjectInfoQueryReq;
|
||||
import com.muyu.product.domain.req.ProjectInfoSaveReq;
|
||||
import com.muyu.product.domain.req.ProjectInfoEditReq;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品信息对象 project_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("project_info")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "ProjectInfo", description = "商品信息")
|
||||
public class ProjectInfo extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 商品名称 */
|
||||
@Excel(name = "商品名称")
|
||||
@ApiModelProperty(name = "商品名称", value = "商品名称")
|
||||
private String name;
|
||||
|
||||
/** 商品描述 */
|
||||
@Excel(name = "商品描述")
|
||||
@ApiModelProperty(name = "商品描述", value = "商品描述")
|
||||
private String introduction;
|
||||
|
||||
/** 主类型 */
|
||||
@Excel(name = "主类型")
|
||||
@ApiModelProperty(name = "主类型", value = "主类型")
|
||||
private String mianType;
|
||||
|
||||
/** 父类型 */
|
||||
@Excel(name = "父类型")
|
||||
@ApiModelProperty(name = "父类型", value = "父类型")
|
||||
private String parent;
|
||||
|
||||
/** 商品类型 */
|
||||
@Excel(name = "商品类型")
|
||||
@ApiModelProperty(name = "商品类型", value = "商品类型")
|
||||
private String type;
|
||||
|
||||
/** 商品图片 */
|
||||
@Excel(name = "商品图片")
|
||||
@ApiModelProperty(name = "商品图片", value = "商品图片")
|
||||
private String image;
|
||||
|
||||
/** 商品轮播图 */
|
||||
@Excel(name = "商品轮播图")
|
||||
@ApiModelProperty(name = "商品轮播图", value = "商品轮播图")
|
||||
private String carouselImages;
|
||||
|
||||
/** 商品状态 */
|
||||
@Excel(name = "商品状态")
|
||||
@ApiModelProperty(name = "商品状态", value = "商品状态")
|
||||
private Long status;
|
||||
|
||||
/** 规格 */
|
||||
@Excel(name = "规格")
|
||||
@ApiModelProperty(name = "规格", value = "规格")
|
||||
private Long ruleId;
|
||||
|
||||
/** 品牌 */
|
||||
@Excel(name = "品牌")
|
||||
@ApiModelProperty(name = "品牌", value = "品牌")
|
||||
private Long brandId;
|
||||
|
||||
/** 创建人 */
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
public static ProjectInfo queryBuild( ProjectInfoQueryReq projectInfoQueryReq){
|
||||
return ProjectInfo.builder()
|
||||
.name(projectInfoQueryReq.getName())
|
||||
.introduction(projectInfoQueryReq.getIntroduction())
|
||||
.mianType(projectInfoQueryReq.getMianType())
|
||||
.parent(projectInfoQueryReq.getParent())
|
||||
.type(projectInfoQueryReq.getType())
|
||||
.image(projectInfoQueryReq.getImage())
|
||||
.carouselImages(projectInfoQueryReq.getCarouselImages())
|
||||
.status(projectInfoQueryReq.getStatus())
|
||||
.ruleId(projectInfoQueryReq.getRuleId())
|
||||
.brandId(projectInfoQueryReq.getBrandId())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加构造器
|
||||
*/
|
||||
public static ProjectInfo saveBuild(ProjectInfoSaveReq projectInfoSaveReq){
|
||||
return ProjectInfo.builder()
|
||||
.name(projectInfoSaveReq.getName())
|
||||
.introduction(projectInfoSaveReq.getIntroduction())
|
||||
.mianType(projectInfoSaveReq.getMianType())
|
||||
.parent(projectInfoSaveReq.getParent())
|
||||
.type(projectInfoSaveReq.getType())
|
||||
.image(projectInfoSaveReq.getImage())
|
||||
.carouselImages(projectInfoSaveReq.getCarouselImages())
|
||||
.status(projectInfoSaveReq.getStatus())
|
||||
.ruleId(projectInfoSaveReq.getRuleId())
|
||||
.brandId(projectInfoSaveReq.getBrandId())
|
||||
.updatedBy(projectInfoSaveReq.getUpdatedBy())
|
||||
.updatedTime(projectInfoSaveReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改构造器
|
||||
*/
|
||||
public static ProjectInfo editBuild(Long id, ProjectInfoEditReq projectInfoEditReq){
|
||||
return ProjectInfo.builder()
|
||||
.id(id)
|
||||
.name(projectInfoEditReq.getName())
|
||||
.introduction(projectInfoEditReq.getIntroduction())
|
||||
.mianType(projectInfoEditReq.getMianType())
|
||||
.parent(projectInfoEditReq.getParent())
|
||||
.type(projectInfoEditReq.getType())
|
||||
.image(projectInfoEditReq.getImage())
|
||||
.carouselImages(projectInfoEditReq.getCarouselImages())
|
||||
.status(projectInfoEditReq.getStatus())
|
||||
.ruleId(projectInfoEditReq.getRuleId())
|
||||
.brandId(projectInfoEditReq.getBrandId())
|
||||
.updatedBy(projectInfoEditReq.getUpdatedBy())
|
||||
.updatedTime(projectInfoEditReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,128 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.product.domain.req.ProjectSkuInfoQueryReq;
|
||||
import com.muyu.product.domain.req.ProjectSkuInfoSaveReq;
|
||||
import com.muyu.product.domain.req.ProjectSkuInfoEditReq;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品SKU对象 project_sku_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("project_sku_info")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "ProjectSkuInfo", description = "商品SKU")
|
||||
public class ProjectSkuInfo extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 商品id */
|
||||
@Excel(name = "商品id")
|
||||
@ApiModelProperty(name = "商品id", value = "商品id", required = true)
|
||||
private Long projectId;
|
||||
|
||||
/** sku */
|
||||
@Excel(name = "sku")
|
||||
@ApiModelProperty(name = "sku", value = "sku", required = true)
|
||||
private String sku;
|
||||
|
||||
/** 商品库存 */
|
||||
@Excel(name = "商品库存")
|
||||
@ApiModelProperty(name = "商品库存", value = "商品库存", required = true)
|
||||
private Long stock;
|
||||
|
||||
/** 商品价格 */
|
||||
@Excel(name = "商品价格")
|
||||
@ApiModelProperty(name = "商品价格", value = "商品价格", required = true)
|
||||
private BigDecimal price;
|
||||
|
||||
/** 规格图片 */
|
||||
@Excel(name = "规格图片")
|
||||
@ApiModelProperty(name = "规格图片", value = "规格图片", required = true)
|
||||
private String image;
|
||||
|
||||
/** 创建人 */
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
public static ProjectSkuInfo queryBuild( ProjectSkuInfoQueryReq projectSkuInfoQueryReq){
|
||||
return ProjectSkuInfo.builder()
|
||||
.projectId(projectSkuInfoQueryReq.getProjectId())
|
||||
.sku(projectSkuInfoQueryReq.getSku())
|
||||
.stock(projectSkuInfoQueryReq.getStock())
|
||||
.price(projectSkuInfoQueryReq.getPrice())
|
||||
.image(projectSkuInfoQueryReq.getImage())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加构造器
|
||||
*/
|
||||
public static ProjectSkuInfo saveBuild(ProjectSkuInfoSaveReq projectSkuInfoSaveReq){
|
||||
return ProjectSkuInfo.builder()
|
||||
.projectId(projectSkuInfoSaveReq.getProjectId())
|
||||
.sku(projectSkuInfoSaveReq.getSku())
|
||||
.stock(projectSkuInfoSaveReq.getStock())
|
||||
.price(projectSkuInfoSaveReq.getPrice())
|
||||
.image(projectSkuInfoSaveReq.getImage())
|
||||
.updatedBy(projectSkuInfoSaveReq.getUpdatedBy())
|
||||
.updatedTime(projectSkuInfoSaveReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改构造器
|
||||
*/
|
||||
public static ProjectSkuInfo editBuild(Long id, ProjectSkuInfoEditReq projectSkuInfoEditReq){
|
||||
return ProjectSkuInfo.builder()
|
||||
.id(id)
|
||||
.projectId(projectSkuInfoEditReq.getProjectId())
|
||||
.sku(projectSkuInfoEditReq.getSku())
|
||||
.stock(projectSkuInfoEditReq.getStock())
|
||||
.price(projectSkuInfoEditReq.getPrice())
|
||||
.image(projectSkuInfoEditReq.getImage())
|
||||
.updatedBy(projectSkuInfoEditReq.getUpdatedBy())
|
||||
.updatedTime(projectSkuInfoEditReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,111 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.product.domain.req.RuleAttrInfoQueryReq;
|
||||
import com.muyu.product.domain.req.RuleAttrInfoSaveReq;
|
||||
import com.muyu.product.domain.req.RuleAttrInfoEditReq;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 规格详情对象 rule_attr_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("rule_attr_info")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "RuleAttrInfo", description = "规格详情")
|
||||
public class RuleAttrInfo extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 规格id */
|
||||
@Excel(name = "规格id")
|
||||
@ApiModelProperty(name = "规格id", value = "规格id", required = true)
|
||||
private Long ruleId;
|
||||
|
||||
/** 类目名称 */
|
||||
@Excel(name = "类目名称")
|
||||
@ApiModelProperty(name = "类目名称", value = "类目名称")
|
||||
private String name;
|
||||
|
||||
/** 规格值 */
|
||||
@Excel(name = "规格值")
|
||||
@ApiModelProperty(name = "规格值", value = "规格值")
|
||||
private String attrValue;
|
||||
|
||||
/** 创建人 */
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
public static RuleAttrInfo queryBuild( RuleAttrInfoQueryReq ruleAttrInfoQueryReq){
|
||||
return RuleAttrInfo.builder()
|
||||
.ruleId(ruleAttrInfoQueryReq.getRuleId())
|
||||
.name(ruleAttrInfoQueryReq.getName())
|
||||
.attrValue(ruleAttrInfoQueryReq.getAttrValue())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加构造器
|
||||
*/
|
||||
public static RuleAttrInfo saveBuild(RuleAttrInfoSaveReq ruleAttrInfoSaveReq){
|
||||
return RuleAttrInfo.builder()
|
||||
.ruleId(ruleAttrInfoSaveReq.getRuleId())
|
||||
.name(ruleAttrInfoSaveReq.getName())
|
||||
.attrValue(ruleAttrInfoSaveReq.getAttrValue())
|
||||
.updatedBy(ruleAttrInfoSaveReq.getUpdatedBy())
|
||||
.updatedTime(ruleAttrInfoSaveReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改构造器
|
||||
*/
|
||||
public static RuleAttrInfo editBuild(Long id, RuleAttrInfoEditReq ruleAttrInfoEditReq){
|
||||
return RuleAttrInfo.builder()
|
||||
.id(id)
|
||||
.ruleId(ruleAttrInfoEditReq.getRuleId())
|
||||
.name(ruleAttrInfoEditReq.getName())
|
||||
.attrValue(ruleAttrInfoEditReq.getAttrValue())
|
||||
.updatedBy(ruleAttrInfoEditReq.getUpdatedBy())
|
||||
.updatedTime(ruleAttrInfoEditReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.product.domain.req.RuleInfoQueryReq;
|
||||
import com.muyu.product.domain.req.RuleInfoSaveReq;
|
||||
import com.muyu.product.domain.req.RuleInfoEditReq;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品规格对象 rule_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("rule_info")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "RuleInfo", description = "商品规格")
|
||||
public class RuleInfo extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 规格名称 */
|
||||
@Excel(name = "规格名称")
|
||||
@ApiModelProperty(name = "规格名称", value = "规格名称")
|
||||
private String name;
|
||||
|
||||
/** 规格状态 */
|
||||
@Excel(name = "规格状态")
|
||||
@ApiModelProperty(name = "规格状态", value = "规格状态")
|
||||
private String status;
|
||||
|
||||
/** 创建人 */
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
public static RuleInfo queryBuild( RuleInfoQueryReq ruleInfoQueryReq){
|
||||
return RuleInfo.builder()
|
||||
.name(ruleInfoQueryReq.getName())
|
||||
.status(ruleInfoQueryReq.getStatus())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加构造器
|
||||
*/
|
||||
public static RuleInfo saveBuild(RuleInfoSaveReq ruleInfoSaveReq){
|
||||
return RuleInfo.builder()
|
||||
.name(ruleInfoSaveReq.getName())
|
||||
.status(ruleInfoSaveReq.getStatus())
|
||||
.updatedBy(ruleInfoSaveReq.getUpdatedBy())
|
||||
.updatedTime(ruleInfoSaveReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改构造器
|
||||
*/
|
||||
public static RuleInfo editBuild(Long id, RuleInfoEditReq ruleInfoEditReq){
|
||||
return RuleInfo.builder()
|
||||
.id(id)
|
||||
.name(ruleInfoEditReq.getName())
|
||||
.status(ruleInfoEditReq.getStatus())
|
||||
.updatedBy(ruleInfoEditReq.getUpdatedBy())
|
||||
.updatedTime(ruleInfoEditReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,122 @@
|
|||
package com.muyu.product.domain.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品属性对象 as_product_attribute_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("as_product_attribute_info")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "AsProductAttributeInfo", description = "商品属性")
|
||||
public class AsProductAttributeInfo extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 属性编号 */
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "属性编号", value = "属性编号")
|
||||
private Long id;
|
||||
|
||||
/** 商品 */
|
||||
@Excel(name = "商品")
|
||||
@ApiModelProperty(name = "商品", value = "商品", required = true)
|
||||
private Long productId;
|
||||
|
||||
/** 属性 */
|
||||
@Excel(name = "属性")
|
||||
@ApiModelProperty(name = "属性", value = "属性", required = true)
|
||||
private Long attributeId;
|
||||
|
||||
/** 属性值 */
|
||||
@Excel(name = "属性值")
|
||||
@ApiModelProperty(name = "属性值", value = "属性值", required = true)
|
||||
private String value;
|
||||
|
||||
/** 创建人 */
|
||||
@Excel(name = "创建人")
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private Long createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
@Excel(name = "更新人")
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
public static AsProductAttributeInfo queryBuild( AsProductAttributeInfoQueryReq asProductAttributeInfoQueryReq){
|
||||
return AsProductAttributeInfo.builder()
|
||||
.productId(asProductAttributeInfoQueryReq.getProductId())
|
||||
.attributeId(asProductAttributeInfoQueryReq.getAttributeId())
|
||||
.value(asProductAttributeInfoQueryReq.getValue())
|
||||
.createdBy(asProductAttributeInfoQueryReq.getCreatedBy())
|
||||
.createdTime(asProductAttributeInfoQueryReq.getCreatedTime())
|
||||
.updatedBy(asProductAttributeInfoQueryReq.getUpdatedBy())
|
||||
.updatedTime(asProductAttributeInfoQueryReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加构造器
|
||||
*/
|
||||
public static AsProductAttributeInfo saveBuild(AsProductAttributeInfoSaveReq asProductAttributeInfoSaveReq){
|
||||
return AsProductAttributeInfo.builder()
|
||||
.productId(asProductAttributeInfoSaveReq.getProductId())
|
||||
.attributeId(asProductAttributeInfoSaveReq.getAttributeId())
|
||||
.value(asProductAttributeInfoSaveReq.getValue())
|
||||
.createdBy(asProductAttributeInfoSaveReq.getCreatedBy())
|
||||
.createdTime(asProductAttributeInfoSaveReq.getCreatedTime())
|
||||
.updatedBy(asProductAttributeInfoSaveReq.getUpdatedBy())
|
||||
.updatedTime(asProductAttributeInfoSaveReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改构造器
|
||||
*/
|
||||
public static AsProductAttributeInfo editBuild(Long id, AsProductAttributeInfoEditReq asProductAttributeInfoEditReq){
|
||||
return AsProductAttributeInfo.builder()
|
||||
.id(id)
|
||||
.productId(asProductAttributeInfoEditReq.getProductId())
|
||||
.attributeId(asProductAttributeInfoEditReq.getAttributeId())
|
||||
.value(asProductAttributeInfoEditReq.getValue())
|
||||
.createdBy(asProductAttributeInfoEditReq.getCreatedBy())
|
||||
.createdTime(asProductAttributeInfoEditReq.getCreatedTime())
|
||||
.updatedBy(asProductAttributeInfoEditReq.getUpdatedBy())
|
||||
.updatedTime(asProductAttributeInfoEditReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,126 @@
|
|||
package com.muyu.product.domain.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.product.domain.req.CommentInfoQueryReq;
|
||||
import com.muyu.product.domain.req.CommentInfoSaveReq;
|
||||
import com.muyu.product.domain.req.CommentInfoEditReq;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品评论对象 comment_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("comment_info")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "CommentInfo", description = "商品评论")
|
||||
public class CommentInfo extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 商品id */
|
||||
@Excel(name = "商品id")
|
||||
@ApiModelProperty(name = "商品id", value = "商品id", required = true)
|
||||
private Long projectId;
|
||||
|
||||
/** 评论 */
|
||||
@Excel(name = "评论")
|
||||
@ApiModelProperty(name = "评论", value = "评论")
|
||||
private String comment;
|
||||
|
||||
/** 图片 */
|
||||
@Excel(name = "图片")
|
||||
@ApiModelProperty(name = "图片", value = "图片")
|
||||
private String images;
|
||||
|
||||
/** 父类id */
|
||||
@Excel(name = "父类id")
|
||||
@ApiModelProperty(name = "父类id", value = "父类id", required = true)
|
||||
private String parentId;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
@ApiModelProperty(name = "备注", value = "备注")
|
||||
private String rmark;
|
||||
|
||||
/** 创建人 */
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
public static CommentInfo queryBuild( CommentInfoQueryReq commentInfoQueryReq){
|
||||
return CommentInfo.builder()
|
||||
.projectId(commentInfoQueryReq.getProjectId())
|
||||
.comment(commentInfoQueryReq.getComment())
|
||||
.images(commentInfoQueryReq.getImages())
|
||||
.parentId(commentInfoQueryReq.getParentId())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加构造器
|
||||
*/
|
||||
public static CommentInfo saveBuild(CommentInfoSaveReq commentInfoSaveReq){
|
||||
return CommentInfo.builder()
|
||||
.projectId(commentInfoSaveReq.getProjectId())
|
||||
.comment(commentInfoSaveReq.getComment())
|
||||
.images(commentInfoSaveReq.getImages())
|
||||
.parentId(commentInfoSaveReq.getParentId())
|
||||
.rmark(commentInfoSaveReq.getRmark())
|
||||
.updatedBy(commentInfoSaveReq.getUpdatedBy())
|
||||
.updatedTime(commentInfoSaveReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改构造器
|
||||
*/
|
||||
public static CommentInfo editBuild(Long id, CommentInfoEditReq commentInfoEditReq){
|
||||
return CommentInfo.builder()
|
||||
.id(id)
|
||||
.projectId(commentInfoEditReq.getProjectId())
|
||||
.comment(commentInfoEditReq.getComment())
|
||||
.images(commentInfoEditReq.getImages())
|
||||
.parentId(commentInfoEditReq.getParentId())
|
||||
.rmark(commentInfoEditReq.getRmark())
|
||||
.updatedBy(commentInfoEditReq.getUpdatedBy())
|
||||
.updatedTime(commentInfoEditReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,128 @@
|
|||
package com.muyu.product.domain.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.product.domain.req.ProjectSkuInfoQueryReq;
|
||||
import com.muyu.product.domain.req.ProjectSkuInfoSaveReq;
|
||||
import com.muyu.product.domain.req.ProjectSkuInfoEditReq;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品SKU对象 project_sku_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("project_sku_info")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "ProjectSkuInfo", description = "商品SKU")
|
||||
public class ProjectSkuInfo extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 商品id */
|
||||
@Excel(name = "商品id")
|
||||
@ApiModelProperty(name = "商品id", value = "商品id", required = true)
|
||||
private Long projectId;
|
||||
|
||||
/** sku */
|
||||
@Excel(name = "sku")
|
||||
@ApiModelProperty(name = "sku", value = "sku", required = true)
|
||||
private String sku;
|
||||
|
||||
/** 商品库存 */
|
||||
@Excel(name = "商品库存")
|
||||
@ApiModelProperty(name = "商品库存", value = "商品库存", required = true)
|
||||
private Long stock;
|
||||
|
||||
/** 商品价格 */
|
||||
@Excel(name = "商品价格")
|
||||
@ApiModelProperty(name = "商品价格", value = "商品价格", required = true)
|
||||
private BigDecimal price;
|
||||
|
||||
/** 规格图片 */
|
||||
@Excel(name = "规格图片")
|
||||
@ApiModelProperty(name = "规格图片", value = "规格图片", required = true)
|
||||
private String image;
|
||||
|
||||
/** 创建人 */
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
public static ProjectSkuInfo queryBuild( ProjectSkuInfoQueryReq projectSkuInfoQueryReq){
|
||||
return ProjectSkuInfo.builder()
|
||||
.projectId(projectSkuInfoQueryReq.getProjectId())
|
||||
.sku(projectSkuInfoQueryReq.getSku())
|
||||
.stock(projectSkuInfoQueryReq.getStock())
|
||||
.price(projectSkuInfoQueryReq.getPrice())
|
||||
.image(projectSkuInfoQueryReq.getImage())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加构造器
|
||||
*/
|
||||
public static ProjectSkuInfo saveBuild(ProjectSkuInfoSaveReq projectSkuInfoSaveReq){
|
||||
return ProjectSkuInfo.builder()
|
||||
.projectId(projectSkuInfoSaveReq.getProjectId())
|
||||
.sku(projectSkuInfoSaveReq.getSku())
|
||||
.stock(projectSkuInfoSaveReq.getStock())
|
||||
.price(projectSkuInfoSaveReq.getPrice())
|
||||
.image(projectSkuInfoSaveReq.getImage())
|
||||
.updatedBy(projectSkuInfoSaveReq.getUpdatedBy())
|
||||
.updatedTime(projectSkuInfoSaveReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改构造器
|
||||
*/
|
||||
public static ProjectSkuInfo editBuild(Long id, ProjectSkuInfoEditReq projectSkuInfoEditReq){
|
||||
return ProjectSkuInfo.builder()
|
||||
.id(id)
|
||||
.projectId(projectSkuInfoEditReq.getProjectId())
|
||||
.sku(projectSkuInfoEditReq.getSku())
|
||||
.stock(projectSkuInfoEditReq.getStock())
|
||||
.price(projectSkuInfoEditReq.getPrice())
|
||||
.image(projectSkuInfoEditReq.getImage())
|
||||
.updatedBy(projectSkuInfoEditReq.getUpdatedBy())
|
||||
.updatedTime(projectSkuInfoEditReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,111 @@
|
|||
package com.muyu.product.domain.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.product.domain.req.RuleAttrInfoQueryReq;
|
||||
import com.muyu.product.domain.req.RuleAttrInfoSaveReq;
|
||||
import com.muyu.product.domain.req.RuleAttrInfoEditReq;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 规格详情对象 rule_attr_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("rule_attr_info")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "RuleAttrInfo", description = "规格详情")
|
||||
public class RuleAttrInfo extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 规格id */
|
||||
@Excel(name = "规格id")
|
||||
@ApiModelProperty(name = "规格id", value = "规格id", required = true)
|
||||
private Long ruleId;
|
||||
|
||||
/** 类目名称 */
|
||||
@Excel(name = "类目名称")
|
||||
@ApiModelProperty(name = "类目名称", value = "类目名称")
|
||||
private String name;
|
||||
|
||||
/** 规格值 */
|
||||
@Excel(name = "规格值")
|
||||
@ApiModelProperty(name = "规格值", value = "规格值")
|
||||
private String attrValue;
|
||||
|
||||
/** 创建人 */
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
public static RuleAttrInfo queryBuild( RuleAttrInfoQueryReq ruleAttrInfoQueryReq){
|
||||
return RuleAttrInfo.builder()
|
||||
.ruleId(ruleAttrInfoQueryReq.getRuleId())
|
||||
.name(ruleAttrInfoQueryReq.getName())
|
||||
.attrValue(ruleAttrInfoQueryReq.getAttrValue())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加构造器
|
||||
*/
|
||||
public static RuleAttrInfo saveBuild(RuleAttrInfoSaveReq ruleAttrInfoSaveReq){
|
||||
return RuleAttrInfo.builder()
|
||||
.ruleId(ruleAttrInfoSaveReq.getRuleId())
|
||||
.name(ruleAttrInfoSaveReq.getName())
|
||||
.attrValue(ruleAttrInfoSaveReq.getAttrValue())
|
||||
.updatedBy(ruleAttrInfoSaveReq.getUpdatedBy())
|
||||
.updatedTime(ruleAttrInfoSaveReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改构造器
|
||||
*/
|
||||
public static RuleAttrInfo editBuild(Long id, RuleAttrInfoEditReq ruleAttrInfoEditReq){
|
||||
return RuleAttrInfo.builder()
|
||||
.id(id)
|
||||
.ruleId(ruleAttrInfoEditReq.getRuleId())
|
||||
.name(ruleAttrInfoEditReq.getName())
|
||||
.attrValue(ruleAttrInfoEditReq.getAttrValue())
|
||||
.updatedBy(ruleAttrInfoEditReq.getUpdatedBy())
|
||||
.updatedTime(ruleAttrInfoEditReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
package com.muyu.product.domain.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.product.domain.req.RuleInfoQueryReq;
|
||||
import com.muyu.product.domain.req.RuleInfoSaveReq;
|
||||
import com.muyu.product.domain.req.RuleInfoEditReq;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品规格对象 rule_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("rule_info")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "RuleInfo", description = "商品规格")
|
||||
public class RuleInfo extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 规格名称 */
|
||||
@Excel(name = "规格名称")
|
||||
@ApiModelProperty(name = "规格名称", value = "规格名称")
|
||||
private String name;
|
||||
|
||||
/** 规格状态 */
|
||||
@Excel(name = "规格状态")
|
||||
@ApiModelProperty(name = "规格状态", value = "规格状态")
|
||||
private String status;
|
||||
|
||||
/** 创建人 */
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
public static RuleInfo queryBuild( RuleInfoQueryReq ruleInfoQueryReq){
|
||||
return RuleInfo.builder()
|
||||
.name(ruleInfoQueryReq.getName())
|
||||
.status(ruleInfoQueryReq.getStatus())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加构造器
|
||||
*/
|
||||
public static RuleInfo saveBuild(RuleInfoSaveReq ruleInfoSaveReq){
|
||||
return RuleInfo.builder()
|
||||
.name(ruleInfoSaveReq.getName())
|
||||
.status(ruleInfoSaveReq.getStatus())
|
||||
.updatedBy(ruleInfoSaveReq.getUpdatedBy())
|
||||
.updatedTime(ruleInfoSaveReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改构造器
|
||||
*/
|
||||
public static RuleInfo editBuild(Long id, RuleInfoEditReq ruleInfoEditReq){
|
||||
return RuleInfo.builder()
|
||||
.id(id)
|
||||
.name(ruleInfoEditReq.getName())
|
||||
.status(ruleInfoEditReq.getStatus())
|
||||
.updatedBy(ruleInfoEditReq.getUpdatedBy())
|
||||
.updatedTime(ruleInfoEditReq.getUpdatedTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
package com.muyu.product.domain.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品属性对象 as_product_attribute_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "AsProductAttributeInfoEditReq", description = "商品属性")
|
||||
public class AsProductAttributeInfoEditReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 商品 */
|
||||
@ApiModelProperty(name = "商品", value = "商品", required = true)
|
||||
private Long productId;
|
||||
|
||||
/** 属性 */
|
||||
@ApiModelProperty(name = "属性", value = "属性", required = true)
|
||||
private Long attributeId;
|
||||
|
||||
/** 属性值 */
|
||||
@ApiModelProperty(name = "属性值", value = "属性值", required = true)
|
||||
private String value;
|
||||
|
||||
/** 创建人 */
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private Long createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
package com.muyu.product.domain.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品属性对象 as_product_attribute_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "AsProductAttributeInfoQueryReq", description = "商品属性")
|
||||
public class AsProductAttributeInfoQueryReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 商品 */
|
||||
@ApiModelProperty(name = "商品", value = "商品")
|
||||
private Long productId;
|
||||
|
||||
/** 属性 */
|
||||
@ApiModelProperty(name = "属性", value = "属性")
|
||||
private Long attributeId;
|
||||
|
||||
/** 属性值 */
|
||||
@ApiModelProperty(name = "属性值", value = "属性值")
|
||||
private String value;
|
||||
|
||||
/** 创建人 */
|
||||
@ApiModelProperty(name = "创建人", value = "创建人")
|
||||
private Long createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间")
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
package com.muyu.product.domain.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品属性对象 as_product_attribute_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "AsProductAttributeInfoSaveReq", description = "商品属性")
|
||||
public class AsProductAttributeInfoSaveReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 属性编号 */
|
||||
|
||||
@ApiModelProperty(name = "属性编号", value = "属性编号")
|
||||
private Long id;
|
||||
|
||||
/** 商品 */
|
||||
|
||||
@ApiModelProperty(name = "商品", value = "商品", required = true)
|
||||
private Long productId;
|
||||
|
||||
/** 属性 */
|
||||
|
||||
@ApiModelProperty(name = "属性", value = "属性", required = true)
|
||||
private Long attributeId;
|
||||
|
||||
/** 属性值 */
|
||||
|
||||
@ApiModelProperty(name = "属性值", value = "属性值", required = true)
|
||||
private String value;
|
||||
|
||||
/** 创建人 */
|
||||
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private Long createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
package com.muyu.product.domain.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品评论对象 comment_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "CommentInfoEditReq", description = "商品评论")
|
||||
public class CommentInfoEditReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 商品id */
|
||||
@ApiModelProperty(name = "商品id", value = "商品id", required = true)
|
||||
private Long projectId;
|
||||
|
||||
/** 评论 */
|
||||
@ApiModelProperty(name = "评论", value = "评论")
|
||||
private String comment;
|
||||
|
||||
/** 图片 */
|
||||
@ApiModelProperty(name = "图片", value = "图片")
|
||||
private String images;
|
||||
|
||||
/** 父类id */
|
||||
@ApiModelProperty(name = "父类id", value = "父类id", required = true)
|
||||
private String parentId;
|
||||
|
||||
/** 备注 */
|
||||
@ApiModelProperty(name = "备注", value = "备注")
|
||||
private String rmark;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package com.muyu.product.domain.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品评论对象 comment_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "CommentInfoQueryReq", description = "商品评论")
|
||||
public class CommentInfoQueryReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 商品id */
|
||||
@ApiModelProperty(name = "商品id", value = "商品id")
|
||||
private Long projectId;
|
||||
|
||||
/** 评论 */
|
||||
@ApiModelProperty(name = "评论", value = "评论")
|
||||
private String comment;
|
||||
|
||||
/** 图片 */
|
||||
@ApiModelProperty(name = "图片", value = "图片")
|
||||
private String images;
|
||||
|
||||
/** 父类id */
|
||||
@ApiModelProperty(name = "父类id", value = "父类id")
|
||||
private String parentId;
|
||||
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
package com.muyu.product.domain.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品评论对象 comment_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "CommentInfoSaveReq", description = "商品评论")
|
||||
public class CommentInfoSaveReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 商品id */
|
||||
|
||||
@ApiModelProperty(name = "商品id", value = "商品id", required = true)
|
||||
private Long projectId;
|
||||
|
||||
/** 评论 */
|
||||
|
||||
@ApiModelProperty(name = "评论", value = "评论")
|
||||
private String comment;
|
||||
|
||||
/** 图片 */
|
||||
|
||||
@ApiModelProperty(name = "图片", value = "图片")
|
||||
private String images;
|
||||
|
||||
/** 父类id */
|
||||
|
||||
@ApiModelProperty(name = "父类id", value = "父类id", required = true)
|
||||
private String parentId;
|
||||
|
||||
/** 备注 */
|
||||
|
||||
@ApiModelProperty(name = "备注", value = "备注")
|
||||
private String rmark;
|
||||
|
||||
/** 创建人 */
|
||||
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
package com.muyu.product.domain.domain.req;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品SKU对象 project_sku_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "ProjectSkuInfoEditReq", description = "商品SKU")
|
||||
public class ProjectSkuInfoEditReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 商品id */
|
||||
@ApiModelProperty(name = "商品id", value = "商品id", required = true)
|
||||
private Long projectId;
|
||||
|
||||
/** sku */
|
||||
@ApiModelProperty(name = "sku", value = "sku", required = true)
|
||||
private String sku;
|
||||
|
||||
/** 商品库存 */
|
||||
@ApiModelProperty(name = "商品库存", value = "商品库存", required = true)
|
||||
private Long stock;
|
||||
|
||||
/** 商品价格 */
|
||||
@ApiModelProperty(name = "商品价格", value = "商品价格", required = true)
|
||||
private BigDecimal price;
|
||||
|
||||
/** 规格图片 */
|
||||
@ApiModelProperty(name = "规格图片", value = "规格图片", required = true)
|
||||
private String image;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
package com.muyu.product.domain.domain.req;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品SKU对象 project_sku_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "ProjectSkuInfoQueryReq", description = "商品SKU")
|
||||
public class ProjectSkuInfoQueryReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 商品id */
|
||||
@ApiModelProperty(name = "商品id", value = "商品id")
|
||||
private Long projectId;
|
||||
|
||||
/** sku */
|
||||
@ApiModelProperty(name = "sku", value = "sku")
|
||||
private String sku;
|
||||
|
||||
/** 商品库存 */
|
||||
@ApiModelProperty(name = "商品库存", value = "商品库存")
|
||||
private Long stock;
|
||||
|
||||
/** 商品价格 */
|
||||
@ApiModelProperty(name = "商品价格", value = "商品价格")
|
||||
private BigDecimal price;
|
||||
|
||||
/** 规格图片 */
|
||||
@ApiModelProperty(name = "规格图片", value = "规格图片")
|
||||
private String image;
|
||||
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
package com.muyu.product.domain.domain.req;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品SKU对象 project_sku_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "ProjectSkuInfoSaveReq", description = "商品SKU")
|
||||
public class ProjectSkuInfoSaveReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 商品id */
|
||||
|
||||
@ApiModelProperty(name = "商品id", value = "商品id", required = true)
|
||||
private Long projectId;
|
||||
|
||||
/** sku */
|
||||
|
||||
@ApiModelProperty(name = "sku", value = "sku", required = true)
|
||||
private String sku;
|
||||
|
||||
/** 商品库存 */
|
||||
|
||||
@ApiModelProperty(name = "商品库存", value = "商品库存", required = true)
|
||||
private Long stock;
|
||||
|
||||
/** 商品价格 */
|
||||
|
||||
@ApiModelProperty(name = "商品价格", value = "商品价格", required = true)
|
||||
private BigDecimal price;
|
||||
|
||||
/** 规格图片 */
|
||||
|
||||
@ApiModelProperty(name = "规格图片", value = "规格图片", required = true)
|
||||
private String image;
|
||||
|
||||
/** 创建人 */
|
||||
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
package com.muyu.product.domain.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 规格详情对象 rule_attr_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "RuleAttrInfoEditReq", description = "规格详情")
|
||||
public class RuleAttrInfoEditReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 规格id */
|
||||
@ApiModelProperty(name = "规格id", value = "规格id", required = true)
|
||||
private Long ruleId;
|
||||
|
||||
/** 类目名称 */
|
||||
@ApiModelProperty(name = "类目名称", value = "类目名称")
|
||||
private String name;
|
||||
|
||||
/** 规格值 */
|
||||
@ApiModelProperty(name = "规格值", value = "规格值")
|
||||
private String attrValue;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
package com.muyu.product.domain.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 规格详情对象 rule_attr_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "RuleAttrInfoQueryReq", description = "规格详情")
|
||||
public class RuleAttrInfoQueryReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 规格id */
|
||||
@ApiModelProperty(name = "规格id", value = "规格id")
|
||||
private Long ruleId;
|
||||
|
||||
/** 类目名称 */
|
||||
@ApiModelProperty(name = "类目名称", value = "类目名称")
|
||||
private String name;
|
||||
|
||||
/** 规格值 */
|
||||
@ApiModelProperty(name = "规格值", value = "规格值")
|
||||
private String attrValue;
|
||||
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
package com.muyu.product.domain.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 规格详情对象 rule_attr_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "RuleAttrInfoSaveReq", description = "规格详情")
|
||||
public class RuleAttrInfoSaveReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 规格id */
|
||||
|
||||
@ApiModelProperty(name = "规格id", value = "规格id", required = true)
|
||||
private Long ruleId;
|
||||
|
||||
/** 类目名称 */
|
||||
|
||||
@ApiModelProperty(name = "类目名称", value = "类目名称")
|
||||
private String name;
|
||||
|
||||
/** 规格值 */
|
||||
|
||||
@ApiModelProperty(name = "规格值", value = "规格值")
|
||||
private String attrValue;
|
||||
|
||||
/** 创建人 */
|
||||
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package com.muyu.product.domain.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品规格对象 rule_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "RuleInfoEditReq", description = "商品规格")
|
||||
public class RuleInfoEditReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 规格名称 */
|
||||
@ApiModelProperty(name = "规格名称", value = "规格名称")
|
||||
private String name;
|
||||
|
||||
/** 规格状态 */
|
||||
@ApiModelProperty(name = "规格状态", value = "规格状态")
|
||||
private String status;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package com.muyu.product.domain.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品规格对象 rule_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "RuleInfoQueryReq", description = "商品规格")
|
||||
public class RuleInfoQueryReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 规格名称 */
|
||||
@ApiModelProperty(name = "规格名称", value = "规格名称")
|
||||
private String name;
|
||||
|
||||
/** 规格状态 */
|
||||
@ApiModelProperty(name = "规格状态", value = "规格状态")
|
||||
private String status;
|
||||
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
package com.muyu.product.domain.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品规格对象 rule_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "RuleInfoSaveReq", description = "商品规格")
|
||||
public class RuleInfoSaveReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 规格名称 */
|
||||
|
||||
@ApiModelProperty(name = "规格名称", value = "规格名称")
|
||||
private String name;
|
||||
|
||||
/** 规格状态 */
|
||||
|
||||
@ApiModelProperty(name = "规格状态", value = "规格状态")
|
||||
private String status;
|
||||
|
||||
/** 创建人 */
|
||||
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 属性组对象 attribute_group
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "AttributeGroupEditReq", description = "属性组")
|
||||
public class AttributeGroupEditReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 组名称 */
|
||||
@ApiModelProperty(name = "组名称", value = "组名称", required = true)
|
||||
private String name;
|
||||
|
||||
/** 状态 */
|
||||
@ApiModelProperty(name = "状态", value = "状态", required = true)
|
||||
private String states;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 属性组对象 attribute_group
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "AttributeGroupQueryReq", description = "属性组")
|
||||
public class AttributeGroupQueryReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 组名称 */
|
||||
@ApiModelProperty(name = "组名称", value = "组名称")
|
||||
private String name;
|
||||
|
||||
/** 状态 */
|
||||
@ApiModelProperty(name = "状态", value = "状态")
|
||||
private String states;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 属性组对象 attribute_group
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "AttributeGroupSaveReq", description = "属性组")
|
||||
public class AttributeGroupSaveReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 属性组编号 */
|
||||
|
||||
@ApiModelProperty(name = "属性组编号", value = "属性组编号")
|
||||
private Long id;
|
||||
|
||||
/** 组名称 */
|
||||
|
||||
@ApiModelProperty(name = "组名称", value = "组名称", required = true)
|
||||
private String name;
|
||||
|
||||
/** 状态 */
|
||||
|
||||
@ApiModelProperty(name = "状态", value = "状态", required = true)
|
||||
private String states;
|
||||
|
||||
/** 创建人 */
|
||||
|
||||
@ApiModelProperty(name = "创建人", value = "创建人")
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间")
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品属性对象 attribute_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "AttributeInfoEditReq", description = "商品属性")
|
||||
public class AttributeInfoEditReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 属性名 */
|
||||
@ApiModelProperty(name = "属性名", value = "属性名", required = true)
|
||||
private String name;
|
||||
|
||||
/** 分组 */
|
||||
@ApiModelProperty(name = "分组", value = "分组")
|
||||
private Long groupId;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品属性对象 attribute_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "AttributeInfoQueryReq", description = "商品属性")
|
||||
public class AttributeInfoQueryReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 属性名 */
|
||||
@ApiModelProperty(name = "属性名", value = "属性名")
|
||||
private String name;
|
||||
|
||||
/** 分组 */
|
||||
@ApiModelProperty(name = "分组", value = "分组")
|
||||
private Long groupId;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品属性对象 attribute_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "AttributeInfoSaveReq", description = "商品属性")
|
||||
public class AttributeInfoSaveReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 属性编号 */
|
||||
|
||||
@ApiModelProperty(name = "属性编号", value = "属性编号")
|
||||
private Long id;
|
||||
|
||||
/** 属性名 */
|
||||
|
||||
@ApiModelProperty(name = "属性名", value = "属性名", required = true)
|
||||
private String name;
|
||||
|
||||
/** 分组 */
|
||||
|
||||
@ApiModelProperty(name = "分组", value = "分组")
|
||||
private Long groupId;
|
||||
|
||||
/** 创建人 */
|
||||
|
||||
@ApiModelProperty(name = "创建人", value = "创建人")
|
||||
private Long createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 品牌信息对象 brand_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "BrandInfoEditReq", description = "品牌信息")
|
||||
public class BrandInfoEditReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 品牌名称 */
|
||||
@ApiModelProperty(name = "品牌名称", value = "品牌名称")
|
||||
private String name;
|
||||
|
||||
/** Logo */
|
||||
@ApiModelProperty(name = "Logo", value = "Logo")
|
||||
private String logo;
|
||||
|
||||
/** 介绍 */
|
||||
@ApiModelProperty(name = "介绍", value = "介绍")
|
||||
private String introduction;
|
||||
|
||||
/** 是否启用 */
|
||||
@ApiModelProperty(name = "是否启用", value = "是否启用")
|
||||
private String stauts;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 品牌信息对象 brand_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "BrandInfoQueryReq", description = "品牌信息")
|
||||
public class BrandInfoQueryReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 品牌名称 */
|
||||
@ApiModelProperty(name = "品牌名称", value = "品牌名称")
|
||||
private String name;
|
||||
|
||||
/** Logo */
|
||||
@ApiModelProperty(name = "Logo", value = "Logo")
|
||||
private String logo;
|
||||
|
||||
/** 介绍 */
|
||||
@ApiModelProperty(name = "介绍", value = "介绍")
|
||||
private String introduction;
|
||||
|
||||
/** 是否启用 */
|
||||
@ApiModelProperty(name = "是否启用", value = "是否启用")
|
||||
private String stauts;
|
||||
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 品牌信息对象 brand_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "BrandInfoSaveReq", description = "品牌信息")
|
||||
public class BrandInfoSaveReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 品牌名称 */
|
||||
|
||||
@ApiModelProperty(name = "品牌名称", value = "品牌名称")
|
||||
private String name;
|
||||
|
||||
/** Logo */
|
||||
|
||||
@ApiModelProperty(name = "Logo", value = "Logo")
|
||||
private String logo;
|
||||
|
||||
/** 介绍 */
|
||||
|
||||
@ApiModelProperty(name = "介绍", value = "介绍")
|
||||
private String introduction;
|
||||
|
||||
/** 是否启用 */
|
||||
|
||||
@ApiModelProperty(name = "是否启用", value = "是否启用")
|
||||
private String stauts;
|
||||
|
||||
/** 创建人 */
|
||||
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.TreeEntity;
|
||||
|
||||
/**
|
||||
* 品类信息对象 category_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "CategoryInfoEditReq", description = "品类信息")
|
||||
public class CategoryInfoEditReq extends TreeEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 品类名称 */
|
||||
@ApiModelProperty(name = "品类名称", value = "品类名称", required = true)
|
||||
private String name;
|
||||
|
||||
/** 图片 */
|
||||
@ApiModelProperty(name = "图片", value = "图片", required = true)
|
||||
private String image;
|
||||
|
||||
/** 是否启用 */
|
||||
@ApiModelProperty(name = "是否启用", value = "是否启用", required = true)
|
||||
private String stauts;
|
||||
|
||||
/** 介绍 */
|
||||
@ApiModelProperty(name = "介绍", value = "介绍")
|
||||
private String introduction;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.TreeEntity;
|
||||
|
||||
/**
|
||||
* 品类信息对象 category_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "CategoryInfoQueryReq", description = "品类信息")
|
||||
public class CategoryInfoQueryReq extends TreeEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 品类名称 */
|
||||
@ApiModelProperty(name = "品类名称", value = "品类名称")
|
||||
private String name;
|
||||
|
||||
/** 图片 */
|
||||
@ApiModelProperty(name = "图片", value = "图片")
|
||||
private String image;
|
||||
|
||||
/** 是否启用 */
|
||||
@ApiModelProperty(name = "是否启用", value = "是否启用")
|
||||
private String stauts;
|
||||
|
||||
/** 介绍 */
|
||||
@ApiModelProperty(name = "介绍", value = "介绍")
|
||||
private String introduction;
|
||||
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.TreeEntity;
|
||||
|
||||
/**
|
||||
* 品类信息对象 category_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "CategoryInfoSaveReq", description = "品类信息")
|
||||
public class CategoryInfoSaveReq extends TreeEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 品类名称 */
|
||||
|
||||
@ApiModelProperty(name = "品类名称", value = "品类名称", required = true)
|
||||
private String name;
|
||||
|
||||
/** 图片 */
|
||||
|
||||
@ApiModelProperty(name = "图片", value = "图片", required = true)
|
||||
private String image;
|
||||
|
||||
/** 是否启用 */
|
||||
|
||||
@ApiModelProperty(name = "是否启用", value = "是否启用", required = true)
|
||||
private String stauts;
|
||||
|
||||
/** 介绍 */
|
||||
|
||||
@ApiModelProperty(name = "介绍", value = "介绍")
|
||||
private String introduction;
|
||||
|
||||
/** 创建人 */
|
||||
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createBy;
|
||||
|
||||
/** 创建时间 */
|
||||
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createTime;
|
||||
|
||||
/** 更新人 */
|
||||
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
/** 更新时间 */
|
||||
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品评论对象 comment_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "CommentInfoEditReq", description = "商品评论")
|
||||
public class CommentInfoEditReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 商品id */
|
||||
@ApiModelProperty(name = "商品id", value = "商品id", required = true)
|
||||
private Long projectId;
|
||||
|
||||
/** 评论 */
|
||||
@ApiModelProperty(name = "评论", value = "评论")
|
||||
private String comment;
|
||||
|
||||
/** 图片 */
|
||||
@ApiModelProperty(name = "图片", value = "图片")
|
||||
private String images;
|
||||
|
||||
/** 父类id */
|
||||
@ApiModelProperty(name = "父类id", value = "父类id", required = true)
|
||||
private String parentId;
|
||||
|
||||
/** 备注 */
|
||||
@ApiModelProperty(name = "备注", value = "备注")
|
||||
private String rmark;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品评论对象 comment_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "CommentInfoQueryReq", description = "商品评论")
|
||||
public class CommentInfoQueryReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 商品id */
|
||||
@ApiModelProperty(name = "商品id", value = "商品id")
|
||||
private Long projectId;
|
||||
|
||||
/** 评论 */
|
||||
@ApiModelProperty(name = "评论", value = "评论")
|
||||
private String comment;
|
||||
|
||||
/** 图片 */
|
||||
@ApiModelProperty(name = "图片", value = "图片")
|
||||
private String images;
|
||||
|
||||
/** 父类id */
|
||||
@ApiModelProperty(name = "父类id", value = "父类id")
|
||||
private String parentId;
|
||||
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品评论对象 comment_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "CommentInfoSaveReq", description = "商品评论")
|
||||
public class CommentInfoSaveReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 商品id */
|
||||
|
||||
@ApiModelProperty(name = "商品id", value = "商品id", required = true)
|
||||
private Long projectId;
|
||||
|
||||
/** 评论 */
|
||||
|
||||
@ApiModelProperty(name = "评论", value = "评论")
|
||||
private String comment;
|
||||
|
||||
/** 图片 */
|
||||
|
||||
@ApiModelProperty(name = "图片", value = "图片")
|
||||
private String images;
|
||||
|
||||
/** 父类id */
|
||||
|
||||
@ApiModelProperty(name = "父类id", value = "父类id", required = true)
|
||||
private String parentId;
|
||||
|
||||
/** 备注 */
|
||||
|
||||
@ApiModelProperty(name = "备注", value = "备注")
|
||||
private String rmark;
|
||||
|
||||
/** 创建人 */
|
||||
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 评论点赞对象 comment_like_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "CommentLikeInfoEditReq", description = "评论点赞")
|
||||
public class CommentLikeInfoEditReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 评论id */
|
||||
@ApiModelProperty(name = "评论id", value = "评论id", required = true)
|
||||
private Long commentId;
|
||||
|
||||
/** 点赞人id */
|
||||
@ApiModelProperty(name = "点赞人id", value = "点赞人id", required = true)
|
||||
private Long userId;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 评论点赞对象 comment_like_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "CommentLikeInfoQueryReq", description = "评论点赞")
|
||||
public class CommentLikeInfoQueryReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 评论id */
|
||||
@ApiModelProperty(name = "评论id", value = "评论id")
|
||||
private Long commentId;
|
||||
|
||||
/** 点赞人id */
|
||||
@ApiModelProperty(name = "点赞人id", value = "点赞人id")
|
||||
private Long userId;
|
||||
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 评论点赞对象 comment_like_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "CommentLikeInfoSaveReq", description = "评论点赞")
|
||||
public class CommentLikeInfoSaveReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 评论id */
|
||||
|
||||
@ApiModelProperty(name = "评论id", value = "评论id", required = true)
|
||||
private Long commentId;
|
||||
|
||||
/** 点赞人id */
|
||||
|
||||
@ApiModelProperty(name = "点赞人id", value = "点赞人id", required = true)
|
||||
private Long userId;
|
||||
|
||||
/** 创建人 */
|
||||
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品信息对象 project_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "ProjectInfoEditReq", description = "商品信息")
|
||||
public class ProjectInfoEditReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 商品名称 */
|
||||
@ApiModelProperty(name = "商品名称", value = "商品名称")
|
||||
private String name;
|
||||
|
||||
/** 商品描述 */
|
||||
@ApiModelProperty(name = "商品描述", value = "商品描述")
|
||||
private String introduction;
|
||||
|
||||
/** 主类型 */
|
||||
@ApiModelProperty(name = "主类型", value = "主类型")
|
||||
private String mianType;
|
||||
|
||||
/** 父类型 */
|
||||
@ApiModelProperty(name = "父类型", value = "父类型")
|
||||
private String parent;
|
||||
|
||||
/** 商品类型 */
|
||||
@ApiModelProperty(name = "商品类型", value = "商品类型")
|
||||
private String type;
|
||||
|
||||
/** 商品图片 */
|
||||
@ApiModelProperty(name = "商品图片", value = "商品图片")
|
||||
private String image;
|
||||
|
||||
/** 商品轮播图 */
|
||||
@ApiModelProperty(name = "商品轮播图", value = "商品轮播图")
|
||||
private String carouselImages;
|
||||
|
||||
/** 商品状态 */
|
||||
@ApiModelProperty(name = "商品状态", value = "商品状态")
|
||||
private Long status;
|
||||
|
||||
/** 规格 */
|
||||
@ApiModelProperty(name = "规格", value = "规格")
|
||||
private Long ruleId;
|
||||
|
||||
/** 品牌 */
|
||||
@ApiModelProperty(name = "品牌", value = "品牌")
|
||||
private Long brandId;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品信息对象 project_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "ProjectInfoQueryReq", description = "商品信息")
|
||||
public class ProjectInfoQueryReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 商品名称 */
|
||||
@ApiModelProperty(name = "商品名称", value = "商品名称")
|
||||
private String name;
|
||||
|
||||
/** 商品描述 */
|
||||
@ApiModelProperty(name = "商品描述", value = "商品描述")
|
||||
private String introduction;
|
||||
|
||||
/** 主类型 */
|
||||
@ApiModelProperty(name = "主类型", value = "主类型")
|
||||
private String mianType;
|
||||
|
||||
/** 父类型 */
|
||||
@ApiModelProperty(name = "父类型", value = "父类型")
|
||||
private String parent;
|
||||
|
||||
/** 商品类型 */
|
||||
@ApiModelProperty(name = "商品类型", value = "商品类型")
|
||||
private String type;
|
||||
|
||||
/** 商品图片 */
|
||||
@ApiModelProperty(name = "商品图片", value = "商品图片")
|
||||
private String image;
|
||||
|
||||
/** 商品轮播图 */
|
||||
@ApiModelProperty(name = "商品轮播图", value = "商品轮播图")
|
||||
private String carouselImages;
|
||||
|
||||
/** 商品状态 */
|
||||
@ApiModelProperty(name = "商品状态", value = "商品状态")
|
||||
private Long status;
|
||||
|
||||
/** 规格 */
|
||||
@ApiModelProperty(name = "规格", value = "规格")
|
||||
private Long ruleId;
|
||||
|
||||
/** 品牌 */
|
||||
@ApiModelProperty(name = "品牌", value = "品牌")
|
||||
private Long brandId;
|
||||
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品信息对象 project_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "ProjectInfoSaveReq", description = "商品信息")
|
||||
public class ProjectInfoSaveReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 商品名称 */
|
||||
|
||||
@ApiModelProperty(name = "商品名称", value = "商品名称")
|
||||
private String name;
|
||||
|
||||
/** 商品描述 */
|
||||
|
||||
@ApiModelProperty(name = "商品描述", value = "商品描述")
|
||||
private String introduction;
|
||||
|
||||
/** 主类型 */
|
||||
|
||||
@ApiModelProperty(name = "主类型", value = "主类型")
|
||||
private String mianType;
|
||||
|
||||
/** 父类型 */
|
||||
|
||||
@ApiModelProperty(name = "父类型", value = "父类型")
|
||||
private String parent;
|
||||
|
||||
/** 商品类型 */
|
||||
|
||||
@ApiModelProperty(name = "商品类型", value = "商品类型")
|
||||
private String type;
|
||||
|
||||
/** 商品图片 */
|
||||
|
||||
@ApiModelProperty(name = "商品图片", value = "商品图片")
|
||||
private String image;
|
||||
|
||||
/** 商品轮播图 */
|
||||
|
||||
@ApiModelProperty(name = "商品轮播图", value = "商品轮播图")
|
||||
private String carouselImages;
|
||||
|
||||
/** 商品状态 */
|
||||
|
||||
@ApiModelProperty(name = "商品状态", value = "商品状态")
|
||||
private Long status;
|
||||
|
||||
/** 规格 */
|
||||
|
||||
@ApiModelProperty(name = "规格", value = "规格")
|
||||
private Long ruleId;
|
||||
|
||||
/** 品牌 */
|
||||
|
||||
@ApiModelProperty(name = "品牌", value = "品牌")
|
||||
private Long brandId;
|
||||
|
||||
/** 创建人 */
|
||||
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品SKU对象 project_sku_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "ProjectSkuInfoEditReq", description = "商品SKU")
|
||||
public class ProjectSkuInfoEditReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 商品id */
|
||||
@ApiModelProperty(name = "商品id", value = "商品id", required = true)
|
||||
private Long projectId;
|
||||
|
||||
/** sku */
|
||||
@ApiModelProperty(name = "sku", value = "sku", required = true)
|
||||
private String sku;
|
||||
|
||||
/** 商品库存 */
|
||||
@ApiModelProperty(name = "商品库存", value = "商品库存", required = true)
|
||||
private Long stock;
|
||||
|
||||
/** 商品价格 */
|
||||
@ApiModelProperty(name = "商品价格", value = "商品价格", required = true)
|
||||
private BigDecimal price;
|
||||
|
||||
/** 规格图片 */
|
||||
@ApiModelProperty(name = "规格图片", value = "规格图片", required = true)
|
||||
private String image;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品SKU对象 project_sku_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "ProjectSkuInfoQueryReq", description = "商品SKU")
|
||||
public class ProjectSkuInfoQueryReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 商品id */
|
||||
@ApiModelProperty(name = "商品id", value = "商品id")
|
||||
private Long projectId;
|
||||
|
||||
/** sku */
|
||||
@ApiModelProperty(name = "sku", value = "sku")
|
||||
private String sku;
|
||||
|
||||
/** 商品库存 */
|
||||
@ApiModelProperty(name = "商品库存", value = "商品库存")
|
||||
private Long stock;
|
||||
|
||||
/** 商品价格 */
|
||||
@ApiModelProperty(name = "商品价格", value = "商品价格")
|
||||
private BigDecimal price;
|
||||
|
||||
/** 规格图片 */
|
||||
@ApiModelProperty(name = "规格图片", value = "规格图片")
|
||||
private String image;
|
||||
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品SKU对象 project_sku_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "ProjectSkuInfoSaveReq", description = "商品SKU")
|
||||
public class ProjectSkuInfoSaveReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 商品id */
|
||||
|
||||
@ApiModelProperty(name = "商品id", value = "商品id", required = true)
|
||||
private Long projectId;
|
||||
|
||||
/** sku */
|
||||
|
||||
@ApiModelProperty(name = "sku", value = "sku", required = true)
|
||||
private String sku;
|
||||
|
||||
/** 商品库存 */
|
||||
|
||||
@ApiModelProperty(name = "商品库存", value = "商品库存", required = true)
|
||||
private Long stock;
|
||||
|
||||
/** 商品价格 */
|
||||
|
||||
@ApiModelProperty(name = "商品价格", value = "商品价格", required = true)
|
||||
private BigDecimal price;
|
||||
|
||||
/** 规格图片 */
|
||||
|
||||
@ApiModelProperty(name = "规格图片", value = "规格图片", required = true)
|
||||
private String image;
|
||||
|
||||
/** 创建人 */
|
||||
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 规格详情对象 rule_attr_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "RuleAttrInfoEditReq", description = "规格详情")
|
||||
public class RuleAttrInfoEditReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 规格id */
|
||||
@ApiModelProperty(name = "规格id", value = "规格id", required = true)
|
||||
private Long ruleId;
|
||||
|
||||
/** 类目名称 */
|
||||
@ApiModelProperty(name = "类目名称", value = "类目名称")
|
||||
private String name;
|
||||
|
||||
/** 规格值 */
|
||||
@ApiModelProperty(name = "规格值", value = "规格值")
|
||||
private String attrValue;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 规格详情对象 rule_attr_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "RuleAttrInfoQueryReq", description = "规格详情")
|
||||
public class RuleAttrInfoQueryReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 规格id */
|
||||
@ApiModelProperty(name = "规格id", value = "规格id")
|
||||
private Long ruleId;
|
||||
|
||||
/** 类目名称 */
|
||||
@ApiModelProperty(name = "类目名称", value = "类目名称")
|
||||
private String name;
|
||||
|
||||
/** 规格值 */
|
||||
@ApiModelProperty(name = "规格值", value = "规格值")
|
||||
private String attrValue;
|
||||
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 规格详情对象 rule_attr_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "RuleAttrInfoSaveReq", description = "规格详情")
|
||||
public class RuleAttrInfoSaveReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 规格id */
|
||||
|
||||
@ApiModelProperty(name = "规格id", value = "规格id", required = true)
|
||||
private Long ruleId;
|
||||
|
||||
/** 类目名称 */
|
||||
|
||||
@ApiModelProperty(name = "类目名称", value = "类目名称")
|
||||
private String name;
|
||||
|
||||
/** 规格值 */
|
||||
|
||||
@ApiModelProperty(name = "规格值", value = "规格值")
|
||||
private String attrValue;
|
||||
|
||||
/** 创建人 */
|
||||
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品规格对象 rule_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "RuleInfoEditReq", description = "商品规格")
|
||||
public class RuleInfoEditReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 规格名称 */
|
||||
@ApiModelProperty(name = "规格名称", value = "规格名称")
|
||||
private String name;
|
||||
|
||||
/** 规格状态 */
|
||||
@ApiModelProperty(name = "规格状态", value = "规格状态")
|
||||
private String status;
|
||||
|
||||
/** 更新人 */
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品规格对象 rule_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "RuleInfoQueryReq", description = "商品规格")
|
||||
public class RuleInfoQueryReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 规格名称 */
|
||||
@ApiModelProperty(name = "规格名称", value = "规格名称")
|
||||
private String name;
|
||||
|
||||
/** 规格状态 */
|
||||
@ApiModelProperty(name = "规格状态", value = "规格状态")
|
||||
private String status;
|
||||
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品规格对象 rule_info
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "RuleInfoSaveReq", description = "商品规格")
|
||||
public class RuleInfoSaveReq extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 规格名称 */
|
||||
|
||||
@ApiModelProperty(name = "规格名称", value = "规格名称")
|
||||
private String name;
|
||||
|
||||
/** 规格状态 */
|
||||
|
||||
@ApiModelProperty(name = "规格状态", value = "规格状态")
|
||||
private String status;
|
||||
|
||||
/** 创建人 */
|
||||
|
||||
@ApiModelProperty(name = "创建人", value = "创建人", required = true)
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间", required = true)
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
|
||||
@ApiModelProperty(name = "更新人", value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
|
||||
@ApiModelProperty(name = "更新时间", value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
<?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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-product</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>muyu-product-remote</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-product-common</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,114 @@
|
|||
<?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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-product</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>muyu-product-server</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!--商品模快 remote 依賴-->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-product-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos Config -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Sentinel -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringBoot Actuator -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Swagger UI -->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>${swagger.fox.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Mysql Connector -->
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- MuYu Common DataSource -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-datasource</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- MuYu Common DataScope -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-datascope</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- MuYu Common Log -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-log</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- MuYu Common Swagger -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-swagger</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- 加入maven deploy插件,当在deploy时,忽略些model-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,18 @@
|
|||
package com.muyu.product;
|
||||
|
||||
import com.muyu.common.security.annotation.EnableCustomConfig;
|
||||
import com.muyu.common.security.annotation.EnableMyFeignClients;
|
||||
import com.muyu.common.swagger.annotation.EnableCustomSwagger2;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@EnableCustomConfig
|
||||
@EnableCustomSwagger2
|
||||
@EnableMyFeignClients
|
||||
@SpringBootApplication
|
||||
public class MuYuProductApplication {
|
||||
public static void main (String[] args) {
|
||||
SpringApplication.run(MuYuProductApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,111 @@
|
|||
package com.muyu.product.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.common.log.annotation.Log;
|
||||
import com.muyu.common.log.enums.BusinessType;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.product.domain.AttributeGroup;
|
||||
import com.muyu.product.domain.req.AttributeGroupQueryReq;
|
||||
import com.muyu.product.domain.req.AttributeGroupSaveReq;
|
||||
import com.muyu.product.domain.req.AttributeGroupEditReq;
|
||||
import com.muyu.product.service.AttributeGroupService;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 属性组Controller
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Api(tags = "属性组")
|
||||
@RestController
|
||||
@RequestMapping("/attributeGroup")
|
||||
public class AttributeGroupController extends BaseController {
|
||||
@Autowired
|
||||
private AttributeGroupService attributeGroupService;
|
||||
|
||||
/**
|
||||
* 查询属性组列表
|
||||
*/
|
||||
@ApiOperation("获取属性组列表")
|
||||
@RequiresPermissions("product:attributeGroup:list")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<AttributeGroup>> list(AttributeGroupQueryReq attributeGroupQueryReq) {
|
||||
startPage();
|
||||
List<AttributeGroup> list = attributeGroupService.list(AttributeGroup.queryBuild(attributeGroupQueryReq));
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出属性组列表
|
||||
*/
|
||||
@ApiOperation("导出属性组列表")
|
||||
@RequiresPermissions("product:attributeGroup:export")
|
||||
@Log(title = "属性组", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, AttributeGroup attributeGroup) {
|
||||
List<AttributeGroup> list = attributeGroupService.list(attributeGroup);
|
||||
ExcelUtil<AttributeGroup> util = new ExcelUtil<AttributeGroup>(AttributeGroup.class);
|
||||
util.exportExcel(response, list, "属性组数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取属性组详细信息
|
||||
*/
|
||||
@ApiOperation("获取属性组详细信息")
|
||||
@RequiresPermissions("product:attributeGroup:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class)
|
||||
public Result<AttributeGroup> getInfo(@PathVariable("id") Long id) {
|
||||
return Result.success(attributeGroupService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增属性组
|
||||
*/
|
||||
@RequiresPermissions("product:attributeGroup:add")
|
||||
@Log(title = "属性组", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@ApiOperation("新增属性组")
|
||||
public Result<String> add(@RequestBody AttributeGroupSaveReq attributeGroupSaveReq) {
|
||||
return toAjax(attributeGroupService.save(AttributeGroup.saveBuild(attributeGroupSaveReq)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改属性组
|
||||
*/
|
||||
@RequiresPermissions("product:attributeGroup:edit")
|
||||
@Log(title = "属性组", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{id}")
|
||||
@ApiOperation("修改属性组")
|
||||
public Result<String> edit(@PathVariable Long id, @RequestBody AttributeGroupEditReq attributeGroupEditReq) {
|
||||
return toAjax(attributeGroupService.updateById(AttributeGroup.editBuild(id,attributeGroupEditReq)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除属性组
|
||||
*/
|
||||
@RequiresPermissions("product:attributeGroup:remove")
|
||||
@Log(title = "属性组", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除属性组")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
|
||||
public Result<String> remove(@PathVariable List<Long> ids) {
|
||||
return toAjax(attributeGroupService.removeBatchByIds(ids));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,111 @@
|
|||
package com.muyu.product.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.common.log.annotation.Log;
|
||||
import com.muyu.common.log.enums.BusinessType;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.product.domain.AttributeInfo;
|
||||
import com.muyu.product.domain.req.AttributeInfoQueryReq;
|
||||
import com.muyu.product.domain.req.AttributeInfoSaveReq;
|
||||
import com.muyu.product.domain.req.AttributeInfoEditReq;
|
||||
import com.muyu.product.service.AttributeInfoService;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 商品属性Controller
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Api(tags = "商品属性")
|
||||
@RestController
|
||||
@RequestMapping("/attribute")
|
||||
public class AttributeInfoController extends BaseController {
|
||||
@Autowired
|
||||
private AttributeInfoService attributeInfoService;
|
||||
|
||||
/**
|
||||
* 查询商品属性列表
|
||||
*/
|
||||
@ApiOperation("获取商品属性列表")
|
||||
@RequiresPermissions("product:attribute:list")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<AttributeInfo>> list(AttributeInfoQueryReq attributeInfoQueryReq) {
|
||||
startPage();
|
||||
List<AttributeInfo> list = attributeInfoService.list(AttributeInfo.queryBuild(attributeInfoQueryReq));
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出商品属性列表
|
||||
*/
|
||||
@ApiOperation("导出商品属性列表")
|
||||
@RequiresPermissions("product:attribute:export")
|
||||
@Log(title = "商品属性", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, AttributeInfo attributeInfo) {
|
||||
List<AttributeInfo> list = attributeInfoService.list(attributeInfo);
|
||||
ExcelUtil<AttributeInfo> util = new ExcelUtil<AttributeInfo>(AttributeInfo.class);
|
||||
util.exportExcel(response, list, "商品属性数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商品属性详细信息
|
||||
*/
|
||||
@ApiOperation("获取商品属性详细信息")
|
||||
@RequiresPermissions("product:attribute:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class)
|
||||
public Result<AttributeInfo> getInfo(@PathVariable("id") Long id) {
|
||||
return Result.success(attributeInfoService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品属性
|
||||
*/
|
||||
@RequiresPermissions("product:attribute:add")
|
||||
@Log(title = "商品属性", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@ApiOperation("新增商品属性")
|
||||
public Result<String> add(@RequestBody AttributeInfoSaveReq attributeInfoSaveReq) {
|
||||
return toAjax(attributeInfoService.save(AttributeInfo.saveBuild(attributeInfoSaveReq)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品属性
|
||||
*/
|
||||
@RequiresPermissions("product:attribute:edit")
|
||||
@Log(title = "商品属性", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{id}")
|
||||
@ApiOperation("修改商品属性")
|
||||
public Result<String> edit(@PathVariable Long id, @RequestBody AttributeInfoEditReq attributeInfoEditReq) {
|
||||
return toAjax(attributeInfoService.updateById(AttributeInfo.editBuild(id,attributeInfoEditReq)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品属性
|
||||
*/
|
||||
@RequiresPermissions("product:attribute:remove")
|
||||
@Log(title = "商品属性", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除商品属性")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
|
||||
public Result<String> remove(@PathVariable List<Long> ids) {
|
||||
return toAjax(attributeInfoService.removeBatchByIds(ids));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,111 @@
|
|||
package com.muyu.product.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.common.log.annotation.Log;
|
||||
import com.muyu.common.log.enums.BusinessType;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.product.domain.BrandInfo;
|
||||
import com.muyu.product.domain.req.BrandInfoQueryReq;
|
||||
import com.muyu.product.domain.req.BrandInfoSaveReq;
|
||||
import com.muyu.product.domain.req.BrandInfoEditReq;
|
||||
import com.muyu.product.service.BrandInfoService;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 品牌信息Controller
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Api(tags = "品牌信息")
|
||||
@RestController
|
||||
@RequestMapping("/brand")
|
||||
public class BrandInfoController extends BaseController {
|
||||
@Autowired
|
||||
private BrandInfoService brandInfoService;
|
||||
|
||||
/**
|
||||
* 查询品牌信息列表
|
||||
*/
|
||||
@ApiOperation("获取品牌信息列表")
|
||||
@RequiresPermissions("product:brand:list")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<BrandInfo>> list(BrandInfoQueryReq brandInfoQueryReq) {
|
||||
startPage();
|
||||
List<BrandInfo> list = brandInfoService.list(BrandInfo.queryBuild(brandInfoQueryReq));
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出品牌信息列表
|
||||
*/
|
||||
@ApiOperation("导出品牌信息列表")
|
||||
@RequiresPermissions("product:brand:export")
|
||||
@Log(title = "品牌信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BrandInfo brandInfo) {
|
||||
List<BrandInfo> list = brandInfoService.list(brandInfo);
|
||||
ExcelUtil<BrandInfo> util = new ExcelUtil<BrandInfo>(BrandInfo.class);
|
||||
util.exportExcel(response, list, "品牌信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取品牌信息详细信息
|
||||
*/
|
||||
@ApiOperation("获取品牌信息详细信息")
|
||||
@RequiresPermissions("product:brand:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class)
|
||||
public Result<BrandInfo> getInfo(@PathVariable("id") Long id) {
|
||||
return Result.success(brandInfoService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增品牌信息
|
||||
*/
|
||||
@RequiresPermissions("product:brand:add")
|
||||
@Log(title = "品牌信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@ApiOperation("新增品牌信息")
|
||||
public Result<String> add(@RequestBody BrandInfoSaveReq brandInfoSaveReq) {
|
||||
return toAjax(brandInfoService.save(BrandInfo.saveBuild(brandInfoSaveReq)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改品牌信息
|
||||
*/
|
||||
@RequiresPermissions("product:brand:edit")
|
||||
@Log(title = "品牌信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{id}")
|
||||
@ApiOperation("修改品牌信息")
|
||||
public Result<String> edit(@PathVariable Long id, @RequestBody BrandInfoEditReq brandInfoEditReq) {
|
||||
return toAjax(brandInfoService.updateById(BrandInfo.editBuild(id,brandInfoEditReq)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除品牌信息
|
||||
*/
|
||||
@RequiresPermissions("product:brand:remove")
|
||||
@Log(title = "品牌信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除品牌信息")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
|
||||
public Result<String> remove(@PathVariable List<Long> ids) {
|
||||
return toAjax(brandInfoService.removeBatchByIds(ids));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,109 @@
|
|||
package com.muyu.product.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.common.log.annotation.Log;
|
||||
import com.muyu.common.log.enums.BusinessType;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.product.domain.CategoryInfo;
|
||||
import com.muyu.product.domain.req.CategoryInfoQueryReq;
|
||||
import com.muyu.product.domain.req.CategoryInfoSaveReq;
|
||||
import com.muyu.product.domain.req.CategoryInfoEditReq;
|
||||
import com.muyu.product.service.CategoryInfoService;
|
||||
|
||||
/**
|
||||
* 品类信息Controller
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Api(tags = "品类信息")
|
||||
@RestController
|
||||
@RequestMapping("/category")
|
||||
public class CategoryInfoController extends BaseController {
|
||||
@Autowired
|
||||
private CategoryInfoService categoryInfoService;
|
||||
|
||||
/**
|
||||
* 查询品类信息列表
|
||||
*/
|
||||
@ApiOperation("获取品类信息列表")
|
||||
@RequiresPermissions("product:category:list")
|
||||
@GetMapping("/list")
|
||||
public Result<List<CategoryInfo>> list(CategoryInfo categoryInfo) {
|
||||
List<CategoryInfo> list = categoryInfoService.list(categoryInfo);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出品类信息列表
|
||||
*/
|
||||
@ApiOperation("导出品类信息列表")
|
||||
@RequiresPermissions("product:category:export")
|
||||
@Log(title = "品类信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CategoryInfo categoryInfo) {
|
||||
List<CategoryInfo> list = categoryInfoService.list(categoryInfo);
|
||||
ExcelUtil<CategoryInfo> util = new ExcelUtil<CategoryInfo>(CategoryInfo.class);
|
||||
util.exportExcel(response, list, "品类信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取品类信息详细信息
|
||||
*/
|
||||
@ApiOperation("获取品类信息详细信息")
|
||||
@RequiresPermissions("product:category:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class)
|
||||
public Result<CategoryInfo> getInfo(@PathVariable("id") Long id) {
|
||||
return Result.success(categoryInfoService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增品类信息
|
||||
*/
|
||||
@RequiresPermissions("product:category:add")
|
||||
@Log(title = "品类信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@ApiOperation("新增品类信息")
|
||||
public Result<String> add(@RequestBody CategoryInfoSaveReq categoryInfoSaveReq) {
|
||||
return toAjax(categoryInfoService.save(CategoryInfo.saveBuild(categoryInfoSaveReq)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改品类信息
|
||||
*/
|
||||
@RequiresPermissions("product:category:edit")
|
||||
@Log(title = "品类信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{id}")
|
||||
@ApiOperation("修改品类信息")
|
||||
public Result<String> edit(@PathVariable Long id, @RequestBody CategoryInfoEditReq categoryInfoEditReq) {
|
||||
return toAjax(categoryInfoService.updateById(CategoryInfo.editBuild(id,categoryInfoEditReq)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除品类信息
|
||||
*/
|
||||
@RequiresPermissions("product:category:remove")
|
||||
@Log(title = "品类信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除品类信息")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
|
||||
public Result<String> remove(@PathVariable List<Long> ids) {
|
||||
return toAjax(categoryInfoService.removeBatchByIds(ids));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,111 @@
|
|||
package com.muyu.product.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.common.log.annotation.Log;
|
||||
import com.muyu.common.log.enums.BusinessType;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.product.domain.CommentInfo;
|
||||
import com.muyu.product.domain.req.CommentInfoQueryReq;
|
||||
import com.muyu.product.domain.req.CommentInfoSaveReq;
|
||||
import com.muyu.product.domain.req.CommentInfoEditReq;
|
||||
import com.muyu.product.service.CommentInfoService;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 商品评论Controller
|
||||
*
|
||||
* @author XiaoHuang
|
||||
* @date 2024-03-05
|
||||
*/
|
||||
@Api(tags = "商品评论")
|
||||
@RestController
|
||||
@RequestMapping("/comment")
|
||||
public class CommentInfoController extends BaseController {
|
||||
@Autowired
|
||||
private CommentInfoService commentInfoService;
|
||||
|
||||
/**
|
||||
* 查询商品评论列表
|
||||
*/
|
||||
@ApiOperation("获取商品评论列表")
|
||||
@RequiresPermissions("product:comment:list")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<CommentInfo>> list(CommentInfoQueryReq commentInfoQueryReq) {
|
||||
startPage();
|
||||
List<CommentInfo> list = commentInfoService.list(CommentInfo.queryBuild(commentInfoQueryReq));
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出商品评论列表
|
||||
*/
|
||||
@ApiOperation("导出商品评论列表")
|
||||
@RequiresPermissions("product:comment:export")
|
||||
@Log(title = "商品评论", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CommentInfo commentInfo) {
|
||||
List<CommentInfo> list = commentInfoService.list(commentInfo);
|
||||
ExcelUtil<CommentInfo> util = new ExcelUtil<CommentInfo>(CommentInfo.class);
|
||||
util.exportExcel(response, list, "商品评论数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商品评论详细信息
|
||||
*/
|
||||
@ApiOperation("获取商品评论详细信息")
|
||||
@RequiresPermissions("product:comment:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class)
|
||||
public Result<CommentInfo> getInfo(@PathVariable("id") Long id) {
|
||||
return Result.success(commentInfoService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品评论
|
||||
*/
|
||||
@RequiresPermissions("product:comment:add")
|
||||
@Log(title = "商品评论", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@ApiOperation("新增商品评论")
|
||||
public Result<String> add(@RequestBody CommentInfoSaveReq commentInfoSaveReq) {
|
||||
return toAjax(commentInfoService.save(CommentInfo.saveBuild(commentInfoSaveReq)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品评论
|
||||
*/
|
||||
@RequiresPermissions("product:comment:edit")
|
||||
@Log(title = "商品评论", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{id}")
|
||||
@ApiOperation("修改商品评论")
|
||||
public Result<String> edit(@PathVariable Long id, @RequestBody CommentInfoEditReq commentInfoEditReq) {
|
||||
return toAjax(commentInfoService.updateById(CommentInfo.editBuild(id,commentInfoEditReq)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品评论
|
||||
*/
|
||||
@RequiresPermissions("product:comment:remove")
|
||||
@Log(title = "商品评论", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除商品评论")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
|
||||
public Result<String> remove(@PathVariable List<Long> ids) {
|
||||
return toAjax(commentInfoService.removeBatchByIds(ids));
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue