Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
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
pseer
gxpt_ht
Commits
12c9d33a
Commit
12c9d33a
authored
Oct 27, 2023
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加枚举类
parent
ed350316
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
144 additions
and
8 deletions
+144
-8
AvailableEnum.java
...ommon/src/main/java/share/common/enums/AvailableEnum.java
+34
-0
CleaningStatusEnum.java
.../src/main/java/share/common/enums/CleaningStatusEnum.java
+33
-0
ConsumerCouponUseStatusEnum.java
.../java/share/common/enums/ConsumerCouponUseStatusEnum.java
+34
-0
RoleTypeEnum.java
...common/src/main/java/share/common/enums/RoleTypeEnum.java
+33
-0
OrderTask.java
share-quartz/src/main/java/share/quartz/task/OrderTask.java
+3
-3
SConsumer.java
...e-system/src/main/java/share/system/domain/SConsumer.java
+1
-1
SConsumerCoupon.java
...em/src/main/java/share/system/domain/SConsumerCoupon.java
+1
-1
SCleanRecordsServiceImpl.java
...a/share/system/service/impl/SCleanRecordsServiceImpl.java
+5
-3
SConsumerCouponServiceImpl.java
...share/system/service/impl/SConsumerCouponServiceImpl.java
+0
-0
No files found.
share-common/src/main/java/share/common/enums/AvailableEnum.java
0 → 100644
View file @
12c9d33a
package
share
.
common
.
enums
;
public
enum
AvailableEnum
{
//(0:可用,1:不可以)
AVAILABLE
(
0
,
"可用"
),
UNAVAILABLE
(
1
,
"不可用"
);
private
Integer
code
;
private
String
name
;
AvailableEnum
(
Integer
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
}
AvailableEnum
()
{
}
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
}
share-common/src/main/java/share/common/enums/CleaningStatusEnum.java
0 → 100644
View file @
12c9d33a
package
share
.
common
.
enums
;
public
enum
CleaningStatusEnum
{
UNCLEAN
(
0
,
"未保洁"
),
CLEANING
(
1
,
"保洁中"
),
CLEANED
(
2
,
"已保洁"
);
private
Integer
code
;
private
String
name
;
CleaningStatusEnum
(
Integer
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
}
CleaningStatusEnum
()
{
}
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
}
share-common/src/main/java/share/common/enums/ConsumerCouponUseStatusEnum.java
0 → 100644
View file @
12c9d33a
package
share
.
common
.
enums
;
public
enum
ConsumerCouponUseStatusEnum
{
//0:待使用,1:已使用,2:已失效
WAIT_USE
(
0
,
"待使用"
),
USED
(
1
,
"已使用"
),
INVALID
(
2
,
"已失效"
);
private
Integer
code
;
private
String
name
;
ConsumerCouponUseStatusEnum
(
Integer
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
}
ConsumerCouponUseStatusEnum
()
{
}
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
}
share-common/src/main/java/share/common/enums/RoleTypeEnum.java
0 → 100644
View file @
12c9d33a
package
share
.
common
.
enums
;
public
enum
RoleTypeEnum
{
MEMBRO
(
0
,
"会员"
),
CLEANER
(
1
,
"保洁人员"
),
ADMIN
(
2
,
"后台管理人员"
);;
private
Integer
code
;
private
String
name
;
RoleTypeEnum
(
Integer
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
}
RoleTypeEnum
()
{
}
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
}
share-quartz/src/main/java/share/quartz/task/OrderTask.java
View file @
12c9d33a
...
@@ -185,7 +185,7 @@ public class OrderTask {
...
@@ -185,7 +185,7 @@ public class OrderTask {
logger
.
info
(
"================="
+
sOrder
.
getCouponId
()
+
"================="
);
logger
.
info
(
"================="
+
sOrder
.
getCouponId
()
+
"================="
);
logger
.
info
(
"================================================="
);
logger
.
info
(
"================================================="
);
// 退优惠券
// 退优惠券
if
(
Objects
.
nonNull
(
sOrder
)
&&
sOrder
.
getCouponId
()
>
0
)
{
if
(
sOrder
.
getCouponId
()
>
0
)
{
SConsumerCoupon
couponUser
=
consumerCouponService
.
getById
(
sOrder
.
getCouponId
());
SConsumerCoupon
couponUser
=
consumerCouponService
.
getById
(
sOrder
.
getCouponId
());
couponUser
.
setUseStatus
(
CouponStatusEnum
.
NORMAL
.
getValue
());
couponUser
.
setUseStatus
(
CouponStatusEnum
.
NORMAL
.
getValue
());
consumerCouponService
.
updateById
(
couponUser
);
consumerCouponService
.
updateById
(
couponUser
);
...
@@ -225,12 +225,12 @@ public class OrderTask {
...
@@ -225,12 +225,12 @@ public class OrderTask {
});
});
}
}
});
});
boolean
execute
=
transactionTemplate
.
execute
(
e
->
{
Boolean
execute
=
transactionTemplate
.
execute
(
e
->
{
orderService
.
updateBatchById
(
sOrders
,
sOrders
.
size
());
orderService
.
updateBatchById
(
sOrders
,
sOrders
.
size
());
roomService
.
updateBatchById
(
roomList
,
roomList
.
size
());
roomService
.
updateBatchById
(
roomList
,
roomList
.
size
());
return
true
;
return
true
;
});
});
if
(!
execute
)
{
if
(
Boolean
.
FALSE
.
equals
(
execute
))
{
logger
.
error
(
"预约订单到期自动更新订单状态失败!"
);
logger
.
error
(
"预约订单到期自动更新订单状态失败!"
);
throw
new
BaseException
(
"预约订单到期自动更新订单状态失败!"
);
throw
new
BaseException
(
"预约订单到期自动更新订单状态失败!"
);
}
}
...
...
share-system/src/main/java/share/system/domain/SConsumer.java
View file @
12c9d33a
...
@@ -51,7 +51,7 @@ public class SConsumer
...
@@ -51,7 +51,7 @@ public class SConsumer
/** 会员角色类型(0:会员,1:保洁人员,2:后台管理人员) */
/** 会员角色类型(0:会员,1:保洁人员,2:后台管理人员) */
@ApiModelProperty
(
value
=
"会员角色类型"
,
example
=
"0=:会员,1:保洁人员,2:后台管理人员"
)
@ApiModelProperty
(
value
=
"会员角色类型"
,
example
=
"0=:会员,1:保洁人员,2:后台管理人员"
)
private
String
roleType
;
private
Integer
roleType
;
/** 会员性别(0:未知,1:男,2:女) */
/** 会员性别(0:未知,1:男,2:女) */
@ApiModelProperty
(
value
=
"会员性别"
,
example
=
"0=:未知,1:男,2:女"
)
@ApiModelProperty
(
value
=
"会员性别"
,
example
=
"0=:未知,1:男,2:女"
)
...
...
share-system/src/main/java/share/system/domain/SConsumerCoupon.java
View file @
12c9d33a
...
@@ -58,7 +58,7 @@ public class SConsumerCoupon extends BaseEntity
...
@@ -58,7 +58,7 @@ public class SConsumerCoupon extends BaseEntity
/** 优惠券类型(1:折扣券,2,满减券,3:时长券) */
/** 优惠券类型(1:折扣券,2,满减券,3:时长券) */
@Excel
(
name
=
"优惠券类型(1:折扣券,2,满减券,3:时长券)"
)
@Excel
(
name
=
"优惠券类型(1:折扣券,2,满减券,3:时长券)"
)
private
String
couponType
;
private
Integer
couponType
;
/** 门槛时长 */
/** 门槛时长 */
@Excel
(
name
=
"门槛时长"
)
@Excel
(
name
=
"门槛时长"
)
...
...
share-system/src/main/java/share/system/service/impl/SCleanRecordsServiceImpl.java
View file @
12c9d33a
...
@@ -3,6 +3,8 @@ package share.system.service.impl;
...
@@ -3,6 +3,8 @@ package share.system.service.impl;
import
java.util.List
;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
share.common.enums.CleaningStatusEnum
;
import
share.common.enums.RoleTypeEnum
;
import
share.common.utils.DateUtils
;
import
share.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -148,12 +150,12 @@ public class SCleanRecordsServiceImpl implements ISCleanRecordsService
...
@@ -148,12 +150,12 @@ public class SCleanRecordsServiceImpl implements ISCleanRecordsService
@Override
@Override
public
SCleanRecords
getByCleanerId
()
{
public
SCleanRecords
getByCleanerId
()
{
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
if
(!
user
.
getRoleType
().
equals
(
"1"
))
{
if
(!
user
.
getRoleType
().
equals
(
RoleTypeEnum
.
CLEANER
.
getCode
()))
{
throw
new
RuntimeException
(
"当前用户不是保洁人员"
);
throw
new
RuntimeException
(
"当前用户不是保洁人员"
);
}
}
LambdaQueryWrapper
<
SCleanRecords
>
queryWrapper
=
new
LambdaQueryWrapper
();
LambdaQueryWrapper
<
SCleanRecords
>
queryWrapper
=
new
LambdaQueryWrapper
<>
();
queryWrapper
.
in
(
SCleanRecords:
:
getConsumerId
,
user
.
getId
());
queryWrapper
.
in
(
SCleanRecords:
:
getConsumerId
,
user
.
getId
());
queryWrapper
.
in
(
SCleanRecords:
:
getStatus
,
1
);
queryWrapper
.
in
(
SCleanRecords:
:
getStatus
,
CleaningStatusEnum
.
CLEANING
.
getCode
()
);
SCleanRecords
sCleanRecords
=
sCleanRecordsMapper
.
selectOne
(
queryWrapper
);
SCleanRecords
sCleanRecords
=
sCleanRecordsMapper
.
selectOne
(
queryWrapper
);
if
(
sCleanRecords
==
null
){
if
(
sCleanRecords
==
null
){
throw
new
RuntimeException
(
"当前用户没有保洁任务"
);
throw
new
RuntimeException
(
"当前用户没有保洁任务"
);
...
...
share-system/src/main/java/share/system/service/impl/SConsumerCouponServiceImpl.java
View file @
12c9d33a
This diff is collapsed.
Click to expand it.
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