Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
Overview
Overview
Details
Activity
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
吴迪
gs1-office-web-sit
Commits
606b59a2
Commit
606b59a2
authored
Nov 16, 2021
by
rongkailun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】提供商管理
parent
9ced1266
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
283 additions
and
0 deletions
+283
-0
PartnersController.java
.../office/modules/manage/controller/PartnersController.java
+90
-0
PartnersDao.java
src/main/java/io/office/modules/manage/dao/PartnersDao.java
+17
-0
PartnersEntity.java
.../java/io/office/modules/manage/entity/PartnersEntity.java
+96
-0
PartnersService.java
...ava/io/office/modules/manage/service/PartnersService.java
+20
-0
PartnersServiceImpl.java
...fice/modules/manage/service/impl/PartnersServiceImpl.java
+30
-0
PartnersDao.xml
src/main/resources/mapper/manage/PartnersDao.xml
+30
-0
No files found.
src/main/java/io/office/modules/manage/controller/PartnersController.java
0 → 100644
View file @
606b59a2
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.util.Arrays
;
import
java.util.Map
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
io.office.modules.manage.entity.PartnersEntity
;
import
io.office.modules.manage.service.PartnersService
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
/**
* 标准服务 提供商管理
*
* @author rkl
* @email
* @date 2021-11-16 08:59:11
*/
@RestController
@RequestMapping
(
"/partners"
)
public
class
PartnersController
{
@Autowired
private
PartnersService
partnersService
;
/**
* 列表
*/
@RequestMapping
(
"/list"
)
// @RequiresPermissions("manage:partners:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
PageUtils
page
=
partnersService
.
queryPage
(
params
);
return
R
.
ok
().
put
(
"page"
,
page
);
}
/**
* 信息
*/
@RequestMapping
(
"/info/{id}"
)
// @RequiresPermissions("manage:partners:info")
public
R
info
(
@PathVariable
(
"id"
)
Integer
id
){
PartnersEntity
partners
=
partnersService
.
getById
(
id
);
return
R
.
ok
().
put
(
"partners"
,
partners
);
}
/**
* 保存
*/
@RequestMapping
(
"/save"
)
// @RequiresPermissions("manage:partners:save")
public
R
save
(
@RequestBody
PartnersEntity
partners
){
partnersService
.
save
(
partners
);
return
R
.
ok
();
}
/**
* 修改
*/
@RequestMapping
(
"/update"
)
// @RequiresPermissions("manage:partners:update")
public
R
update
(
@RequestBody
PartnersEntity
partners
){
partnersService
.
updateById
(
partners
);
return
R
.
ok
();
}
/**
* 删除
*/
@RequestMapping
(
"/delete"
)
// @RequiresPermissions("manage:partners:delete")
public
R
delete
(
@RequestBody
Integer
[]
ids
){
partnersService
.
removeByIds
(
Arrays
.
asList
(
ids
));
return
R
.
ok
();
}
}
src/main/java/io/office/modules/manage/dao/PartnersDao.java
0 → 100644
View file @
606b59a2
package
io
.
office
.
modules
.
manage
.
dao
;
import
io.office.modules.manage.entity.PartnersEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* 提供商管理
*
* @author rkl
* @email
* @date 2021-11-16 08:59:11
*/
@Mapper
public
interface
PartnersDao
extends
BaseMapper
<
PartnersEntity
>
{
}
src/main/java/io/office/modules/manage/entity/PartnersEntity.java
0 → 100644
View file @
606b59a2
package
io
.
office
.
modules
.
manage
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.io.Serializable
;
import
java.util.Date
;
import
lombok.Data
;
/**
* 提供商服务
*
* @author rkl
* @email
* @date 2021-11-16 08:59:11
*/
@Data
@TableName
(
"Partners"
)
public
class
PartnersEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* $column.comments
*/
@TableId
private
Integer
id
;
/**
* $column.comments
*/
private
String
firmname
;
/**
* $column.comments
*/
private
String
brief
;
/**
* $column.comments
*/
private
String
pic
;
/**
* $column.comments
*/
private
String
technology
;
/**
* $column.comments
*/
private
String
service
;
/**
* $column.comments
*/
private
String
site
;
/**
* $column.comments
*/
private
String
name
;
/**
* $column.comments
*/
private
String
phone
;
/**
* $column.comments
*/
private
String
email
;
/**
* $column.comments
*/
private
Date
registerdate
;
/**
* $column.comments
*/
private
Date
updatedate
;
/**
* $column.comments
*/
private
String
editor
;
/**
* $column.comments
*/
private
String
lasteditor
;
/**
* $column.comments
*/
private
Integer
levels
;
/**
* $column.comments
*/
private
Integer
status
;
/**
* $column.comments
*/
private
String
auditor
;
/**
* $column.comments
*/
private
Date
checkdate
;
}
src/main/java/io/office/modules/manage/service/PartnersService.java
0 → 100644
View file @
606b59a2
package
io
.
office
.
modules
.
manage
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
io.office.common.utils.PageUtils
;
import
io.office.modules.manage.entity.PartnersEntity
;
import
java.util.Map
;
/**
* 提供商管理
*
* @author rkl
* @email
* @date 2021-11-16 08:59:11
*/
public
interface
PartnersService
extends
IService
<
PartnersEntity
>
{
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
}
src/main/java/io/office/modules/manage/service/impl/PartnersServiceImpl.java
0 → 100644
View file @
606b59a2
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
org.springframework.stereotype.Service
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.Query
;
import
io.office.modules.manage.dao.PartnersDao
;
import
io.office.modules.manage.entity.PartnersEntity
;
import
io.office.modules.manage.service.PartnersService
;
@Service
(
"partnersService"
)
public
class
PartnersServiceImpl
extends
ServiceImpl
<
PartnersDao
,
PartnersEntity
>
implements
PartnersService
{
@Override
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
IPage
<
PartnersEntity
>
page
=
this
.
page
(
new
Query
<
PartnersEntity
>().
getPage
(
params
),
new
QueryWrapper
<
PartnersEntity
>()
);
return
new
PageUtils
(
page
);
}
}
\ No newline at end of file
src/main/resources/mapper/manage/PartnersDao.xml
0 → 100644
View file @
606b59a2
<?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=
"io.office.modules.manage.dao.PartnersDao"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"io.office.modules.manage.entity.PartnersEntity"
id=
"partnersMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"firmname"
column=
"firmname"
/>
<result
property=
"brief"
column=
"brief"
/>
<result
property=
"pic"
column=
"pic"
/>
<result
property=
"technology"
column=
"technology"
/>
<result
property=
"service"
column=
"service"
/>
<result
property=
"site"
column=
"site"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"email"
column=
"email"
/>
<result
property=
"registerdate"
column=
"registerdate"
/>
<result
property=
"updatedate"
column=
"updatedate"
/>
<result
property=
"editor"
column=
"editor"
/>
<result
property=
"lasteditor"
column=
"lasteditor"
/>
<result
property=
"levels"
column=
"levels"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"auditor"
column=
"auditor"
/>
<result
property=
"checkdate"
column=
"checkdate"
/>
</resultMap>
</mapper>
\ No newline at end of file
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