mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-11-04 10:57:10 +08:00 
			
		
		
		
	chore: continew-starter 2.7.2 => 2.7.3
1.CrudApi GET => DETAIL(支持详情权限) 2.适配 CharConstants 3.适配 EnumValue 校验器
This commit is contained in:
		@@ -26,7 +26,7 @@ import lombok.Data;
 | 
			
		||||
import lombok.NoArgsConstructor;
 | 
			
		||||
import org.hibernate.validator.constraints.Length;
 | 
			
		||||
import top.continew.admin.common.constant.RegexConstants;
 | 
			
		||||
import top.continew.starter.core.constant.StringConstants;
 | 
			
		||||
import top.continew.starter.core.constant.CharConstants;
 | 
			
		||||
import top.continew.starter.core.util.StrUtils;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
@@ -130,7 +130,7 @@ public class GenConfigDO implements Serializable {
 | 
			
		||||
    public void setTableName(String tableName) {
 | 
			
		||||
        this.tableName = tableName;
 | 
			
		||||
        // 默认表前缀(sys_user -> sys_)
 | 
			
		||||
        int underLineIndex = StrUtil.indexOf(tableName, StringConstants.C_UNDERLINE);
 | 
			
		||||
        int underLineIndex = StrUtil.indexOf(tableName, CharConstants.UNDERLINE);
 | 
			
		||||
        if (-1 != underLineIndex) {
 | 
			
		||||
            this.tablePrefix = StrUtil.subPre(tableName, underLineIndex + 1);
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -22,5 +22,5 @@ import ${packageName}.service.${classNamePrefix}Service;
 | 
			
		||||
 */
 | 
			
		||||
@Tag(name = "${businessName}管理 API")
 | 
			
		||||
@RestController
 | 
			
		||||
@CrudRequestMapping(value = "/${apiModuleName}/${apiName}", api = {Api.PAGE, Api.GET, Api.ADD, Api.UPDATE, Api.DELETE, Api.EXPORT})
 | 
			
		||||
@CrudRequestMapping(value = "/${apiModuleName}/${apiName}", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE, Api.EXPORT})
 | 
			
		||||
public class ${className} extends BaseController<${classNamePrefix}Service, ${classNamePrefix}Resp, ${classNamePrefix}DetailResp, ${classNamePrefix}Query, ${classNamePrefix}Req> {}
 | 
			
		||||
@@ -14,6 +14,7 @@
 | 
			
		||||
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { Message } from '@arco-design/web-vue'
 | 
			
		||||
import { useWindowSize } from '@vueuse/core'
 | 
			
		||||
import { get${classNamePrefix}, add${classNamePrefix}, update${classNamePrefix} } from '@/apis/${apiModuleName}/${apiName}'
 | 
			
		||||
import { type Columns, GiForm, type Options } from '@/components/GiForm'
 | 
			
		||||
import { useForm } from '@/hooks'
 | 
			
		||||
@@ -23,6 +24,8 @@ const emit = defineEmits<{
 | 
			
		||||
  (e: 'save-success'): void
 | 
			
		||||
}>()
 | 
			
		||||
 | 
			
		||||
const { width } = useWindowSize()
 | 
			
		||||
 | 
			
		||||
const dataId = ref('')
 | 
			
		||||
const visible = ref(false)
 | 
			
		||||
const isUpdate = computed(() => !!dataId.value)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user