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
d61db807
Commit
d61db807
authored
Aug 07, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
玩物app跳转到换藏专场,专场id传-1
parent
81416f0e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
26 additions
and
25 deletions
+26
-25
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/SysGroupPurchaseServiceImpl.java
...a/com/wwdz/ch/admin/impl/SysGroupPurchaseServiceImpl.java
+3
-3
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/SysSupplierItemServiceImpl.java
...va/com/wwdz/ch/admin/impl/SysSupplierItemServiceImpl.java
+4
-4
ch-dao/src/main/java/com/wwdz/ch/db/dao/distribution/SupplierItemDao.java
...java/com/wwdz/ch/db/dao/distribution/SupplierItemDao.java
+1
-1
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/SupplierItemDaoImpl.java
...com/wwdz/ch/db/impl/distribution/SupplierItemDaoImpl.java
+2
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/GroupPurchaseServiceImpl.java
...wdz/ch/wx/impl/distribution/GroupPurchaseServiceImpl.java
+4
-13
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SpecialPerformanceServiceImpl.java
...h/wx/impl/distribution/SpecialPerformanceServiceImpl.java
+1
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/distribution/GroupPurchaseController.java
.../wwdz/ch/wx/web/distribution/GroupPurchaseController.java
+8
-0
ch-wx-api/src/test/java/com/wwdz/ch/wx/api/WxPayServiceTest.java
...pi/src/test/java/com/wwdz/ch/wx/api/WxPayServiceTest.java
+3
-3
No files found.
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/SysGroupPurchaseServiceImpl.java
View file @
d61db807
...
@@ -50,9 +50,9 @@ public class SysGroupPurchaseServiceImpl implements SysGroupPurchaseService {
...
@@ -50,9 +50,9 @@ public class SysGroupPurchaseServiceImpl implements SysGroupPurchaseService {
for
(
String
id
:
idList
)
{
for
(
String
id
:
idList
)
{
long
itemId
=
Long
.
valueOf
(
id
);
long
itemId
=
Long
.
valueOf
(
id
);
SupplierItem
oldItem
=
supplierItemDao
.
findById
(
itemId
);
SupplierItem
oldItem
=
supplierItemDao
.
findById
(
itemId
);
/*if (supplierItemDao.isSupplierIdExisted(itemId
)) {
if
(
supplierItemDao
.
isSupplierIdExisted
(
itemId
,
DistributionEnum
.
DistributionTypeEnum
.
GROUP_PURCHASE
.
getCode
()
))
{
continue
;
return
Result
.
failed
(
"商品id:"
+
itemId
+
", 已转过团购"
)
;
}
*/
}
//复制一份藏家藏品的数据,设置为团购品
//复制一份藏家藏品的数据,设置为团购品
SupplierItem
supplierItem
=
new
SupplierItem
();
SupplierItem
supplierItem
=
new
SupplierItem
();
EntityMapper
.
copyAttribute
(
oldItem
,
supplierItem
);
EntityMapper
.
copyAttribute
(
oldItem
,
supplierItem
);
...
...
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/SysSupplierItemServiceImpl.java
View file @
d61db807
...
@@ -173,7 +173,7 @@ public class SysSupplierItemServiceImpl implements SysSupplierItemService {
...
@@ -173,7 +173,7 @@ public class SysSupplierItemServiceImpl implements SysSupplierItemService {
supplierItemVo
.
setTypeName
(
DistributionEnum
.
DistributionTypeEnum
.
getNameByCode
(
supplierItem
.
getType
()));
supplierItemVo
.
setTypeName
(
DistributionEnum
.
DistributionTypeEnum
.
getNameByCode
(
supplierItem
.
getType
()));
supplierItemVo
.
setCreatorName
(
supplierItem
.
getCreatorId
()
==
CommConsts
.
SYSTEM_ACCOUNT
.
longValue
()?
"平台自营"
:
cacheUtil
.
getAppletUserById
(
supplierItem
.
getCreatorId
()).
getNickname
());
supplierItemVo
.
setCreatorName
(
supplierItem
.
getCreatorId
()
==
CommConsts
.
SYSTEM_ACCOUNT
.
longValue
()?
"平台自营"
:
cacheUtil
.
getAppletUserById
(
supplierItem
.
getCreatorId
()).
getNickname
());
supplierItemVo
.
setStatusName
(
SupplierItemEnum
.
StatusEnum
.
getNameByCode
(
supplierItem
.
getStatus
()));
supplierItemVo
.
setStatusName
(
SupplierItemEnum
.
StatusEnum
.
getNameByCode
(
supplierItem
.
getStatus
()));
if
(
supplierItemDao
.
isSupplierIdExisted
(
supplierItem
.
getId
()))
{
if
(
supplierItemDao
.
isSupplierIdExisted
(
supplierItem
.
getId
()
,
DistributionEnum
.
DistributionTypeEnum
.
AUCTION
.
getCode
()
))
{
supplierItemVo
.
setIsTransformAuction
(
true
);
supplierItemVo
.
setIsTransformAuction
(
true
);
}
else
{
}
else
{
supplierItemVo
.
setIsTransformAuction
(
false
);
supplierItemVo
.
setIsTransformAuction
(
false
);
...
@@ -347,7 +347,7 @@ public class SysSupplierItemServiceImpl implements SysSupplierItemService {
...
@@ -347,7 +347,7 @@ public class SysSupplierItemServiceImpl implements SysSupplierItemService {
if
(
supplierItem
.
getBuyLimitNum
()
==
-
1
)
{
if
(
supplierItem
.
getBuyLimitNum
()
==
-
1
)
{
supplierItemVo
.
setIsLimitBuy
(
false
);
supplierItemVo
.
setIsLimitBuy
(
false
);
}
}
if
(
supplierItemDao
.
isSupplierIdExisted
(
itemId
))
{
if
(
supplierItemDao
.
isSupplierIdExisted
(
itemId
,
DistributionEnum
.
DistributionTypeEnum
.
AUCTION
.
getCode
()
))
{
supplierItemVo
.
setIsTransformAuction
(
true
);
supplierItemVo
.
setIsTransformAuction
(
true
);
}
else
{
}
else
{
supplierItemVo
.
setIsTransformAuction
(
false
);
supplierItemVo
.
setIsTransformAuction
(
false
);
...
@@ -564,8 +564,8 @@ public class SysSupplierItemServiceImpl implements SysSupplierItemService {
...
@@ -564,8 +564,8 @@ public class SysSupplierItemServiceImpl implements SysSupplierItemService {
for
(
String
id
:
idList
)
{
for
(
String
id
:
idList
)
{
long
itemId
=
Long
.
valueOf
(
id
);
long
itemId
=
Long
.
valueOf
(
id
);
SupplierItem
oldItem
=
supplierItemDao
.
findById
(
itemId
);
SupplierItem
oldItem
=
supplierItemDao
.
findById
(
itemId
);
if
(
supplierItemDao
.
isSupplierIdExisted
(
itemId
))
{
if
(
supplierItemDao
.
isSupplierIdExisted
(
itemId
,
DistributionEnum
.
DistributionTypeEnum
.
AUCTION
.
getCode
()
))
{
continue
;
return
Result
.
failed
(
"商品id:"
+
itemId
+
", 已转过拍卖"
)
;
}
}
//复制一份藏家藏品的数据,设置为拍卖品
//复制一份藏家藏品的数据,设置为拍卖品
SupplierItem
supplierItem
=
new
SupplierItem
();
SupplierItem
supplierItem
=
new
SupplierItem
();
...
...
ch-dao/src/main/java/com/wwdz/ch/db/dao/distribution/SupplierItemDao.java
View file @
d61db807
...
@@ -97,6 +97,6 @@ public interface SupplierItemDao {
...
@@ -97,6 +97,6 @@ public interface SupplierItemDao {
* @param supplierId
* @param supplierId
* @return
* @return
*/
*/
boolean
isSupplierIdExisted
(
long
supplierId
);
boolean
isSupplierIdExisted
(
long
supplierId
,
int
type
);
}
}
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/SupplierItemDaoImpl.java
View file @
d61db807
...
@@ -210,10 +210,11 @@ public class SupplierItemDaoImpl implements SupplierItemDao {
...
@@ -210,10 +210,11 @@ public class SupplierItemDaoImpl implements SupplierItemDao {
@Override
@Override
public
boolean
isSupplierIdExisted
(
long
supplierId
)
{
public
boolean
isSupplierIdExisted
(
long
supplierId
,
int
type
)
{
SupplierItemExample
supplierItemExample
=
new
SupplierItemExample
();
SupplierItemExample
supplierItemExample
=
new
SupplierItemExample
();
SupplierItemExample
.
Criteria
criteria
=
supplierItemExample
.
createCriteria
();
SupplierItemExample
.
Criteria
criteria
=
supplierItemExample
.
createCriteria
();
criteria
.
andSupplierIdEqualTo
(
supplierId
);
criteria
.
andSupplierIdEqualTo
(
supplierId
);
criteria
.
andTypeEqualTo
(
type
);
criteria
.
andIsDeletedEqualTo
(
false
);
criteria
.
andIsDeletedEqualTo
(
false
);
return
supplierItemMapper
.
countByExample
(
supplierItemExample
)
>
0
;
return
supplierItemMapper
.
countByExample
(
supplierItemExample
)
>
0
;
}
}
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/GroupPurchaseServiceImpl.java
View file @
d61db807
...
@@ -328,18 +328,6 @@ public class GroupPurchaseServiceImpl implements GroupPurchaseService {
...
@@ -328,18 +328,6 @@ public class GroupPurchaseServiceImpl implements GroupPurchaseService {
return
Result
.
failed
(
"查询团购进度失败"
);
return
Result
.
failed
(
"查询团购进度失败"
);
}
}
/*
@Override
public Result payBalance(GroupPurchaseRecordRequestDto dto) {
try {
} catch (Exception e) {
logger.error("支付尾款失败 error : {}", e);
}
return Result.failed("支付尾款失败");
}*/
@Override
@Override
public
Result
systemAddRecord
(
GroupPurchaseRecordRequestDto
dto
)
{
public
Result
systemAddRecord
(
GroupPurchaseRecordRequestDto
dto
)
{
...
@@ -356,12 +344,15 @@ public class GroupPurchaseServiceImpl implements GroupPurchaseService {
...
@@ -356,12 +344,15 @@ public class GroupPurchaseServiceImpl implements GroupPurchaseService {
groupPurchaseRecord
.
setDepositPayId
(
depositPayId
);
groupPurchaseRecord
.
setDepositPayId
(
depositPayId
);
groupPurchaseRecord
.
setDistributionOrderId
(
depositPayId
);
groupPurchaseRecord
.
setDistributionOrderId
(
depositPayId
);
groupPurchaseRecord
.
setPrepayId
(
depositPayId
);
groupPurchaseRecord
.
setPrepayId
(
depositPayId
);
groupPurchaseRecord
.
setTransactionId
(
depositPayId
);
groupPurchaseRecord
.
setItemId
(
dto
.
getItemId
());
groupPurchaseRecord
.
setItemId
(
dto
.
getItemId
());
groupPurchaseRecord
.
setItemNum
(
dto
.
getItemNum
());
groupPurchaseRecord
.
setItemNum
(
dto
.
getItemNum
());
groupPurchaseRecord
.
setUserId
(
CommConsts
.
SYSTEM_ACCOUNT
);
groupPurchaseRecord
.
setUserId
(
dto
.
getUserId
()
==
null
?
CommConsts
.
SYSTEM_ACCOUNT
:
dto
.
getUserId
()
);
groupPurchaseRecord
.
setUserOpenid
(
CommConsts
.
SYSTEM_ACCOUNT
.
toString
());
groupPurchaseRecord
.
setUserOpenid
(
CommConsts
.
SYSTEM_ACCOUNT
.
toString
());
groupPurchaseRecord
.
setAmount
(
groupPurchaseConfig
.
getPrice
());
groupPurchaseRecord
.
setAmount
(
groupPurchaseConfig
.
getPrice
());
groupPurchaseRecord
.
setState
(
GroupPurchaseEnum
.
StateEnum
.
VALID
.
getCode
());
groupPurchaseRecord
.
setState
(
GroupPurchaseEnum
.
StateEnum
.
VALID
.
getCode
());
groupPurchaseRecord
.
setCreateTime
(
new
Date
());
groupPurchaseRecord
.
setUpdateTime
(
new
Date
());
groupPurchaseRecordDao
.
insert
(
groupPurchaseRecord
);
groupPurchaseRecordDao
.
insert
(
groupPurchaseRecord
);
return
Result
.
success
();
return
Result
.
success
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SpecialPerformanceServiceImpl.java
View file @
d61db807
...
@@ -310,6 +310,7 @@ public class SpecialPerformanceServiceImpl implements SpecialPerformanceService
...
@@ -310,6 +310,7 @@ public class SpecialPerformanceServiceImpl implements SpecialPerformanceService
if
(!
CollectionUtils
.
isEmpty
(
specialPerformanceList
))
{
if
(!
CollectionUtils
.
isEmpty
(
specialPerformanceList
))
{
specialPerformance
=
specialPerformanceList
.
get
(
0
);
specialPerformance
=
specialPerformanceList
.
get
(
0
);
dto
.
setSpecialPerformanceId
(
specialPerformance
.
getId
());
dto
.
setSpecialPerformanceId
(
specialPerformance
.
getId
());
specialPerformanceId
=
specialPerformance
.
getId
();
}
else
{
}
else
{
return
Result
.
failed
(
8000
,
"没有专场"
);
return
Result
.
failed
(
8000
,
"没有专场"
);
}
}
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/distribution/GroupPurchaseController.java
View file @
d61db807
...
@@ -51,4 +51,12 @@ public class GroupPurchaseController {
...
@@ -51,4 +51,12 @@ public class GroupPurchaseController {
}
}
return
groupPurchaseService
.
cancelOrder
(
dto
);
return
groupPurchaseService
.
cancelOrder
(
dto
);
}
}
@ApiOperation
(
value
=
"系统新增团购记录"
)
@PostMapping
(
"/systemAddRecord"
)
public
Result
systemAddRecord
(
@RequestBody
GroupPurchaseRecordRequestDto
dto
)
{
logger
.
info
(
"系统新增团购记录,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
return
groupPurchaseService
.
systemAddRecord
(
dto
);
}
}
}
ch-wx-api/src/test/java/com/wwdz/ch/wx/api/WxPayServiceTest.java
View file @
d61db807
...
@@ -89,12 +89,12 @@ public class WxPayServiceTest {
...
@@ -89,12 +89,12 @@ public class WxPayServiceTest {
@Test
@Test
public
void
refund
()
{
public
void
refund
()
{
List
<
String
>
list
=
Arrays
.
asList
(
"DA24080
51714332074170
"
);
List
<
String
>
list
=
Arrays
.
asList
(
"DA24080
61745277070223
"
);
list
.
forEach
(
orderId
->{
list
.
forEach
(
orderId
->{
DistributionOrderRequestDto
dto
=
new
DistributionOrderRequestDto
();
DistributionOrderRequestDto
dto
=
new
DistributionOrderRequestDto
();
dto
.
setDistributionOrderId
(
orderId
);
dto
.
setDistributionOrderId
(
orderId
);
dto
.
setAmount
(
"1"
);
dto
.
setAmount
(
"
0.
1"
);
dto
.
setRefundPrice
(
"1"
);
dto
.
setRefundPrice
(
"
0.
1"
);
Result
result
=
wxPayServiceApi
.
refund
(
dto
);
Result
result
=
wxPayServiceApi
.
refund
(
dto
);
logger
.
info
(
"申请微信支付退款:{}"
,
result
);
logger
.
info
(
"申请微信支付退款:{}"
,
result
);
});
});
...
...
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