店员管理/店员等级/账户管理
This commit is contained in:
@@ -46,9 +46,26 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectGenTableVo">
|
||||
select table_id, table_name, table_comment, sub_table_name, sub_table_fk_name, class_name, tpl_category,
|
||||
package_name, module_name, business_name, function_name, function_author, gen_type, gen_path, options,
|
||||
created_by, created_time, updated_by, updated_time from gen_table
|
||||
select table_id,
|
||||
table_name,
|
||||
table_comment,
|
||||
sub_table_name,
|
||||
sub_table_fk_name,
|
||||
class_name,
|
||||
tpl_category,
|
||||
package_name,
|
||||
module_name,
|
||||
business_name,
|
||||
function_name,
|
||||
function_author,
|
||||
gen_type,
|
||||
gen_path,
|
||||
options,
|
||||
created_by,
|
||||
created_time,
|
||||
updated_by,
|
||||
updated_time
|
||||
from gen_table
|
||||
</sql>
|
||||
|
||||
<select id="selectDbTableList" resultMap="BaseResultMap">
|
||||
|
||||
@@ -8,6 +8,7 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
||||
import java.util.Date;
|
||||
#if($table.crud || $table.sub)
|
||||
import com.starry.common.domain.BaseEntity;
|
||||
@@ -21,21 +22,21 @@ import com.starry.common.domain.TreeEntity;
|
||||
* @author ${author}
|
||||
* @since ${datetime}
|
||||
*/
|
||||
#if($table.crud || $table.sub)
|
||||
#set($Entity="BaseEntity")
|
||||
#elseif($table.tree)
|
||||
#set($Entity="TreeEntity")
|
||||
#end
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("$table.tableName")
|
||||
public class ${ClassName}Entity extends BaseEntity<${ClassName}Entity>{
|
||||
#if($table.crud || $table.sub)
|
||||
#set($Entity="BaseEntity")
|
||||
#elseif($table.tree)
|
||||
#set($Entity="TreeEntity")
|
||||
#end
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("$table.tableName")
|
||||
public class ${ClassName}Entity extends BaseEntity<${ClassName}Entity> {
|
||||
|
||||
|
||||
|
||||
#foreach ($column in $columns)
|
||||
#if(!$table.isSuperColumn($column.javaField))
|
||||
/** $column.columnComment */
|
||||
/** $column.columnComment */
|
||||
#if($column.list)
|
||||
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||
#if($parentheseIndex != -1)
|
||||
@@ -57,8 +58,8 @@ public class ${ClassName}Entity extends BaseEntity<${ClassName}Entity>{
|
||||
#end
|
||||
#end
|
||||
#if($table.sub)
|
||||
/** $table.subTable.functionName信息 */
|
||||
private List<${subClassName}> ${subclassName}List;
|
||||
/** $table.subTable.functionName信息 */
|
||||
private List<${subClassName}> ${subclassName}List;
|
||||
|
||||
#end
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package ${packageName}.service.impl;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@@ -68,9 +70,9 @@ public class ${ClassName}ServiceImpl extends ServiceImpl<${ClassName}Mapper, ${C
|
||||
insert${subClassName}(${className});
|
||||
return rows;
|
||||
#else
|
||||
if (StrUtil.isBlankIfStr(${className}.getId())) {
|
||||
if (StrUtil.isBlankIfStr(${className}.getId())){
|
||||
${className}.setId(IdUtil.fastSimpleUUID());
|
||||
}
|
||||
}
|
||||
return save(${className});
|
||||
#end
|
||||
}
|
||||
|
||||
@@ -104,7 +104,8 @@
|
||||
</delete>
|
||||
|
||||
<delete id="delete${subClassName}By${subTableFkClassName}" parameterType="${pkColumn.javaType}">
|
||||
delete from ${subTableName} where ${subTableFkName} = #{${subTableFkclassName}}
|
||||
delete
|
||||
from ${subTableName} where ${subTableFkName} = #{${subTableFkclassName}}
|
||||
</delete>
|
||||
|
||||
<insert id="batch${subClassName}">
|
||||
|
||||
Reference in New Issue
Block a user