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
68b96dd7
Commit
68b96dd7
authored
Jun 07, 2022
by
ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
整合后台接口
parent
200b89e1
Changes
23
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
670 additions
and
1 deletion
+670
-1
pom.xml
license/pom.xml
+18
-0
LicenseApplication.java
...src/main/java/iot/sixiang/license/LicenseApplication.java
+3
-0
MyBatisPlusConfig.java
...in/java/iot/sixiang/license/config/MyBatisPlusConfig.java
+16
-0
LicenseController.java
...ava/iot/sixiang/license/controller/LicenseController.java
+71
-0
ServerController.java
...java/iot/sixiang/license/controller/ServerController.java
+68
-0
UserController.java
...n/java/iot/sixiang/license/controller/UserController.java
+70
-0
License.java
...nse/src/main/java/iot/sixiang/license/entity/License.java
+30
-0
Server.java
license/src/main/java/iot/sixiang/license/entity/Server.java
+28
-0
User.java
license/src/main/java/iot/sixiang/license/entity/User.java
+28
-0
LicenseMapper.java
...c/main/java/iot/sixiang/license/mapper/LicenseMapper.java
+19
-0
ServerMapper.java
...rc/main/java/iot/sixiang/license/mapper/ServerMapper.java
+19
-0
UserMapper.java
.../src/main/java/iot/sixiang/license/mapper/UserMapper.java
+19
-0
RespResult.java
...e/src/main/java/iot/sixiang/license/model/RespResult.java
+39
-0
LicenseService.java
...main/java/iot/sixiang/license/service/LicenseService.java
+23
-0
ServerService.java
.../main/java/iot/sixiang/license/service/ServerService.java
+23
-0
UserService.java
...rc/main/java/iot/sixiang/license/service/UserService.java
+23
-0
LicenseServiceImpl.java
.../iot/sixiang/license/service/impl/LicenseServiceImpl.java
+44
-0
ServerServiceImpl.java
...a/iot/sixiang/license/service/impl/ServerServiceImpl.java
+44
-0
UserServiceImpl.java
...ava/iot/sixiang/license/service/impl/UserServiceImpl.java
+44
-0
application.properties
license/src/main/resources/application.properties
+7
-1
LicenseMapper.xml
license/src/main/resources/mapper/LicenseMapper.xml
+11
-0
ServerMapper.xml
license/src/main/resources/mapper/ServerMapper.xml
+11
-0
UserMapper.xml
license/src/main/resources/mapper/UserMapper.xml
+12
-0
No files found.
license/pom.xml
View file @
68b96dd7
...
@@ -39,6 +39,24 @@
...
@@ -39,6 +39,24 @@
<artifactId>
lombok
</artifactId>
<artifactId>
lombok
</artifactId>
<version>
1.16.10
</version>
<version>
1.16.10
</version>
</dependency>
</dependency>
<!--mysql-->
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<version>
8.0.29
</version>
</dependency>
<!--mybatis-plus-->
<dependency>
<groupId>
com.baomidou
</groupId>
<artifactId>
mybatis-plus-boot-starter
</artifactId>
<version>
3.0.5
</version>
</dependency>
<!-- velocity 模板引擎, Mybatis Plus 代码生成器需要 -->
<dependency>
<groupId>
org.apache.velocity
</groupId>
<artifactId>
velocity-engine-core
</artifactId>
<version>
2.0
</version>
</dependency>
</dependencies>
</dependencies>
...
...
license/src/main/java/iot/sixiang/license/LicenseApplication.java
View file @
68b96dd7
package
iot
.
sixiang
.
license
;
package
iot
.
sixiang
.
license
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
@SpringBootApplication
@SpringBootApplication
@MapperScan
(
basePackages
=
"iot.sixiang.license.mapper"
)
public
class
LicenseApplication
{
public
class
LicenseApplication
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
...
...
license/src/main/java/iot/sixiang/license/config/MyBatisPlusConfig.java
0 → 100644
View file @
68b96dd7
package
iot
.
sixiang
.
license
.
config
;
import
com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
/**
* Created by m33 on 2022/6/7 15:08
*/
@Configuration
public
class
MyBatisPlusConfig
{
@Bean
public
PaginationInterceptor
paginationInterceptor
()
{
return
new
PaginationInterceptor
();
}
}
license/src/main/java/iot/sixiang/license/controller/LicenseController.java
0 → 100644
View file @
68b96dd7
package
iot
.
sixiang
.
license
.
controller
;
import
iot.sixiang.license.entity.License
;
import
iot.sixiang.license.model.RespResult
;
import
iot.sixiang.license.service.LicenseService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* <p>
* 前端控制器
* </p>
*
* @author m33
* @since 2022-06-06
*/
@RestController
@RequestMapping
(
"/iot_sixiang_license/license"
)
public
class
LicenseController
{
@Autowired
private
LicenseService
licenseService
;
/**
* 添加license
* @param license
* @return
*/
@PostMapping
(
"add"
)
public
RespResult
addLicense
(
@RequestBody
License
license
){
boolean
save
=
licenseService
.
addLicense
(
license
);
if
(
save
)
{
return
RespResult
.
success
();
}
else
{
return
RespResult
.
fail
();
}
}
/**
* 删除license
* @param appId
* @return
*/
@PostMapping
(
"delete"
)
public
RespResult
deleteLicense
(
@RequestParam
(
"appId"
)
String
appId
)
{
boolean
flag
=
licenseService
.
deleteLicense
(
appId
);
if
(
flag
)
{
return
RespResult
.
success
();
}
else
{
return
RespResult
.
fail
();
}
}
/**
* 分页查询所有的license
* @param pageNo
* @param pageSize
* @return
*/
@GetMapping
(
"get_license_list"
)
public
RespResult
getLicenseList
(
@RequestParam
(
"pageNo"
)
int
pageNo
,
@RequestParam
(
"pageSize"
)
int
pageSize
)
{
List
<
License
>
records
=
licenseService
.
getLicenseList
(
pageNo
,
pageSize
);
return
RespResult
.
success
().
record
(
records
);
}
}
license/src/main/java/iot/sixiang/license/controller/ServerController.java
0 → 100644
View file @
68b96dd7
package
iot
.
sixiang
.
license
.
controller
;
import
iot.sixiang.license.entity.Server
;
import
iot.sixiang.license.model.RespResult
;
import
iot.sixiang.license.service.ServerService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* <p>
* 前端控制器
* </p>
*
* @author m33
* @since 2022-06-06
*/
@RestController
@RequestMapping
(
"/iot_sixiang_license/server"
)
public
class
ServerController
{
@Autowired
private
ServerService
serverService
;
/**
* 添加server
* @param server
* @return
*/
@PostMapping
(
"add"
)
public
RespResult
addServer
(
@RequestBody
Server
server
)
{
boolean
save
=
serverService
.
addServer
(
server
);
if
(
save
)
{
return
RespResult
.
success
();
}
else
{
return
RespResult
.
fail
();
}
}
/**
* 删除server
* @param serverIp
* @return
*/
@PostMapping
(
"delete"
)
public
RespResult
deleteServer
(
@RequestParam
(
"serverIp"
)
String
serverIp
)
{
boolean
flag
=
serverService
.
deleteServer
(
serverIp
);
if
(
flag
)
{
return
RespResult
.
success
();
}
else
{
return
RespResult
.
fail
();
}
}
/**
* 分页查询所有的server
* @param pageNo
* @param pageSize
* @return
*/
@GetMapping
(
"get_server_list"
)
public
RespResult
getServerList
(
@RequestParam
(
"pageNo"
)
int
pageNo
,
@RequestParam
(
"pageSize"
)
int
pageSize
)
{
List
<
Server
>
records
=
serverService
.
getServerList
(
pageNo
,
pageSize
);
return
RespResult
.
success
().
record
(
records
);
}
}
license/src/main/java/iot/sixiang/license/controller/UserController.java
0 → 100644
View file @
68b96dd7
package
iot
.
sixiang
.
license
.
controller
;
import
iot.sixiang.license.entity.User
;
import
iot.sixiang.license.model.RespResult
;
import
iot.sixiang.license.service.UserService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* <p>
* 前端控制器
* </p>
*
* @author m33
* @since 2022-06-06
*/
@RestController
@RequestMapping
(
"/iot_sixiang_license/user"
)
public
class
UserController
{
@Autowired
private
UserService
userService
;
/**
* 添加user
* @param user
* @return
*/
@PostMapping
(
"add"
)
public
RespResult
addUser
(
@RequestBody
User
user
)
{
boolean
save
=
userService
.
addUser
(
user
);
if
(
save
)
{
return
RespResult
.
success
();
}
else
{
return
RespResult
.
fail
();
}
}
/**
* 删除user
* @param userId
* @return
*/
@PostMapping
(
"delete"
)
public
RespResult
deleteUser
(
@RequestParam
(
"userId"
)
String
userId
)
{
boolean
flag
=
userService
.
deleteUser
(
userId
);
if
(
flag
)
{
return
RespResult
.
success
();
}
else
{
return
RespResult
.
fail
();
}
}
/**
* 分页查询所有的user
* @param pageNo
* @param pageSize
* @return
*/
@GetMapping
(
"get_user_list"
)
public
RespResult
getUserList
(
@RequestParam
(
"pageNo"
)
int
pageNo
,
@RequestParam
(
"pageSize"
)
int
pageSize
)
{
List
<
User
>
records
=
userService
.
getUserList
(
pageNo
,
pageSize
);
return
RespResult
.
success
().
record
(
records
);
}
}
license/src/main/java/iot/sixiang/license/entity/License.java
0 → 100644
View file @
68b96dd7
package
iot
.
sixiang
.
license
.
entity
;
import
java.io.Serializable
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
/**
* <p>
*
* </p>
*
* @author m33
* @since 2022-06-06
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
public
class
License
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
appId
;
private
String
appKey
;
private
String
userId
;
}
license/src/main/java/iot/sixiang/license/entity/Server.java
0 → 100644
View file @
68b96dd7
package
iot
.
sixiang
.
license
.
entity
;
import
java.io.Serializable
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
/**
* <p>
*
* </p>
*
* @author m33
* @since 2022-06-06
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
public
class
Server
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
serverIp
;
private
Integer
port
;
}
license/src/main/java/iot/sixiang/license/entity/User.java
0 → 100644
View file @
68b96dd7
package
iot
.
sixiang
.
license
.
entity
;
import
java.io.Serializable
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
/**
* <p>
*
* </p>
*
* @author m33
* @since 2022-06-06
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
public
class
User
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
userId
;
private
String
password
;
}
license/src/main/java/iot/sixiang/license/mapper/LicenseMapper.java
0 → 100644
View file @
68b96dd7
package
iot
.
sixiang
.
license
.
mapper
;
import
iot.sixiang.license.entity.License
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* <p>
* Mapper 接口
* </p>
*
* @author m33
* @since 2022-06-06
*/
public
interface
LicenseMapper
extends
BaseMapper
<
License
>
{
boolean
addLicense
(
License
license
);
boolean
deleteLicense
(
String
appId
);
}
license/src/main/java/iot/sixiang/license/mapper/ServerMapper.java
0 → 100644
View file @
68b96dd7
package
iot
.
sixiang
.
license
.
mapper
;
import
iot.sixiang.license.entity.Server
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* <p>
* Mapper 接口
* </p>
*
* @author m33
* @since 2022-06-06
*/
public
interface
ServerMapper
extends
BaseMapper
<
Server
>
{
boolean
addServer
(
Server
server
);
boolean
deleteServer
(
String
serverIp
);
}
license/src/main/java/iot/sixiang/license/mapper/UserMapper.java
0 → 100644
View file @
68b96dd7
package
iot
.
sixiang
.
license
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
iot.sixiang.license.entity.User
;
/**
* <p>
* Mapper 接口
* </p>
*
* @author m33
* @since 2022-06-06
*/
public
interface
UserMapper
extends
BaseMapper
<
User
>
{
boolean
addUser
(
User
user
);
boolean
deleteUser
(
String
user
);
}
license/src/main/java/iot/sixiang/license/model/RespResult.java
0 → 100644
View file @
68b96dd7
package
iot
.
sixiang
.
license
.
model
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
RespResult
{
private
int
code
;
private
String
msg
;
private
Object
data
;
public
static
RespResult
success
()
{
RespResult
respResult
=
new
RespResult
();
respResult
.
setCode
(
200
);
respResult
.
setMsg
(
"success"
);
return
respResult
;
}
public
static
RespResult
fail
()
{
RespResult
respResult
=
new
RespResult
();
respResult
.
setCode
(
400
);
respResult
.
setMsg
(
"fail"
);
return
respResult
;
}
public
RespResult
msg
(
String
message
)
{
this
.
msg
=
message
;
return
this
;
}
public
RespResult
record
(
Object
data
){
this
.
data
=
data
;
return
this
;
}
}
license/src/main/java/iot/sixiang/license/service/LicenseService.java
0 → 100644
View file @
68b96dd7
package
iot
.
sixiang
.
license
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
iot.sixiang.license.entity.License
;
import
java.util.List
;
/**
* <p>
* 服务类
* </p>
*
* @author m33
* @since 2022-06-06
*/
public
interface
LicenseService
extends
IService
<
License
>
{
boolean
addLicense
(
License
license
);
List
<
License
>
getLicenseList
(
int
pageNo
,
int
pageSize
);
boolean
deleteLicense
(
String
appId
);
}
license/src/main/java/iot/sixiang/license/service/ServerService.java
0 → 100644
View file @
68b96dd7
package
iot
.
sixiang
.
license
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
iot.sixiang.license.entity.Server
;
import
java.util.List
;
/**
* <p>
* 服务类
* </p>
*
* @author m33
* @since 2022-06-06
*/
public
interface
ServerService
extends
IService
<
Server
>
{
boolean
addServer
(
Server
server
);
List
<
Server
>
getServerList
(
int
pageNo
,
int
pageSize
);
boolean
deleteServer
(
String
serverIp
);
}
license/src/main/java/iot/sixiang/license/service/UserService.java
0 → 100644
View file @
68b96dd7
package
iot
.
sixiang
.
license
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
iot.sixiang.license.entity.User
;
import
java.util.List
;
/**
* <p>
* 服务类
* </p>
*
* @author m33
* @since 2022-06-06
*/
public
interface
UserService
extends
IService
<
User
>
{
boolean
addUser
(
User
user
);
List
<
User
>
getUserList
(
int
pageNo
,
int
pageSize
);
boolean
deleteUser
(
String
user
);
}
license/src/main/java/iot/sixiang/license/service/impl/LicenseServiceImpl.java
0 → 100644
View file @
68b96dd7
package
iot
.
sixiang
.
license
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
iot.sixiang.license.entity.License
;
import
iot.sixiang.license.mapper.LicenseMapper
;
import
iot.sixiang.license.service.LicenseService
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* <p>
* 服务实现类
* </p>
*
* @author m33
* @since 2022-06-06
*/
@Service
public
class
LicenseServiceImpl
extends
ServiceImpl
<
LicenseMapper
,
License
>
implements
LicenseService
{
@Resource
LicenseMapper
licenseMapper
;
@Override
public
boolean
addLicense
(
License
license
)
{
return
licenseMapper
.
addLicense
(
license
);
}
@Override
public
List
<
License
>
getLicenseList
(
int
pageNo
,
int
pageSize
)
{
Page
<
License
>
page
=
new
Page
<>(
pageNo
,
pageSize
);
baseMapper
.
selectPage
(
page
,
null
);
List
<
License
>
records
=
page
.
getRecords
();
return
records
;
}
@Override
public
boolean
deleteLicense
(
String
appId
)
{
return
licenseMapper
.
deleteLicense
(
appId
);
}
}
license/src/main/java/iot/sixiang/license/service/impl/ServerServiceImpl.java
0 → 100644
View file @
68b96dd7
package
iot
.
sixiang
.
license
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
iot.sixiang.license.entity.Server
;
import
iot.sixiang.license.mapper.ServerMapper
;
import
iot.sixiang.license.service.ServerService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* <p>
* 服务实现类
* </p>
*
* @author m33
* @since 2022-06-06
*/
@Service
public
class
ServerServiceImpl
extends
ServiceImpl
<
ServerMapper
,
Server
>
implements
ServerService
{
@Resource
ServerMapper
serverMapper
;
@Override
public
boolean
addServer
(
Server
server
)
{
return
serverMapper
.
addServer
(
server
);
}
@Override
public
List
<
Server
>
getServerList
(
int
pageNo
,
int
pageSize
)
{
Page
<
Server
>
page
=
new
Page
<>(
pageNo
,
pageSize
);
baseMapper
.
selectPage
(
page
,
null
);
List
<
Server
>
records
=
page
.
getRecords
();
return
records
;
}
@Override
public
boolean
deleteServer
(
String
serverIp
)
{
return
serverMapper
.
deleteServer
(
serverIp
);
}
}
license/src/main/java/iot/sixiang/license/service/impl/UserServiceImpl.java
0 → 100644
View file @
68b96dd7
package
iot
.
sixiang
.
license
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
iot.sixiang.license.entity.User
;
import
iot.sixiang.license.mapper.UserMapper
;
import
iot.sixiang.license.service.UserService
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* <p>
* 服务实现类
* </p>
*
* @author m33
* @since 2022-06-06
*/
@Service
public
class
UserServiceImpl
extends
ServiceImpl
<
UserMapper
,
User
>
implements
UserService
{
@Resource
UserMapper
userMapper
;
@Override
public
boolean
addUser
(
User
user
)
{
return
userMapper
.
addUser
(
user
);
}
@Override
public
List
<
User
>
getUserList
(
int
pageNo
,
int
pageSize
)
{
Page
<
User
>
page
=
new
Page
<>(
pageNo
,
pageSize
);
baseMapper
.
selectPage
(
page
,
null
);
List
<
User
>
records
=
page
.
getRecords
();
return
records
;
}
@Override
public
boolean
deleteUser
(
String
user
)
{
return
userMapper
.
deleteUser
(
user
);
}
}
license/src/main/resources/application.properties
View file @
68b96dd7
server.port
=
8868
server.port
=
8868
logging.level.root
=
debug
logging.level.root
=
debug
spring.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
spring.datasource.url
=
jdbc:mysql://localhost:3306/firstwork?serverTimezone=GMT%2B8
spring.datasource.username
=
root
spring.datasource.password
=
123456
mybatis-plus.mapper-locations
=
classpath:/mapper/**.xml
mybatis-plus.type-aliases-package
=
iot.sixiang.license.entity
\ No newline at end of file
license/src/main/resources/mapper/LicenseMapper.xml
0 → 100644
View file @
68b96dd7
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"iot.sixiang.license.mapper.LicenseMapper"
>
<insert
id=
"addLicense"
parameterType=
"iot.sixiang.license.entity.License"
>
insert into license(app_id, app_key, user_id) values (#{appId},#{appKey},#{userId})
</insert>
<delete
id=
"deleteLicense"
parameterType=
"iot.sixiang.license.entity.License"
>
delete from license where app_id = #{appId}
</delete>
</mapper>
license/src/main/resources/mapper/ServerMapper.xml
0 → 100644
View file @
68b96dd7
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"iot.sixiang.license.mapper.ServerMapper"
>
<insert
id=
"addServer"
parameterType=
"iot.sixiang.license.entity.Server"
>
insert into server(server_ip, port) values (#{serverIp},#{port})
</insert>
<delete
id=
"deleteServer"
parameterType=
"iot.sixiang.license.entity.Server"
>
delete from server where server_ip = #{serverIp}
</delete>
</mapper>
license/src/main/resources/mapper/UserMapper.xml
0 → 100644
View file @
68b96dd7
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"iot.sixiang.license.mapper.UserMapper"
>
<insert
id=
"addUser"
parameterType=
"iot.sixiang.license.entity.User"
>
insert into user(user_id, password) values (#{userId},#{password})
</insert>
<delete
id=
"deleteUser"
parameterType=
"iot.sixiang.license.entity.User"
>
delete from user where user_id = #{userId}
</delete>
</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