Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
02cd467c
Commit
02cd467c
authored
Aug 05, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增押金记录,修改租车核销
parent
0a1cb12d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
19 deletions
+24
-19
IntegralUserStatus.java
...com/xxfc/platform/activity/entity/IntegralUserStatus.java
+6
-0
IntegralRuleBiz.java
.../java/com/xxfc/platform/activity/biz/IntegralRuleBiz.java
+9
-14
IntegralUserStatusBiz.java
...com/xxfc/platform/activity/biz/IntegralUserStatusBiz.java
+6
-0
IntegralRuleMapper.xml
...y-server/src/main/resources/mapper/IntegralRuleMapper.xml
+1
-5
IntegralUserStatusMapper.xml
...er/src/main/resources/mapper/IntegralUserStatusMapper.xml
+1
-0
DepositRefundRecordMapper.xml
...r/src/main/resources/mapper/DepositRefundRecordMapper.xml
+1
-0
No files found.
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/entity/IntegralUserStatus.java
View file @
02cd467c
...
@@ -21,4 +21,10 @@ public class IntegralUserStatus {
...
@@ -21,4 +21,10 @@ public class IntegralUserStatus {
private
Long
crtTime
;
private
Long
crtTime
;
private
Long
updTime
;
private
Long
updTime
;
@Transient
private
Long
startTime
;
@Transient
private
Long
endTime
;
}
}
\ No newline at end of file
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/IntegralRuleBiz.java
View file @
02cd467c
...
@@ -8,11 +8,10 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
...
@@ -8,11 +8,10 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import
com.github.wxiaoqi.security.common.util.Query
;
import
com.github.wxiaoqi.security.common.util.Query
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.activity.entity.IntegralRule
;
import
com.xxfc.platform.activity.entity.IntegralRule
;
import
com.xxfc.platform.activity.entity.IntegralUser
Record
;
import
com.xxfc.platform.activity.entity.IntegralUser
Status
;
import
com.xxfc.platform.activity.mapper.IntegralRuleMapper
;
import
com.xxfc.platform.activity.mapper.IntegralRuleMapper
;
import
com.xxfc.platform.activity.user.UserInfoBiz
;
import
com.xxfc.platform.activity.user.UserInfoBiz
;
import
com.xxfc.platform.activity.vo.IntegralRuleDto
;
import
com.xxfc.platform.activity.vo.IntegralRuleDto
;
import
com.xxfc.platform.activity.vo.IntegralUserRecordDto
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -27,7 +26,8 @@ public class IntegralRuleBiz extends BaseBiz<IntegralRuleMapper, IntegralRule> {
...
@@ -27,7 +26,8 @@ public class IntegralRuleBiz extends BaseBiz<IntegralRuleMapper, IntegralRule> {
UserInfoBiz
userInfoBiz
;
UserInfoBiz
userInfoBiz
;
@Autowired
@Autowired
IntegralUserRecordBiz
integralUserRecordBiz
;
IntegralUserRecordBiz
integralUserRecordBiz
;
@Autowired
IntegralUserStatusBiz
integralUserStatusBiz
;
/**
/**
* 添加、更新积分规则
* 添加、更新积分规则
* @param integralRule
* @param integralRule
...
@@ -97,22 +97,17 @@ public class IntegralRuleBiz extends BaseBiz<IntegralRuleMapper, IntegralRule> {
...
@@ -97,22 +97,17 @@ public class IntegralRuleBiz extends BaseBiz<IntegralRuleMapper, IntegralRule> {
Query
query
=
new
Query
(
integralRule
);
Query
query
=
new
Query
(
integralRule
);
PageDataVO
<
IntegralRule
>
pageDataVO
=
PageDataVO
.
pageInfo
(
query
,
()
->
mapper
.
selectAllByParam
(
integralRule
));
PageDataVO
<
IntegralRule
>
pageDataVO
=
PageDataVO
.
pageInfo
(
query
,
()
->
mapper
.
selectAllByParam
(
integralRule
));
//添加个人积分状态
//添加个人积分状态
pageDataVO
.
getData
().
forEach
((
a
)
->
getIntegralStatus
(
appUserDTO
,
a
));
return
ObjectRestResponse
.
succ
(
pageDataVO
);
return
ObjectRestResponse
.
succ
(
pageDataVO
);
}
}
public
boolean
getIntegralStatus
(
AppUserDTO
appUserDTO
,
IntegralRule
integralRule
)
{
public
void
getIntegralStatus
(
AppUserDTO
appUserDTO
,
IntegralRule
integralRule
)
{
IntegralUserRecordDto
integralUserRecordDto
=
new
IntegralUserRecordDto
();
IntegralUserStatus
integralUserStatus1
=
integralUserStatusBiz
.
selectByUserAndCode
(
integralRule
.
getCode
(),
appUserDTO
.
getUserid
());
integralUserRecordDto
.
setUserId
(
appUserDTO
.
getUserid
());
if
(
integralUserStatus1
!=
null
)
{
integralUserRecordDto
.
setIntegralRuleCode
(
integralRule
.
getCode
());
integralRule
.
setIntegralStatus
(
integralUserStatus1
.
getIntegralStatus
());
List
<
IntegralUserRecord
>
integralUserRecords
=
integralUserRecordBiz
.
getByUserAndTime
(
integralUserRecordDto
).
getData
();
if
(
integralUserRecords
==
null
||
integralUserRecords
.
size
()
<=
0
)
{
return
false
;
}
else
if
(
integralUserRecords
.
size
()
==
integralRule
.
getNumber
()){
//记录 == 规则数 代表已经完成
return
true
;
}
else
{
return
false
;
}
}
}
}
}
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/IntegralUserStatusBiz.java
View file @
02cd467c
...
@@ -10,6 +10,8 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -10,6 +10,8 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.TimeZone
;
@Service
@Service
@Transactional
@Transactional
public
class
IntegralUserStatusBiz
extends
BaseBiz
<
IntegralUserStatusMapper
,
IntegralUserStatus
>
{
public
class
IntegralUserStatusBiz
extends
BaseBiz
<
IntegralUserStatusMapper
,
IntegralUserStatus
>
{
...
@@ -28,9 +30,13 @@ public class IntegralUserStatusBiz extends BaseBiz<IntegralUserStatusMapper, Int
...
@@ -28,9 +30,13 @@ public class IntegralUserStatusBiz extends BaseBiz<IntegralUserStatusMapper, Int
public
IntegralUserStatus
selectByUserAndCode
(
String
code
,
Integer
userId
)
{
public
IntegralUserStatus
selectByUserAndCode
(
String
code
,
Integer
userId
)
{
if
(!
StringUtils
.
isAllBlank
(
code
,
userId
+
""
))
{
if
(!
StringUtils
.
isAllBlank
(
code
,
userId
+
""
))
{
long
current
=
System
.
currentTimeMillis
();
long
startTime
=
current
/
(
1000
*
3600
*
24
)
*
(
1000
*
3600
*
24
)
-
TimeZone
.
getDefault
().
getRawOffset
();
IntegralUserStatus
integralUserStatus
=
new
IntegralUserStatus
();
IntegralUserStatus
integralUserStatus
=
new
IntegralUserStatus
();
integralUserStatus
.
setIntegralRuleCode
(
code
);
integralUserStatus
.
setIntegralRuleCode
(
code
);
integralUserStatus
.
setUserId
(
userId
);
integralUserStatus
.
setUserId
(
userId
);
integralUserStatus
.
setStartTime
(
startTime
);
integralUserStatus
.
setEndTime
(
startTime
+
24
*
60
*
60
*
1000
-
1
);
return
mapper
.
selectByUserAndCode
(
integralUserStatus
);
return
mapper
.
selectByUserAndCode
(
integralUserStatus
);
}
}
return
null
;
return
null
;
...
...
xx-activity/xx-activity-server/src/main/resources/mapper/IntegralRuleMapper.xml
View file @
02cd467c
...
@@ -31,15 +31,11 @@
...
@@ -31,15 +31,11 @@
<select
id=
"selectAllByParam"
resultType=
"com.xxfc.platform.activity.entity.IntegralRule"
parameterType=
"com.xxfc.platform.activity.vo.IntegralRuleDto"
>
<select
id=
"selectAllByParam"
resultType=
"com.xxfc.platform.activity.entity.IntegralRule"
parameterType=
"com.xxfc.platform.activity.vo.IntegralRuleDto"
>
select i1.*, i2.integral_status from integral_rule i1
select i1.* from integral_rule i1
left join integral_user_status i2 on i1.code = i2.integral_rule_code
<where>
<where>
<if
test=
"id != null"
>
<if
test=
"id != null"
>
and i1.id = #{id}
and i1.id = #{id}
</if>
</if>
<if
test=
"userId != null"
>
and i2.user_id = #{userId}
</if>
<if
test=
"code != null"
>
<if
test=
"code != null"
>
and i1.code = #{code}
and i1.code = #{code}
</if>
</if>
...
...
xx-activity/xx-activity-server/src/main/resources/mapper/IntegralUserStatusMapper.xml
View file @
02cd467c
...
@@ -11,5 +11,6 @@
...
@@ -11,5 +11,6 @@
<select
id=
"selectByUserAndCode"
resultType=
"com.xxfc.platform.activity.entity.IntegralUserStatus"
parameterType=
"com.xxfc.platform.activity.entity.IntegralUserStatus"
>
<select
id=
"selectByUserAndCode"
resultType=
"com.xxfc.platform.activity.entity.IntegralUserStatus"
parameterType=
"com.xxfc.platform.activity.entity.IntegralUserStatus"
>
select * from integral_user_status
select * from integral_user_status
where integral_rule_code = #{integralRuleCode} and user_id = #{userId}
where integral_rule_code = #{integralRuleCode} and user_id = #{userId}
and crt_time between #{startTime} and #{endTime} and integral_status =1
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
xx-order/xx-order-server/src/main/resources/mapper/DepositRefundRecordMapper.xml
View file @
02cd467c
...
@@ -11,5 +11,6 @@
...
@@ -11,5 +11,6 @@
parameterType=
"java.lang.Integer"
>
parameterType=
"java.lang.Integer"
>
select * from deposit_refund_record
select * from deposit_refund_record
where crosstown_id = #{crossId} and isshow = 1
where crosstown_id = #{crossId} and isshow = 1
order by status
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
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