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
f25bddba
Commit
f25bddba
authored
Nov 21, 2021
by
rongkailun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】图片资讯列表添加id
parent
abb54dda
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
49 additions
and
12 deletions
+49
-12
MedicalController.java
...o/office/modules/manage/controller/MedicalController.java
+12
-10
MedicalDao.java
src/main/java/io/office/modules/manage/dao/MedicalDao.java
+7
-1
MedicalEntity.java
...n/java/io/office/modules/manage/entity/MedicalEntity.java
+7
-1
MedicalService.java
...java/io/office/modules/manage/service/MedicalService.java
+4
-0
MedicalServiceImpl.java
...ffice/modules/manage/service/impl/MedicalServiceImpl.java
+13
-0
MedicalDao.xml
src/main/resources/mapper/manage/MedicalDao.xml
+5
-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
View file @
f25bddba
package
io
.
office
.
modules
.
manage
.
controller
;
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.util.Arrays
;
import
java.util.*
;
import
java.util.Map
;
import
io.office.modules.manage.entity.MedicalEntity
;
import
io.office.modules.manage.entity.MedicalEntity
;
import
io.office.modules.manage.service.MedicalService
;
import
io.office.modules.manage.service.MedicalService
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.*
;
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.common.utils.PageUtils
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
import
io.office.common.utils.R
;
...
@@ -60,9 +55,10 @@ public class MedicalController {
...
@@ -60,9 +55,10 @@ public class MedicalController {
@RequestMapping
(
"/save"
)
@RequestMapping
(
"/save"
)
// @RequiresPermissions("manage:medical:save")
// @RequiresPermissions("manage:medical:save")
public
R
save
(
@RequestBody
MedicalEntity
medical
){
public
R
save
(
@RequestBody
MedicalEntity
medical
){
medicalService
.
save
(
medical
);
medical
.
setId
(
UUID
.
randomUUID
().
toString
());
medical
.
setInputDate
(
new
Date
());
return
R
.
ok
();
// medicalService.insertMedical(medical);
return
R
.
ok
(
"新增成功!"
);
}
}
/**
/**
...
@@ -87,4 +83,10 @@ public class MedicalController {
...
@@ -87,4 +83,10 @@ public class MedicalController {
return
R
.
ok
();
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
View file @
f25bddba
...
@@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
io.office.modules.manage.entity.MedicalEntity
;
import
io.office.modules.manage.entity.MedicalEntity
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* ${comments}
* ${comments}
*
*
...
@@ -13,5 +16,8 @@ import org.apache.ibatis.annotations.Mapper;
...
@@ -13,5 +16,8 @@ import org.apache.ibatis.annotations.Mapper;
*/
*/
@Mapper
@Mapper
public
interface
MedicalDao
extends
BaseMapper
<
MedicalEntity
>
{
public
interface
MedicalDao
extends
BaseMapper
<
MedicalEntity
>
{
List
<
Map
<
String
,
Object
>>
getMedicalTypeList
();
}
}
src/main/java/io/office/modules/manage/entity/MedicalEntity.java
View file @
f25bddba
...
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableName;
...
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableName;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
lombok.Data
;
/**
/**
...
@@ -23,7 +25,7 @@ public class MedicalEntity implements Serializable {
...
@@ -23,7 +25,7 @@ public class MedicalEntity implements Serializable {
* $column.comments
* $column.comments
*/
*/
@TableId
@TableId
private
Integer
id
;
private
String
id
;
/**
/**
* $column.comments
* $column.comments
*/
*/
...
@@ -55,10 +57,12 @@ public class MedicalEntity implements Serializable {
...
@@ -55,10 +57,12 @@ public class MedicalEntity implements Serializable {
/**
/**
* $column.comments
* $column.comments
*/
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
releasetime
;
private
Date
releasetime
;
/**
/**
* $column.comments
* $column.comments
*/
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
implementationtime
;
private
Date
implementationtime
;
/**
/**
* $column.comments
* $column.comments
...
@@ -69,4 +73,6 @@ public class MedicalEntity implements Serializable {
...
@@ -69,4 +73,6 @@ public class MedicalEntity implements Serializable {
*/
*/
private
String
content
;
private
String
content
;
private
Date
inputDate
;
}
}
src/main/java/io/office/modules/manage/service/MedicalService.java
View file @
f25bddba
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.PageUtils
;
import
io.office.modules.manage.entity.MedicalEntity
;
import
io.office.modules.manage.entity.MedicalEntity
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -16,5 +17,8 @@ import java.util.Map;
...
@@ -16,5 +17,8 @@ import java.util.Map;
public
interface
MedicalService
extends
IService
<
MedicalEntity
>
{
public
interface
MedicalService
extends
IService
<
MedicalEntity
>
{
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
List
<
Map
<
String
,
Object
>>
getMedicalTypeList
();
}
}
src/main/java/io/office/modules/manage/service/impl/MedicalServiceImpl.java
View file @
f25bddba
...
@@ -3,7 +3,10 @@ package io.office.modules.manage.service.impl;
...
@@ -3,7 +3,10 @@ package io.office.modules.manage.service.impl;
import
io.office.modules.manage.dao.MedicalDao
;
import
io.office.modules.manage.dao.MedicalDao
;
import
io.office.modules.manage.entity.MedicalEntity
;
import
io.office.modules.manage.entity.MedicalEntity
;
import
io.office.modules.manage.service.MedicalService
;
import
io.office.modules.manage.service.MedicalService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
@@ -16,6 +19,9 @@ import io.office.common.utils.Query;
...
@@ -16,6 +19,9 @@ import io.office.common.utils.Query;
@Service
(
"medicalService"
)
@Service
(
"medicalService"
)
public
class
MedicalServiceImpl
extends
ServiceImpl
<
MedicalDao
,
MedicalEntity
>
implements
MedicalService
{
public
class
MedicalServiceImpl
extends
ServiceImpl
<
MedicalDao
,
MedicalEntity
>
implements
MedicalService
{
@Autowired
MedicalDao
medicalDao
;
@Override
@Override
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
IPage
<
MedicalEntity
>
page
=
this
.
page
(
IPage
<
MedicalEntity
>
page
=
this
.
page
(
...
@@ -26,4 +32,10 @@ public class MedicalServiceImpl extends ServiceImpl<MedicalDao, MedicalEntity> i
...
@@ -26,4 +32,10 @@ public class MedicalServiceImpl extends ServiceImpl<MedicalDao, MedicalEntity> i
return
new
PageUtils
(
page
);
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
View file @
f25bddba
...
@@ -17,7 +17,11 @@
...
@@ -17,7 +17,11 @@
<result
property=
"implementationtime"
column=
"implementationTime"
/>
<result
property=
"implementationtime"
column=
"implementationTime"
/>
<result
property=
"remarks"
column=
"remarks"
/>
<result
property=
"remarks"
column=
"remarks"
/>
<result
property=
"content"
column=
"content"
/>
<result
property=
"content"
column=
"content"
/>
<result
property=
"inputDate"
column=
"inputDate"
/>
</resultMap>
</resultMap>
<select
id=
"getMedicalTypeList"
resultType=
"java.util.Map"
>
select * from medical_type t
</select>
</mapper>
</mapper>
\ No newline at end of file
src/main/resources/mapper/manage/PictureDao.xml
View file @
f25bddba
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
<select
id=
"selectPictureList"
resultMap=
"pictureMap"
parameterType=
"io.office.modules.manage.entity.dto.PictureParams"
>
<select
id=
"selectPictureList"
resultMap=
"pictureMap"
parameterType=
"io.office.modules.manage.entity.dto.PictureParams"
>
SELECT
SELECT
t.pictureID,
t.title,
t.title,
t.Picture_type,
t.Picture_type,
t.showtime,
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