Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
lic
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
inroi
lic
Commits
ccabdb97
提交
ccabdb97
authored
4月 13, 2023
作者:
李炎
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
微调
上级
5a9b9281
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
32 行增加
和
4 行删除
+32
-4
LicInfoController.java
...rc/main/java/com/system/controller/LicInfoController.java
+14
-1
LicInfoMapper.java
lic-system/src/main/java/com/system/dao/LicInfoMapper.java
+7
-1
LicInfoMapper.xml
...tem/src/main/java/com/system/dao/mapper/LicInfoMapper.xml
+9
-0
LicInfoServiceImpl.java
...main/java/com/system/serivce/impl/LicInfoServiceImpl.java
+1
-1
LicInfoFileCreateInVo.java
...n/java/com/system/transfer/lic/LicInfoFileCreateInVo.java
+1
-1
没有找到文件。
lic-system/src/main/java/com/system/controller/LicInfoController.java
浏览文件 @
ccabdb97
package
com
.
system
.
controller
;
package
com
.
system
.
controller
;
import
com.system.dao.LicInfoMapper
;
import
com.system.serivce.ILicInfoService
;
import
com.system.serivce.ILicInfoService
;
import
com.system.transfer.lic.*
;
import
com.system.transfer.lic.*
;
import
com.system.transfer.response.RestResponse
;
import
com.system.transfer.response.RestResponse
;
import
com.system.utils.StringUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -20,7 +22,8 @@ public class LicInfoController {
...
@@ -20,7 +22,8 @@ public class LicInfoController {
@Autowired
@Autowired
private
ILicInfoService
locInfoService
;
private
ILicInfoService
locInfoService
;
@Autowired
private
LicInfoMapper
licInfoMapper
;
@ApiOperation
(
"Lic信息列表"
)
@ApiOperation
(
"Lic信息列表"
)
@GetMapping
(
"/lic/info/list"
)
@GetMapping
(
"/lic/info/list"
)
...
@@ -32,6 +35,10 @@ public class LicInfoController {
...
@@ -32,6 +35,10 @@ public class LicInfoController {
@ApiOperation
(
"Lic信息创建"
)
@ApiOperation
(
"Lic信息创建"
)
@PostMapping
(
"/lic/info/create"
)
@PostMapping
(
"/lic/info/create"
)
public
RestResponse
licInfoCreate
(
@RequestBody
LicInfoCreateInVo
inVo
)
{
public
RestResponse
licInfoCreate
(
@RequestBody
LicInfoCreateInVo
inVo
)
{
LicInfoListOutVoRecords
mac
=
licInfoMapper
.
getLicInfoByMacAddress
(
inVo
.
getMacAddress
());
if
(!
StringUtil
.
isNull
(
mac
))
{
return
RestResponse
.
fail
(
"MAC地址已存在"
);
}
locInfoService
.
licInfoCreate
(
inVo
);
locInfoService
.
licInfoCreate
(
inVo
);
return
RestResponse
.
success
();
return
RestResponse
.
success
();
}
}
...
@@ -39,6 +46,12 @@ public class LicInfoController {
...
@@ -39,6 +46,12 @@ public class LicInfoController {
@ApiOperation
(
"Lic信息更新"
)
@ApiOperation
(
"Lic信息更新"
)
@PutMapping
(
"/lic/info/update"
)
@PutMapping
(
"/lic/info/update"
)
public
RestResponse
licInfoUpdate
(
@RequestBody
LicInfoUpdateInVo
inVo
)
{
public
RestResponse
licInfoUpdate
(
@RequestBody
LicInfoUpdateInVo
inVo
)
{
LicInfoListOutVoRecords
mac
=
licInfoMapper
.
getLicInfoByMacAddress
(
inVo
.
getMacAddress
());
if
(!
StringUtil
.
isNull
(
mac
))
{
if
(!
mac
.
getId
().
equals
(
inVo
.
getId
()))
{
return
RestResponse
.
fail
(
"MAC地址已存在"
);
}
}
locInfoService
.
licInfoUpdate
(
inVo
);
locInfoService
.
licInfoUpdate
(
inVo
);
return
RestResponse
.
success
();
return
RestResponse
.
success
();
}
}
...
...
lic-system/src/main/java/com/system/dao/LicInfoMapper.java
浏览文件 @
ccabdb97
...
@@ -48,5 +48,11 @@ public interface LicInfoMapper {
...
@@ -48,5 +48,11 @@ public interface LicInfoMapper {
* @return Lic信息
* @return Lic信息
*/
*/
LicInfoListOutVoRecords
getLicInfoByMacAddress
(
String
macAddress
);
LicInfoListOutVoRecords
getLicInfoByMacAddress
(
String
macAddress
);
/**
* 根据id查询Lic信息
*
* @param macAddress MAC地址
* @return Lic信息
*/
LicInfoListOutVoRecords
getLicInfoById
(
Integer
id
);
}
}
lic-system/src/main/java/com/system/dao/mapper/LicInfoMapper.xml
浏览文件 @
ccabdb97
...
@@ -70,5 +70,14 @@
...
@@ -70,5 +70,14 @@
</select>
</select>
<select
id=
"getLicInfoById"
parameterType=
"java.lang.Integer"
resultType=
"com.system.transfer.lic.LicInfoListOutVoRecords"
>
SELECT
id, lq_lic_name, mac_address, effective_time, file_effective_time, verification_interval, module_verification, create_time
FROM tb_lic_info WHERE id = #{id}
</select>
</mapper>
</mapper>
lic-system/src/main/java/com/system/serivce/impl/LicInfoServiceImpl.java
浏览文件 @
ccabdb97
...
@@ -59,7 +59,7 @@ public class LicInfoServiceImpl implements ILicInfoService {
...
@@ -59,7 +59,7 @@ public class LicInfoServiceImpl implements ILicInfoService {
@Override
@Override
public
RestResponse
licInfoFileCreate
(
LicInfoFileCreateInVo
inVo
,
HttpServletResponse
response
)
{
public
RestResponse
licInfoFileCreate
(
LicInfoFileCreateInVo
inVo
,
HttpServletResponse
response
)
{
LicInfoListOutVoRecords
records
=
licInfoMapper
.
getLicInfoBy
MacAddress
(
inVo
.
getMacAddress
());
LicInfoListOutVoRecords
records
=
licInfoMapper
.
getLicInfoBy
Id
(
inVo
.
getId
());
if
(
StringUtil
.
isNull
(
records
))
{
if
(
StringUtil
.
isNull
(
records
))
{
return
RestResponse
.
fail
(
"MAC地址不存在"
);
return
RestResponse
.
fail
(
"MAC地址不存在"
);
}
}
...
...
lic-system/src/main/java/com/system/transfer/lic/LicInfoFileCreateInVo.java
浏览文件 @
ccabdb97
...
@@ -10,7 +10,7 @@ import java.util.List;
...
@@ -10,7 +10,7 @@ import java.util.List;
*/
*/
@Data
@Data
public
class
LicInfoFileCreateInVo
{
public
class
LicInfoFileCreateInVo
{
private
Integer
id
;
/**
/**
* MAC地址
* MAC地址
*/
*/
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论