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
d912829b
Commit
d912829b
authored
Dec 10, 2019
by
zhangqingle
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/meiteng' into zql
parents
8298f52f
cba390ec
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
26 additions
and
21 deletions
+26
-21
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
+2
-2
UserValueDto.java
.../org/rcisoft/business/breleasevalue/dto/UserValueDto.java
+1
-1
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 @
d912829b
#
修改
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 @
d912829b
...
@@ -108,10 +108,10 @@ public class BLesson extends IdEntity<BLesson> {
...
@@ -108,10 +108,10 @@ public class BLesson extends IdEntity<BLesson> {
private
String
hotNumber
;
private
String
hotNumber
;
@ApiModelProperty
(
value
=
"消耗积分"
)
@ApiModelProperty
(
value
=
"消耗积分"
)
private
Integer
valueConsume
;
private
String
valueConsume
;
@ApiModelProperty
(
value
=
"获得积分"
)
@ApiModelProperty
(
value
=
"获得积分"
)
private
Integer
valueGain
;
private
String
valueGain
;
@ApiModelProperty
(
value
=
"更新积分日期"
)
@ApiModelProperty
(
value
=
"更新积分日期"
)
private
Date
valueUpdateDate
;
private
Date
valueUpdateDate
;
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonPersonServiceImpl.java
View file @
d912829b
...
@@ -325,7 +325,7 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
...
@@ -325,7 +325,7 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
line
=
bLessonPersonRepository
.
updateByPrimaryKeySelective
(
bLessonPersonReal
);
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"
);
BPersonValue
bPersonValue
=
new
BPersonValue
(
curUser
.
getUserId
(),
"学习"
+
bLesson
.
getLessonName
()+
"课程"
,
bLesson
.
getValueConsume
(),
"1"
);
bLessonServiceImpl
.
addValueEvent
(
curUser
.
getUserId
(),
bPersonValue
,
userInfo
.
getLockNum
());
bLessonServiceImpl
.
addValueEvent
(
curUser
.
getUserId
(),
bPersonValue
,
userInfo
.
getLockNum
());
}
}
...
@@ -343,7 +343,7 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
...
@@ -343,7 +343,7 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
//扣除对应积分 添加用户积分详情 更新用户积分
//扣除对应积分 添加用户积分详情 更新用户积分
//增加用户积分详情
//增加用户积分详情
//积分变化后 s_user表中value字段重新统计
//积分变化后 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"
);
BPersonValue
bPersonValue
=
new
BPersonValue
(
curUser
.
getUserId
(),
"学习"
+
bLesson
.
getLessonName
()+
"课程"
,
bLesson
.
getValueConsume
(),
"1"
);
bLessonServiceImpl
.
addValueEvent
(
curUser
.
getUserId
(),
bPersonValue
,
userInfo
.
getLockNum
());
bLessonServiceImpl
.
addValueEvent
(
curUser
.
getUserId
(),
bPersonValue
,
userInfo
.
getLockNum
());
}
}
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
d912829b
...
@@ -1194,14 +1194,14 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -1194,14 +1194,14 @@ public class BLessonServiceImpl implements BLessonService {
if
(
userInfo
==
null
)
{
if
(
userInfo
==
null
)
{
throw
new
ServiceException
(
ResultServiceEnums
.
COMPANY_NOT_EXISTS
);
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
);
throw
new
ServiceException
(
ResultServiceEnums
.
VALUE_NOT_ENOUGH
);
}
}
int
line
=
bLessonPersonRepository
.
updateByPrimaryKeySelective
(
person
);
int
line
=
bLessonPersonRepository
.
updateByPrimaryKeySelective
(
person
);
//TODO 更新用户积分明细表 重进计算积分
//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"
);
BPersonValue
bPersonValue
=
new
BPersonValue
(
curUser
.
getUserId
(),
"报名"
+
bLesson
.
getLessonName
()+
"培训"
,
bLesson
.
getValueConsume
(),
"1"
);
addValueEvent
(
curUser
.
getUserId
(),
bPersonValue
,
userInfo
.
getLockNum
());
addValueEvent
(
curUser
.
getUserId
(),
bPersonValue
,
userInfo
.
getLockNum
());
}
}
...
@@ -1225,14 +1225,14 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -1225,14 +1225,14 @@ public class BLessonServiceImpl implements BLessonService {
if
(
userInfo
==
null
)
{
if
(
userInfo
==
null
)
{
throw
new
ServiceException
(
ResultServiceEnums
.
COMPANY_NOT_EXISTS
);
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
);
throw
new
ServiceException
(
ResultServiceEnums
.
VALUE_NOT_ENOUGH
);
}
}
int
line
=
this
.
trainInsert
(
"0"
,
bLesson
,
bLessonPersons
);
int
line
=
this
.
trainInsert
(
"0"
,
bLesson
,
bLessonPersons
);
//TODO 更新用户积分明细表 重进计算积分
//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"
);
BPersonValue
bPersonValue
=
new
BPersonValue
(
curUser
.
getUserId
(),
"报名"
+
bLesson
.
getLessonName
()+
"培训"
,
bLesson
.
getValueConsume
(),
"1"
);
addValueEvent
(
curUser
.
getUserId
(),
bPersonValue
,
userInfo
.
getLockNum
());
addValueEvent
(
curUser
.
getUserId
(),
bPersonValue
,
userInfo
.
getLockNum
());
}
}
...
@@ -1626,7 +1626,7 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -1626,7 +1626,7 @@ public class BLessonServiceImpl implements BLessonService {
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
,
rollbackFor
=
Exception
.
class
)
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
,
rollbackFor
=
Exception
.
class
)
public
void
addValueEvent
(
String
personId
,
BPersonValue
bPersonValue
,
Integer
lockNum
)
{
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
(
"-----------------正在设置积分详情-------------------"
);
log
.
debug
(
"-----------------正在设置积分详情-------------------"
);
UserUtil
.
setCurrentPersistOperation
(
bPersonValue
);
UserUtil
.
setCurrentPersistOperation
(
bPersonValue
);
bPersonValueRepository
.
add
(
bPersonValue
);
bPersonValueRepository
.
add
(
bPersonValue
);
...
...
src/main/java/org/rcisoft/business/bpersonvalue/entity/BPersonValue.java
View file @
d912829b
...
@@ -25,7 +25,7 @@ public class BPersonValue extends IdEntity<BPersonValue> {
...
@@ -25,7 +25,7 @@ public class BPersonValue extends IdEntity<BPersonValue> {
private
String
event
;
private
String
event
;
private
Integer
value
;
private
String
value
;
private
String
type
;
private
String
type
;
...
...
src/main/java/org/rcisoft/business/bpersonvalue/service/impl/BPersonValueServiceImpl.java
View file @
d912829b
...
@@ -40,7 +40,6 @@ public class BPersonValueServiceImpl implements BPersonValueService {
...
@@ -40,7 +40,6 @@ public class BPersonValueServiceImpl implements BPersonValueService {
@Autowired
@Autowired
private
SysUserMapper
sysUserMapper
;
private
SysUserMapper
sysUserMapper
;
@Override
@Override
public
List
<
BPersonValue
>
queryByPagination
(
PageUtil
pageUtil
,
CurUser
curUser
,
PersonValueClientDto
dto
)
{
public
List
<
BPersonValue
>
queryByPagination
(
PageUtil
pageUtil
,
CurUser
curUser
,
PersonValueClientDto
dto
)
{
if
(
dto
.
getBusinessId
()
==
null
||
""
.
equals
(
dto
.
getBusinessId
())){
if
(
dto
.
getBusinessId
()
==
null
||
""
.
equals
(
dto
.
getBusinessId
())){
...
@@ -61,7 +60,8 @@ public class BPersonValueServiceImpl implements BPersonValueService {
...
@@ -61,7 +60,8 @@ public class BPersonValueServiceImpl implements BPersonValueService {
UserUtil
.
setCurrentPersistOperation
(
bPersonValue
);
UserUtil
.
setCurrentPersistOperation
(
bPersonValue
);
try
{
try
{
bPersonValue
.
setValue
(
Integer
.
parseInt
(
personValueDto
.
getValue
().
trim
()));
Long
.
parseLong
(
personValueDto
.
getValue
());
bPersonValue
.
setValue
(
personValueDto
.
getValue
().
trim
());
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
throw
new
ServiceException
(
ResultServiceEnums
.
NUM_IS_ERROR
);
throw
new
ServiceException
(
ResultServiceEnums
.
NUM_IS_ERROR
);
}
}
...
...
src/main/java/org/rcisoft/business/breleasevalue/dto/UserValueDto.java
View file @
d912829b
...
@@ -13,5 +13,5 @@ public class UserValueDto {
...
@@ -13,5 +13,5 @@ public class UserValueDto {
public
String
value
;
public
String
value
;
public
Stri
ng
valueGain
;
public
Lo
ng
valueGain
;
}
}
src/main/java/org/rcisoft/business/breleasevalue/entity/BReleaseValue.java
View file @
d912829b
...
@@ -23,9 +23,9 @@ public class BReleaseValue extends IdEntity<BReleaseValue> {
...
@@ -23,9 +23,9 @@ public class BReleaseValue extends IdEntity<BReleaseValue> {
private
String
title
;
private
String
title
;
private
Integer
lessonValue
;
private
String
lessonValue
;
private
Integer
trainValue
;
private
String
trainValue
;
private
String
corpId
;
private
String
corpId
;
...
...
src/main/java/org/rcisoft/business/breleasevalue/service/impl/BReleaseValueServiceImpl.java
View file @
d912829b
...
@@ -62,8 +62,8 @@ public class BReleaseValueServiceImpl implements BReleaseValueService {
...
@@ -62,8 +62,8 @@ public class BReleaseValueServiceImpl implements BReleaseValueService {
// BeanUtils.copyProperties(bReleaseValueDto, bReleaseValue);
// BeanUtils.copyProperties(bReleaseValueDto, bReleaseValue);
bReleaseValue
.
setBusinessId
(
bReleaseValueDto
.
getBusinessId
());
bReleaseValue
.
setBusinessId
(
bReleaseValueDto
.
getBusinessId
());
bReleaseValue
.
setTitle
(
bReleaseValueDto
.
getTitle
());
bReleaseValue
.
setTitle
(
bReleaseValueDto
.
getTitle
());
bReleaseValue
.
setTrainValue
(
Integer
.
parseInt
(
bReleaseValueDto
.
getTrainValue
()
));
bReleaseValue
.
setTrainValue
(
bReleaseValueDto
.
getTrainValue
(
));
bReleaseValue
.
setLessonValue
(
Integer
.
parseInt
(
bReleaseValueDto
.
getLessonValue
()
));
bReleaseValue
.
setLessonValue
(
bReleaseValueDto
.
getLessonValue
(
));
UserUtil
.
setCurrentMergeOperation
(
bReleaseValue
);
UserUtil
.
setCurrentMergeOperation
(
bReleaseValue
);
int
line
=
bReleaseValueRepository
.
updateByPrimaryKeySelective
(
bReleaseValue
);
int
line
=
bReleaseValueRepository
.
updateByPrimaryKeySelective
(
bReleaseValue
);
// 删除子表中的相关记录
// 删除子表中的相关记录
...
@@ -78,8 +78,8 @@ public class BReleaseValueServiceImpl implements BReleaseValueService {
...
@@ -78,8 +78,8 @@ public class BReleaseValueServiceImpl implements BReleaseValueService {
// BeanUtils.copyProperties(bReleaseValueDto, bReleaseValue);
// BeanUtils.copyProperties(bReleaseValueDto, bReleaseValue);
bReleaseValue
.
setBusinessId
(
bReleaseValueDto
.
getBusinessId
());
bReleaseValue
.
setBusinessId
(
bReleaseValueDto
.
getBusinessId
());
bReleaseValue
.
setTitle
(
bReleaseValueDto
.
getTitle
());
bReleaseValue
.
setTitle
(
bReleaseValueDto
.
getTitle
());
bReleaseValue
.
setTrainValue
(
Integer
.
parseInt
(
bReleaseValueDto
.
getTrainValue
()
));
bReleaseValue
.
setTrainValue
(
bReleaseValueDto
.
getTrainValue
(
));
bReleaseValue
.
setLessonValue
(
Integer
.
parseInt
(
bReleaseValueDto
.
getLessonValue
()
));
bReleaseValue
.
setLessonValue
(
bReleaseValueDto
.
getLessonValue
(
));
UserUtil
.
setCurrentPersistOperation
(
bReleaseValue
);
UserUtil
.
setCurrentPersistOperation
(
bReleaseValue
);
if
(
StringUtils
.
isNotEmpty
(
bReleaseValueDto
.
getUserIds
())){
if
(
StringUtils
.
isNotEmpty
(
bReleaseValueDto
.
getUserIds
())){
...
@@ -195,8 +195,8 @@ public class BReleaseValueServiceImpl implements BReleaseValueService {
...
@@ -195,8 +195,8 @@ public class BReleaseValueServiceImpl implements BReleaseValueService {
throw
new
ServiceException
(
ResultServiceEnums
.
VALUE_NOT_NULL
);
throw
new
ServiceException
(
ResultServiceEnums
.
VALUE_NOT_NULL
);
}
}
try
{
try
{
Integer
.
parseInt
(
valueConsume
);
Long
.
parseLong
(
valueConsume
);
Integer
.
parseInt
(
valueGain
);
Long
.
parseLong
(
valueGain
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
throw
new
ServiceException
(
ResultServiceEnums
.
NUM_IS_ERROR
);
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