From 80edb0e8087a3dc435368686938a450559c9eb41 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 24 Oct 2023 20:45:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E4=B8=80=20boot=20=E5=92=8C=20cloud?= =?UTF-8?q?=20=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/enums/CommonStatusEnum.java | 9 ++++ .../resources/codegen/vue3_vben/api/api.ts.vm | 4 +- .../codegen/vue3_vben/views/data.ts.vm | 20 ++++++-- .../codegen/vue3_vben/views/index.vue.vm | 16 +++--- .../admin/banner/BannerController.java | 12 ++--- .../admin/banner/vo/BannerBaseVO.java | 2 + .../admin/banner/vo/BannerRespVO.java | 5 ++ .../app/banner/AppBannerController.java | 24 +-------- .../convert/coupon/CouponTemplateConvert.java | 3 -- .../dal/dataobject/banner/BannerDO.java | 3 +- .../discount/DiscountActivityServiceImpl.java | 4 +- .../signin/MemberSignInRecordConvert.java | 50 +++++++++---------- .../signin/MemberSignInRecordMapper.java | 27 ++-------- .../signin/MemberSignInRecordServiceImpl.java | 43 ++++++++-------- .../module/pay/api/refund/PayRefundApi.java | 6 ++- .../service/auth/AdminAuthServiceImpl.java | 4 +- .../oauth2/OAuth2ClientServiceImpl.java | 2 +- .../service/sms/SmsTemplateServiceImpl.java | 3 +- 18 files changed, 108 insertions(+), 129 deletions(-) diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/CommonStatusEnum.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/CommonStatusEnum.java index 7b07fa1f5..facf32679 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/CommonStatusEnum.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/CommonStatusEnum.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.framework.common.enums; +import cn.hutool.core.util.ObjUtil; import cn.iocoder.yudao.framework.common.core.IntArrayValuable; import lombok.AllArgsConstructor; import lombok.Getter; @@ -34,4 +35,12 @@ public enum CommonStatusEnum implements IntArrayValuable { return ARRAYS; } + public static boolean isEnable(Integer status) { + return ObjUtil.equal(ENABLE.status, status); + } + + public static boolean isDisable(Integer status) { + return ObjUtil.equal(DISABLE.status, status); + } + } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/api/api.ts.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/api/api.ts.vm index c7283a121..5ab06f577 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/api/api.ts.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/api/api.ts.vm @@ -1,4 +1,4 @@ -import { defHttp } from '@/utils/http/axios' +import {defHttp} from '@/utils/http/axios' #set ($baseURL = "/${table.moduleName}/${simpleClassName_strikeCase}") // 查询${table.classComment}列表 @@ -28,5 +28,5 @@ export function delete${simpleClassName}(id: number) { // 导出${table.classComment} Excel export function export${simpleClassName}(params) { - return defHttp.download({ url: '${baseURL}/export-excel', params }, '${table.classComment}.xls') + return defHttp.download({ url: '${baseURL}/export-excel', params }, '${table.classComment}.xls') } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/data.ts.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/data.ts.vm index 5557b38c9..92d3b2d75 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/data.ts.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/data.ts.vm @@ -1,6 +1,6 @@ -import type { BasicColumn, FormSchema } from '@/components/Table' -import { useRender } from '@/components/Table' -import { DICT_TYPE, getDictOptions } from '@/utils/dict' +import type {BasicColumn, FormSchema} from '@/components/Table' +import {useRender} from '@/components/Table' +import {DICT_TYPE, getDictOptions} from '@/utils/dict' export const columns: BasicColumn[] = [ #foreach($column in $columns) @@ -50,7 +50,7 @@ export const searchFormSchema: FormSchema[] = [ field: '${javaField}', #if ($column.htmlType == "input") component: 'Input', - #elseif ($column.htmlType == "select" || $column.htmlType == "radio") + #elseif ($column.htmlType == "select") component: 'Select', componentProps: { #if ("" != $dictType)## 设置了 dictType 数据字典的情况 @@ -59,6 +59,15 @@ export const searchFormSchema: FormSchema[] = [ options: [], #end }, + #elseif ($column.htmlType == "radio") + component: 'Radio', + componentProps: { + #if ("" != $dictType)## 设置了 dictType 数据字典的情况 + options: getDictOptions(DICT_TYPE.$dictType.toUpperCase()), + #else## 未设置 dictType 数据字典的情况 + options: [], + #end + }, #elseif($column.htmlType == "datetime") component: 'RangePicker', #end @@ -181,7 +190,8 @@ export const updateFormSchema: FormSchema[] = [ fileType: 'file', maxCount: 1, }, - #elseif($column.htmlType == "editor")## 文本编辑器component: 'Editor', + #elseif($column.htmlType == "editor")## 文本编辑器 + component: 'Editor', #elseif($column.htmlType == "select")## 下拉框 component: 'Select', componentProps: { diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/index.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/index.vue.vm index 07f3285c1..f8bcdd865 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/index.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/index.vue.vm @@ -1,12 +1,10 @@