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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
22 deletions
+27
-22
BikefirmController.java
.../office/modules/manage/controller/BikefirmController.java
+27
-22
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
;
...
...
@@ -28,7 +29,7 @@ import javax.servlet.http.HttpServletRequest;
* ${comments}
*
* @author wudi
* @email
* @email
* @date 2021-12-01 21:14:01
*/
@RestController
...
...
@@ -46,8 +47,8 @@ public class BikefirmController {
* 列表
*/
@RequestMapping
(
"/list"
)
// @RequiresPermissions("manage:bikefirm:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
// @RequiresPermissions("manage:bikefirm:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
PageUtils
page
=
bikefirmService
.
queryPage
(
params
);
return
R
.
ok
().
put
(
"page"
,
page
);
...
...
@@ -58,9 +59,9 @@ public class BikefirmController {
* 信息
*/
@RequestMapping
(
"/info/{id}"
)
// @RequiresPermissions("manage:bikefirm:info")
public
R
info
(
@PathVariable
(
"id"
)
Integer
id
){
BikefirmEntity
bikefirm
=
bikefirmService
.
getById
(
id
);
// @RequiresPermissions("manage:bikefirm:info")
public
R
info
(
@PathVariable
(
"id"
)
Integer
id
)
{
BikefirmEntity
bikefirm
=
bikefirmService
.
getById
(
id
);
return
R
.
ok
().
put
(
"bikefirm"
,
bikefirm
);
}
...
...
@@ -69,9 +70,9 @@ public class BikefirmController {
* 保存
*/
@RequestMapping
(
"/save"
)
// @RequiresPermissions("manage:bikefirm:save")
public
R
save
(
@RequestBody
BikefirmEntity
bikefirm
){
bikefirmService
.
save
(
bikefirm
);
// @RequiresPermissions("manage:bikefirm:save")
public
R
save
(
@RequestBody
BikefirmEntity
bikefirm
)
{
bikefirmService
.
save
(
bikefirm
);
return
R
.
ok
();
}
...
...
@@ -80,9 +81,9 @@ public class BikefirmController {
* 修改
*/
@RequestMapping
(
"/update"
)
// @RequiresPermissions("manage:bikefirm:update")
public
R
update
(
@RequestBody
BikefirmEntity
bikefirm
){
bikefirmService
.
updateById
(
bikefirm
);
// @RequiresPermissions("manage:bikefirm:update")
public
R
update
(
@RequestBody
BikefirmEntity
bikefirm
)
{
bikefirmService
.
updateById
(
bikefirm
);
return
R
.
ok
();
}
...
...
@@ -91,9 +92,9 @@ public class BikefirmController {
* 删除
*/
@RequestMapping
(
"/delete"
)
// @RequiresPermissions("manage:bikefirm:delete")
public
R
delete
(
@RequestBody
Integer
[]
ids
){
bikefirmService
.
removeByIds
(
Arrays
.
asList
(
ids
));
// @RequiresPermissions("manage:bikefirm:delete")
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