Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ioc_sixiang_license
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
zengtianlai3
ioc_sixiang_license
Commits
f0afbbdc
Commit
f0afbbdc
authored
Jun 08, 2022
by
zengtianlai3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加修改功能
parent
02387dcd
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
148 additions
and
24 deletions
+148
-24
LicenseController.java
...ava/iot/sixiang/license/controller/LicenseController.java
+26
-8
ServerController.java
...java/iot/sixiang/license/controller/ServerController.java
+26
-7
UserController.java
...n/java/iot/sixiang/license/controller/UserController.java
+23
-5
LicenseMapper.java
...c/main/java/iot/sixiang/license/mapper/LicenseMapper.java
+2
-0
ServerMapper.java
...rc/main/java/iot/sixiang/license/mapper/ServerMapper.java
+2
-0
UserMapper.java
.../src/main/java/iot/sixiang/license/mapper/UserMapper.java
+2
-0
LicenseService.java
...main/java/iot/sixiang/license/service/LicenseService.java
+2
-0
ServerService.java
.../main/java/iot/sixiang/license/service/ServerService.java
+2
-0
UserService.java
...rc/main/java/iot/sixiang/license/service/UserService.java
+3
-1
LicenseServiceImpl.java
.../iot/sixiang/license/service/impl/LicenseServiceImpl.java
+15
-0
ServerServiceImpl.java
...a/iot/sixiang/license/service/impl/ServerServiceImpl.java
+16
-1
UserServiceImpl.java
...ava/iot/sixiang/license/service/impl/UserServiceImpl.java
+17
-2
LicenseMapper.xml
license/src/main/resources/mapper/LicenseMapper.xml
+4
-0
ServerMapper.xml
license/src/main/resources/mapper/ServerMapper.xml
+4
-0
UserMapper.xml
license/src/main/resources/mapper/UserMapper.xml
+4
-0
No files found.
license/src/main/java/iot/sixiang/license/controller/LicenseController.java
View file @
f0afbbdc
...
@@ -32,11 +32,11 @@ public class LicenseController {
...
@@ -32,11 +32,11 @@ public class LicenseController {
*/
*/
@PostMapping
(
"add"
)
@PostMapping
(
"add"
)
public
RespResult
addLicense
(
@RequestBody
JSONObject
jsonObject
){
public
RespResult
addLicense
(
@RequestBody
JSONObject
jsonObject
){
String
appId
=
(
String
)
jsonObject
.
get
(
"app_id"
);
String
appId
=
jsonObject
.
getString
(
"app_id"
);
String
appKey
=
(
String
)
jsonObject
.
get
(
"app_key"
);
String
appKey
=
jsonObject
.
getString
(
"app_key"
);
String
userId
=
(
String
)
jsonObject
.
get
(
"user_id"
);
String
userId
=
jsonObject
.
getString
(
"user_id"
);
boolean
save
=
licenseService
.
addLicense
(
appId
,
appKey
,
userId
);
boolean
res
=
licenseService
.
addLicense
(
appId
,
appKey
,
userId
);
if
(
save
)
{
if
(
res
)
{
return
RespResult
.
success
();
return
RespResult
.
success
();
}
else
{
}
else
{
return
RespResult
.
fail
();
return
RespResult
.
fail
();
...
@@ -50,8 +50,26 @@ public class LicenseController {
...
@@ -50,8 +50,26 @@ public class LicenseController {
*/
*/
@PostMapping
(
"delete"
)
@PostMapping
(
"delete"
)
public
RespResult
deleteLicense
(
@RequestParam
(
"app_id"
)
String
appId
)
{
public
RespResult
deleteLicense
(
@RequestParam
(
"app_id"
)
String
appId
)
{
boolean
flag
=
licenseService
.
deleteLicense
(
appId
);
boolean
res
=
licenseService
.
deleteLicense
(
appId
);
if
(
flag
)
{
if
(
res
)
{
return
RespResult
.
success
();
}
else
{
return
RespResult
.
fail
();
}
}
/**
* 修改license
* @param jsonObject
* @return
*/
@PostMapping
(
"update"
)
public
RespResult
updateLicense
(
@RequestBody
JSONObject
jsonObject
){
String
appId
=
jsonObject
.
getString
(
"app_id"
);
String
appKey
=
jsonObject
.
getString
(
"app_key"
);
String
userId
=
jsonObject
.
getString
(
"user_id"
);
boolean
res
=
licenseService
.
updateLicense
(
appId
,
appKey
,
userId
);
if
(
res
)
{
return
RespResult
.
success
();
return
RespResult
.
success
();
}
else
{
}
else
{
return
RespResult
.
fail
();
return
RespResult
.
fail
();
...
@@ -64,7 +82,7 @@ public class LicenseController {
...
@@ -64,7 +82,7 @@ public class LicenseController {
* @param pageSize
* @param pageSize
* @return
* @return
*/
*/
@GetMapping
(
"
get_license_
list"
)
@GetMapping
(
"list"
)
public
RespResult
getLicenseList
(
@RequestParam
(
"page_no"
)
int
pageNo
,
@RequestParam
(
"page_size"
)
int
pageSize
)
{
public
RespResult
getLicenseList
(
@RequestParam
(
"page_no"
)
int
pageNo
,
@RequestParam
(
"page_size"
)
int
pageSize
)
{
List
<
License
>
records
=
licenseService
.
getLicenseList
(
pageNo
,
pageSize
);
List
<
License
>
records
=
licenseService
.
getLicenseList
(
pageNo
,
pageSize
);
return
RespResult
.
success
().
record
(
records
);
return
RespResult
.
success
().
record
(
records
);
...
...
license/src/main/java/iot/sixiang/license/controller/ServerController.java
View file @
f0afbbdc
...
@@ -24,6 +24,7 @@ public class ServerController {
...
@@ -24,6 +24,7 @@ public class ServerController {
@Autowired
@Autowired
private
ServerService
serverService
;
private
ServerService
serverService
;
/**
/**
* 添加server
* 添加server
* @param jsonObject
* @param jsonObject
...
@@ -31,10 +32,10 @@ public class ServerController {
...
@@ -31,10 +32,10 @@ public class ServerController {
*/
*/
@PostMapping
(
"add"
)
@PostMapping
(
"add"
)
public
RespResult
addServer
(
@RequestBody
JSONObject
jsonObject
)
{
public
RespResult
addServer
(
@RequestBody
JSONObject
jsonObject
)
{
String
serverIp
=
(
String
)
jsonObject
.
get
(
"server_ip"
);
String
serverIp
=
jsonObject
.
getString
(
"server_ip"
);
int
port
=
(
int
)
jsonObject
.
get
(
"port"
);
int
port
=
jsonObject
.
getInteger
(
"port"
);
boolean
save
=
serverService
.
addServer
(
serverIp
,
port
);
boolean
res
=
serverService
.
addServer
(
serverIp
,
port
);
if
(
save
)
{
if
(
res
)
{
return
RespResult
.
success
();
return
RespResult
.
success
();
}
else
{
}
else
{
return
RespResult
.
fail
();
return
RespResult
.
fail
();
...
@@ -48,21 +49,39 @@ public class ServerController {
...
@@ -48,21 +49,39 @@ public class ServerController {
*/
*/
@PostMapping
(
"delete"
)
@PostMapping
(
"delete"
)
public
RespResult
deleteServer
(
@RequestParam
(
"server_ip"
)
String
serverIp
)
{
public
RespResult
deleteServer
(
@RequestParam
(
"server_ip"
)
String
serverIp
)
{
boolean
flag
=
serverService
.
deleteServer
(
serverIp
);
boolean
res
=
serverService
.
deleteServer
(
serverIp
);
if
(
flag
)
{
if
(
res
)
{
return
RespResult
.
success
();
}
else
{
return
RespResult
.
fail
();
}
}
/**
* 修改server
* @param jsonObject
* @return
*/
@PostMapping
(
"update"
)
public
RespResult
updateServer
(
@RequestBody
JSONObject
jsonObject
)
{
String
serverIp
=
jsonObject
.
getString
(
"server_ip"
);
int
port
=
jsonObject
.
getInteger
(
"port"
);
boolean
res
=
serverService
.
updateServer
(
serverIp
,
port
);
if
(
res
)
{
return
RespResult
.
success
();
return
RespResult
.
success
();
}
else
{
}
else
{
return
RespResult
.
fail
();
return
RespResult
.
fail
();
}
}
}
}
/**
/**
* 分页查询所有的server
* 分页查询所有的server
* @param pageNo
* @param pageNo
* @param pageSize
* @param pageSize
* @return
* @return
*/
*/
@GetMapping
(
"
get_server_
list"
)
@GetMapping
(
"list"
)
public
RespResult
getServerList
(
@RequestParam
(
"page_no"
)
int
pageNo
,
@RequestParam
(
"page_size"
)
int
pageSize
)
{
public
RespResult
getServerList
(
@RequestParam
(
"page_no"
)
int
pageNo
,
@RequestParam
(
"page_size"
)
int
pageSize
)
{
List
<
Server
>
records
=
serverService
.
getServerList
(
pageNo
,
pageSize
);
List
<
Server
>
records
=
serverService
.
getServerList
(
pageNo
,
pageSize
);
return
RespResult
.
success
().
record
(
records
);
return
RespResult
.
success
().
record
(
records
);
...
...
license/src/main/java/iot/sixiang/license/controller/UserController.java
View file @
f0afbbdc
...
@@ -35,8 +35,8 @@ public class UserController {
...
@@ -35,8 +35,8 @@ public class UserController {
public
RespResult
addUser
(
@RequestBody
JSONObject
jsonObject
)
{
public
RespResult
addUser
(
@RequestBody
JSONObject
jsonObject
)
{
String
userId
=
(
String
)
jsonObject
.
get
(
"user_id"
);
String
userId
=
(
String
)
jsonObject
.
get
(
"user_id"
);
String
password
=
(
String
)
jsonObject
.
get
(
"password"
);
String
password
=
(
String
)
jsonObject
.
get
(
"password"
);
boolean
save
=
userService
.
addUser
(
userId
,
password
);
boolean
res
=
userService
.
addUser
(
userId
,
password
);
if
(
save
)
{
if
(
res
)
{
return
RespResult
.
success
();
return
RespResult
.
success
();
}
else
{
}
else
{
return
RespResult
.
fail
();
return
RespResult
.
fail
();
...
@@ -50,21 +50,39 @@ public class UserController {
...
@@ -50,21 +50,39 @@ public class UserController {
*/
*/
@PostMapping
(
"delete"
)
@PostMapping
(
"delete"
)
public
RespResult
deleteUser
(
@RequestParam
(
"user_id"
)
String
userId
)
{
public
RespResult
deleteUser
(
@RequestParam
(
"user_id"
)
String
userId
)
{
boolean
flag
=
userService
.
deleteUser
(
userId
);
boolean
res
=
userService
.
deleteUser
(
userId
);
if
(
flag
)
{
if
(
res
)
{
return
RespResult
.
success
();
return
RespResult
.
success
();
}
else
{
}
else
{
return
RespResult
.
fail
();
return
RespResult
.
fail
();
}
}
}
}
/**
* 修改user
* @param jsonObject
* @return
*/
@PostMapping
(
"update"
)
public
RespResult
updateUser
(
@RequestBody
JSONObject
jsonObject
)
{
String
userId
=
jsonObject
.
getString
(
"user_id"
);
String
password
=
jsonObject
.
getString
(
"password"
);
boolean
res
=
userService
.
updateUser
(
userId
,
password
);
if
(
res
)
{
return
RespResult
.
success
();
}
else
{
return
RespResult
.
fail
();
}
}
/**
/**
* 分页查询所有的user
* 分页查询所有的user
* @param pageNo
* @param pageNo
* @param pageSize
* @param pageSize
* @return
* @return
*/
*/
@GetMapping
(
"
get_user_
list"
)
@GetMapping
(
"list"
)
public
RespResult
getUserList
(
@RequestParam
(
"page_no"
)
int
pageNo
,
@RequestParam
(
"page_size"
)
int
pageSize
)
{
public
RespResult
getUserList
(
@RequestParam
(
"page_no"
)
int
pageNo
,
@RequestParam
(
"page_size"
)
int
pageSize
)
{
List
<
User
>
records
=
userService
.
getUserList
(
pageNo
,
pageSize
);
List
<
User
>
records
=
userService
.
getUserList
(
pageNo
,
pageSize
);
return
RespResult
.
success
().
record
(
records
);
return
RespResult
.
success
().
record
(
records
);
...
...
license/src/main/java/iot/sixiang/license/mapper/LicenseMapper.java
View file @
f0afbbdc
...
@@ -16,4 +16,6 @@ public interface LicenseMapper extends BaseMapper<License> {
...
@@ -16,4 +16,6 @@ public interface LicenseMapper extends BaseMapper<License> {
boolean
deleteLicense
(
String
appId
);
boolean
deleteLicense
(
String
appId
);
boolean
addLicense
(
String
appId
,
String
appKey
,
String
userId
);
boolean
addLicense
(
String
appId
,
String
appKey
,
String
userId
);
boolean
updateLicense
(
String
appId
,
String
appKey
,
String
userId
);
}
}
license/src/main/java/iot/sixiang/license/mapper/ServerMapper.java
View file @
f0afbbdc
...
@@ -16,4 +16,6 @@ public interface ServerMapper extends BaseMapper<Server> {
...
@@ -16,4 +16,6 @@ public interface ServerMapper extends BaseMapper<Server> {
boolean
deleteServer
(
String
serverIp
);
boolean
deleteServer
(
String
serverIp
);
boolean
addServer
(
String
serverIp
,
int
port
);
boolean
addServer
(
String
serverIp
,
int
port
);
boolean
updateServer
(
String
serverIp
,
int
port
);
}
}
license/src/main/java/iot/sixiang/license/mapper/UserMapper.java
View file @
f0afbbdc
...
@@ -17,4 +17,6 @@ public interface UserMapper extends BaseMapper<User> {
...
@@ -17,4 +17,6 @@ public interface UserMapper extends BaseMapper<User> {
boolean
deleteUser
(
String
user
);
boolean
deleteUser
(
String
user
);
boolean
addUser
(
String
userId
,
String
password
);
boolean
addUser
(
String
userId
,
String
password
);
boolean
updateUser
(
String
userId
,
String
password
);
}
}
license/src/main/java/iot/sixiang/license/service/LicenseService.java
View file @
f0afbbdc
...
@@ -20,4 +20,6 @@ public interface LicenseService extends IService<License> {
...
@@ -20,4 +20,6 @@ public interface LicenseService extends IService<License> {
boolean
deleteLicense
(
String
appId
);
boolean
deleteLicense
(
String
appId
);
boolean
addLicense
(
String
appId
,
String
appKey
,
String
userId
);
boolean
addLicense
(
String
appId
,
String
appKey
,
String
userId
);
boolean
updateLicense
(
String
appId
,
String
appKey
,
String
userId
);
}
}
license/src/main/java/iot/sixiang/license/service/ServerService.java
View file @
f0afbbdc
...
@@ -20,4 +20,6 @@ public interface ServerService extends IService<Server> {
...
@@ -20,4 +20,6 @@ public interface ServerService extends IService<Server> {
boolean
deleteServer
(
String
serverIp
);
boolean
deleteServer
(
String
serverIp
);
boolean
addServer
(
String
serverIp
,
int
port
);
boolean
addServer
(
String
serverIp
,
int
port
);
boolean
updateServer
(
String
serverIp
,
int
port
);
}
}
license/src/main/java/iot/sixiang/license/service/UserService.java
View file @
f0afbbdc
...
@@ -17,7 +17,9 @@ public interface UserService extends IService<User> {
...
@@ -17,7 +17,9 @@ public interface UserService extends IService<User> {
List
<
User
>
getUserList
(
int
pageNo
,
int
pageSize
);
List
<
User
>
getUserList
(
int
pageNo
,
int
pageSize
);
boolean
deleteUser
(
String
user
);
boolean
deleteUser
(
String
user
Id
);
boolean
addUser
(
String
userId
,
String
password
);
boolean
addUser
(
String
userId
,
String
password
);
boolean
updateUser
(
String
userId
,
String
password
);
}
}
license/src/main/java/iot/sixiang/license/service/impl/LicenseServiceImpl.java
View file @
f0afbbdc
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
iot.sixiang.license.entity.License
;
import
iot.sixiang.license.entity.License
;
import
iot.sixiang.license.mapper.LicenseMapper
;
import
iot.sixiang.license.mapper.LicenseMapper
;
import
iot.sixiang.license.service.LicenseService
;
import
iot.sixiang.license.service.LicenseService
;
import
iot.sixiang.license.util.JsonUtil
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -34,12 +35,26 @@ public class LicenseServiceImpl extends ServiceImpl<LicenseMapper, License> impl
...
@@ -34,12 +35,26 @@ public class LicenseServiceImpl extends ServiceImpl<LicenseMapper, License> impl
@Override
@Override
public
boolean
deleteLicense
(
String
appId
)
{
public
boolean
deleteLicense
(
String
appId
)
{
if
(
JsonUtil
.
isNull
(
appId
))
{
return
false
;
}
return
licenseMapper
.
deleteLicense
(
appId
);
return
licenseMapper
.
deleteLicense
(
appId
);
}
}
@Override
@Override
public
boolean
addLicense
(
String
appId
,
String
appKey
,
String
userId
)
{
public
boolean
addLicense
(
String
appId
,
String
appKey
,
String
userId
)
{
if
(
JsonUtil
.
isNull
(
appId
)
||
JsonUtil
.
isNull
(
appKey
)
||
JsonUtil
.
isNull
(
userId
))
{
return
false
;
}
return
licenseMapper
.
addLicense
(
appId
,
appKey
,
userId
);
return
licenseMapper
.
addLicense
(
appId
,
appKey
,
userId
);
}
}
@Override
public
boolean
updateLicense
(
String
appId
,
String
appKey
,
String
userId
)
{
if
(
JsonUtil
.
isNull
(
appId
)
||
JsonUtil
.
isNull
(
appKey
)
||
JsonUtil
.
isNull
(
userId
))
{
return
false
;
}
return
licenseMapper
.
updateLicense
(
appId
,
appKey
,
userId
);
}
}
}
license/src/main/java/iot/sixiang/license/service/impl/ServerServiceImpl.java
View file @
f0afbbdc
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
iot.sixiang.license.entity.Server
;
import
iot.sixiang.license.entity.Server
;
import
iot.sixiang.license.mapper.ServerMapper
;
import
iot.sixiang.license.mapper.ServerMapper
;
import
iot.sixiang.license.service.ServerService
;
import
iot.sixiang.license.service.ServerService
;
import
iot.sixiang.license.util.JsonUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -35,11 +36,25 @@ public class ServerServiceImpl extends ServiceImpl<ServerMapper, Server> impleme
...
@@ -35,11 +36,25 @@ public class ServerServiceImpl extends ServiceImpl<ServerMapper, Server> impleme
@Override
@Override
public
boolean
deleteServer
(
String
serverIp
)
{
public
boolean
deleteServer
(
String
serverIp
)
{
if
(
JsonUtil
.
isNull
(
serverIp
))
{
return
false
;
}
return
serverMapper
.
deleteServer
(
serverIp
);
return
serverMapper
.
deleteServer
(
serverIp
);
}
}
@Override
@Override
public
boolean
addServer
(
String
serverIp
,
int
port
)
{
public
boolean
addServer
(
String
serverIp
,
int
port
)
{
return
baseMapper
.
addServer
(
serverIp
,
port
);
if
(
JsonUtil
.
isNull
(
serverIp
)
||
JsonUtil
.
isNull
(
String
.
valueOf
(
port
)))
{
return
false
;
}
return
serverMapper
.
addServer
(
serverIp
,
port
);
}
@Override
public
boolean
updateServer
(
String
serverIp
,
int
port
)
{
if
(
JsonUtil
.
isNull
(
serverIp
)
||
JsonUtil
.
isNull
(
String
.
valueOf
(
port
)))
{
return
false
;
}
return
serverMapper
.
updateServer
(
serverIp
,
port
);
}
}
}
}
license/src/main/java/iot/sixiang/license/service/impl/UserServiceImpl.java
View file @
f0afbbdc
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
iot.sixiang.license.entity.User
;
import
iot.sixiang.license.entity.User
;
import
iot.sixiang.license.mapper.UserMapper
;
import
iot.sixiang.license.mapper.UserMapper
;
import
iot.sixiang.license.service.UserService
;
import
iot.sixiang.license.service.UserService
;
import
iot.sixiang.license.util.JsonUtil
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -34,12 +35,26 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
...
@@ -34,12 +35,26 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
}
}
@Override
@Override
public
boolean
deleteUser
(
String
user
)
{
public
boolean
deleteUser
(
String
userId
)
{
return
userMapper
.
deleteUser
(
user
);
if
(
JsonUtil
.
isNull
(
userId
))
{
return
false
;
}
return
userMapper
.
deleteUser
(
userId
);
}
}
@Override
@Override
public
boolean
addUser
(
String
userId
,
String
password
)
{
public
boolean
addUser
(
String
userId
,
String
password
)
{
if
(
JsonUtil
.
isNull
(
userId
)
||
JsonUtil
.
isNull
(
password
))
{
return
false
;
}
return
userMapper
.
addUser
(
userId
,
password
);
return
userMapper
.
addUser
(
userId
,
password
);
}
}
@Override
public
boolean
updateUser
(
String
userId
,
String
password
)
{
if
(
JsonUtil
.
isNull
(
userId
)
||
JsonUtil
.
isNull
(
password
))
{
return
false
;
}
return
userMapper
.
updateUser
(
userId
,
password
);
}
}
}
license/src/main/resources/mapper/LicenseMapper.xml
View file @
f0afbbdc
...
@@ -8,4 +8,8 @@
...
@@ -8,4 +8,8 @@
<delete
id=
"deleteLicense"
parameterType=
"iot.sixiang.license.entity.License"
>
<delete
id=
"deleteLicense"
parameterType=
"iot.sixiang.license.entity.License"
>
delete from license where app_id = #{appId}
delete from license where app_id = #{appId}
</delete>
</delete>
<update
id=
"updateLicense"
parameterType=
"iot.sixiang.license.entity.License"
>
update license set app_key = #{appKey} , user_id = #{userId} where app_id = #{appId}
</update>
</mapper>
</mapper>
license/src/main/resources/mapper/ServerMapper.xml
View file @
f0afbbdc
...
@@ -8,4 +8,8 @@
...
@@ -8,4 +8,8 @@
<delete
id=
"deleteServer"
parameterType=
"iot.sixiang.license.entity.Server"
>
<delete
id=
"deleteServer"
parameterType=
"iot.sixiang.license.entity.Server"
>
delete from server where server_ip = #{serverIp}
delete from server where server_ip = #{serverIp}
</delete>
</delete>
<update
id=
"updateServer"
parameterType=
"iot.sixiang.license.entity.Server"
>
update server set port = #{port} where server_ip = #{serverIp}
</update>
</mapper>
</mapper>
license/src/main/resources/mapper/UserMapper.xml
View file @
f0afbbdc
...
@@ -9,4 +9,8 @@
...
@@ -9,4 +9,8 @@
<delete
id=
"deleteUser"
parameterType=
"iot.sixiang.license.entity.User"
>
<delete
id=
"deleteUser"
parameterType=
"iot.sixiang.license.entity.User"
>
delete from user where user_id = #{userId}
delete from user where user_id = #{userId}
</delete>
</delete>
<update
id=
"updateUser"
parameterType=
"iot.sixiang.license.entity.User"
>
update user set password = #{password} where user_id = #{userId}
</update>
</mapper>
</mapper>
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