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
6d4c6ebe
Commit
6d4c6ebe
authored
Nov 21, 2021
by
rongkailun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】物流管理功能
parent
cbf85bd1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
277 additions
and
0 deletions
+277
-0
LogisticsController.java
...office/modules/manage/controller/LogisticsController.java
+91
-0
LogisticsDao.java
src/main/java/io/office/modules/manage/dao/LogisticsDao.java
+17
-0
LogisticsEntity.java
...java/io/office/modules/manage/entity/LogisticsEntity.java
+83
-0
LogisticsService.java
...va/io/office/modules/manage/service/LogisticsService.java
+20
-0
LogisticsServiceImpl.java
...ice/modules/manage/service/impl/LogisticsServiceImpl.java
+41
-0
LogisticsDao.xml
src/main/resources/mapper/manage/LogisticsDao.xml
+25
-0
No files found.
src/main/java/io/office/modules/manage/controller/LogisticsController.java
0 → 100644
View file @
6d4c6ebe
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Map
;
import
io.office.modules.manage.utils.IdKeysConstant
;
import
io.office.modules.manage.utils.IdWorkerUtils
;
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.LogisticsEntity
;
import
io.office.modules.manage.service.LogisticsService
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-11-21 15:48:47
*/
@RestController
@RequestMapping
(
"/logistics"
)
public
class
LogisticsController
{
@Autowired
private
LogisticsService
logisticsService
;
/**
* 列表
*/
@RequestMapping
(
"/list"
)
// @RequiresPermissions("manage:logistics:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
PageUtils
page
=
logisticsService
.
queryPage
(
params
);
return
R
.
ok
().
put
(
"page"
,
page
);
}
/**
* 信息
*/
@RequestMapping
(
"/info/{id}"
)
// @RequiresPermissions("manage:logistics:info")
public
R
info
(
@PathVariable
(
"id"
)
String
id
){
LogisticsEntity
logistics
=
logisticsService
.
getById
(
id
);
return
R
.
ok
().
put
(
"logistics"
,
logistics
);
}
/**
* 保存
*/
@RequestMapping
(
"/save"
)
// @RequiresPermissions("manage:logistics:save")
public
R
save
(
@RequestBody
LogisticsEntity
logistics
){
logistics
.
setId
(
IdWorkerUtils
.
getSEQByKey
(
IdKeysConstant
.
ID_SEQ_KEY
));
logistics
.
setInputdate
(
new
Date
());
logisticsService
.
save
(
logistics
);
return
R
.
ok
(
"新增成功!"
);
}
/**
* 修改
*/
@RequestMapping
(
"/update"
)
// @RequiresPermissions("manage:logistics:update")
public
R
update
(
@RequestBody
LogisticsEntity
logistics
){
logisticsService
.
updateById
(
logistics
);
return
R
.
ok
(
"修改成功!"
);
}
/**
* 删除
*/
@RequestMapping
(
"/delete"
)
// @RequiresPermissions("manage:logistics:delete")
public
R
delete
(
@RequestBody
String
[]
ids
){
logisticsService
.
removeByIds
(
Arrays
.
asList
(
ids
));
return
R
.
ok
(
"删除成功!"
);
}
}
src/main/java/io/office/modules/manage/dao/LogisticsDao.java
0 → 100644
View file @
6d4c6ebe
package
io
.
office
.
modules
.
manage
.
dao
;
import
io.office.modules.manage.entity.LogisticsEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-11-21 15:48:47
*/
@Mapper
public
interface
LogisticsDao
extends
BaseMapper
<
LogisticsEntity
>
{
}
src/main/java/io/office/modules/manage/entity/LogisticsEntity.java
0 → 100644
View file @
6d4c6ebe
package
io
.
office
.
modules
.
manage
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.io.Serializable
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-11-21 15:48:47
*/
@Data
@TableName
(
"logistics"
)
public
class
LogisticsEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* $column.comments
*/
@TableId
(
type
=
IdType
.
INPUT
)
private
String
id
;
/**
* $column.comments
*/
private
String
title
;
/**
* $column.comments
*/
private
String
type
;
/**
* $column.comments
*/
private
Integer
level
;
/**
* $column.comments
*/
private
String
jumppath
;
/**
* $column.comments
*/
private
String
keyword
;
/**
* $column.comments
*/
private
String
source
;
/**
* $column.comments
*/
private
String
author
;
/**
* $column.comments
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:smm:ss"
)
private
Date
releasetime
;
/**
* $column.comments
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
implementationtime
;
/**
* $column.comments
*/
private
String
remarks
;
/**
* $column.comments
*/
private
String
content
;
/**
* $column.comments
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@TableId
(
"inputdate"
)
private
Date
inputdate
;
}
src/main/java/io/office/modules/manage/service/LogisticsService.java
0 → 100644
View file @
6d4c6ebe
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.LogisticsEntity
;
import
java.util.Map
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-11-21 15:48:47
*/
public
interface
LogisticsService
extends
IService
<
LogisticsEntity
>
{
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
}
src/main/java/io/office/modules/manage/service/impl/LogisticsServiceImpl.java
0 → 100644
View file @
6d4c6ebe
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
com.qiniu.util.StringUtils
;
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.LogisticsDao
;
import
io.office.modules.manage.entity.LogisticsEntity
;
import
io.office.modules.manage.service.LogisticsService
;
@Service
(
"logisticsService"
)
public
class
LogisticsServiceImpl
extends
ServiceImpl
<
LogisticsDao
,
LogisticsEntity
>
implements
LogisticsService
{
@Override
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
QueryWrapper
<
LogisticsEntity
>
logisticsEntityQueryWrapper
=
new
QueryWrapper
<>();
if
(!
StringUtils
.
isNullOrEmpty
(
String
.
valueOf
(
params
.
get
(
"title"
)))){
logisticsEntityQueryWrapper
.
eq
(
"title"
,
params
.
get
(
"title"
));
}
if
(!
StringUtils
.
isNullOrEmpty
(
String
.
valueOf
(
params
.
get
(
"keyword"
)))){
logisticsEntityQueryWrapper
.
eq
(
"keyword"
,
params
.
get
(
"keyword"
));
}
if
(!
StringUtils
.
isNullOrEmpty
(
String
.
valueOf
(
params
.
get
(
"type"
)))){
logisticsEntityQueryWrapper
.
eq
(
"type"
,
params
.
get
(
"type"
));
}
IPage
<
LogisticsEntity
>
page
=
this
.
page
(
new
Query
<
LogisticsEntity
>().
getPage
(
params
),
new
QueryWrapper
<
LogisticsEntity
>()
);
return
new
PageUtils
(
page
);
}
}
\ No newline at end of file
src/main/resources/mapper/manage/LogisticsDao.xml
0 → 100644
View file @
6d4c6ebe
<?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.LogisticsDao"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"io.office.modules.manage.entity.LogisticsEntity"
id=
"logisticsMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"title"
column=
"title"
/>
<result
property=
"type"
column=
"type"
/>
<result
property=
"level"
column=
"level"
/>
<result
property=
"jumppath"
column=
"jumppath"
/>
<result
property=
"keyword"
column=
"keyword"
/>
<result
property=
"source"
column=
"source"
/>
<result
property=
"author"
column=
"author"
/>
<result
property=
"releasetime"
column=
"releaseTime"
/>
<result
property=
"implementationtime"
column=
"implementationTime"
/>
<result
property=
"remarks"
column=
"remarks"
/>
<result
property=
"content"
column=
"content"
/>
<result
property=
"inputdate"
column=
"inputDate"
/>
</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