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
514a3824
Commit
514a3824
authored
Dec 06, 2021
by
吴迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】自行车公告
parent
ccb6cf8f
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
105 additions
and
5 deletions
+105
-5
BikefirmController.java
.../office/modules/manage/controller/BikefirmController.java
+47
-5
BikefirmDao.java
src/main/java/io/office/modules/manage/dao/BikefirmDao.java
+6
-0
BikefirmService.java
...ava/io/office/modules/manage/service/BikefirmService.java
+6
-0
BikefirmServiceImpl.java
...fice/modules/manage/service/impl/BikefirmServiceImpl.java
+9
-0
BikeFirmVo.java
.../java/io/office/modules/manage/vo/request/BikeFirmVo.java
+22
-0
BikefirmDao.xml
src/main/resources/mapper/manage/BikefirmDao.xml
+15
-0
No files found.
src/main/java/io/office/modules/manage/controller/BikefirmController.java
View file @
514a3824
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Map
;
import
io.office.common.utils.IPUtils
;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.manage.entity.SearchgtinlogEntity
;
import
io.office.modules.manage.service.SearchgtinlogService
;
import
io.office.modules.manage.vo.request.BikeFirmVo
;
import
io.office.modules.manage.vo.request.DomesticCodeDetailRequest
;
import
io.office.modules.sys.service.SysCaptchaService
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
io.office.modules.manage.entity.BikefirmEntity
;
import
io.office.modules.manage.service.BikefirmService
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
import
javax.servlet.http.HttpServletRequest
;
/**
...
...
@@ -31,6 +37,11 @@ public class BikefirmController {
@Autowired
private
BikefirmService
bikefirmService
;
@Autowired
private
SysCaptchaService
sysCaptchaService
;
@Autowired
private
SearchgtinlogService
searchgtinlogService
;
/**
* 列表
*/
...
...
@@ -87,4 +98,35 @@ public class BikefirmController {
return
R
.
ok
();
}
@Login
@PostMapping
(
"/api/getBikeFirm"
)
public
R
getBikeFirm
(
@RequestBody
BikeFirmVo
bikeFirmVo
,
HttpServletRequest
request
)
{
boolean
captcha
=
sysCaptchaService
.
validate
(
bikeFirmVo
.
getUuid
(),
bikeFirmVo
.
getCaptcha
());
if
(!
captcha
){
return
R
.
error
(
"验证码不正确"
);
}
SearchgtinlogEntity
searchgtinlogEntity
=
new
SearchgtinlogEntity
();
searchgtinlogEntity
.
setCreatedate
(
new
Date
());
searchgtinlogEntity
.
setIp
(
IPUtils
.
getIpAddr
(
request
));
if
(
StringUtils
.
isNotBlank
(
bikeFirmVo
.
getCode
()))
{
searchgtinlogEntity
.
setKeyword
(
bikeFirmVo
.
getCode
());
searchgtinlogEntity
.
setClassStr
(
"自行车企业代码公告查询:企业代码查询"
);
}
if
(
StringUtils
.
isNotBlank
(
bikeFirmVo
.
getFirmName
()))
{
searchgtinlogEntity
.
setKeyword
(
bikeFirmVo
.
getFirmName
());
searchgtinlogEntity
.
setClassStr
(
"自行车企业代码公告查询:企业名称查询"
);
}
searchgtinlogEntity
.
setSearchsource
(
0
);
//新增查询日志
searchgtinlogService
.
save
(
searchgtinlogEntity
);
return
R
.
ok
().
put
(
"data"
,
bikefirmService
.
getBikeFirm
(
bikeFirmVo
));
}
}
src/main/java/io/office/modules/manage/dao/BikefirmDao.java
View file @
514a3824
...
...
@@ -2,8 +2,11 @@ package io.office.modules.manage.dao;
import
io.office.modules.manage.entity.BikefirmEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
io.office.modules.manage.vo.request.BikeFirmVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/**
* ${comments}
*
...
...
@@ -14,4 +17,7 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public
interface
BikefirmDao
extends
BaseMapper
<
BikefirmEntity
>
{
List
<
BikeFirmVo
>
getBikeFirm
(
BikeFirmVo
bikeFirmVo
);
}
src/main/java/io/office/modules/manage/service/BikefirmService.java
View file @
514a3824
...
...
@@ -3,7 +3,9 @@ package io.office.modules.manage.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
io.office.common.utils.PageUtils
;
import
io.office.modules.manage.entity.BikefirmEntity
;
import
io.office.modules.manage.vo.request.BikeFirmVo
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
@@ -16,5 +18,9 @@ import java.util.Map;
public
interface
BikefirmService
extends
IService
<
BikefirmEntity
>
{
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
List
<
BikeFirmVo
>
getBikeFirm
(
BikeFirmVo
bikeFirmVo
);
}
src/main/java/io/office/modules/manage/service/impl/BikefirmServiceImpl.java
View file @
514a3824
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
io.office.modules.manage.vo.request.BikeFirmVo
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
...
@@ -26,4 +29,9 @@ public class BikefirmServiceImpl extends ServiceImpl<BikefirmDao, BikefirmEntity
return
new
PageUtils
(
page
);
}
@Override
public
List
<
BikeFirmVo
>
getBikeFirm
(
BikeFirmVo
bikeFirmVo
)
{
return
baseMapper
.
getBikeFirm
(
bikeFirmVo
);
}
}
\ No newline at end of file
src/main/java/io/office/modules/manage/vo/request/BikeFirmVo.java
0 → 100644
View file @
514a3824
package
io
.
office
.
modules
.
manage
.
vo
.
request
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
*
* @description:
*
* @author wudi
* @date 14:18 2021/12/6
*/
@Data
public
class
BikeFirmVo
implements
Serializable
{
private
String
code
;
private
String
firmName
;
private
String
captcha
;
private
String
uuid
;
}
src/main/resources/mapper/manage/BikefirmDao.xml
View file @
514a3824
...
...
@@ -50,4 +50,18 @@
</resultMap>
<select
id=
"getBikeFirm"
parameterType=
"io.office.modules.manage.vo.request.BikeFirmVo"
resultType=
"io.office.modules.manage.vo.request.BikeFirmVo"
>
select a.firm_name,b.code from ancc_db2.dbo.bikefirm a left join ancc_db2.dbo.bikecode b on a.id=b.bikeid where check_stat=1
<if
test=
"code!='' and code!=null"
>
and b.code= #{code}
</if>
<if
test=
"firmName!='' and firmName!=null"
>
and firm_name_real like concat('%',#{firmName},'%')
</if>
order by id desc
</select>
</mapper>
\ No newline at end of file
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