Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
cea5f99e
Commit
cea5f99e
authored
Dec 20, 2023
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小程序寄售详情
parent
08718b93
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
411 additions
and
59 deletions
+411
-59
ch-core/src/main/java/com/wwdz/ch/core/consts/ConsignSaleEnum.java
...rc/main/java/com/wwdz/ch/core/consts/ConsignSaleEnum.java
+1
-0
ch-core/src/main/java/com/wwdz/ch/core/consts/LogisticsEnum.java
.../src/main/java/com/wwdz/ch/core/consts/LogisticsEnum.java
+37
-0
ch-core/src/main/java/com/wwdz/ch/core/entity/ConsignSaleRecordVo.java
...ain/java/com/wwdz/ch/core/entity/ConsignSaleRecordVo.java
+45
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/config/WebMvcConfiguration.java
.../main/java/com/wwdz/ch/wx/config/WebMvcConfiguration.java
+2
-2
ch-wx-api/src/main/java/com/wwdz/ch/wx/entity/vo/ConsignSaleAppletVo.java
...in/java/com/wwdz/ch/wx/entity/vo/ConsignSaleAppletVo.java
+12
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/ConsignSaleServiceImpl.java
...main/java/com/wwdz/ch/wx/impl/ConsignSaleServiceImpl.java
+213
-55
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/ConsignSaleService.java
.../main/java/com/wwdz/ch/wx/service/ConsignSaleService.java
+22
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/ConsignSaleController.java
...c/main/java/com/wwdz/ch/wx/web/ConsignSaleController.java
+79
-1
No files found.
ch-core/src/main/java/com/wwdz/ch/core/consts/ConsignSaleEnum.java
View file @
cea5f99e
...
...
@@ -103,6 +103,7 @@ public class ConsignSaleEnum {
FINISH
(
90
,
"寄售单完成"
),
CUSTOM_CANCEL
(
100
,
"用户取消寄售"
),
SYS_CANCEL
(
101
,
"平台取消寄售"
),
TIME_OUT_CANCEL
(
102
,
"超时未确认,取消寄售"
),
;
private
int
code
;
...
...
ch-core/src/main/java/com/wwdz/ch/core/consts/LogisticsEnum.java
0 → 100644
View file @
cea5f99e
package
com.wwdz.ch.core.consts
;
public
enum
LogisticsEnum
{
JD
(
"JD"
,
"京东快递"
),
SF
(
"SF"
,
"顺丰快递"
),
STO
(
"STO"
,
"申通快递"
),
YTO
(
"YTO"
,
"圆通快递"
),
ZTO
(
"ZTO"
,
"中通快递"
),
YUNDA
(
"YUNDA"
,
"韵达快递"
),
;
private
String
code
;
private
String
name
;
LogisticsEnum
(
String
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
}
public
static
String
getNameByCode
(
String
code
)
{
for
(
LogisticsEnum
logisticsEnum
:
LogisticsEnum
.
values
())
{
if
(
code
.
equals
(
logisticsEnum
.
getCode
()))
{
return
logisticsEnum
.
getName
();
}
}
return
null
;
}
public
String
getCode
()
{
return
code
;
}
public
String
getName
()
{
return
name
;
}
}
ch-core/src/main/java/com/wwdz/ch/core/entity/ConsignSaleRecordVo.java
0 → 100644
View file @
cea5f99e
package
com.wwdz.ch.core.entity
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
ConsignSaleRecordVo
implements
Entity
{
private
String
content
;
private
String
remark
;
private
String
saleId
;
private
String
itemName
;
private
String
image
;
private
Date
time
;
/**
* 是否有估价
*/
private
Boolean
isHasPrice
;
/**
* 是否超时未确认
*/
private
Boolean
isTimeOut
;
private
String
tip
;
/**
* 客户端状态
*/
private
Integer
customState
;
/**
* 客户端状态
*/
private
String
customStateName
;
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/config/WebMvcConfiguration.java
View file @
cea5f99e
...
...
@@ -40,8 +40,8 @@ public class WebMvcConfiguration implements WebMvcConfigurer {
.
excludePathPatterns
(
"/*.html"
,
"/**/*.html"
,
"/**/*.css"
,
"/**/*.js"
,
"/wx/user/loginByWx"
,
"/wx/user/finishLogin"
,
"/wx/user/loginByMobile"
,
"/wx/user/loginRegCaptcha"
,
"/wx/user/updateRegCaptcha"
,
"/wx/user/login"
,
"/wx/user/fillCode"
,
"/officialAccountCallback/**"
,
"/imCallback/**"
,
"/wx/category/**"
//
"/wx/consignSale/**", "/wx/item/**"
"/imCallback/**"
,
"/wx/category/**"
,
"/wx/consignSale/**"
,
"/wx/item/**"
/* "/wx/officialAccount/**",
"/wx/item/**",
"/wx/aiAssistant/**",
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/entity/vo/ConsignSaleAppletVo.java
View file @
cea5f99e
...
...
@@ -22,13 +22,24 @@ public class ConsignSaleAppletVo implements Entity {
/**
* 商品名称
*/
private
String
n
ame
;
private
String
itemN
ame
;
/**
* 寄售单号
*/
private
String
saleId
;
/**
* 客户端状态
*/
private
Integer
customState
;
/**
* 客户端状态
*/
private
String
customStateName
;
/**
* 下单时间
*/
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/ConsignSaleServiceImpl.java
View file @
cea5f99e
This diff is collapsed.
Click to expand it.
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/ConsignSaleService.java
View file @
cea5f99e
...
...
@@ -36,6 +36,20 @@ public interface ConsignSaleService {
*/
Result
findDetail
(
ConsignSaleRequestDto
dto
);
/**
* 图文估价详情
* @param dto
* @return
*/
Result
findImgValuateDetail
(
ConsignSaleRequestDto
dto
);
/**
* 实物鉴定详情
* @param dto
* @return
*/
Result
findIdentifyDetail
(
ConsignSaleRequestDto
dto
);
/**
* 图文鉴定后用户确认
...
...
@@ -44,6 +58,14 @@ public interface ConsignSaleService {
*/
Result
confirmForImgValuate
(
ConsignSaleRequestDto
dto
);
/**
* 超时未确认取消寄售单
* @param dto
* @return
*/
Result
timeOutForCancel
(
ConsignSaleRequestDto
dto
);
/**
* 用户寄出商品
* @param dto
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/ConsignSaleController.java
View file @
cea5f99e
package
com.wwdz.ch.wx.web
;
import
com.alibaba.fastjson.JSON
;
import
com.wwdz.ch.core.consts.LogisticsEnum
;
import
com.wwdz.ch.core.consts.ResultCode
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dto.request.ConsignSaleRequestDto
;
...
...
@@ -19,7 +20,8 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.Map
;
import
java.util.*
;
/**
* 寄售单
...
...
@@ -104,6 +106,47 @@ public class ConsignSaleController {
}
@ApiOperation
(
value
=
"用户查询寄售单详情"
)
@PostMapping
(
"/findDetail"
)
public
Result
findDetail
(
@RequestBody
ConsignSaleRequestDto
dto
)
{
logger
.
info
(
"【请求开始】用户查询寄售单详情,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
Validator
validator
=
new
Validator
(
FormHandler
.
ofEntity
(
dto
));
validator
.
set
(
"saleId"
,
"寄售单号"
).
must
().
string
()
.
end
();
if
(!
validator
.
isValid
())
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
.
getCode
(),
validator
.
getErrorInfo
());
}
return
consignSaleService
.
findDetail
(
dto
);
}
@ApiOperation
(
value
=
"图文估价详情"
)
@PostMapping
(
"/findImgValuateDetail"
)
public
Result
findImgValuateDetail
(
@RequestBody
ConsignSaleRequestDto
dto
)
{
logger
.
info
(
"【请求开始】图文估价详情,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
Validator
validator
=
new
Validator
(
FormHandler
.
ofEntity
(
dto
));
validator
.
set
(
"saleId"
,
"寄售单号"
).
must
().
string
()
.
end
();
if
(!
validator
.
isValid
())
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
.
getCode
(),
validator
.
getErrorInfo
());
}
return
consignSaleService
.
findImgValuateDetail
(
dto
);
}
@ApiOperation
(
value
=
"实物鉴定详情"
)
@PostMapping
(
"/findIdentifyDetail"
)
public
Result
findIdentifyDetail
(
@RequestBody
ConsignSaleRequestDto
dto
)
{
logger
.
info
(
"【请求开始】实物鉴定详情,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
Validator
validator
=
new
Validator
(
FormHandler
.
ofEntity
(
dto
));
validator
.
set
(
"saleId"
,
"寄售单号"
).
must
().
string
()
.
end
();
if
(!
validator
.
isValid
())
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
.
getCode
(),
validator
.
getErrorInfo
());
}
return
consignSaleService
.
findIdentifyDetail
(
dto
);
}
@ApiOperation
(
value
=
"图文鉴定后用户确认"
)
@PostMapping
(
"/confirmForImgValuate"
)
...
...
@@ -144,6 +187,20 @@ public class ConsignSaleController {
}
@ApiOperation
(
value
=
"超时未确认取消寄售单"
)
@PostMapping
(
"/timeOutForcancel"
)
public
Result
timeOutForcancel
(
@RequestBody
ConsignSaleRequestDto
dto
)
{
logger
.
info
(
"【请求开始】超时未确认取消寄售单,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
Validator
validator
=
new
Validator
(
FormHandler
.
ofEntity
(
dto
));
validator
.
set
(
"saleId"
,
"寄售单号"
).
must
().
string
()
.
end
();
if
(!
validator
.
isValid
())
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
.
getCode
(),
validator
.
getErrorInfo
());
}
return
consignSaleService
.
timeOutForCancel
(
dto
);
}
@ApiOperation
(
value
=
"用户取消寄售单"
)
@PostMapping
(
"/cancel"
)
public
Result
cancel
(
@RequestBody
ConsignSaleRequestDto
dto
)
{
...
...
@@ -157,4 +214,25 @@ public class ConsignSaleController {
}
return
consignSaleService
.
customCancel
(
dto
);
}
@ApiOperation
(
value
=
"获取快递公司列表"
)
@PostMapping
(
"/getLogisticsList"
)
public
Result
getLogisticsList
()
{
try
{
LogisticsEnum
[]
logisticsEnums
=
LogisticsEnum
.
values
();
List
<
Map
<
String
,
String
>>
mapList
=
new
ArrayList
<>();
Arrays
.
stream
(
logisticsEnums
).
forEach
(
logisticsEnum
->
{
mapList
.
add
(
new
HashMap
()
{{
put
(
"code"
,
logisticsEnum
.
getCode
());
}});
mapList
.
add
(
new
HashMap
()
{{
put
(
"name"
,
logisticsEnum
.
getName
());
}});
});
return
Result
.
success
(
mapList
);
}
catch
(
Exception
e
)
{
return
Result
.
failed
();
}
}
}
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