侧边栏壁纸
  • 累计撰写 781 篇文章
  • 累计创建 1 个标签
  • 累计收到 1 条评论
标签搜索

代码生成

Dettan
2022-03-04 / 0 评论 / 0 点赞 / 34 阅读 / 3,398 字
温馨提示:
本文最后更新于 2022-03-13,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。
基于行的 增删改查 生成能力
典例
{
    "title": "车牌号",
    "javaType": "String",
    "inputType": "input",
"search": true,
"sort": true,

	"validator":"carNum",
	"require":true,

}

{
    "title": "车牌号",
    "javaType": "String",
    "inputType": "input",
"search": true,
"sort": true,

	"require":true,

}

{
    "title": "车牌号",
    "javaType": "String",
    "inputType": "input",
"search": true,
"sort": true,

	"validator":"carNum",
	"require":true,

}

input
"inputType": "input",
3.
input
4.
num
5.
dict
6.
star
7.
switch
8.
textarea
9.
checkBoxGroup(不完整)
10.
date
11.
time
12.
dateTime
13.
checkBox

validator
"validator":"carNum",
\vue\src\utils\fromValidate.js
4.
carNum
5.
Username
6.
Password
7.
Name
8.
Mobile
9.
Iden
10.
Title
11.
Content
12.
Salary
13.
CarNum
hidden
"hiddenWhenShow":true,
"hiddenWhenAdd":true,
"hiddenWhenEdit":true,
"disableWhenAdd":true,
"disableWhenEdit":true,

只有 input = text 有disable




dict
//如果有这一项的话
"dictDirName": "color",
"dictDirName": "color",
系统中要有我的dictionary系统才行, 那样输入的时候就会是字典的下拉框.显示的时候也是显示字典对应的名字.

getAllForSelect name 查询指定的字段而不是只查name
表的注释
{
    "dataType": "list",
    "tableTitle": "user"
  }
id
如果是id的话只写 id 就可以了

添加时间
addTime

SELECT
        equipmentmanage.*,
        userUser.username AS userUser,
        concat( d2.content, ' ', d1.content, ' ', num ) equipmentIdEquipment
        FROM
        equipmentmanage
        LEFT JOIN equipment equipmentIdEquipment ON equipmentmanage.equipment_id = equipmentIdEquipment.id
        LEFT JOIN sys_user userUser ON equipmentmanage.USER = userUser.user_id
        LEFT JOIN dict d1 ON equipmentIdEquipment.type = d1.dict_id
        LEFT JOIN dict d2 ON equipmentIdEquipment.location = d2.dict_id

foreign
{
	"title": "属于",
	"search": true,
	"foreignType": "one",
	"tableName": "sys_user",
	"tableId": "user_id",
	"showName": "name",
	"showType": "String",
"require":true,

}
{
"title": "申购人",
"javaType": "Long",
"inputType": "foreign",
"search": true,
"foreignType": "one",
"tableName": "customer",
"tableId": "user_id",
"showName": "name",
"showType": "String",
}

{
"title": "申购人",
"javaType": "Long",
"inputType": "foreign",
"search": true,
"foreignType": "one",
"tableName": "supplier",
"tableId": "user_id",
"showName": "company_name",
"showType": "String",
}

{
"title": "管理员",
"javaType": "Long",
"inputType": "foreign",
"search": true,
"foreignType": "one",
"tableName": "user",
"tableId": "user_id",
"showName": "username",
"showType": "String",
}




0

评论区