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
bae28f80
Commit
bae28f80
authored
Nov 21, 2021
by
吴迪
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
7a7b4fa1
f25bddba
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
288 additions
and
0 deletions
+288
-0
MedicalController.java
...o/office/modules/manage/controller/MedicalController.java
+92
-0
MedicalDao.java
src/main/java/io/office/modules/manage/dao/MedicalDao.java
+23
-0
MedicalEntity.java
...n/java/io/office/modules/manage/entity/MedicalEntity.java
+78
-0
MedicalService.java
...java/io/office/modules/manage/service/MedicalService.java
+24
-0
MedicalServiceImpl.java
...ffice/modules/manage/service/impl/MedicalServiceImpl.java
+42
-0
MedicalDao.xml
src/main/resources/mapper/manage/MedicalDao.xml
+28
-0
PictureDao.xml
src/main/resources/mapper/manage/PictureDao.xml
+1
-0
No files found.
src/main/java/io/office/modules/manage/controller/MedicalController.java
0 → 100644
View file @
bae28f80
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.util.*
;
import
io.office.modules.manage.entity.MedicalEntity
;
import
io.office.modules.manage.service.MedicalService
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-11-21 12:15:48
*/
@RestController
@RequestMapping
(
"/medical"
)
public
class
MedicalController
{
@Autowired
private
MedicalService
medicalService
;
/**
* 列表
*/
@RequestMapping
(
"/list"
)
// @RequiresPermissions("manage:medical:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
PageUtils
page
=
medicalService
.
queryPage
(
params
);
return
R
.
ok
().
put
(
"page"
,
page
);
}
/**
* 信息
*/
@RequestMapping
(
"/info/{id}"
)
// @RequiresPermissions("manage:medical:info")
public
R
info
(
@PathVariable
(
"id"
)
Integer
id
){
MedicalEntity
medical
=
medicalService
.
getById
(
id
);
return
R
.
ok
().
put
(
"medical"
,
medical
);
}
/**
* 保存
*/
@RequestMapping
(
"/save"
)
// @RequiresPermissions("manage:medical:save")
public
R
save
(
@RequestBody
MedicalEntity
medical
){
medical
.
setId
(
UUID
.
randomUUID
().
toString
());
medical
.
setInputDate
(
new
Date
());
// medicalService.insertMedical(medical);
return
R
.
ok
(
"新增成功!"
);
}
/**
* 修改
*/
@RequestMapping
(
"/update"
)
// @RequiresPermissions("manage:medical:update")
public
R
update
(
@RequestBody
MedicalEntity
medical
){
medicalService
.
updateById
(
medical
);
return
R
.
ok
();
}
/**
* 删除
*/
@RequestMapping
(
"/delete"
)
// @RequiresPermissions("manage:medical:delete")
public
R
delete
(
@RequestBody
Integer
[]
ids
){
medicalService
.
removeByIds
(
Arrays
.
asList
(
ids
));
return
R
.
ok
();
}
@GetMapping
(
"/getMedicalTypeList"
)
public
R
getMedicalTypeList
(){
List
<
Map
<
String
,
Object
>>
list
=
medicalService
.
getMedicalTypeList
();
return
R
.
ok
().
put
(
"list"
,
list
);
}
}
src/main/java/io/office/modules/manage/dao/MedicalDao.java
0 → 100644
View file @
bae28f80
package
io
.
office
.
modules
.
manage
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
io.office.modules.manage.entity.MedicalEntity
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
import
java.util.Map
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-11-21 12:15:48
*/
@Mapper
public
interface
MedicalDao
extends
BaseMapper
<
MedicalEntity
>
{
List
<
Map
<
String
,
Object
>>
getMedicalTypeList
();
}
src/main/java/io/office/modules/manage/entity/MedicalEntity.java
0 → 100644
View file @
bae28f80
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
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
/**
* ${comments}
*
* @author rkl
* @email
* @date 2021-11-21 12:15:48
*/
@Data
@TableName
(
"medical"
)
public
class
MedicalEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* $column.comments
*/
@TableId
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:mm: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
;
private
Date
inputDate
;
}
src/main/java/io/office/modules/manage/service/MedicalService.java
0 → 100644
View file @
bae28f80
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.MedicalEntity
;
import
java.util.List
;
import
java.util.Map
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-11-21 12:15:48
*/
public
interface
MedicalService
extends
IService
<
MedicalEntity
>
{
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
List
<
Map
<
String
,
Object
>>
getMedicalTypeList
();
}
src/main/java/io/office/modules/manage/service/impl/MedicalServiceImpl.java
0 → 100644
View file @
bae28f80
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
io.office.modules.manage.dao.MedicalDao
;
import
io.office.modules.manage.entity.MedicalEntity
;
import
io.office.modules.manage.service.MedicalService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
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
;
@Service
(
"medicalService"
)
public
class
MedicalServiceImpl
extends
ServiceImpl
<
MedicalDao
,
MedicalEntity
>
implements
MedicalService
{
@Autowired
MedicalDao
medicalDao
;
@Override
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
IPage
<
MedicalEntity
>
page
=
this
.
page
(
new
Query
<
MedicalEntity
>().
getPage
(
params
),
new
QueryWrapper
<
MedicalEntity
>()
);
return
new
PageUtils
(
page
);
}
@Override
public
List
<
Map
<
String
,
Object
>>
getMedicalTypeList
()
{
List
<
Map
<
String
,
Object
>>
list
=
this
.
medicalDao
.
getMedicalTypeList
();
return
list
;
}
}
\ No newline at end of file
src/main/resources/mapper/manage/MedicalDao.xml
0 → 100644
View file @
bae28f80
<?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.MedicalDao"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"io.office.modules.manage.entity.MedicalEntity"
id=
"medicalMap"
>
<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>
<select
id=
"getMedicalTypeList"
resultType=
"java.util.Map"
>
select * from medical_type t
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapper/manage/PictureDao.xml
View file @
bae28f80
...
...
@@ -25,6 +25,7 @@
<select
id=
"selectPictureList"
resultMap=
"pictureMap"
parameterType=
"io.office.modules.manage.entity.dto.PictureParams"
>
SELECT
t.pictureID,
t.title,
t.Picture_type,
t.showtime,
...
...
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