commit
81bd19395f
@ -0,0 +1,305 @@
|
||||
package ${fullPackage};
|
||||
|
||||
#foreach ($import in $importList)
|
||||
import ${import};
|
||||
#end
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public class ${ClassName}Example {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public ${ClassName}Example() {
|
||||
oredCriteria = new ArrayList<>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
protected void addCriterionForJDBCDate(String condition, Date value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
addCriterion(condition, new java.sql.Date(value.getTime()), property);
|
||||
}
|
||||
|
||||
protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
|
||||
if (values == null || values.size() == 0) {
|
||||
throw new RuntimeException("Value list for " + property + " cannot be null or empty");
|
||||
}
|
||||
List<java.sql.Date> dateList = new ArrayList<>();
|
||||
Iterator<Date> iter = values.iterator();
|
||||
while (iter.hasNext()) {
|
||||
dateList.add(new java.sql.Date(iter.next().getTime()));
|
||||
}
|
||||
addCriterion(condition, dateList, property);
|
||||
}
|
||||
|
||||
protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
|
||||
}
|
||||
#foreach ($column in $columns)
|
||||
public Criteria and${column.capJavaField}IsNull() {
|
||||
addCriterion("${column.columnName} is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria and${column.capJavaField}IsNotNull() {
|
||||
addCriterion("${column.columnName} is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria and${column.capJavaField}EqualTo(${column.javaType} value) {
|
||||
addCriterion("${column.columnName} =", value, "${column.javaField}");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria and${column.capJavaField}NotEqualTo(${column.javaType} value) {
|
||||
addCriterion("${column.columnName} <>", value, "${column.javaField}");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria and${column.capJavaField}GreaterThan(${column.javaType} value) {
|
||||
addCriterion("${column.columnName} >", value, "${column.javaField}");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria and${column.capJavaField}GreaterThanOrEqualTo(${column.javaType} value) {
|
||||
addCriterion("${column.columnName} >=", value, "${column.javaField}");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria and${column.capJavaField}LessThan(${column.javaType} value) {
|
||||
addCriterion("${column.columnName} <", value, "${column.javaField}");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria and${column.capJavaField}LessThanOrEqualTo(${column.javaType} value) {
|
||||
addCriterion("${column.columnName} <=", value, "${column.javaField}");
|
||||
return (Criteria) this;
|
||||
}
|
||||
#if($column.javaType == 'String')
|
||||
|
||||
public Criteria and${column.capJavaField}Like(${column.javaType} value) {
|
||||
addCriterion("${column.columnName} like", value, "${column.javaField}");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria and${column.capJavaField}NotLike(${column.javaType} value) {
|
||||
addCriterion("${column.columnName} not like", value, "${column.javaField}");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
#end
|
||||
public Criteria and${column.capJavaField}In(List<${column.javaType}> values) {
|
||||
addCriterion("${column.columnName} in", values, "${column.javaField}");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria and${column.capJavaField}NotIn(List<${column.javaType}> values) {
|
||||
addCriterion("${column.columnName} not in", values, "${column.javaField}");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria and${column.capJavaField}Between(${column.javaType} value1, ${column.javaType} value2) {
|
||||
addCriterion("${column.columnName} between", value1, value2, "${column.javaField}");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria and${column.capJavaField}NotBetween(${column.javaType} value1, ${column.javaType} value2) {
|
||||
addCriterion("${column.columnName} not between", value1, value2, "${column.javaField}");
|
||||
return (Criteria) this;
|
||||
}
|
||||
#end
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,97 +1,28 @@
|
||||
package ${packageName}.mapper;
|
||||
package ${fullPackage};
|
||||
|
||||
import java.util.List;
|
||||
import ${packageName}.domain.${ClassName};
|
||||
#if($table.sub)
|
||||
import ${packageName}.domain.${subClassName};
|
||||
#end
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import ${_fullClass.domain};
|
||||
|
||||
/**
|
||||
* ${functionName}Mapper接口
|
||||
*
|
||||
* @author ${author}
|
||||
*/
|
||||
public interface ${ClassName}Mapper {
|
||||
/**
|
||||
* 查询${functionName}
|
||||
*
|
||||
* @param ${pkColumn.javaField} ${functionName}主键
|
||||
* @return ${functionName}
|
||||
*/
|
||||
${ClassName} selectBy${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField});
|
||||
|
||||
public interface ${ClassName}Mapper extends BaseMapper<${ClassName}> {
|
||||
/**
|
||||
* 查询${functionName}列表
|
||||
*
|
||||
* @param ${className} ${functionName}
|
||||
* @return ${functionName}集合
|
||||
*/
|
||||
List<${ClassName}> selectList(${ClassName} ${className});
|
||||
|
||||
/**
|
||||
* 新增${functionName}
|
||||
*
|
||||
* @param ${className} ${functionName}
|
||||
* @return 结果
|
||||
*/
|
||||
int insert(${ClassName} ${className});
|
||||
|
||||
/**
|
||||
* 修改${functionName}
|
||||
*
|
||||
* @param ${className} ${functionName}
|
||||
* @return 结果
|
||||
*/
|
||||
int update(${ClassName} ${className});
|
||||
|
||||
/**
|
||||
* 删除${functionName}
|
||||
*
|
||||
* @param ${pkColumn.javaField} ${functionName}主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteBy${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField});
|
||||
|
||||
/**
|
||||
* 批量删除${functionName}
|
||||
*
|
||||
* @param ${pkColumn.javaField}s 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteBy${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s);
|
||||
|
||||
/**
|
||||
* 更新或插入${functionName}
|
||||
*
|
||||
* @param ${className} ${functionName}
|
||||
* @return 结果
|
||||
*/
|
||||
int insertOrUpdate(${ClassName} ${className});
|
||||
#if($table.sub)
|
||||
|
||||
/**
|
||||
* 批量删除${subTable.functionName}
|
||||
*
|
||||
* @param ${pkColumn.javaField}s 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int delete${subClassName}By${subTableFkClassName}s(${pkColumn.javaType}[] ${pkColumn.javaField}s);
|
||||
|
||||
/**
|
||||
* 批量新增${subTable.functionName}
|
||||
*
|
||||
* @param ${subclassName}List ${subTable.functionName}列表
|
||||
* @return 结果
|
||||
* @return ${functionName}集合
|
||||
*/
|
||||
int batch${subClassName}(List<${subClassName}> ${subclassName}List);
|
||||
|
||||
List<${ClassName}> selectByEntity(${ClassName} ${className});
|
||||
|
||||
/**
|
||||
* 通过${functionName}主键删除${subTable.functionName}信息
|
||||
*
|
||||
* @param ${pkColumn.javaField} ${functionName}ID
|
||||
* @return 结果
|
||||
*/
|
||||
int delete${subClassName}By${subTableFkClassName}(${pkColumn.javaType} ${pkColumn.javaField});
|
||||
#end
|
||||
* 批量软删除
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int updateDelFlagByIds(@Param("ids") Long[] ids);
|
||||
}
|
||||
|
||||
@ -1,38 +1,32 @@
|
||||
package ${packageName}.pojo.query;
|
||||
import com.ruoyi.common.core.domain.IQuery;
|
||||
import ${packageName}.domain.${ClassName};
|
||||
import lombok.Setter;
|
||||
package ${fullPackage};
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
#foreach ($import in $importList)
|
||||
import ${import};
|
||||
#end
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* ${functionName} 查询 对象
|
||||
*
|
||||
* @author ${author}
|
||||
*/
|
||||
@Setter
|
||||
public class ${ClassName}Query extends ${ClassName} implements IQuery {
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
@ApiModel(description="${functionName} 查询 对象")
|
||||
@Data
|
||||
public class ${_className.query} {
|
||||
#foreach($column in $columns)
|
||||
#if($column.query)
|
||||
## 根据查询类型生成 EQ等于、NE不等于、GT大于、LT小于、LIKE模糊、BETWEEN范围
|
||||
## 范围查询, 使用数组实现
|
||||
#if($column.queryType == 'BETWEEN')
|
||||
@ApiModelProperty("${column.genLabel()} 范围")
|
||||
private ${column.javaType}[] ${column.javaField}${column.queryField};
|
||||
#else
|
||||
@ApiModelProperty("${column.genLabel()} 精确匹配")
|
||||
private ${column.javaType} ${column.javaField}${column.queryField};
|
||||
#end
|
||||
|
||||
/**
|
||||
* 请求参数
|
||||
*/
|
||||
private Map<String, Object> params;
|
||||
|
||||
@Override
|
||||
public String getSearchValue() {
|
||||
return this.searchValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getParams() {
|
||||
if (params == null) {
|
||||
params = new HashMap<>();
|
||||
}
|
||||
return params;
|
||||
}
|
||||
#end
|
||||
#end
|
||||
}
|
||||
|
||||
@ -1,59 +1,149 @@
|
||||
package ${packageName}.service;
|
||||
package ${fullPackage};
|
||||
|
||||
#foreach ($import in $importList)
|
||||
import ${import};
|
||||
#end
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import ${packageName}.domain.${ClassName};
|
||||
#if($table.hasDate())
|
||||
#foreach($date in $table.dateImports())
|
||||
import $date;
|
||||
#end
|
||||
#end
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ${_fullClass.mapper};
|
||||
import #evaluate(${_fullClass.domain});
|
||||
import #evaluate(${_fullClass.query});
|
||||
|
||||
/**
|
||||
* ${functionName}Service接口
|
||||
*
|
||||
* ${functionName}Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author ${author}
|
||||
*/
|
||||
public interface I${ClassName}Service {
|
||||
@Service
|
||||
public class ${ClassName}Service {
|
||||
@Autowired
|
||||
private ${_className.mapper} ${className}Mapper;
|
||||
|
||||
/**
|
||||
* 查询${functionName}
|
||||
*
|
||||
*
|
||||
* @param ${pkColumn.javaField} ${functionName}主键
|
||||
* @return ${functionName}
|
||||
*/
|
||||
${ClassName} select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField});
|
||||
public ${ClassName} selectBy${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}) {
|
||||
return ${className}Mapper.selectById(${pkColumn.javaField});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询${functionName}列表
|
||||
*
|
||||
* @param ${className} ${functionName}
|
||||
* @return ${functionName}集合
|
||||
*
|
||||
* @param query 查询条件
|
||||
* @param page 分页条件
|
||||
* @return ${functionName}
|
||||
*/
|
||||
List<${ClassName}> select${ClassName}List(${ClassName} ${className});
|
||||
public List<${_className.domain}> selectList(${_className.query} query, Pageable page) {
|
||||
if (page != null) {
|
||||
PageHelper.startPage(page.getPageNumber() + 1, page.getPageSize());
|
||||
}
|
||||
QueryWrapper<${_className.domain}> qw = new QueryWrapper<>();
|
||||
qw.eq("del_flag",0);
|
||||
#foreach($column in $columns)
|
||||
#if($column.query)
|
||||
## 根据查询类型生成 EQ等于、NE不等于、GT大于、LT小于、LIKE模糊、BETWEEN范围
|
||||
## 范围查询, 使用数组实现
|
||||
#if($column.queryType == 'BETWEEN')
|
||||
${column.javaType}[] ${column.javaField}${column.queryField} = query.get${column.capJavaField}${column.queryField}();
|
||||
if (${column.javaField}${column.queryField} != null && ${column.javaField}${column.queryField}.length == 2) {
|
||||
${column.javaType} start = ${column.javaField}${column.queryField}[0];
|
||||
if (#if($column.javaType == 'String')!StringUtils.isEmpty(start)#{else}start != null#end) {
|
||||
qw.ge("${column.columnName}", start);
|
||||
}
|
||||
${column.javaType} end = ${column.javaField}Range[0];
|
||||
if (#if($column.javaType == 'String')!StringUtils.isEmpty(end) #{else}end != null#end) {
|
||||
qw.le("${column.columnName}", end);
|
||||
}
|
||||
}
|
||||
#else
|
||||
${column.javaType} ${column.javaField}${column.queryField} = query.get${column.capJavaField}${column.queryField}();
|
||||
if (#if($column.javaType == 'String')!StringUtils.isEmpty(${column.javaField}${column.queryField})#{else}${column.javaField}${column.queryField} != null#end) {
|
||||
qw.${column.queryMethod}("${column.columnName}", ${column.javaField}${column.queryField});
|
||||
}
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
return ${className}Mapper.selectList(qw);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增${functionName}
|
||||
*
|
||||
*
|
||||
* @param ${className} ${functionName}
|
||||
* @return 结果
|
||||
*/
|
||||
int insert${ClassName}(${ClassName} ${className});
|
||||
#if($table.sub)
|
||||
@Transactional
|
||||
#end
|
||||
public int insert(${ClassName} ${className}) {
|
||||
${className}.setDelFlag(0);
|
||||
#foreach ($column in $columns)
|
||||
#if($column.javaField == 'createTime')
|
||||
${className}.setCreateTime(#if($column.javaType == "Date")new Date()#else${column.javaType}.now()#end);
|
||||
#end
|
||||
#end
|
||||
#if($table.sub)
|
||||
int rows = ${className}Mapper.insert(${className});
|
||||
insert${subClassName}(${className});
|
||||
return rows;
|
||||
#else
|
||||
return ${className}Mapper.insert(${className});
|
||||
#end
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改${functionName}
|
||||
*
|
||||
*
|
||||
* @param ${className} ${functionName}
|
||||
* @return 结果
|
||||
*/
|
||||
int update${ClassName}(${ClassName} ${className});
|
||||
#if($table.sub)
|
||||
@Transactional
|
||||
#end
|
||||
public int update(${ClassName} ${className}) {
|
||||
#if($table.sub)
|
||||
${className}Mapper.delete${subClassName}By${subTableFkClassName}(${className}.get${pkColumn.capJavaField}());
|
||||
insert${subClassName}(${className});
|
||||
#end
|
||||
return ${className}Mapper.updateById(${className});
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除${functionName}
|
||||
*
|
||||
* @param ${pkColumn.javaField}s 需要删除的${functionName}主键集合
|
||||
*
|
||||
* @param ${pkColumn.javaField}s 需要删除的${functionName}主键
|
||||
* @return 结果
|
||||
*/
|
||||
int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s);
|
||||
#if($table.sub)
|
||||
@Transactional
|
||||
#end
|
||||
public int deleteBy${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s) {
|
||||
return ${className}Mapper.updateDelFlagByIds(${pkColumn.javaField}s);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除${functionName}信息
|
||||
*
|
||||
*
|
||||
* @param ${pkColumn.javaField} ${functionName}主键
|
||||
* @return 结果
|
||||
*/
|
||||
int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField});
|
||||
public int deleteBy${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}) {
|
||||
Long[] ${pkColumn.javaField}s = {${pkColumn.javaField}};
|
||||
return ${className}Mapper.updateDelFlagByIds(${pkColumn.javaField}s);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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', '#', 1, sysdate(), '', null, '${functionName}菜单');
|
||||
values('${functionName}', '${parentMenuId}', '1', '${className}', '${moduleName}/${className}/index', 1, 0, 'C', '0', '0', '${permissionPrefix}:list', '#', 1, sysdate(), 1, 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', '#', 1, sysdate(), '', null, '');
|
||||
values('${functionName}查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:query', '#', 1, sysdate(), 1, 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', '#', 1, sysdate(), '', null, '');
|
||||
values('${functionName}新增', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:add', '#', 1, sysdate(), 1, 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', '#', 1, sysdate(), '', null, '');
|
||||
values('${functionName}修改', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:edit', '#', 1, sysdate(), 1, 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', '#', 1, sysdate(), '', null, '');
|
||||
values('${functionName}删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:remove', '#', 1, sysdate(), 1, 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', '#', 1, sysdate(), '', null, '');
|
||||
values('${functionName}导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:export', '#', 1, sysdate(), 1, null, '');
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue