Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
V
volunteer_service
Project
Project
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
licc
volunteer_service
Commits
ebf8e92d
Commit
ebf8e92d
authored
Jan 22, 2021
by
licc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
excel 上传提交
parent
56371e55
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
97 additions
and
57 deletions
+97
-57
PayRecordMapper.xml
...ergy-mapper/src/main/resources/mapper/PayRecordMapper.xml
+11
-10
SchemeMapper.xml
wisenergy-mapper/src/main/resources/mapper/SchemeMapper.xml
+2
-1
PayRecord.java
...model/src/main/java/cn/wisenergy/model/app/PayRecord.java
+1
-1
SchemeInfo.java
...odel/src/main/java/cn/wisenergy/model/app/SchemeInfo.java
+3
-1
Volunteer.java
...model/src/main/java/cn/wisenergy/model/app/Volunteer.java
+2
-2
VolunteerService.java
.../main/java/cn/wisenergy/service/app/VolunteerService.java
+3
-0
VolunteerServiceImpl.java
...a/cn/wisenergy/service/app/impl/VolunteerServiceImpl.java
+36
-10
VolunteerListener.java
...n/java/cn/wisenergy/service/common/VolunteerListener.java
+26
-28
SchemeController.java
.../wisenergy/web/admin/controller/app/SchemeController.java
+13
-4
No files found.
wisenergy-mapper/src/main/resources/mapper/PayRecordMapper.xml
View file @
ebf8e92d
...
@@ -6,10 +6,10 @@
...
@@ -6,10 +6,10 @@
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"user_id"
property=
"userId"
/>
<result
column=
"user_id"
property=
"userId"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"card_
number"
property=
"cardNumber
"
/>
<result
column=
"card_
id"
property=
"cardId
"
/>
<result
column=
"money"
property=
"money"
/>
<result
column=
"money"
property=
"money"
/>
<result
column=
"result"
property=
"result"
/>
<result
column=
"result"
property=
"result"
/>
<result
column=
"
limit"
property=
"l
imit"
/>
<result
column=
"
pay_limit"
property=
"payL
imit"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
</resultMap>
</resultMap>
...
@@ -24,20 +24,20 @@
...
@@ -24,20 +24,20 @@
</sql>
</sql>
<sql
id=
"cols_exclude_id"
>
<sql
id=
"cols_exclude_id"
>
user_id,type, card_id,money,result,limit, create_time,update_time
user_id,type, card_id,money,result,
pay_
limit, create_time,update_time
</sql>
</sql>
<sql
id=
"vals"
>
<sql
id=
"vals"
>
#{userId},#{type},#{card
Number},#{money},#{result},#{l
imit},now(),now()
#{userId},#{type},#{card
Id},#{money},#{result},#{payL
imit},now(),now()
</sql>
</sql>
<sql
id=
"updateCondition"
>
<sql
id=
"updateCondition"
>
<if
test=
"userId != null"
>
user_id = #{userId},
</if>
<if
test=
"userId != null"
>
user_id = #{userId},
</if>
<if
test=
"type != null"
>
type =#{type},
</if>
<if
test=
"type != null"
>
type =#{type},
</if>
<if
test=
"card
Number != null"
>
card_number =#{cardNumber
},
</if>
<if
test=
"card
Id != null"
>
card_id =#{cardId
},
</if>
<if
test=
"money != null"
>
money =#{money},
</if>
<if
test=
"money != null"
>
money =#{money},
</if>
<if
test=
"result != null"
>
result =#{result},
</if>
<if
test=
"result != null"
>
result =#{result},
</if>
<if
test=
"
limit != null"
>
limit =#{l
imit},
</if>
<if
test=
"
payLimit != null"
>
pay_limit =#{payL
imit},
</if>
update_time =now()
update_time =now()
</sql>
</sql>
...
@@ -45,10 +45,10 @@
...
@@ -45,10 +45,10 @@
<if
test=
"id != null"
>
id = #{id}
</if>
<if
test=
"id != null"
>
id = #{id}
</if>
<if
test=
"userId != null"
>
and user_id = #{userId}
</if>
<if
test=
"userId != null"
>
and user_id = #{userId}
</if>
<if
test=
"type != null"
>
and type =#{type}
</if>
<if
test=
"type != null"
>
and type =#{type}
</if>
<if
test=
"card
Number != null"
>
and card_number =#{cardNumber
}
</if>
<if
test=
"card
Id != null"
>
and card_id =#{cardId
}
</if>
<if
test=
"money != null"
>
and money =#{money}
</if>
<if
test=
"money != null"
>
and money =#{money}
</if>
<if
test=
"result != null"
>
and result =#{result}
</if>
<if
test=
"result != null"
>
and result =#{result}
</if>
<if
test=
"
limit != null"
>
and limit =#{l
imit}
</if>
<if
test=
"
payLimit != null"
>
and pay_limit =#{payL
imit}
</if>
<if
test=
"createTime != null"
>
and create_time
>
= #{createTime}
</if>
<if
test=
"createTime != null"
>
and create_time
>
= #{createTime}
</if>
<if
test=
"updateTime != null"
>
and #{updateTime}
>
= update_time
</if>
<if
test=
"updateTime != null"
>
and #{updateTime}
>
= update_time
</if>
</sql>
</sql>
...
@@ -62,15 +62,16 @@
...
@@ -62,15 +62,16 @@
)
)
</insert>
</insert>
<select
id=
"getList"
resultType=
"cn.wisenergy.model.vo.PayRecordShowVo"
>
<select
id=
"getList"
resultType=
"cn.wisenergy.model.vo.PayRecordShowVo"
>
select id as recordId,type,result,limit,create_time as payTime
select
<include
refid=
"cols_all"
/>
from
from
<include
refid=
"table"
/>
<include
refid=
"table"
/>
<where>
<where>
<if
test=
"userId != null"
>
<if
test=
"userId != null"
>
user_id=#{userId}
user_id=#{userId}
</if>
</if>
limit #{startNum},#{endNum}
order by create_time desc
order by create_time desc
limit #{startNum},#{endNum}
</where>
</where>
</select>
</select>
...
...
wisenergy-mapper/src/main/resources/mapper/SchemeMapper.xml
View file @
ebf8e92d
...
@@ -47,7 +47,8 @@
...
@@ -47,7 +47,8 @@
<if
test=
"updateTime != null"
>
and #{updateTime}
>
= update_time
</if>
<if
test=
"updateTime != null"
>
and #{updateTime}
>
= update_time
</if>
</sql>
</sql>
<insert
id=
"add"
parameterType=
"cn.wisenergy.model.app.SchemeInfo"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
<insert
id=
"add"
parameterType=
"cn.wisenergy.model.app.SchemeInfo"
keyProperty=
"id"
keyColumn=
"id"
useGeneratedKeys=
"true"
>
insert into
insert into
<include
refid=
"table"
/>
<include
refid=
"table"
/>
(
<include
refid=
"cols_exclude_id"
/>
)
(
<include
refid=
"cols_exclude_id"
/>
)
...
...
wisenergy-model/src/main/java/cn/wisenergy/model/app/PayRecord.java
View file @
ebf8e92d
...
@@ -56,7 +56,7 @@ public class PayRecord implements Serializable {
...
@@ -56,7 +56,7 @@ public class PayRecord implements Serializable {
* 充值次数
* 充值次数
*/
*/
@ApiModelProperty
(
value
=
"充值次数"
,
name
=
"limit"
)
@ApiModelProperty
(
value
=
"充值次数"
,
name
=
"limit"
)
private
Integer
l
imit
;
private
Integer
payL
imit
;
/**
/**
* 创建时间
* 创建时间
...
...
wisenergy-model/src/main/java/cn/wisenergy/model/app/SchemeInfo.java
View file @
ebf8e92d
...
@@ -4,6 +4,7 @@ import cn.wisenergy.model.common.BaseEntity;
...
@@ -4,6 +4,7 @@ import cn.wisenergy.model.common.BaseEntity;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -11,8 +12,9 @@ import java.util.Date;
...
@@ -11,8 +12,9 @@ import java.util.Date;
/**
/**
* @author 86187
* @author 86187
*/
*/
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
@Data
@ApiModel
(
value
=
"SchemeIn
n
fo"
)
@ApiModel
(
value
=
"SchemeInfo"
)
public
class
SchemeInfo
extends
BaseEntity
implements
Serializable
{
public
class
SchemeInfo
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
7020644673356401949L
;
private
static
final
long
serialVersionUID
=
7020644673356401949L
;
/**
/**
...
...
wisenergy-model/src/main/java/cn/wisenergy/model/app/Volunteer.java
View file @
ebf8e92d
...
@@ -92,8 +92,8 @@ public class Volunteer extends BaseEntity implements Serializable {
...
@@ -92,8 +92,8 @@ public class Volunteer extends BaseEntity implements Serializable {
/**
/**
* 计划投档数
* 计划投档数
*/
*/
@ApiModelProperty
(
value
=
"
计划投档
数"
,
name
=
"castArchivesNum"
)
@ApiModelProperty
(
value
=
"
投档计划
数"
,
name
=
"castArchivesNum"
)
@ExcelProperty
(
value
=
"
计划投档
数"
)
@ExcelProperty
(
value
=
"
投档计划
数"
)
private
Integer
castArchivesNum
;
private
Integer
castArchivesNum
;
/**
/**
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/VolunteerService.java
View file @
ebf8e92d
package
cn
.
wisenergy
.
service
.
app
;
package
cn
.
wisenergy
.
service
.
app
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.model.app.SchemeInfo
;
import
cn.wisenergy.model.app.Volunteer
;
import
cn.wisenergy.model.app.Volunteer
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
...
@@ -38,4 +39,6 @@ public interface VolunteerService extends IService<Volunteer> {
...
@@ -38,4 +39,6 @@ public interface VolunteerService extends IService<Volunteer> {
* @throws IOException 异常
* @throws IOException 异常
*/
*/
void
ceshi
(
MultipartFile
file
,
HttpServletResponse
response
)
throws
IOException
;
void
ceshi
(
MultipartFile
file
,
HttpServletResponse
response
)
throws
IOException
;
R
<
SchemeInfo
>
add
(
SchemeInfo
schemeInfo
);
}
}
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/VolunteerServiceImpl.java
View file @
ebf8e92d
...
@@ -36,6 +36,9 @@ public class VolunteerServiceImpl extends ServiceImpl<VolunteerMapper, Volunteer
...
@@ -36,6 +36,9 @@ public class VolunteerServiceImpl extends ServiceImpl<VolunteerMapper, Volunteer
@Autowired
@Autowired
private
SchemeMapper
schemeMapper
;
private
SchemeMapper
schemeMapper
;
@Autowired
private
VolunteerService
volunteerService
;
@Override
@Override
public
R
<
Boolean
>
batchAdd
(
List
<
Volunteer
>
list
)
{
public
R
<
Boolean
>
batchAdd
(
List
<
Volunteer
>
list
)
{
return
null
;
return
null
;
...
@@ -52,15 +55,20 @@ public class VolunteerServiceImpl extends ServiceImpl<VolunteerMapper, Volunteer
...
@@ -52,15 +55,20 @@ public class VolunteerServiceImpl extends ServiceImpl<VolunteerMapper, Volunteer
if
(!
valid
)
{
if
(!
valid
)
{
throw
new
BaseException
(
"请传入Excel文件"
);
throw
new
BaseException
(
"请传入Excel文件"
);
}
}
VolunteerListener
excelListener
=
new
VolunteerListener
();
//1、保存方案信息
//2.读取数据进行入库操作
EasyExcel
.
read
(
file
.
getInputStream
(),
Volunteer
.
class
,
new
VolunteerListener
()).
sheet
().
doRead
();
List
<
Volunteer
>
list
=
excelListener
.
getList
();
//3、保存方案和志愿信息
SchemeInfo
schemeInfo
=
new
SchemeInfo
();
SchemeInfo
schemeInfo
=
new
SchemeInfo
();
schemeInfo
.
setSchemeName
(
schemeName
);
schemeInfo
.
setSchemeName
(
schemeName
);
schemeInfo
.
setType
(
type
);
schemeInfo
.
setType
(
type
);
schemeInfo
.
setUploadTime
(
new
Date
());
schemeInfo
.
setUploadTime
(
new
Date
());
schemeInfo
.
setIsDelete
(
0
);
schemeInfo
.
setIsDelete
(
0
);
saveSchemeAndVolunteer
(
schemeInfo
,
file
);
saveSchemeAndVolunteer
(
schemeInfo
,
list
);
}
}
@Override
@Override
...
@@ -69,33 +77,51 @@ public class VolunteerServiceImpl extends ServiceImpl<VolunteerMapper, Volunteer
...
@@ -69,33 +77,51 @@ public class VolunteerServiceImpl extends ServiceImpl<VolunteerMapper, Volunteer
throw
new
BaseException
(
"操作错误"
);
throw
new
BaseException
(
"操作错误"
);
}
}
VolunteerListener
excelListener
=
new
VolunteerListener
();
//判断文件类型=
//判断文件类型=
boolean
valid
=
this
.
validContentType
(
file
.
getOriginalFilename
());
boolean
valid
=
this
.
validContentType
(
file
.
getOriginalFilename
());
if
(!
valid
)
{
if
(!
valid
)
{
throw
new
BaseException
(
"请传入Excel文件"
);
throw
new
BaseException
(
"请传入Excel文件"
);
}
}
//2.读取数据进行入库操作
//2.读取数据进行入库操作
EasyExcel
.
read
(
file
.
getInputStream
(),
Volunteer
.
class
,
new
VolunteerListener
(
this
)).
sheet
().
doRead
();
EasyExcel
.
read
(
file
.
getInputStream
(),
Volunteer
.
class
,
excelListener
).
sheet
().
doRead
();
List
<
Volunteer
>
sult
=
excelListener
.
getList
();
log
.
info
(
"返回的excel集合:"
+
sult
);
log
.
info
(
"返回的excel集合:"
+
sult
);
for
(
Volunteer
volunteer
:
sult
)
{
}
}
@Override
public
R
<
SchemeInfo
>
add
(
SchemeInfo
schemeInfo
)
{
int
count
=
schemeMapper
.
add
(
schemeInfo
);
log
.
info
(
"返回对象:"
+
schemeInfo
);
int
id
=
schemeInfo
.
getId
();
log
.
info
(
"主键id:"
+
id
);
return
R
.
ok
(
schemeInfo
);
}
}
/**
/**
* 保存方案和志愿信息
* 保存方案和志愿信息
*
*
* @param schemeInfo 方案信息
* @param schemeInfo 方案信息
* @param file 志愿文件
* @param list 志愿信息
* @throws IOException 异常
*/
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
saveSchemeAndVolunteer
(
SchemeInfo
schemeInfo
,
MultipartFile
file
)
throws
IOException
{
public
void
saveSchemeAndVolunteer
(
SchemeInfo
schemeInfo
,
List
<
Volunteer
>
list
)
{
//1、保存方案信息
//1、保存方案信息
int
count
=
schemeMapper
.
add
(
schemeInfo
);
int
count
=
schemeMapper
.
insert
(
schemeInfo
);
if
(
count
==
0
)
{
if
(
count
==
0
)
{
throw
new
RuntimeException
(
"保存方案信息失败!"
);
throw
new
RuntimeException
(
"保存方案信息失败!"
);
}
}
//2.读取数据进行入库操作
//保存志愿信息
EasyExcel
.
read
(
file
.
getInputStream
(),
Volunteer
.
class
,
new
VolunteerListener
(
this
)).
sheet
().
doRead
();
for
(
Volunteer
volunteer
:
list
)
{
}
}
}
/**
/**
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/common/VolunteerListener.java
View file @
ebf8e92d
...
@@ -15,14 +15,13 @@ import java.util.stream.Collectors;
...
@@ -15,14 +15,13 @@ import java.util.stream.Collectors;
/**
/**
* Excel批量添加社区居民 监听器
* Excel批量添加社区居民 监听器
*
* @author 86187
*/
*/
@Slf4j
@Slf4j
public
class
VolunteerListener
extends
AnalysisEventListener
<
Volunteer
>
{
public
class
VolunteerListener
extends
AnalysisEventListener
<
Volunteer
>
{
private
List
<
Volunteer
>
list
;
private
List
<
Volunteer
>
list
=
new
ArrayList
<>();
private
VolunteerService
volunteerService
;
private
final
int
batch
=
50000
;
private
final
int
batch
=
50000
;
/**
/**
...
@@ -36,11 +35,6 @@ public class VolunteerListener extends AnalysisEventListener<Volunteer> {
...
@@ -36,11 +35,6 @@ public class VolunteerListener extends AnalysisEventListener<Volunteer> {
private
boolean
isCorrectFormat
=
true
;
private
boolean
isCorrectFormat
=
true
;
public
VolunteerListener
(
VolunteerService
volunteerService
)
{
this
.
volunteerService
=
volunteerService
;
list
=
new
ArrayList
<>();
}
/**
/**
* 这个每一条数据解析都会来调用 ==
* 这个每一条数据解析都会来调用 ==
*
*
...
@@ -56,6 +50,9 @@ public class VolunteerListener extends AnalysisEventListener<Volunteer> {
...
@@ -56,6 +50,9 @@ public class VolunteerListener extends AnalysisEventListener<Volunteer> {
log
.
info
(
"解析到一条志愿数据>>>>>>>>>>:{}"
,
volunteer
);
log
.
info
(
"解析到一条志愿数据>>>>>>>>>>:{}"
,
volunteer
);
//此处做校验 本次没有校验
//此处做校验 本次没有校验
if
(
volunteer
!=
null
)
{
if
(
volunteer
!=
null
)
{
volunteer
.
setIsDelete
(
0
);
volunteer
.
setCreateTime
(
new
Date
());
volunteer
.
setUpdateTime
(
new
Date
());
if
(
StringUtils
.
isEmpty
(
volunteer
.
getMajorName
()))
{
if
(
StringUtils
.
isEmpty
(
volunteer
.
getMajorName
()))
{
throw
new
RuntimeException
(
"专业不能为空!"
);
throw
new
RuntimeException
(
"专业不能为空!"
);
}
}
...
@@ -99,17 +96,6 @@ public class VolunteerListener extends AnalysisEventListener<Volunteer> {
...
@@ -99,17 +96,6 @@ public class VolunteerListener extends AnalysisEventListener<Volunteer> {
list
.
add
(
volunteer
);
list
.
add
(
volunteer
);
}
}
//每500条插入一次数据库
if
(
list
.
size
()
>=
batch
)
{
//判断数据库是否已有手机号的数据
log
.
info
(
"invoke批量插入志愿数据,条数为>>>>>>>>>>:{}"
,
list
.
size
());
if
(
list
.
size
()
>
0
)
{
volunteerService
.
saveBatch
(
list
);
}
//保存后清除,防止大量数据导致内存耗尽
list
.
clear
();
}
}
}
/**
/**
...
@@ -119,16 +105,28 @@ public class VolunteerListener extends AnalysisEventListener<Volunteer> {
...
@@ -119,16 +105,28 @@ public class VolunteerListener extends AnalysisEventListener<Volunteer> {
*/
*/
@Override
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
analysisContext
)
{
public
void
doAfterAllAnalysed
(
AnalysisContext
analysisContext
)
{
log
.
info
(
"doAfterAllAnalysed解析玩一个志愿sheet工作表>>>>>>>>>>"
);
// log.info("doAfterAllAnalysed解析玩一个志愿sheet工作表>>>>>>>>>>");
//如果集合不为空
// //如果集合不为空
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
// if (!CollectionUtils.isEmpty(list)) {
log
.
info
(
"批量插入志愿数据,条数为>>>>>>>>>>:{}"
,
list
.
size
());
// log.info("批量插入志愿数据,条数为>>>>>>>>>>:{}", list.size());
if
(
list
.
size
()
>
0
)
{
// if (list.size() > 0) {
volunteerService
.
saveBatch
(
list
);
// volunteerService.saveBatch(list);
// }
// }
}
}
public
List
<
Volunteer
>
getList
()
{
List
<
Volunteer
>
result
=
new
ArrayList
<>();
result
.
addAll
(
list
);
return
result
;
}
}
public
void
setList
(
List
<
Volunteer
>
list
)
{
this
.
list
=
list
;
}
}
/**
/**
* 校验导入模板表头是否正确
* 校验导入模板表头是否正确
*
*
...
...
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/SchemeController.java
View file @
ebf8e92d
...
@@ -2,13 +2,11 @@ package cn.wisenergy.web.admin.controller.app;
...
@@ -2,13 +2,11 @@ package cn.wisenergy.web.admin.controller.app;
import
cn.wisenergy.common.expection.BaseException
;
import
cn.wisenergy.common.expection.BaseException
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.model.app.Scheme
QueryRecord
;
import
cn.wisenergy.model.app.Scheme
Info
;
import
cn.wisenergy.model.vo.SchemeQueryVo
;
import
cn.wisenergy.model.vo.SchemeQueryVo
;
import
cn.wisenergy.model.vo.SchemeRecordQueryVo
;
import
cn.wisenergy.model.vo.VolunteerVo
;
import
cn.wisenergy.model.vo.VolunteerVo
;
import
cn.wisenergy.service.app.SchemeService
;
import
cn.wisenergy.service.app.SchemeService
;
import
cn.wisenergy.service.app.VolunteerService
;
import
cn.wisenergy.service.app.VolunteerService
;
import
com.github.pagehelper.PageInfo
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -22,6 +20,7 @@ import javax.servlet.http.HttpServletResponse;
...
@@ -22,6 +20,7 @@ import javax.servlet.http.HttpServletResponse;
import
java.io.IOException
;
import
java.io.IOException
;
/**
/**
* @author 86187
* @ Description: PC-方案
* @ Description: PC-方案
* @ Author : 86187
* @ Author : 86187
* @ Date : 2021/1/14 10:50
* @ Date : 2021/1/14 10:50
...
@@ -75,4 +74,14 @@ public class SchemeController {
...
@@ -75,4 +74,14 @@ public class SchemeController {
return
R
.
ok
(
"添加成功"
);
return
R
.
ok
(
"添加成功"
);
}
}
@ApiOperation
(
value
=
"测试主键自增"
,
notes
=
"测试主键自增"
)
@ApiImplicitParam
(
name
=
"schemeInfo"
,
value
=
"信息"
,
dataType
=
"SchemeInfo"
)
@PostMapping
(
"/add"
)
public
R
<
SchemeInfo
>
add
(
@RequestBody
SchemeInfo
schemeInfo
)
{
R
<
SchemeInfo
>
scheme
=
volunteerService
.
add
(
schemeInfo
);
log
.
info
(
"scheme:"
+
scheme
);
return
scheme
;
}
}
}
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