Merge branch 'master' of https://gitee.com/youlaiorg/youlai-boot
This commit is contained in:
@@ -61,8 +61,8 @@ mybatis-plus:
|
||||
db-config:
|
||||
# 主键ID类型
|
||||
id-type: none
|
||||
# 逻辑删除字段名称
|
||||
logic-delete-field: is_deleted
|
||||
# 逻辑删除全局属性名(驼峰和下划线都支持)
|
||||
logic-delete-field: isDeleted
|
||||
# 逻辑删除-删除值
|
||||
logic-delete-value: 1
|
||||
# 逻辑删除-未删除值
|
||||
|
||||
@@ -46,7 +46,7 @@ mybatis-plus:
|
||||
# 主键ID类型
|
||||
id-type: none
|
||||
# 逻辑删除字段名称
|
||||
logic-delete-field: is_deleted
|
||||
logic-delete-field: isDeleted
|
||||
# 逻辑删除-删除值
|
||||
logic-delete-value: 1
|
||||
# 逻辑删除-未删除值
|
||||
|
||||
@@ -3,6 +3,8 @@ spring:
|
||||
name: youlai-boot
|
||||
profiles:
|
||||
active: dev
|
||||
project:
|
||||
version: @project.version@
|
||||
|
||||
# 代码生成器配置
|
||||
codegen:
|
||||
|
||||
@@ -7,7 +7,7 @@ ${AnsiColor.BRIGHT_BLUE}
|
||||
|_|\___/ \__,_| |______\__,_|_|
|
||||
|
||||
${AnsiColor.BRIGHT_GREEN}
|
||||
YouLai Boot Version: 2.8.1
|
||||
YouLai Boot Version: ${project.version}
|
||||
Spring Boot Version: ${spring-boot.version}${spring-boot.formatted-version}
|
||||
有来官网: https://www.youlai.tech/
|
||||
版权所属: 有来开源组织
|
||||
|
||||
@@ -30,14 +30,16 @@
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} -%5level ---[%15.15thread] %-40.40logger{39} : %msg%n%n</pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志记录器的滚动策略,按大小和时间记录 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!-- 滚动后的日志文件命名模式 -->
|
||||
<fileNamePattern>${LOG_HOME}/%d{yyyy-MM-dd}.%i.log</fileNamePattern>
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>10MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
<!--日志文档保留天数-->
|
||||
<!-- 单个日志文件的最大大小 -->
|
||||
<maxFileSize>10MB</maxFileSize>
|
||||
<!-- 最大保留30天的日志 -->
|
||||
<maxHistory>30</maxHistory>
|
||||
<!-- 总日志文件大小不超过3GB -->
|
||||
<totalSizeCap>1GB</totalSizeCap>
|
||||
</rollingPolicy>
|
||||
<!-- 临界值过滤器,输出大于INFO级别日志 -->
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
@@ -59,4 +61,4 @@
|
||||
<appender-ref ref="FILE"/>
|
||||
</root>
|
||||
</springProfile>
|
||||
</configuration>
|
||||
</configuration>
|
||||
|
||||
@@ -35,12 +35,26 @@
|
||||
value,
|
||||
label
|
||||
FROM
|
||||
sys_dict_data
|
||||
sys_dict_data
|
||||
<where>
|
||||
dict_code = #{dictCode}
|
||||
</where>
|
||||
ORDER BY
|
||||
sort ASC
|
||||
sort ASC
|
||||
</select>
|
||||
|
||||
<!-- 根据字典编码获取字典数据列表 -->
|
||||
<select id="getDictDataList" resultType="com.youlai.boot.system.model.vo.DictVO$DictData">
|
||||
SELECT
|
||||
value,
|
||||
label,
|
||||
tag_type
|
||||
FROM
|
||||
sys_dict_data
|
||||
WHERE
|
||||
status = 1 AND dict_code = #{dictCode}
|
||||
ORDER BY
|
||||
sort ASC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -25,4 +25,26 @@
|
||||
ORDER BY
|
||||
t1.create_time DESC
|
||||
</select>
|
||||
|
||||
<resultMap id="DictWithDataMap" type="com.youlai.boot.system.model.vo.DictVO">
|
||||
<result column="name" property="name"/>
|
||||
<result column="dict_code" property="dictCode"/>
|
||||
<collection property="dictDataList"
|
||||
column="{dictCode=dict_code}"
|
||||
select="com.youlai.boot.system.mapper.DictDataMapper.getDictDataList">
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
<!-- 获取所有字典和字典数据 -->
|
||||
<select id="getAllDictWithData" resultMap="DictWithDataMap">
|
||||
SELECT
|
||||
t1.name,
|
||||
t1.dict_code
|
||||
FROM
|
||||
sys_dict t1
|
||||
WHERE
|
||||
t1.is_deleted = 0 AND t1.status = 1
|
||||
ORDER BY
|
||||
t1.create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -2,36 +2,36 @@ import request from "@/utils/request";
|
||||
|
||||
const ${entityName.toUpperCase()}_BASE_URL = "/api/v1/${lowerFirstEntityName}s";
|
||||
|
||||
class ${entityName}API {
|
||||
const ${entityName}API = {
|
||||
/** 获取${businessName}分页数据 */
|
||||
static getPage(queryParams?: ${entityName}PageQuery) {
|
||||
getPage(queryParams?: ${entityName}PageQuery) {
|
||||
return request<any, PageResult<${entityName}PageVO[]>>({
|
||||
url: `${${entityName.toUpperCase()}_BASE_URL}/page`,
|
||||
method: "get",
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取${businessName}表单数据
|
||||
*
|
||||
* @param id ${entityName}ID
|
||||
* @returns ${entityName}表单数据
|
||||
*/
|
||||
static getFormData(id: number) {
|
||||
getFormData(id: number) {
|
||||
return request<any, ${entityName}Form>({
|
||||
url: `${${entityName.toUpperCase()}_BASE_URL}/${id}/form`,
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/** 添加${businessName}*/
|
||||
static add(data: ${entityName}Form) {
|
||||
add(data: ${entityName}Form) {
|
||||
return request({
|
||||
url: `${${entityName.toUpperCase()}_BASE_URL}`,
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 更新${businessName}
|
||||
@@ -39,20 +39,20 @@ class ${entityName}API {
|
||||
* @param id ${entityName}ID
|
||||
* @param data ${entityName}表单数据
|
||||
*/
|
||||
static update(id: number, data: ${entityName}Form) {
|
||||
update(id: number, data: ${entityName}Form) {
|
||||
return request({
|
||||
url: `${${entityName.toUpperCase()}_BASE_URL}/${id}`,
|
||||
method: "put",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 批量删除${businessName},多个以英文逗号(,)分割
|
||||
*
|
||||
* @param ids ${businessName}ID字符串,多个以英文逗号(,)分割
|
||||
*/
|
||||
static deleteByIds(ids: string) {
|
||||
deleteByIds(ids: string) {
|
||||
return request({
|
||||
url: `${${entityName.toUpperCase()}_BASE_URL}/${ids}`,
|
||||
method: "delete",
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/>
|
||||
#elseif($fieldConfig.formType == "SELECT")
|
||||
#if($fieldConfig.dictType != "")
|
||||
<dictionary v-model="queryParams.$fieldConfig.fieldName" code="$fieldConfig.dictType" />
|
||||
<dict v-model="queryParams.$fieldConfig.fieldName" code="$fieldConfig.dictType" />
|
||||
#else
|
||||
<el-select v-model="queryParams.$fieldConfig.fieldName" placeholder="请选择$fieldConfig.fieldComment">
|
||||
<el-option :key="1" :value="1" label="选项一"/>
|
||||
@@ -187,7 +187,7 @@
|
||||
/>
|
||||
#elseif($fieldConfig.formType == "SELECT")
|
||||
#if($fieldConfig.dictType != "")
|
||||
<dictionary v-model="formData.$fieldConfig.fieldName" code="$fieldConfig.dictType" />
|
||||
<dict v-model="formData.$fieldConfig.fieldName" code="$fieldConfig.dictType" />
|
||||
#else
|
||||
<el-select v-model="formData.$fieldConfig.fieldName" placeholder="请选择$fieldConfig.fieldComment">
|
||||
<el-option :value="0" label="选项一"/>
|
||||
@@ -256,7 +256,7 @@
|
||||
inheritAttrs: false,
|
||||
});
|
||||
|
||||
import ${entityName}API, { ${entityName}PageVO, ${entityName}Form, ${entityName}PageQuery } from "@/api/${kebabCaseEntityName}";
|
||||
import ${entityName}API, { ${entityName}PageVO, ${entityName}Form, ${entityName}PageQuery } from "@/api/${moduleName}/${kebabCaseEntityName}";
|
||||
|
||||
const queryFormRef = ref(ElForm);
|
||||
const dataFormRef = ref(ElForm);
|
||||
|
||||
Reference in New Issue
Block a user