Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
T
tcm-system
Project
Project
Details
Activity
Releases
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
TCM
tcm-system
Commits
bf0c48e9
Commit
bf0c48e9
authored
Oct 19, 2020
by
tangf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增公司消息
parent
3359a531
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
0 deletions
+33
-0
DevideController.java
...m/pangding/web/authority/controller/DevideController.java
+6
-0
DeviceDao.java
src/main/java/com/pangding/web/authority/dao/DeviceDao.java
+2
-0
DeviceDaoImpl.java
...va/com/pangding/web/authority/dao/impl/DeviceDaoImpl.java
+18
-0
DeviceService.java
...ava/com/pangding/web/authority/service/DeviceService.java
+2
-0
DeviceServiceImpl.java
...angding/web/authority/service/impl/DeviceServiceImpl.java
+5
-0
No files found.
src/main/java/com/pangding/web/authority/controller/DevideController.java
View file @
bf0c48e9
...
...
@@ -38,6 +38,12 @@ public class DevideController {
return
deviceService
.
findDeviceInfo
(
req
);
}
@RequestMapping
(
value
=
"/findDeviceInfoByCode"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
<
DeviceResVo
>
findDeviceInfoByCode
(
@RequestBody
DeviceReqVo
req
){
// CheckerHelper.newInstance().notBlankCheck("id",req.getId()).checkException();
return
deviceService
.
findDeviceInfoByCode
(
req
);
}
@RequestMapping
(
value
=
"/saveDevice"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
saveDevice
(
@RequestBody
DeviceReqVo
req
){
// CheckerHelper.newInstance().notBlankCheck("id",req.getId()).checkException();
...
...
src/main/java/com/pangding/web/authority/dao/DeviceDao.java
View file @
bf0c48e9
...
...
@@ -9,5 +9,7 @@ public interface DeviceDao extends BaseDao {
PageSizeData
<
DeviceResVo
>
findDevicePage
(
DeviceReqVo
req
);
DeviceResVo
findDeviceInfo
(
DeviceReqVo
req
);
}
src/main/java/com/pangding/web/authority/dao/impl/DeviceDaoImpl.java
View file @
bf0c48e9
...
...
@@ -17,6 +17,8 @@ public class DeviceDaoImpl extends BaseDaoImpl implements DeviceDao {
private
static
final
String
QUERY_LIST
=
"QUERY_LIST"
;
private
static
final
String
QUERY_INFO
=
"QUERY_INFO"
;
@Override
protected
void
init
()
{
register
(
DeviceVo
.
class
);
...
...
@@ -30,6 +32,17 @@ public class DeviceDaoImpl extends BaseDaoImpl implements DeviceDao {
.
add
(
"merchantId"
,
" AND merchant_id = ? "
)
.
add
(
"deviceStatus"
,
" AND device_status = ? "
);
table
.
add
(
QUERY_INFO
,
"SELECT a.*,b.company_name FROM pd_device a LEFT JOIN pd_company b ON a.company_id = b.id WHERE 1=1 {WHERE"
)
.
add
(
"deviceId"
,
"AND device_id = ? "
)
.
add
(
"deviceCode"
,
"AND device_code = ? "
)
.
add
(
"deviceName"
,
" AND device_name = ? "
)
.
add
(
"deviceType"
,
" AND device_type = ? "
)
.
add
(
"companyId"
,
" AND company_id = ? "
)
.
add
(
"channelId"
,
" AND channel_id = ? "
)
.
add
(
"merchantId"
,
" AND merchant_id = ? "
)
.
add
(
"deviceStatus"
,
" AND device_status = ? "
);
;
}
@Override
...
...
@@ -37,4 +50,9 @@ public class DeviceDaoImpl extends BaseDaoImpl implements DeviceDao {
return
queryPage
(
DeviceResVo
.
class
,
req
,
QUERY_LIST
,
req
);
}
@Override
public
DeviceResVo
findDeviceInfo
(
DeviceReqVo
req
)
{
return
queryFirst
(
DeviceResVo
.
class
,
QUERY_INFO
,
req
);
}
}
src/main/java/com/pangding/web/authority/service/DeviceService.java
View file @
bf0c48e9
...
...
@@ -12,6 +12,8 @@ public interface DeviceService {
ResponseResult
<
DeviceResVo
>
findDeviceInfo
(
DeviceReqVo
req
);
ResponseResult
<
DeviceResVo
>
findDeviceInfoByCode
(
DeviceReqVo
req
);
ResponseResult
saveDevice
(
DeviceReqVo
req
);
ResponseResult
<
DeviceVo
>
updateDevice
(
DeviceReqVo
req
);
...
...
src/main/java/com/pangding/web/authority/service/impl/DeviceServiceImpl.java
View file @
bf0c48e9
...
...
@@ -30,6 +30,11 @@ public class DeviceServiceImpl implements DeviceService {
return
ResponseResult
.
result
(
deviceResVo
);
}
public
ResponseResult
<
DeviceResVo
>
findDeviceInfoByCode
(
DeviceReqVo
req
)
{
DeviceResVo
deviceResVo
=
deviceDao
.
findDeviceInfo
(
req
);
return
ResponseResult
.
result
(
deviceResVo
);
}
@Override
public
ResponseResult
saveDevice
(
DeviceReqVo
req
)
{
return
ResponseResult
.
result
(
null
);
...
...
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