Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
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
吴迪
gs1-office-web-sit
Commits
2ab1b0f2
Commit
2ab1b0f2
authored
Dec 10, 2021
by
吴迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】
parent
9149956a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
BikefirmController.java
.../office/modules/manage/controller/BikefirmController.java
+17
-12
No files found.
src/main/java/io/office/modules/manage/controller/BikefirmController.java
View file @
2ab1b0f2
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.math.BigDecimal
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Map
;
...
...
@@ -47,7 +48,7 @@ public class BikefirmController {
*/
@RequestMapping
(
"/list"
)
// @RequiresPermissions("manage:bikefirm:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
PageUtils
page
=
bikefirmService
.
queryPage
(
params
);
return
R
.
ok
().
put
(
"page"
,
page
);
...
...
@@ -59,7 +60,7 @@ public class BikefirmController {
*/
@RequestMapping
(
"/info/{id}"
)
// @RequiresPermissions("manage:bikefirm:info")
public
R
info
(
@PathVariable
(
"id"
)
Integer
id
){
public
R
info
(
@PathVariable
(
"id"
)
Integer
id
)
{
BikefirmEntity
bikefirm
=
bikefirmService
.
getById
(
id
);
return
R
.
ok
().
put
(
"bikefirm"
,
bikefirm
);
...
...
@@ -70,7 +71,7 @@ public class BikefirmController {
*/
@RequestMapping
(
"/save"
)
// @RequiresPermissions("manage:bikefirm:save")
public
R
save
(
@RequestBody
BikefirmEntity
bikefirm
){
public
R
save
(
@RequestBody
BikefirmEntity
bikefirm
)
{
bikefirmService
.
save
(
bikefirm
);
return
R
.
ok
();
...
...
@@ -81,7 +82,7 @@ public class BikefirmController {
*/
@RequestMapping
(
"/update"
)
// @RequiresPermissions("manage:bikefirm:update")
public
R
update
(
@RequestBody
BikefirmEntity
bikefirm
){
public
R
update
(
@RequestBody
BikefirmEntity
bikefirm
)
{
bikefirmService
.
updateById
(
bikefirm
);
return
R
.
ok
();
...
...
@@ -92,7 +93,7 @@ public class BikefirmController {
*/
@RequestMapping
(
"/delete"
)
// @RequiresPermissions("manage:bikefirm:delete")
public
R
delete
(
@RequestBody
Integer
[]
ids
){
public
R
delete
(
@RequestBody
Integer
[]
ids
)
{
bikefirmService
.
removeByIds
(
Arrays
.
asList
(
ids
));
return
R
.
ok
();
...
...
@@ -103,18 +104,22 @@ public class BikefirmController {
@PostMapping
(
"/api/getBikeFirm"
)
public
R
getBikeFirm
(
@RequestBody
BikeFirmVo
bikeFirmVo
,
HttpServletRequest
request
)
{
boolean
captcha
=
sysCaptchaService
.
validate
(
bikeFirmVo
.
getUuid
(),
bikeFirmVo
.
getCaptcha
());
if
(!
captcha
)
{
if
(!
captcha
)
{
return
R
.
error
(
"验证码不正确"
);
}
SearchgtinlogEntity
searchgtinlogEntity
=
new
SearchgtinlogEntity
();
searchgtinlogEntity
.
setCreatedate
(
new
Date
());
searchgtinlogEntity
.
setIp
(
IPUtils
.
getIpAddr
(
request
));
if
(
StringUtils
.
isNotBlank
(
bikeFirmVo
.
getCode
()))
{
if
(
StringUtils
.
isNotBlank
(
bikeFirmVo
.
getCode
()))
{
try
{
new
BigDecimal
(
bikeFirmVo
.
getCode
()).
toString
();
}
catch
(
Exception
e
)
{
return
R
.
error
(
"请输入正常的企业代码!"
);
}
searchgtinlogEntity
.
setKeyword
(
bikeFirmVo
.
getCode
());
searchgtinlogEntity
.
setClassStr
(
"自行车企业代码公告查询:企业代码查询"
);
}
if
(
StringUtils
.
isNotBlank
(
bikeFirmVo
.
getFirmName
()))
{
if
(
StringUtils
.
isNotBlank
(
bikeFirmVo
.
getFirmName
()))
{
searchgtinlogEntity
.
setKeyword
(
bikeFirmVo
.
getFirmName
());
searchgtinlogEntity
.
setClassStr
(
"自行车企业代码公告查询:企业名称查询"
);
}
...
...
@@ -123,10 +128,10 @@ public class BikefirmController {
//新增查询日志
searchgtinlogService
.
save
(
searchgtinlogEntity
);
return
R
.
ok
().
put
(
"data"
,
bikefirmService
.
getBikeFirm
(
bikeFirmVo
));
}
return
R
.
ok
().
put
(
"data"
,
bikefirmService
.
getBikeFirm
(
bikeFirmVo
));
}
}
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