Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
education
Project
Project
Details
Activity
Releases
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
李丛阳
education
Commits
6fbc4c7a
Commit
6fbc4c7a
authored
Dec 10, 2019
by
luzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
积分字段int改string
parent
00ebe2b9
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
24 additions
and
20 deletions
+24
-20
edu_modify_lesson_value.sql
sql/edu_modify_lesson_value.sql
+5
-0
BLesson.java
...ain/java/org/rcisoft/business/blesson/entity/BLesson.java
+2
-2
BLessonPersonServiceImpl.java
...siness/blesson/service/impl/BLessonPersonServiceImpl.java
+2
-2
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+5
-5
BPersonValue.java
...rg/rcisoft/business/bpersonvalue/entity/BPersonValue.java
+1
-1
BPersonValueServiceImpl.java
...ss/bpersonvalue/service/impl/BPersonValueServiceImpl.java
+1
-2
BReleaseValue.java
.../rcisoft/business/breleasevalue/entity/BReleaseValue.java
+2
-2
BReleaseValueServiceImpl.java
.../breleasevalue/service/impl/BReleaseValueServiceImpl.java
+6
-6
No files found.
sql/edu_modify_lesson_value.sql
0 → 100644
View file @
6fbc4c7a
#
修改
blesson
value
ALTER
table
b_lesson
modify
column
value_consume
VARCHAR
(
16
);
ALTER
table
b_lesson
modify
column
value_gain
VARCHAR
(
16
);
#
修改
b_lesson_person
value
ALTER
table
b_lesson_person
modify
column
`value`
VARCHAR
(
16
);
\ No newline at end of file
src/main/java/org/rcisoft/business/blesson/entity/BLesson.java
View file @
6fbc4c7a
...
...
@@ -108,10 +108,10 @@ public class BLesson extends IdEntity<BLesson> {
private
String
hotNumber
;
@ApiModelProperty
(
value
=
"消耗积分"
)
private
Integer
valueConsume
;
private
String
valueConsume
;
@ApiModelProperty
(
value
=
"获得积分"
)
private
Integer
valueGain
;
private
String
valueGain
;
@ApiModelProperty
(
value
=
"更新积分日期"
)
private
Date
valueUpdateDate
;
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonPersonServiceImpl.java
View file @
6fbc4c7a
...
...
@@ -325,7 +325,7 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
line
=
bLessonPersonRepository
.
updateByPrimaryKeySelective
(
bLessonPersonReal
);
//扣除对应积分 添加用户积分详情 更新用户积分
//增加用户积分详情
if
(
bLesson
.
getValueConsume
()
!=
null
&&
bLesson
.
getValueConsume
()
!=
0
&&
!
curUser
.
getUserId
().
equals
(
bLesson
.
getLecturerId
())){
if
(
bLesson
.
getValueConsume
()
!=
null
&&
!
"0"
.
equals
(
bLesson
.
getValueConsume
())
&&
!
curUser
.
getUserId
().
equals
(
bLesson
.
getLecturerId
())){
BPersonValue
bPersonValue
=
new
BPersonValue
(
curUser
.
getUserId
(),
"学习"
+
bLesson
.
getLessonName
()+
"课程"
,
bLesson
.
getValueConsume
(),
"1"
);
bLessonServiceImpl
.
addValueEvent
(
curUser
.
getUserId
(),
bPersonValue
,
userInfo
.
getLockNum
());
}
...
...
@@ -343,7 +343,7 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
//扣除对应积分 添加用户积分详情 更新用户积分
//增加用户积分详情
//积分变化后 s_user表中value字段重新统计
if
(
bLesson
.
getValueConsume
()
!=
null
&&
bLesson
.
getValueConsume
()
!=
0
&&
!
curUser
.
getUserId
().
equals
(
bLesson
.
getLecturerId
())){
if
(
bLesson
.
getValueConsume
()
!=
null
&&
!
"0"
.
equals
(
bLesson
.
getValueConsume
())
&&
!
curUser
.
getUserId
().
equals
(
bLesson
.
getLecturerId
())){
BPersonValue
bPersonValue
=
new
BPersonValue
(
curUser
.
getUserId
(),
"学习"
+
bLesson
.
getLessonName
()+
"课程"
,
bLesson
.
getValueConsume
(),
"1"
);
bLessonServiceImpl
.
addValueEvent
(
curUser
.
getUserId
(),
bPersonValue
,
userInfo
.
getLockNum
());
}
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
6fbc4c7a
...
...
@@ -1194,14 +1194,14 @@ public class BLessonServiceImpl implements BLessonService {
if
(
userInfo
==
null
)
{
throw
new
ServiceException
(
ResultServiceEnums
.
COMPANY_NOT_EXISTS
);
}
if
(
bLesson
.
getValueConsume
()
!=
null
&&
bLesson
.
getValueConsume
()
!=
0
&&
Integer
.
parseInt
(
userInfo
.
getValue
())
<
bLesson
.
getValueConsume
(
)
&&
!
curUser
.
getUserId
().
equals
(
bLesson
.
getLecturerId
()))
{
if
(
bLesson
.
getValueConsume
()
!=
null
&&
!
"0"
.
equals
(
bLesson
.
getValueConsume
())
&&
Integer
.
parseInt
(
userInfo
.
getValue
())
<
Integer
.
parseInt
(
bLesson
.
getValueConsume
()
)
&&
!
curUser
.
getUserId
().
equals
(
bLesson
.
getLecturerId
()))
{
throw
new
ServiceException
(
ResultServiceEnums
.
VALUE_NOT_ENOUGH
);
}
int
line
=
bLessonPersonRepository
.
updateByPrimaryKeySelective
(
person
);
//TODO 更新用户积分明细表 重进计算积分
//扣除对应积分 添加用户积分详情 更新用户积分
//增加用户积分详情
if
(
bLesson
.
getValueConsume
()
!=
null
&&
bLesson
.
getValueConsume
()
!=
0
&&
!
curUser
.
getUserId
().
equals
(
bLesson
.
getLecturerId
()))
{
if
(
bLesson
.
getValueConsume
()
!=
null
&&
!
"0"
.
equals
(
bLesson
.
getValueConsume
())
&&
!
curUser
.
getUserId
().
equals
(
bLesson
.
getLecturerId
()))
{
BPersonValue
bPersonValue
=
new
BPersonValue
(
curUser
.
getUserId
(),
"报名"
+
bLesson
.
getLessonName
()+
"培训"
,
bLesson
.
getValueConsume
(),
"1"
);
addValueEvent
(
curUser
.
getUserId
(),
bPersonValue
,
userInfo
.
getLockNum
());
}
...
...
@@ -1225,14 +1225,14 @@ public class BLessonServiceImpl implements BLessonService {
if
(
userInfo
==
null
)
{
throw
new
ServiceException
(
ResultServiceEnums
.
COMPANY_NOT_EXISTS
);
}
if
(
bLesson
.
getValueConsume
()
!=
null
&&
bLesson
.
getValueConsume
()
!=
0
&&
Integer
.
parseInt
(
userInfo
.
getValue
())
<
bLesson
.
getValueConsume
(
))
{
if
(
bLesson
.
getValueConsume
()
!=
null
&&
!
"0"
.
equals
(
bLesson
.
getValueConsume
())
&&
Integer
.
parseInt
(
userInfo
.
getValue
())
<
Integer
.
parseInt
(
bLesson
.
getValueConsume
()
))
{
throw
new
ServiceException
(
ResultServiceEnums
.
VALUE_NOT_ENOUGH
);
}
int
line
=
this
.
trainInsert
(
"0"
,
bLesson
,
bLessonPersons
);
//TODO 更新用户积分明细表 重进计算积分
//扣除对应积分 添加用户积分详情 更新用户积分
//增加用户积分详情
if
(
bLesson
.
getValueConsume
()
!=
null
&&
bLesson
.
getValueConsume
()
!=
0
&&
!
curUser
.
getUserId
().
equals
(
bLesson
.
getLecturerId
()))
{
if
(
bLesson
.
getValueConsume
()
!=
null
&&
!
"0"
.
equals
(
bLesson
.
getValueConsume
())
&&
!
curUser
.
getUserId
().
equals
(
bLesson
.
getLecturerId
()))
{
BPersonValue
bPersonValue
=
new
BPersonValue
(
curUser
.
getUserId
(),
"报名"
+
bLesson
.
getLessonName
()+
"培训"
,
bLesson
.
getValueConsume
(),
"1"
);
addValueEvent
(
curUser
.
getUserId
(),
bPersonValue
,
userInfo
.
getLockNum
());
}
...
...
@@ -1626,7 +1626,7 @@ public class BLessonServiceImpl implements BLessonService {
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
,
rollbackFor
=
Exception
.
class
)
public
void
addValueEvent
(
String
personId
,
BPersonValue
bPersonValue
,
Integer
lockNum
)
{
if
(
StringUtils
.
isNotEmpty
(
personId
)
&&
bPersonValue
!=
null
&&
bPersonValue
.
getValue
()
!=
null
&&
bPersonValue
.
getValue
()
!=
0
)
{
if
(
StringUtils
.
isNotEmpty
(
personId
)
&&
bPersonValue
!=
null
&&
bPersonValue
.
getValue
()
!=
null
&&
!
"0"
.
equals
(
bPersonValue
.
getValue
())
)
{
log
.
debug
(
"-----------------正在设置积分详情-------------------"
);
UserUtil
.
setCurrentPersistOperation
(
bPersonValue
);
bPersonValueRepository
.
add
(
bPersonValue
);
...
...
src/main/java/org/rcisoft/business/bpersonvalue/entity/BPersonValue.java
View file @
6fbc4c7a
...
...
@@ -25,7 +25,7 @@ public class BPersonValue extends IdEntity<BPersonValue> {
private
String
event
;
private
Integer
value
;
private
String
value
;
private
String
type
;
...
...
src/main/java/org/rcisoft/business/bpersonvalue/service/impl/BPersonValueServiceImpl.java
View file @
6fbc4c7a
...
...
@@ -40,7 +40,6 @@ public class BPersonValueServiceImpl implements BPersonValueService {
@Autowired
private
SysUserMapper
sysUserMapper
;
@Override
public
List
<
BPersonValue
>
queryByPagination
(
PageUtil
pageUtil
,
CurUser
curUser
,
PersonValueClientDto
dto
)
{
if
(
dto
.
getBusinessId
()
==
null
||
""
.
equals
(
dto
.
getBusinessId
())){
...
...
@@ -61,7 +60,7 @@ public class BPersonValueServiceImpl implements BPersonValueService {
UserUtil
.
setCurrentPersistOperation
(
bPersonValue
);
try
{
bPersonValue
.
setValue
(
Integer
.
parseInt
(
personValueDto
.
getValue
().
trim
()
));
bPersonValue
.
setValue
(
personValueDto
.
getValue
().
trim
(
));
}
catch
(
Exception
e
){
throw
new
ServiceException
(
ResultServiceEnums
.
NUM_IS_ERROR
);
}
...
...
src/main/java/org/rcisoft/business/breleasevalue/entity/BReleaseValue.java
View file @
6fbc4c7a
...
...
@@ -23,9 +23,9 @@ public class BReleaseValue extends IdEntity<BReleaseValue> {
private
String
title
;
private
Integer
lessonValue
;
private
String
lessonValue
;
private
Integer
trainValue
;
private
String
trainValue
;
private
String
corpId
;
...
...
src/main/java/org/rcisoft/business/breleasevalue/service/impl/BReleaseValueServiceImpl.java
View file @
6fbc4c7a
...
...
@@ -62,8 +62,8 @@ public class BReleaseValueServiceImpl implements BReleaseValueService {
// BeanUtils.copyProperties(bReleaseValueDto, bReleaseValue);
bReleaseValue
.
setBusinessId
(
bReleaseValueDto
.
getBusinessId
());
bReleaseValue
.
setTitle
(
bReleaseValueDto
.
getTitle
());
bReleaseValue
.
setTrainValue
(
Integer
.
parseInt
(
bReleaseValueDto
.
getTrainValue
()
));
bReleaseValue
.
setLessonValue
(
Integer
.
parseInt
(
bReleaseValueDto
.
getLessonValue
()
));
bReleaseValue
.
setTrainValue
(
bReleaseValueDto
.
getTrainValue
(
));
bReleaseValue
.
setLessonValue
(
bReleaseValueDto
.
getLessonValue
(
));
UserUtil
.
setCurrentMergeOperation
(
bReleaseValue
);
int
line
=
bReleaseValueRepository
.
updateByPrimaryKeySelective
(
bReleaseValue
);
// 删除子表中的相关记录
...
...
@@ -78,8 +78,8 @@ public class BReleaseValueServiceImpl implements BReleaseValueService {
// BeanUtils.copyProperties(bReleaseValueDto, bReleaseValue);
bReleaseValue
.
setBusinessId
(
bReleaseValueDto
.
getBusinessId
());
bReleaseValue
.
setTitle
(
bReleaseValueDto
.
getTitle
());
bReleaseValue
.
setTrainValue
(
Integer
.
parseInt
(
bReleaseValueDto
.
getTrainValue
()
));
bReleaseValue
.
setLessonValue
(
Integer
.
parseInt
(
bReleaseValueDto
.
getLessonValue
()
));
bReleaseValue
.
setTrainValue
(
bReleaseValueDto
.
getTrainValue
(
));
bReleaseValue
.
setLessonValue
(
bReleaseValueDto
.
getLessonValue
(
));
UserUtil
.
setCurrentPersistOperation
(
bReleaseValue
);
if
(
StringUtils
.
isNotEmpty
(
bReleaseValueDto
.
getUserIds
())){
...
...
@@ -195,8 +195,8 @@ public class BReleaseValueServiceImpl implements BReleaseValueService {
throw
new
ServiceException
(
ResultServiceEnums
.
VALUE_NOT_NULL
);
}
try
{
Integer
.
parseInt
(
valueConsume
);
Integer
.
parseInt
(
valueGain
);
Long
.
parseLong
(
valueConsume
);
Long
.
parseLong
(
valueGain
);
}
catch
(
Exception
e
){
throw
new
ServiceException
(
ResultServiceEnums
.
NUM_IS_ERROR
);
}
...
...
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