记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
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
董敬伟
liquidnet-bus-v1
Commits
a88cacb2
Commit
a88cacb2
authored
Mar 14, 2022
by
zhengfuxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户认证。
parent
0213d98c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
85 additions
and
193 deletions
+85
-193
GoblinStatusConst.java
.../liquidnet/service/goblin/constant/GoblinStatusConst.java
+0
-191
SmileUserVO.java
...java/com/liquidnet/service/goblin/dto/vo/SmileUserVO.java
+1
-1
SmileFrontService.java
...dnet/service/goblin/service/manage/SmileFrontService.java
+8
-0
SmileUserController.java
...com/liquidnet/service/controller/SmileUserController.java
+53
-1
SmileFrontServiceImpl.java
...liquidnet/service/service/impl/SmileFrontServiceImpl.java
+23
-0
No files found.
liquidnet-bus-api/liquidnet-service-smile-api/src/main/java/com/liquidnet/service/goblin/constant/GoblinStatusConst.java
deleted
100644 → 0
View file @
0213d98c
package
com
.
liquidnet
.
service
.
goblin
.
constant
;
public
class
GoblinStatusConst
{
/* ----------------------------------------------------------------- */
public
enum
CommonStatus
{
COMMON_LIMIT_UN
(
0
,
"不限购"
),
COMMON_TYPE_ALL
(
0
,
"购买条件-全部用户"
),
COMMON_TYPE_MEMBER
(
1
,
"购买条件-会员用户"
),
COMMON_TYPE_CAN
(
2
,
"购买条件-指定用户"
),
;
private
final
int
value
;
private
final
String
desc
;
CommonStatus
(
int
value
,
String
desc
)
{
this
.
value
=
value
;
this
.
desc
=
desc
;
}
public
int
getValue
()
{
return
value
;
}
public
String
getDesc
()
{
return
desc
;
}
}
public
enum
Status
{
ORDER_STATUS_0
(
0
,
"待付款(用户刚下单)"
),
ORDER_STATUS_2
(
2
,
"代发货(用户付完款 等待商城发货)"
),
ORDER_STATUS_3
(
3
,
"代收货(商城已经发货 等待用户确认收货)"
),
ORDER_STATUS_4
(
4
,
"已完成(用户已经确认收货 订单结束)"
),
ORDER_STATUS_5
(
5
,
"取消订单(用户未付款前取消订单)"
),
ORDER_STATUS_6
(
6
,
"退款通过(用户已经付款但是商城还未发货,用户发出退款申请,商城同意退款)"
),
ORDER_STATUS_7
(
7
,
"退货通过(用户已经确认收货后用户发出退货申请,商城同意所有退货申请 ,一个订单可能有多个单品)"
),
ORDER_STATUS_61
(
61
,
"发起-退款(用户已经付款但是商城还未发货,用户发出退款申请,商城同意退款)"
),
ORDER_STATUS_71
(
71
,
"发起-退货(用户已经确认收货后用户发出退货申请,商城同意所有退货申请 ,一个订单可能有多个单品)"
),
ORDER_LOG_STATUS_11
(
11
,
"确认付款"
),
ORDER_LOG_STATUS_12
(
12
,
"修改金额"
),
ORDER_LOG_STATUS_13
(
13
,
"发货"
),
ORDER_LOG_STATUS_14
(
14
,
"取消订单"
),
ORDER_LOG_STATUS_15
(
15
,
"修改物流单号"
),
ORDER_LOG_STATUS_16
(
16
,
"核销虚拟商品订单"
),
ORDER_LOG_STATUS_17
(
17
,
"修改收货地址"
),
ORDER_LOG_STATUS_20
(
20
,
"商家发起退款"
),
ORDER_LOG_STATUS_201
(
201
,
"商家同意退款"
),
ORDER_LOG_STATUS_21
(
21
,
"退款申请"
),
ORDER_LOG_STATUS_22
(
22
,
"退款成功"
),
ORDER_LOG_STATUS_23
(
23
,
"退款拒绝"
),
ORDER_LOG_STATUS_24
(
24
,
"退货申请"
),
ORDER_LOG_STATUS_25
(
25
,
"退货拒绝"
),
ORDER_LOG_STATUS_26
(
26
,
"退货审核通过等待用户填写物流"
),
ORDER_LOG_STATUS_27
(
27
,
"待收货"
),
ORDER_LOG_STATUS_28
(
28
,
"退货完成"
),
ORDER_LOG_STATUS_29
(
29
,
"退款拒绝"
),
ORDER_BACK_STATUS_0
(
0
,
"商家发起退款(退款中)"
),
ORDER_BACK_STATUS_1
(
1
,
"退款申请(用户发送退款请求)"
),
ORDER_BACK_STATUS_2
(
2
,
"退款成功(商家同意退款)"
),
ORDER_BACK_STATUS_3
(
3
,
"退款拒绝(商家拒绝退款)"
),
ORDER_BACK_STATUS_4
(
4
,
"退货申请(用户发起退货请求)"
),
ORDER_BACK_STATUS_5
(
5
,
"退货拒绝(商家拒绝退货)"
),
ORDER_BACK_STATUS_6
(
6
,
"退货审核通过等待用户填写物流"
),
ORDER_BACK_STATUS_7
(
7
,
"待收货(退货中)"
),
ORDER_BACK_STATUS_8
(
8
,
"退货完成"
),
ORDER_BACK_STATUS_9
(
9
,
"退款拒绝"
),
ORDER_BACK_STATUS_10
(
10
,
"退款失败"
),
ORDER_BACK_STATUS_11
(
11
,
"取消退款"
),
;
private
final
int
value
;
private
final
String
desc
;
Status
(
int
value
,
String
desc
)
{
this
.
value
=
value
;
this
.
desc
=
desc
;
}
public
int
getValue
()
{
return
value
;
}
public
String
getDesc
()
{
return
desc
;
}
}
public
enum
Type
{
OPERATION_TYPE_1
(
1
,
"用户"
),
OPERATION_TYPE_2
(
2
,
"商家"
),
BACK_REASON_TYPE_1
(
1
,
"不想买了"
),
BACK_REASON_TYPE_2
(
2
,
"收货人信息有误"
),
BACK_REASON_TYPE_3
(
3
,
"未按指定时间发货"
),
BACK_REASON_TYPE_4
(
4
,
"其他"
),
BACK_REASON_TYPE_5
(
5
,
"不想买了"
),
BACK_REASON_TYPE_6
(
6
,
"商品质量问题"
),
BACK_REASON_TYPE_7
(
7
,
"收到商品与描述不符"
),
BACK_REASON_TYPE_8
(
8
,
"商铺发起"
),
//todo
BACK_REASON_TYPE_9
(
9
,
"系统自动申请"
),
BACK_TYPE_1
(
1
,
"退款"
),
BACK_TYPE_2
(
2
,
"退货"
),
;
private
final
int
value
;
private
final
String
desc
;
Type
(
int
value
,
String
desc
)
{
this
.
value
=
value
;
this
.
desc
=
desc
;
}
public
int
getValue
()
{
return
value
;
}
public
String
getDesc
()
{
return
desc
;
}
}
public
enum
MarketingStatus
{
SELF_TYPE_ZHENGZAI
(
1
,
"正在下单"
),
STORE_TYPE_PURCHASE
(
2
,
"限时秒杀"
),
STORE_PURCHASE_STATUS_ALL
(-
1
,
"全部"
),
STORE_PURCHASE_STATUS_UN_START
(
0
,
"等待开始"
),
STORE_PURCHASE_STATUS_ING_START
(
1
,
"活动中"
),
STORE_PURCHASE_STATUS_END_START
(
2
,
"活动结束"
),
STORE_PURCHASE_STATUS_STOP
(
7
,
"停用"
),
;
private
final
int
value
;
private
final
String
desc
;
MarketingStatus
(
int
value
,
String
desc
)
{
this
.
value
=
value
;
this
.
desc
=
desc
;
}
public
int
getValue
()
{
return
value
;
}
public
String
getDesc
()
{
return
desc
;
}
}
public
enum
MarketPreStatus
{
MARKET_PRE_ZHENGZAI
(
"ZZ"
,
"正在下单前缀"
),
MARKET_PRE_PURCHASE
(
"PC"
,
"限时秒杀前缀"
),
;
private
final
String
value
;
private
final
String
desc
;
MarketPreStatus
(
String
value
,
String
desc
)
{
this
.
value
=
value
;
this
.
desc
=
desc
;
}
public
String
getValue
()
{
return
value
;
}
public
String
getDesc
()
{
return
desc
;
}
public
static
String
getPre
(
String
goblinId
)
{
if
(
goblinId
.
contains
(
MARKET_PRE_ZHENGZAI
.
getValue
()))
{
return
MARKET_PRE_ZHENGZAI
.
getValue
();
}
else
if
(
goblinId
.
contains
(
MARKET_PRE_PURCHASE
.
getValue
()))
{
return
MARKET_PRE_PURCHASE
.
getValue
();
}
return
null
;
}
}
/* ----------------------------------------------------------------- */
/* ----------------------------------------------------------------- */
}
liquidnet-bus-api/liquidnet-service-smile-api/src/main/java/com/liquidnet/service/goblin/dto/vo/SmileUserVO.java
View file @
a88cacb2
...
@@ -144,7 +144,7 @@ public class SmileUserVO implements Serializable {
...
@@ -144,7 +144,7 @@ public class SmileUserVO implements Serializable {
* 标识步骤
* 标识步骤
*/
*/
@ApiModelProperty
(
value
=
"标识步骤"
)
@ApiModelProperty
(
value
=
"标识步骤"
)
private
Integer
tag
;
private
String
tag
;
/**
/**
* 1:代理开启,2:代理关闭
* 1:代理开启,2:代理关闭
...
...
liquidnet-bus-api/liquidnet-service-smile-api/src/main/java/com/liquidnet/service/goblin/service/manage/SmileFrontService.java
0 → 100644
View file @
a88cacb2
package
com
.
liquidnet
.
service
.
goblin
.
service
.
manage
;
import
com.liquidnet.service.goblin.dto.vo.SmileUserVO
;
public
interface
SmileFrontService
{
public
boolean
saveOrUpdateUser
(
SmileUserVO
smileUserVO
,
SmileUserVO
redisVo
);
}
liquidnet-bus-service/liquidnet-service-smile/liquidnet-service-smile-impl/src/main/java/com/liquidnet/service/controller/SmileUserController.java
View file @
a88cacb2
...
@@ -5,10 +5,12 @@ import com.liquidnet.commons.lang.util.CurrentUtil;
...
@@ -5,10 +5,12 @@ import com.liquidnet.commons.lang.util.CurrentUtil;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.goblin.constant.SmileRedisConst
;
import
com.liquidnet.service.goblin.constant.SmileRedisConst
;
import
com.liquidnet.service.goblin.dto.vo.SmileUserVO
;
import
com.liquidnet.service.goblin.dto.vo.SmileUserVO
;
import
com.liquidnet.service.service.impl.SmileFrontServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -17,12 +19,14 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -17,12 +19,14 @@ import org.springframework.web.bind.annotation.RestController;
* @Description:用户接口
* @Description:用户接口
* @date 2021/12/27 下午6:25
* @date 2021/12/27 下午6:25
*/
*/
@Api
(
tags
=
"前端接口管理"
)
@Api
(
tags
=
"前端接口管理
(需要登陆状态)
"
)
@RestController
@RestController
@RequestMapping
(
"/front"
)
@RequestMapping
(
"/front"
)
public
class
SmileUserController
{
public
class
SmileUserController
{
@Autowired
@Autowired
private
RedisUtil
redisUtil
;
private
RedisUtil
redisUtil
;
@Autowired
private
SmileFrontServiceImpl
smileFrontService
;
@GetMapping
(
"getUser"
)
@GetMapping
(
"getUser"
)
@ApiOperation
(
"获取用户状态,如果没查到,则返回null"
)
@ApiOperation
(
"获取用户状态,如果没查到,则返回null"
)
...
@@ -32,6 +36,54 @@ public class SmileUserController {
...
@@ -32,6 +36,54 @@ public class SmileUserController {
return
ResponseDto
.
success
(
smileUserVO
);
return
ResponseDto
.
success
(
smileUserVO
);
}
}
//
@PostMapping
(
"saveOrUpdateUserOneStep"
)
@ApiOperation
(
"增加或者删除第一步"
)
public
ResponseDto
saveOrUpdateUserOneStep
(
SmileUserVO
smileUserVO
)
{
String
userId
=
CurrentUtil
.
getCurrentUid
();
SmileUserVO
smileUserVORedis
=
(
SmileUserVO
)
redisUtil
.
get
(
SmileRedisConst
.
SMILE_USER
.
concat
(
userId
));
if
(
null
==
smileUserVORedis
){
smileUserVO
.
setTag
(
"1"
);
}
else
{
smileUserVO
.
setTag
(
smileUserVORedis
.
getTag
().
concat
(
",1"
));
}
smileFrontService
.
saveOrUpdateUser
(
smileUserVO
,
smileUserVORedis
);
return
ResponseDto
.
success
();
}
@PostMapping
(
"saveOrUpdateUserTwoStep"
)
@ApiOperation
(
"增加或者删除第二步"
)
public
ResponseDto
saveOrUpdateUserTwoStep
(
SmileUserVO
smileUserVO
)
{
String
userId
=
CurrentUtil
.
getCurrentUid
();
SmileUserVO
smileUserVORedis
=
(
SmileUserVO
)
redisUtil
.
get
(
SmileRedisConst
.
SMILE_USER
.
concat
(
userId
));
if
(
null
==
smileUserVORedis
){
smileUserVORedis
.
setTag
(
"2"
);
}
else
{
if
(
smileUserVORedis
.
getTag
().
contains
(
"2"
)){
ResponseDto
.
success
(
null
);
}
else
{
smileUserVO
.
setTag
(
smileUserVORedis
.
getTag
().
concat
(
",2"
));
}
}
smileFrontService
.
saveOrUpdateUser
(
smileUserVO
,
smileUserVORedis
);
return
ResponseDto
.
success
();
}
@PostMapping
(
"saveOrUpdateUserThreeStep"
)
@ApiOperation
(
"增加或者删除第三步"
)
public
ResponseDto
saveOrUpdateUserThreeStep
(
SmileUserVO
smileUserVO
)
{
String
userId
=
CurrentUtil
.
getCurrentUid
();
SmileUserVO
smileUserVORedis
=
(
SmileUserVO
)
redisUtil
.
get
(
SmileRedisConst
.
SMILE_USER
.
concat
(
userId
));
if
(
null
==
smileUserVORedis
){
smileUserVORedis
.
setTag
(
"3"
);
}
else
{
if
(
smileUserVORedis
.
getTag
().
contains
(
"2"
)){
}
else
{
smileUserVO
.
setTag
(
smileUserVORedis
.
getTag
().
concat
(
",3"
));
}
}
smileFrontService
.
saveOrUpdateUser
(
smileUserVO
,
smileUserVORedis
);
return
ResponseDto
.
success
();
}
...
...
liquidnet-bus-service/liquidnet-service-smile/liquidnet-service-smile-impl/src/main/java/com/liquidnet/service/service/impl/SmileFrontServiceImpl.java
0 → 100644
View file @
a88cacb2
package
com
.
liquidnet
.
service
.
service
.
impl
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.service.goblin.dto.vo.SmileUserVO
;
import
com.liquidnet.service.goblin.service.manage.SmileFrontService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
@Service
@Slf4j
public
class
SmileFrontServiceImpl
implements
SmileFrontService
{
@Autowired
private
RedisUtil
redisUtil
;
public
boolean
saveOrUpdateUser
(
SmileUserVO
smileUserVO
,
SmileUserVO
redisVo
){
//redis里面更新
return
true
;
}
}
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