Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fgqyxxlr
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yaru
fgqyxxlr
Commits
6dc56c6e
Commit
6dc56c6e
authored
Jul 28, 2018
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码生成新增 toString
parent
470b2345
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
27 deletions
+31
-27
README.md
+13
-13
src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java
+1
-1
src/main/java/com/ruoyi/common/utils/file/FileUtils.java
+3
-2
src/main/java/com/ruoyi/project/common/CommonController.java
+1
-1
src/main/java/com/ruoyi/project/system/config/controller/ConfigController.java
+1
-1
src/main/java/com/ruoyi/project/system/user/controller/ProfileController.java
+1
-1
src/main/resources/templates/vm/java/domain.java.vm
+11
-8
No files found.
README.md
View file @
6dc56c6e
...
@@ -38,31 +38,31 @@ http://webapplayers.com/inspinia_admin-v2.7.1
...
@@ -38,31 +38,31 @@ http://webapplayers.com/inspinia_admin-v2.7.1
<table>
<table>
<tr>
<tr>
<td><img
src=
"https://oscimg.oschina.net/oscnet/25b5e333768d013d45a990c152dbe4d9d6e.jpg"
/></td>
<td><img
src=
"https://oscimg.oschina.net/oscnet/25b5e333768d013d45a990c152dbe4d9d6e.jpg"
/></td>
<td><img
src=
"https://
oscimg.oschina.net/oscnet/55f92435662e6a799e9daac8a74fd46a1eb.jp
g"
/></td>
<td><img
src=
"https://
static.oschina.net/uploads/space/2018/0728/114553_jBTY_1438828.pn
g"
/></td>
</tr>
</tr>
<tr>
<tr>
<td><img
src=
"https://
oscimg.oschina.net/oscnet/e05d6184cde91f7bb74736a11727ac863fe.jp
g"
/></td>
<td><img
src=
"https://
static.oschina.net/uploads/space/2018/0728/114830_eIHp_1438828.pn
g"
/></td>
<td><img
src=
"https://
oscimg.oschina.net/oscnet/2fc14293b0c7a2a938441bb89b3edde98c1.jp
g"
/></td>
<td><img
src=
"https://
static.oschina.net/uploads/space/2018/0728/114854_Y5a2_1438828.pn
g"
/></td>
</tr>
</tr>
<tr>
<tr>
<td><img
src=
"https://
oscimg.oschina.net/oscnet/1ffdb33f4ae588dd77d7b29779154fd555e.jp
g"
/></td>
<td><img
src=
"https://
static.oschina.net/uploads/space/2018/0728/114920_P8qv_1438828.pn
g"
/></td>
<td><img
src=
"https://
oscimg.oschina.net/oscnet/302762bb406c43ce7680637a793b1f67820.jp
g"
/></td>
<td><img
src=
"https://
static.oschina.net/uploads/space/2018/0728/114946_O3jx_1438828.pn
g"
/></td>
</tr>
</tr>
<tr>
<tr>
<td><img
src=
"https://
oscimg.oschina.net/oscnet/c3eab05442a6ffe87fd63cb1d4855b11d39.jp
g"
/></td>
<td><img
src=
"https://
static.oschina.net/uploads/space/2018/0728/115022_1Tnm_1438828.pn
g"
/></td>
<td><img
src=
"https://
oscimg.oschina.net/oscnet/2b6483aa20459f9bfb9911d614ef8ac3c97.jp
g"
/></td>
<td><img
src=
"https://
static.oschina.net/uploads/space/2018/0728/115051_XvMW_1438828.pn
g"
/></td>
</tr>
</tr>
<tr>
<tr>
<td><img
src=
"https://
oscimg.oschina.net/oscnet/0aff434b32d6012dbf890c7f4603651c917.jp
g"
/></td>
<td><img
src=
"https://
static.oschina.net/uploads/space/2018/0728/115117_9TZ3_1438828.pn
g"
/></td>
<td><img
src=
"https://
oscimg.oschina.net/oscnet/1f1f079c084d60c41ebfdd964d32b956efa.jp
g"
/></td>
<td><img
src=
"https://
static.oschina.net/uploads/space/2018/0728/115130_a5xO_1438828.pn
g"
/></td>
</tr>
</tr>
<tr>
<tr>
<td><img
src=
"https://
oscimg.oschina.net/oscnet/3cc7a4a5885978c1799d874d7727cfcf7a0.jp
g"
/></td>
<td><img
src=
"https://
static.oschina.net/uploads/space/2018/0728/115151_EuYC_1438828.pn
g"
/></td>
<td><img
src=
"https://
oscimg.oschina.net/oscnet/a323d288bf509b7180b1538fe2193d325b3.jp
g"
/></td>
<td><img
src=
"https://
static.oschina.net/uploads/space/2018/0728/115212_QybT_1438828.pn
g"
/></td>
</tr>
</tr>
<tr>
<tr>
<td><img
src=
"https://
oscimg.oschina.net/oscnet/09cd252f86ce338745de291a78b271313be
.jpg"
/></td>
<td><img
src=
"https://
static.oschina.net/uploads/space/2018/0727/172807_8stz_1438828
.jpg"
/></td>
<td><img
src=
"https://
oscimg.oschina.net/oscnet/10b12c7e673fee5ac3254f246354a4805b7
.jpg"
/></td>
<td><img
src=
"https://
static.oschina.net/uploads/space/2018/0727/172830_Q20u_1438828
.jpg"
/></td>
</tr>
</tr>
</table>
</table>
...
...
src/main/java/com/ruoyi/common/utils/FileUploadUtils.java
→
src/main/java/com/ruoyi/common/utils/
file/
FileUploadUtils.java
View file @
6dc56c6e
package
com
.
ruoyi
.
common
.
utils
;
package
com
.
ruoyi
.
common
.
utils
.
file
;
import
java.io.File
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.IOException
;
...
...
src/main/java/com/ruoyi/common/utils/FileUtils.java
→
src/main/java/com/ruoyi/common/utils/
file/
FileUtils.java
View file @
6dc56c6e
package
com
.
ruoyi
.
common
.
utils
;
package
com
.
ruoyi
.
common
.
utils
.
file
;
import
java.io.File
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileInputStream
;
...
@@ -70,7 +70,8 @@ public class FileUtils
...
@@ -70,7 +70,8 @@ public class FileUtils
}
}
/**
/**
* @Desc 删除文件
* 删除文件
*
* @param filePath 文件
* @param filePath 文件
* @return
* @return
*/
*/
...
...
src/main/java/com/ruoyi/project/common/CommonController.java
View file @
6dc56c6e
...
@@ -9,7 +9,7 @@ import org.slf4j.LoggerFactory;
...
@@ -9,7 +9,7 @@ import org.slf4j.LoggerFactory;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.util.ResourceUtils
;
import
org.springframework.util.ResourceUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
com.ruoyi.common.utils.FileUtils
;
import
com.ruoyi.common.utils.
file.
FileUtils
;
/**
/**
* 通用请求处理
* 通用请求处理
...
...
src/main/java/com/ruoyi/project/system/config/controller/ConfigController.java
View file @
6dc56c6e
...
@@ -97,7 +97,7 @@ public class ConfigController extends BaseController
...
@@ -97,7 +97,7 @@ public class ConfigController extends BaseController
@GetMapping
(
"/edit/{configId}"
)
@GetMapping
(
"/edit/{configId}"
)
public
String
edit
(
@PathVariable
(
"configId"
)
Long
configId
,
ModelMap
mmap
)
public
String
edit
(
@PathVariable
(
"configId"
)
Long
configId
,
ModelMap
mmap
)
{
{
mmap
.
addAttribute
(
"config"
,
configService
.
selectConfigById
(
configId
));
mmap
.
put
(
"config"
,
configService
.
selectConfigById
(
configId
));
return
prefix
+
"/edit"
;
return
prefix
+
"/edit"
;
}
}
...
...
src/main/java/com/ruoyi/project/system/user/controller/ProfileController.java
View file @
6dc56c6e
...
@@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.ruoyi.common.utils.FileUploadUtils
;
import
com.ruoyi.common.utils.
file.
FileUploadUtils
;
import
com.ruoyi.framework.aspectj.lang.annotation.Log
;
import
com.ruoyi.framework.aspectj.lang.annotation.Log
;
import
com.ruoyi.framework.aspectj.lang.constant.BusinessType
;
import
com.ruoyi.framework.aspectj.lang.constant.BusinessType
;
import
com.ruoyi.framework.web.controller.BaseController
;
import
com.ruoyi.framework.web.controller.BaseController
;
...
...
src/main/resources/templates/vm/java/domain.java.vm
View file @
6dc56c6e
package
${
package
}.
domain
;
package
${
package
}.
domain
;
import
org
.
apache
.
commons
.
lang3
.
builder
.
ToStringBuilder
;
import
org
.
apache
.
commons
.
lang3
.
builder
.
ToStringStyle
;
import
com
.
ruoyi
.
framework
.
web
.
domain
.
BaseEntity
;
import
com
.
ruoyi
.
framework
.
web
.
domain
.
BaseEntity
;
#
foreach
($
column
in
$
columns
)
#
foreach
($
column
in
$
columns
)
#
if
($
column
.
attrType
==
'Date'
)
#
if
($
column
.
attrType
==
'Date'
)
...
@@ -24,21 +26,22 @@ public class ${className} extends BaseEntity
...
@@ -24,21 +26,22 @@ public class ${className} extends BaseEntity
#
end
#
end
#
foreach
($
column
in
$
columns
)
#
foreach
($
column
in
$
columns
)
/**
*
设置:
${
column
.
columnComment
}
*/
public
void
set
${
column
.
attrName
}($
column
.
attrType
$
column
.
attrname
)
public
void
set
${
column
.
attrName
}($
column
.
attrType
$
column
.
attrname
)
{
{
this
.$
column
.
attrname
=
$
column
.
attrname
;
this
.$
column
.
attrname
=
$
column
.
attrname
;
}
}
/**
*
获取:
${
column
.
columnComment
}
*/
public
$
column
.
attrType
get
${
column
.
attrName
}()
public
$
column
.
attrType
get
${
column
.
attrName
}()
{
{
return
$
column
.
attrname
;
return
$
column
.
attrname
;
}
}
#
end
#
end
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
#
foreach
($
column
in
$
columns
)
.
append
(
"${column.attrname}"
,
get
${
column
.
attrName
}())
#
end
.
toString
();
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment