Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-standard-interfaces
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4d844a7d
authored
Sep 14, 2022
by
向延琳
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改设备响应状态
1 parent
fcb0e64a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
0 deletions
src/main/java/cn/com/glsx/stdinterface/common/constants/Constants.java
src/main/java/cn/com/glsx/stdinterface/modules/controller/DeviceFreqController.java
src/main/java/cn/com/glsx/stdinterface/modules/mapper/DeviceFreqMapper.java
src/main/java/cn/com/glsx/stdinterface/modules/service/DeviceFreqService.java
src/main/resources/mapper/DeviceFreqMapper.xml
src/test/java/cn/com/glsx/stdinterface/modules/service/DeviceFreqServiceTest.java
src/main/java/cn/com/glsx/stdinterface/common/constants/Constants.java
View file @
4d844a7
...
@@ -190,4 +190,9 @@ public final class Constants {
...
@@ -190,4 +190,9 @@ public final class Constants {
* 厂商ID-博实结
* 厂商ID-博实结
*/
*/
public
static
final
String
BSJ_FACTORY_ID
=
"BSJ"
;
public
static
final
String
BSJ_FACTORY_ID
=
"BSJ"
;
/**
* 响应状态
*/
public
static
final
int
STATUS_RESPONSE
=
2
;
}
}
src/main/java/cn/com/glsx/stdinterface/modules/controller/DeviceFreqController.java
View file @
4d844a7
...
@@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.RequestBody;
...
@@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
/**
* @author xiangyanlin
* @author xiangyanlin
* @date 2022/9/9
* @date 2022/9/9
...
@@ -52,4 +54,11 @@ public class DeviceFreqController implements DeviceFreqClient {
...
@@ -52,4 +54,11 @@ public class DeviceFreqController implements DeviceFreqClient {
deviceFreqService
.
closeDeviceFreqFromDB
();
deviceFreqService
.
closeDeviceFreqFromDB
();
return
R
.
ok
();
return
R
.
ok
();
}
}
@PostMapping
(
value
=
"/updateResponseStatus"
)
@Override
public
R
<
Void
>
updateDeviceFreqResponseStatus
(
String
sn
)
{
deviceFreqService
.
updateDeviceFreqResponseStatus
(
sn
);
return
R
.
ok
();
}
}
}
src/main/java/cn/com/glsx/stdinterface/modules/mapper/DeviceFreqMapper.java
View file @
4d844a7
...
@@ -5,6 +5,7 @@ import com.glsx.plat.mybatis.mapper.CommonBaseMapper;
...
@@ -5,6 +5,7 @@ import com.glsx.plat.mybatis.mapper.CommonBaseMapper;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.List
;
@Mapper
@Mapper
...
@@ -22,4 +23,10 @@ public interface DeviceFreqMapper extends CommonBaseMapper<DeviceFreq> {
...
@@ -22,4 +23,10 @@ public interface DeviceFreqMapper extends CommonBaseMapper<DeviceFreq> {
* @return 生效的调频记录
* @return 生效的调频记录
*/
*/
List
<
String
>
listToCloseFreq
();
List
<
String
>
listToCloseFreq
();
/**
* 更新状态
* @param sn 设备号
*/
void
updateDeviceFreqResponseStatus
(
@Param
(
"sn"
)
String
sn
,
@Param
(
"status"
)
Integer
status
);
}
}
\ No newline at end of file
\ No newline at end of file
src/main/java/cn/com/glsx/stdinterface/modules/service/DeviceFreqService.java
View file @
4d844a7
...
@@ -185,4 +185,9 @@ public class DeviceFreqService {
...
@@ -185,4 +185,9 @@ public class DeviceFreqService {
snList
.
forEach
(
sn
->
this
.
resetAdjFreq
(
new
ResetAdjFreqBO
(
sn
,
1L
)));
snList
.
forEach
(
sn
->
this
.
resetAdjFreq
(
new
ResetAdjFreqBO
(
sn
,
1L
)));
}
}
public
void
updateDeviceFreqResponseStatus
(
String
sn
)
{
deviceFreqMapper
.
updateDeviceFreqResponseStatus
(
sn
,
Constants
.
STATUS_RESPONSE
);
}
}
}
src/main/resources/mapper/DeviceFreqMapper.xml
View file @
4d844a7
...
@@ -59,4 +59,10 @@
...
@@ -59,4 +59,10 @@
</where>
</where>
</select>
</select>
<update
id=
"updateDeviceFreqResponseStatus"
>
update t_device_freq
set response_status = #{status}
where sn = #{sn}
</update>
</mapper>
</mapper>
\ No newline at end of file
\ No newline at end of file
src/test/java/cn/com/glsx/stdinterface/modules/service/DeviceFreqServiceTest.java
View file @
4d844a7
...
@@ -39,4 +39,9 @@ public class DeviceFreqServiceTest {
...
@@ -39,4 +39,9 @@ public class DeviceFreqServiceTest {
}
}
@Test
public
void
testUpdateDeviceFreqResponseStatus
()
{
deviceFreqService
.
updateDeviceFreqResponseStatus
(
"2691212734"
);
}
}
}
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment