Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
order-group-application
order-group
Commits
30d26a81
Commit
30d26a81
authored
Jul 01, 2021
by
黄兆良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
20210701-日志切面-黄兆良
parent
3f36710d
Hide whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
326 additions
and
90 deletions
+326
-90
shopping-cart-application-service/pom.xml
+1
-1
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
+2
-1
shopping-cart-application-service/src/main/java/cn/freemud/annotations/IgnoreFeignLogAnnotation.java
+2
-4
shopping-cart-application-service/src/main/java/cn/freemud/aop/ControllerLogAop.java
+5
-5
shopping-cart-application-service/src/main/java/cn/freemud/aop/WebAspect.java
+68
-2
shopping-cart-application-service/src/main/java/cn/freemud/constant/ApplicationConstant.java
+6
-0
shopping-cart-application-service/src/main/java/cn/freemud/controller/AgentController.java
+3
-1
shopping-cart-application-service/src/main/java/cn/freemud/controller/ShoppingCartCollageController.java
+7
-0
shopping-cart-application-service/src/main/java/cn/freemud/controller/ShoppingCartController.java
+13
-0
shopping-cart-application-service/src/main/java/cn/freemud/demo/adapter/service/CalculationSharingAdapter.java
+2
-3
shopping-cart-application-service/src/main/java/cn/freemud/demo/manager/promotion/KgdPromotionServiceImpl.java
+2
-1
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/impl/PlatformApportionService.java
+8
-4
shopping-cart-application-service/src/main/java/cn/freemud/factory/AbstractShoppingCartImpl.java
+1
-1
shopping-cart-application-service/src/main/java/cn/freemud/service/delivery/impl/GradDeliveryServiceImpl.java
+6
-1
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/AssortmentSdkService.java
+9
-2
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/CouponServiceImpl.java
+9
-2
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/MaterialPromotionService.java
+10
-2
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartCollageServiceImpl.java
+5
-1
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartMallServiceImpl.java
+9
-2
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartMealServiceImpl.java
+2
-1
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
+25
-6
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculationCommonService.java
+13
-3
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculationSharingDiscountService.java
+13
-3
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/promotion/AdditionSharingService.java
+7
-2
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
+45
-11
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/CouponDiscountCalculation.java
+17
-4
shopping-cart-application-service/src/main/java/cn/freemud/service/thirdparty/ActivityClient.java
+3
-3
shopping-cart-application-service/src/main/java/cn/freemud/service/thirdparty/CalculationClient.java
+1
-1
shopping-cart-application-service/src/main/java/cn/freemud/service/thirdparty/CardBinClient.java
+2
-2
shopping-cart-application-service/src/main/java/cn/freemud/service/thirdparty/CouponOnlineClient.java
+1
-1
shopping-cart-application-service/src/main/java/cn/freemud/service/thirdparty/CustomerApplicationClient.java
+2
-2
shopping-cart-application-service/src/main/java/cn/freemud/service/thirdparty/ProductClient.java
+2
-2
shopping-cart-application-service/src/main/java/cn/freemud/service/thirdparty/StockClient.java
+1
-1
shopping-cart-application-service/src/main/java/cn/freemud/service/thirdparty/StoreItemClient.java
+5
-5
shopping-cart-application-service/src/main/resources/logback.xml
+19
-10
No files found.
shopping-cart-application-service/pom.xml
View file @
30d26a81
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<dependency>
<dependency>
<groupId>
com.freemud.application.service.sdk
</groupId>
<groupId>
com.freemud.application.service.sdk
</groupId>
<artifactId>
sdk-common-base
</artifactId>
<artifactId>
sdk-common-base
</artifactId>
<version>
1.5.7-SNAPSHOT
</version>
<version>
2.0.BETA
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
com.freemud.application.service.sdk
</groupId>
<groupId>
com.freemud.application.service.sdk
</groupId>
...
...
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
View file @
30d26a81
...
@@ -690,7 +690,8 @@ public class ShoppingCartConvertAdapter {
...
@@ -690,7 +690,8 @@ public class ShoppingCartConvertAdapter {
this
.
checkMaterialProductForMCoffee
(
cartGoods
,
spuProduct
);
this
.
checkMaterialProductForMCoffee
(
cartGoods
,
spuProduct
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ErrorLog
.
infoConvertJson
(
this
.
getClass
(),
"updateCartGoodsInfoForMCoffee_Error"
,
ex
);
//ErrorLog.infoConvertJson(this.getClass(), "updateCartGoodsInfoForMCoffee_Error", ex);
ErrorLog
.
errorConvertJson
(
this
.
getClass
(),
"updateCartGoodsInfoForMCoffee_Error"
,
ex
);
cartGoods
.
setCartGoodsUid
(
null
);
cartGoods
.
setCartGoodsUid
(
null
);
}
}
}
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/annotations/IgnoreFeignLogAnnotation.java
View file @
30d26a81
...
@@ -3,9 +3,6 @@ package cn.freemud.annotations;
...
@@ -3,9 +3,6 @@ package cn.freemud.annotations;
import
java.lang.annotation.*
;
import
java.lang.annotation.*
;
/**
* @author freemud
*/
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Target
(
value
=
{
ElementType
.
METHOD
})
@Target
(
value
=
{
ElementType
.
METHOD
})
@Documented
@Documented
...
@@ -23,10 +20,11 @@ public @interface IgnoreFeignLogAnnotation {
...
@@ -23,10 +20,11 @@ public @interface IgnoreFeignLogAnnotation {
*
*
* @return
* @return
*/
*/
String
[]
excludeStatusCodes
()
default
"100"
;
int
[]
excludeStatusCodes
()
default
0
;
String
statusCodeFieldName
()
default
"code"
;
String
statusCodeFieldName
()
default
"code"
;
String
messageFieldName
()
default
"message"
;
String
messageFieldName
()
default
"message"
;
}
}
shopping-cart-application-service/src/main/java/cn/freemud/aop/ControllerLogAop.java
View file @
30d26a81
...
@@ -34,8 +34,8 @@ import java.util.UUID;
...
@@ -34,8 +34,8 @@ import java.util.UUID;
/**
/**
* @author freemud_whh
* @author freemud_whh
*/
*/
@Aspect
//
@Aspect
@Component
//
@Component
public
class
ControllerLogAop
implements
Ordered
{
public
class
ControllerLogAop
implements
Ordered
{
@Autowired
@Autowired
...
@@ -72,9 +72,9 @@ public class ControllerLogAop implements Ordered {
...
@@ -72,9 +72,9 @@ public class ControllerLogAop implements Ordered {
Object
target
=
joinPoint
.
getTarget
();
Object
target
=
joinPoint
.
getTarget
();
Method
currentMethod
=
target
.
getClass
().
getMethod
(
msig
.
getName
(),
msig
.
getParameterTypes
());
Method
currentMethod
=
target
.
getClass
().
getMethod
(
msig
.
getName
(),
msig
.
getParameterTypes
());
HttpServletRequest
request
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
();
HttpServletRequest
request
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
();
if
(
ApiLog
.
isDebugEnabled
())
{
/*
if (ApiLog.isDebugEnabled()) {
ApiLog.debug("获取tracking的值====>{}", new Object[]{request.getHeader("x-transaction-id")});
ApiLog.debug("获取tracking的值====>{}", new Object[]{request.getHeader("x-transaction-id")});
}
}
*/
LogThreadLocal
.
setTrackingNo
(
StringUtils
.
isEmpty
(
request
.
getHeader
(
"x-transaction-id"
))
?
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
)
:
request
.
getHeader
(
"x-transaction-id"
));
LogThreadLocal
.
setTrackingNo
(
StringUtils
.
isEmpty
(
request
.
getHeader
(
"x-transaction-id"
))
?
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
)
:
request
.
getHeader
(
"x-transaction-id"
));
List
logArgs
=
this
.
getLogArgs
(
currentMethod
,
joinPoint
);
List
logArgs
=
this
.
getLogArgs
(
currentMethod
,
joinPoint
);
String
requestData
=
JSON
.
toJSONString
(
logArgs
);
String
requestData
=
JSON
.
toJSONString
(
logArgs
);
...
@@ -95,7 +95,7 @@ public class ControllerLogAop implements Ordered {
...
@@ -95,7 +95,7 @@ public class ControllerLogAop implements Ordered {
}
}
}
}
}
}
ApiLog
.
infoConvertJson
(
logMethod
.
toString
(),
logIgnore
.
logMessage
(),
request
,
startTime
,
System
.
currentTimeMillis
(),
requestData
,
logObj
);
//
ApiLog.infoConvertJson(logMethod.toString(), logIgnore.logMessage(), request, startTime, System.currentTimeMillis(), requestData, logObj);
LogThreadLocal
.
removeTrackingNo
();
LogThreadLocal
.
removeTrackingNo
();
return
object
;
return
object
;
}
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/aop/WebAspect.java
View file @
30d26a81
...
@@ -14,6 +14,7 @@ import com.freemud.api.assortment.datamanager.manager.AssortmentOpenPlatformConf
...
@@ -14,6 +14,7 @@ import com.freemud.api.assortment.datamanager.manager.AssortmentOpenPlatformConf
import
com.freemud.api.assortment.datamanager.manager.customer.AssortmentCustomerInfoManager
;
import
com.freemud.api.assortment.datamanager.manager.customer.AssortmentCustomerInfoManager
;
import
com.freemud.application.sdk.api.base.SDKCommonBaseContextWare
;
import
com.freemud.application.sdk.api.base.SDKCommonBaseContextWare
;
import
com.freemud.application.sdk.api.log.ApiLog
;
import
com.freemud.application.sdk.api.log.ApiLog
;
import
com.freemud.application.sdk.api.log.ErrorLog
;
import
com.freemud.application.sdk.api.log.LogThreadLocal
;
import
com.freemud.application.sdk.api.log.LogThreadLocal
;
import
com.freemud.application.sdk.api.log.ThirdPartyLog
;
import
com.freemud.application.sdk.api.log.ThirdPartyLog
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -54,6 +55,7 @@ import java.util.Objects;
...
@@ -54,6 +55,7 @@ import java.util.Objects;
* @Copyright: 2018 www.freemud.cn Inc. All rights reserved.
* @Copyright: 2018 www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
*/
*/
@Slf4j
@Aspect
@Aspect
@Component
@Component
public
class
WebAspect
{
public
class
WebAspect
{
...
@@ -87,6 +89,12 @@ public class WebAspect {
...
@@ -87,6 +89,12 @@ public class WebAspect {
/**
/**
* 是否打印响应报文日志,默认是false,若为true会覆盖注解里面的{@link IgnoreFeignLogAnnotation}配置,输出响应报文里面所有的信息
* 是否打印响应报文日志,默认是false,若为true会覆盖注解里面的{@link IgnoreFeignLogAnnotation}配置,输出响应报文里面所有的信息
*/
*/
@Value
(
"${print-feign-response-body-log:false}"
)
private
volatile
boolean
printFeignResponseBodyLog
=
false
;
/**
* 是否打印响应报文日志,默认是false,若为true会覆盖注解里面的{@link IgnoreFeignLogAnnotation}配置,输出响应报文里面所有的信息
*/
@Value
(
"${print-feign-response-body-log-shop-cart:false}"
)
@Value
(
"${print-feign-response-body-log-shop-cart:false}"
)
private
volatile
boolean
printFeignResponseBodyLogForShopCart
=
false
;
private
volatile
boolean
printFeignResponseBodyLogForShopCart
=
false
;
...
@@ -159,7 +167,7 @@ public class WebAspect {
...
@@ -159,7 +167,7 @@ public class WebAspect {
@Around
(
"clientLog()"
)
@Around
(
"clientLog()"
)
public
Object
doAround
(
ProceedingJoinPoint
joinPoint
)
throws
Throwable
{
public
Object
doAround
(
ProceedingJoinPoint
joinPoint
)
throws
Throwable
{
long
start
=
System
.
currentTimeMillis
();
/*
long start = System.currentTimeMillis();
Object result = null;
Object result = null;
try {
try {
result = joinPoint.proceed();
result = joinPoint.proceed();
...
@@ -197,6 +205,52 @@ public class WebAspect {
...
@@ -197,6 +205,52 @@ public class WebAspect {
} catch (Exception e) {
} catch (Exception e) {
LogUtil.error("WebAspect Feign Log Ignore error {}", "","",e);
LogUtil.error("WebAspect Feign Log Ignore error {}", "","",e);
}
}
return result;*/
long
start
=
System
.
currentTimeMillis
();
Object
result
=
null
;
try
{
result
=
joinPoint
.
proceed
();
}
catch
(
Exception
ex
)
{
ThirdPartLogVo
thirdPartLogVo
=
LogUtil
.
createThirdPartLogVo
(
joinPoint
);
ErrorLog
.
printErrorLog
(
ex
.
getMessage
(),
thirdPartLogVo
.
getUri
(),
thirdPartLogVo
.
getRequestBody
(),
ex
);
throw
ex
;
}
try
{
Signature
sig
=
joinPoint
.
getSignature
();
MethodSignature
msig
=
null
;
if
(
sig
instanceof
MethodSignature
)
{
msig
=
(
MethodSignature
)
sig
;
Method
currentMethod
=
sig
.
getDeclaringType
().
getDeclaredMethod
(
msig
.
getName
(),
msig
.
getParameterTypes
());
Object
logReult
=
result
;
ThirdPartLogVo
thirdPartLogVo
=
LogUtil
.
createThirdPartLogVo
(
joinPoint
);
String
statusCodeValue
=
"ignore"
;
String
messageValue
=
"ignore"
;
// 打印第三方出参日志
IgnoreFeignLogAnnotation
logIgnore
=
currentMethod
.
getAnnotation
(
IgnoreFeignLogAnnotation
.
class
);
if
(
logIgnore
!=
null
)
{
statusCodeValue
=
org
.
apache
.
commons
.
beanutils
.
BeanUtils
.
getProperty
(
result
,
logIgnore
.
statusCodeFieldName
());
messageValue
=
org
.
apache
.
commons
.
beanutils
.
BeanUtils
.
getProperty
(
result
,
logIgnore
.
messageFieldName
());
if
(!
this
.
printFeignResponseBodyLog
||
logIgnore
.
printLog
())
{
//todo 当排除了这个状态码不打印响应的具体内容只会打印状态码和状态描述信息
int
[]
excludeStatusCodes
=
logIgnore
.
excludeStatusCodes
();
if
(!
StringUtils
.
isEmpty
(
statusCodeValue
)
&&
this
.
containStatusCode
(
excludeStatusCodes
,
statusCodeValue
))
{
logReult
=
result
.
getClass
().
newInstance
();
org
.
apache
.
commons
.
beanutils
.
BeanUtils
.
setProperty
(
logReult
,
logIgnore
.
statusCodeFieldName
(),
statusCodeValue
);
org
.
apache
.
commons
.
beanutils
.
BeanUtils
.
setProperty
(
logReult
,
logIgnore
.
messageFieldName
(),
messageValue
);
}
}
}
ThirdPartyLog
.
infoConvertJson
(
statusCodeValue
,
messageValue
,
start
,
System
.
currentTimeMillis
(),
thirdPartLogVo
.
getUri
(),
thirdPartLogVo
.
getRequestBody
(),
logReult
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"WebAspect Feign Log Ignore error {}"
,
ExceptionUtils
.
getMessage
(
e
));
}
return
result
;
return
result
;
}
}
...
@@ -270,7 +324,7 @@ public class WebAspect {
...
@@ -270,7 +324,7 @@ public class WebAspect {
return
notFilterUrl
;
return
notFilterUrl
;
}
}
private
boolean
containStatusCode
(
String
[]
excludeStatusCodes
,
/*
private boolean containStatusCode(String[] excludeStatusCodes,
String statusCodeValue) {
String statusCodeValue) {
if (excludeStatusCodes == null || excludeStatusCodes.length == 0) {
if (excludeStatusCodes == null || excludeStatusCodes.length == 0) {
return false;
return false;
...
@@ -281,6 +335,18 @@ public class WebAspect {
...
@@ -281,6 +335,18 @@ public class WebAspect {
}
}
}
}
return false;
return false;
}*/
private
boolean
containStatusCode
(
int
[]
excludeStatusCodes
,
String
statusCodeValue
)
{
if
(
excludeStatusCodes
==
null
||
excludeStatusCodes
.
length
==
0
)
{
return
false
;
}
for
(
int
i
=
0
;
i
<
excludeStatusCodes
.
length
;
i
++)
{
if
(
excludeStatusCodes
[
i
]
==
Integer
.
valueOf
(
statusCodeValue
))
{
return
true
;
}
}
return
false
;
}
}
}
}
shopping-cart-application-service/src/main/java/cn/freemud/constant/ApplicationConstant.java
View file @
30d26a81
...
@@ -13,6 +13,8 @@
...
@@ -13,6 +13,8 @@
package
cn
.
freemud
.
constant
;
package
cn
.
freemud
.
constant
;
import
org.springframework.beans.factory.annotation.Value
;
public
class
ApplicationConstant
{
public
class
ApplicationConstant
{
public
final
static
String
CURRENT_VERSION
=
"1.5.2"
;
public
final
static
String
CURRENT_VERSION
=
"1.5.2"
;
...
@@ -22,4 +24,8 @@ public class ApplicationConstant {
...
@@ -22,4 +24,8 @@ public class ApplicationConstant {
public
final
static
String
DELIVERY_DISCOUNT_DESC2
=
"订单满%s元免配送费"
;
public
final
static
String
DELIVERY_DISCOUNT_DESC2
=
"订单满%s元免配送费"
;
public
final
static
String
DELIVERY_DISCOUNT_DESC3
=
"另需配送费%s元"
;
public
final
static
String
DELIVERY_DISCOUNT_DESC3
=
"另需配送费%s元"
;
public
final
static
String
DELIVERY_DISCOUNT_DESC4
=
" 选择了配送券"
;
public
final
static
String
DELIVERY_DISCOUNT_DESC4
=
" 选择了配送券"
;
@Value
(
"${print-debug-log:false}"
)
public
final
static
boolean
printDebug
=
false
;
}
}
shopping-cart-application-service/src/main/java/cn/freemud/controller/AgentController.java
View file @
30d26a81
...
@@ -2,13 +2,14 @@ package cn.freemud.controller;
...
@@ -2,13 +2,14 @@ package cn.freemud.controller;
import
cn.freemud.monitorcenter.tools.HealthUtil
;
import
cn.freemud.monitorcenter.tools.HealthUtil
;
import
com.freemud.application.sdk.api.log.ApiAnnotation
;
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
;
@RestController
@RestController
public
class
AgentController
{
public
class
AgentController
{
@ApiAnnotation
@RequestMapping
(
value
=
"/agent/check"
)
@RequestMapping
(
value
=
"/agent/check"
)
public
String
reportDefault
()
{
public
String
reportDefault
()
{
return
HealthUtil
.
healthCheck
();
return
HealthUtil
.
healthCheck
();
...
@@ -19,6 +20,7 @@ public class AgentController {
...
@@ -19,6 +20,7 @@ public class AgentController {
* 不可删除,如删除后会造成健康检查失败而重启服务
* 不可删除,如删除后会造成健康检查失败而重启服务
* @return
* @return
*/
*/
@ApiAnnotation
@RequestMapping
(
value
=
"/health/check"
)
@RequestMapping
(
value
=
"/health/check"
)
public
String
checkHealth
()
{
public
String
checkHealth
()
{
return
"ok"
;
return
"ok"
;
...
...
shopping-cart-application-service/src/main/java/cn/freemud/controller/ShoppingCartCollageController.java
View file @
30d26a81
...
@@ -38,6 +38,7 @@ public class ShoppingCartCollageController {
...
@@ -38,6 +38,7 @@ public class ShoppingCartCollageController {
/**
/**
* 向拼单购物车中添加商品
* 向拼单购物车中添加商品
*/
*/
@ApiAnnotation
@PostMapping
(
value
=
"/addGoods"
)
@PostMapping
(
value
=
"/addGoods"
)
@LogIgnore
(
logMessage
=
"addGoods"
)
@LogIgnore
(
logMessage
=
"addGoods"
)
public
BaseResponse
addGoods
(
@Validated
@LogParams
@RequestBody
AddShoppingCartGoodsRequestVo
request
)
{
public
BaseResponse
addGoods
(
@Validated
@LogParams
@RequestBody
AddShoppingCartGoodsRequestVo
request
)
{
...
@@ -47,6 +48,7 @@ public class ShoppingCartCollageController {
...
@@ -47,6 +48,7 @@ public class ShoppingCartCollageController {
/**
/**
* 修改拼单购物车中商品数量
* 修改拼单购物车中商品数量
*/
*/
@ApiAnnotation
@LogIgnore
(
logMessage
=
"updateGoodsQty"
)
@LogIgnore
(
logMessage
=
"updateGoodsQty"
)
@PostMapping
(
value
=
"/updateGoodsQty"
)
@PostMapping
(
value
=
"/updateGoodsQty"
)
public
BaseResponse
updateGoodsQty
(
@Validated
@LogParams
@RequestBody
UpdateShoppingCartGoodsQtyRequestVo
request
)
{
public
BaseResponse
updateGoodsQty
(
@Validated
@LogParams
@RequestBody
UpdateShoppingCartGoodsQtyRequestVo
request
)
{
...
@@ -56,6 +58,7 @@ public class ShoppingCartCollageController {
...
@@ -56,6 +58,7 @@ public class ShoppingCartCollageController {
/**
/**
* 查询购物车信息
* 查询购物车信息
*/
*/
@ApiAnnotation
@LogIgnore
(
logMessage
=
"listCartGoods"
)
@LogIgnore
(
logMessage
=
"listCartGoods"
)
@PostMapping
(
value
=
"/listCartGoods"
)
@PostMapping
(
value
=
"/listCartGoods"
)
public
BaseResponse
listCartGoods
(
@Validated
@LogParams
@RequestBody
ShoppingCartInfoRequestVo
request
)
{
public
BaseResponse
listCartGoods
(
@Validated
@LogParams
@RequestBody
ShoppingCartInfoRequestVo
request
)
{
...
@@ -65,6 +68,7 @@ public class ShoppingCartCollageController {
...
@@ -65,6 +68,7 @@ public class ShoppingCartCollageController {
/**
/**
* 清空自己的购物车
* 清空自己的购物车
*/
*/
@ApiAnnotation
@LogIgnore
(
logMessage
=
"clearPartCartGoods"
)
@LogIgnore
(
logMessage
=
"clearPartCartGoods"
)
@PostMapping
(
value
=
"/clearPartCartGoods"
)
@PostMapping
(
value
=
"/clearPartCartGoods"
)
public
BaseResponse
clearPartCartGoods
(
@Validated
@LogParams
@RequestBody
ShoppingCartCollageClearRequestVo
request
)
{
public
BaseResponse
clearPartCartGoods
(
@Validated
@LogParams
@RequestBody
ShoppingCartCollageClearRequestVo
request
)
{
...
@@ -74,6 +78,7 @@ public class ShoppingCartCollageController {
...
@@ -74,6 +78,7 @@ public class ShoppingCartCollageController {
/**
/**
* 清空购物车
* 清空购物车
*/
*/
@ApiAnnotation
@LogIgnore
(
logMessage
=
"clearCartGoods"
)
@LogIgnore
(
logMessage
=
"clearCartGoods"
)
@PostMapping
(
value
=
"/clearCartGoods"
)
@PostMapping
(
value
=
"/clearCartGoods"
)
public
BaseResponse
clearCartGoods
(
@Validated
@LogParams
@RequestBody
ShoppingCartClearRequestVo
request
)
{
public
BaseResponse
clearCartGoods
(
@Validated
@LogParams
@RequestBody
ShoppingCartClearRequestVo
request
)
{
...
@@ -86,6 +91,7 @@ public class ShoppingCartCollageController {
...
@@ -86,6 +91,7 @@ public class ShoppingCartCollageController {
* @param getShoppingCartGoodsApportionRequestVo
* @param getShoppingCartGoodsApportionRequestVo
* @return
* @return
*/
*/
@ApiAnnotation
@LogIgnore
(
logMessage
=
"getShoppingCartGoodsApportion"
)
@LogIgnore
(
logMessage
=
"getShoppingCartGoodsApportion"
)
@PostMapping
(
value
=
"/getShoppingCartGoodsApportion"
)
@PostMapping
(
value
=
"/getShoppingCartGoodsApportion"
)
public
BaseResponse
getShoppingCartGoodsApportion
(
@Validated
@LogParams
@RequestBody
GetShoppingCartGoodsApportionRequestVo
getShoppingCartGoodsApportionRequestVo
)
{
public
BaseResponse
getShoppingCartGoodsApportion
(
@Validated
@LogParams
@RequestBody
GetShoppingCartGoodsApportionRequestVo
getShoppingCartGoodsApportionRequestVo
)
{
...
@@ -110,6 +116,7 @@ public class ShoppingCartCollageController {
...
@@ -110,6 +116,7 @@ public class ShoppingCartCollageController {
* 查询购车信息无配送费
* 查询购车信息无配送费
* SVC卡支付check,check购物车金额加配送费小于储值卡金额
* SVC卡支付check,check购物车金额加配送费小于储值卡金额
*/
*/
@ApiAnnotation
@LogIgnore
(
logMessage
=
"listCartGoodsCheck"
)
@LogIgnore
(
logMessage
=
"listCartGoodsCheck"
)
@PostMapping
(
value
=
"/listCartGoodsCheck"
)
@PostMapping
(
value
=
"/listCartGoodsCheck"
)
public
BaseResponse
listCartGoodsCheck
(
@Validated
@LogParams
@RequestBody
ShoppingCartInfoRequestVo
request
)
{
public
BaseResponse
listCartGoodsCheck
(
@Validated
@LogParams
@RequestBody
ShoppingCartInfoRequestVo
request
)
{
...
...
shopping-cart-application-service/src/main/java/cn/freemud/controller/ShoppingCartController.java
View file @
30d26a81
...
@@ -76,6 +76,7 @@ public class ShoppingCartController {
...
@@ -76,6 +76,7 @@ public class ShoppingCartController {
/**
/**
* 从微信卡券向购物车中添加商品
* 从微信卡券向购物车中添加商品
*/
*/
@ApiAnnotation
@PostMapping
(
value
=
"/addGoodsByCard"
)
@PostMapping
(
value
=
"/addGoodsByCard"
)
@LogIgnore
(
logMessage
=
"addGoodsByCard"
)
@LogIgnore
(
logMessage
=
"addGoodsByCard"
)
public
BaseResponse
addGoodsByCard
(
@Validated
@LogParams
@RequestBody
AddGoodsByWeixinCardRequestVo
request
)
{
public
BaseResponse
addGoodsByCard
(
@Validated
@LogParams
@RequestBody
AddGoodsByWeixinCardRequestVo
request
)
{
...
@@ -85,6 +86,7 @@ public class ShoppingCartController {
...
@@ -85,6 +86,7 @@ public class ShoppingCartController {
/**
/**
* 向购物车中添加商品
* 向购物车中添加商品
*/
*/
@ApiAnnotation
@IsConvertEN
@IsConvertEN
@PostMapping
(
value
=
"/addGoods"
)
@PostMapping
(
value
=
"/addGoods"
)
@LogIgnore
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
logMessage
=
"addGoods"
)
@LogIgnore
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
logMessage
=
"addGoods"
)
...
@@ -101,6 +103,7 @@ public class ShoppingCartController {
...
@@ -101,6 +103,7 @@ public class ShoppingCartController {
/**
/**
* 修改购物车中商品数量
* 修改购物车中商品数量
*/
*/
@ApiAnnotation
@IsConvertEN
@IsConvertEN
@PostMapping
(
value
=
"/updateGoodsQty"
)
@PostMapping
(
value
=
"/updateGoodsQty"
)
@LogIgnore
(
logMessage
=
"updateGoodsQty"
)
@LogIgnore
(
logMessage
=
"updateGoodsQty"
)
...
@@ -117,6 +120,7 @@ public class ShoppingCartController {
...
@@ -117,6 +120,7 @@ public class ShoppingCartController {
/**
/**
* 查询购物车信息
* 查询购物车信息
*/
*/
@ApiAnnotation
@IsConvertEN
@IsConvertEN
@PostMapping
(
value
=
"/listCartGoods"
)
@PostMapping
(
value
=
"/listCartGoods"
)
@LogIgnore
(
logMessage
=
"listCartGoods"
)
@LogIgnore
(
logMessage
=
"listCartGoods"
)
...
@@ -139,6 +143,7 @@ public class ShoppingCartController {
...
@@ -139,6 +143,7 @@ public class ShoppingCartController {
* 查询购车信息无配送费
* 查询购车信息无配送费
* SVC卡支付check,check购物车金额加配送费小于储值卡金额
* SVC卡支付check,check购物车金额加配送费小于储值卡金额
*/
*/
@ApiAnnotation
@PostMapping
(
value
=
"/listCartGoodsCheck"
)
@PostMapping
(
value
=
"/listCartGoodsCheck"
)
@LogIgnore
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
logMessage
=
"listCartGoodsCheck"
)
@LogIgnore
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
logMessage
=
"listCartGoodsCheck"
)
public
BaseResponse
listCartGoodsCheck
(
@Validated
@LogParams
@RequestBody
ShoppingCartInfoRequestVo
request
)
{
public
BaseResponse
listCartGoodsCheck
(
@Validated
@LogParams
@RequestBody
ShoppingCartInfoRequestVo
request
)
{
...
@@ -161,6 +166,7 @@ public class ShoppingCartController {
...
@@ -161,6 +166,7 @@ public class ShoppingCartController {
/**
/**
* 清空购物车
* 清空购物车
*/
*/
@ApiAnnotation
@IsConvertEN
@IsConvertEN
@PostMapping
(
value
=
"/clearCartGoods"
)
@PostMapping
(
value
=
"/clearCartGoods"
)
@LogIgnore
(
logMessage
=
"clearCartGoods"
)
@LogIgnore
(
logMessage
=
"clearCartGoods"
)
...
@@ -182,6 +188,7 @@ public class ShoppingCartController {
...
@@ -182,6 +188,7 @@ public class ShoppingCartController {
* @param getShoppingCartGoodsApportionRequestVo
* @param getShoppingCartGoodsApportionRequestVo
* @return
* @return
*/
*/
@ApiAnnotation
@IsConvertEN
@IsConvertEN
@PostMapping
(
value
=
"/getShoppingCartGoodsApportion"
)
@PostMapping
(
value
=
"/getShoppingCartGoodsApportion"
)
@LogIgnore
(
logMessage
=
"getShoppingCartGoodsApportion"
)
@LogIgnore
(
logMessage
=
"getShoppingCartGoodsApportion"
)
...
@@ -239,6 +246,7 @@ public class ShoppingCartController {
...
@@ -239,6 +246,7 @@ public class ShoppingCartController {
/**
/**
* 线下订单查询接口
* 线下订单查询接口
*/
*/
@ApiAnnotation
@PostMapping
(
value
=
"/getMemberInfo"
)
@PostMapping
(
value
=
"/getMemberInfo"
)
@LogIgnore
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
logMessage
=
"/getMemberInfo"
)
@LogIgnore
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
logMessage
=
"/getMemberInfo"
)
public
BaseResponse
getMemberInfo
(
@LogParams
@RequestBody
GetMemberInfoRequestDto
request
)
{
public
BaseResponse
getMemberInfo
(
@LogParams
@RequestBody
GetMemberInfoRequestDto
request
)
{
...
@@ -248,6 +256,7 @@ public class ShoppingCartController {
...
@@ -248,6 +256,7 @@ public class ShoppingCartController {
/**
/**
* 结算页获取是否展示订单那备注配置
* 结算页获取是否展示订单那备注配置
*/
*/
@ApiAnnotation
@PostMapping
(
value
=
"/getOpenStoreIappWxappConfig"
)
@PostMapping
(
value
=
"/getOpenStoreIappWxappConfig"
)
@LogIgnore
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
logMessage
=
"/getOpenStoreIappWxappConfig"
)
@LogIgnore
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
logMessage
=
"/getOpenStoreIappWxappConfig"
)
public
BaseResponse
getOpenStoreIappWxappConfig
(
@LogParams
@RequestBody
OpenStoreIappWxappConfigRequestVo
request
)
{
public
BaseResponse
getOpenStoreIappWxappConfig
(
@LogParams
@RequestBody
OpenStoreIappWxappConfigRequestVo
request
)
{
...
@@ -257,6 +266,7 @@ public class ShoppingCartController {
...
@@ -257,6 +266,7 @@ public class ShoppingCartController {
/**
/**
* 结算页获取加价购活动商品列表
* 结算页获取加价购活动商品列表
*/
*/
@ApiAnnotation
@PostMapping
(
value
=
"/premiumExchange"
)
@PostMapping
(
value
=
"/premiumExchange"
)
@LogIgnore
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
logMessage
=
"/premiumExchange"
)
@LogIgnore
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
logMessage
=
"/premiumExchange"
)
public
BaseResponse
premiumExchange
(
@LogParams
@RequestBody
@Validated
PremiumExchangeRequestVo
request
)
{
public
BaseResponse
premiumExchange
(
@LogParams
@RequestBody
@Validated
PremiumExchangeRequestVo
request
)
{
...
@@ -265,6 +275,7 @@ public class ShoppingCartController {
...
@@ -265,6 +275,7 @@ public class ShoppingCartController {
/**
/**
* 券码查询购物车商品信息(平台结算页可用券列表用)
* 券码查询购物车商品信息(平台结算页可用券列表用)
*/
*/
@ApiAnnotation
@PostMapping
(
value
=
"/getCartInfoByUser"
)
@PostMapping
(
value
=
"/getCartInfoByUser"
)
@LogIgnore
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
logMessage
=
"/getCartInfoByUser"
)
@LogIgnore
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
logMessage
=
"/getCartInfoByUser"
)
public
BaseResponse
getCartInfoByUser
(
@LogParams
@RequestBody
@Validated
CouponAvailableRequestVo
request
)
{
public
BaseResponse
getCartInfoByUser
(
@LogParams
@RequestBody
@Validated
CouponAvailableRequestVo
request
)
{
...
@@ -275,6 +286,7 @@ public class ShoppingCartController {
...
@@ -275,6 +286,7 @@ public class ShoppingCartController {
* 【C端服务端】批量一键加购
* 【C端服务端】批量一键加购
* 替换老门店的商品到切换的门店下
* 替换老门店的商品到切换的门店下
*/
*/
@ApiAnnotation
@PostMapping
(
value
=
"/replaceGoodsByShop"
)
@PostMapping
(
value
=
"/replaceGoodsByShop"
)
@LogIgnore
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
logMessage
=
"/replaceGoodsByShop"
)
@LogIgnore
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
logMessage
=
"/replaceGoodsByShop"
)
public
BaseResponse
replaceGoodsByShop
(
@LogParams
@RequestBody
@Validated
ShopGoodsReplaceVo
request
)
{
public
BaseResponse
replaceGoodsByShop
(
@LogParams
@RequestBody
@Validated
ShopGoodsReplaceVo
request
)
{
...
@@ -289,6 +301,7 @@ public class ShoppingCartController {
...
@@ -289,6 +301,7 @@ public class ShoppingCartController {
/**
/**
* 测试用,后续删除
* 测试用,后续删除
*/
*/
@ApiAnnotation
@PostMapping
(
value
=
"/test/putCache"
)
@PostMapping
(
value
=
"/test/putCache"
)
@LogIgnore
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
logMessage
=
"/putCache"
)
@LogIgnore
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
logMessage
=
"/putCache"
)
public
BaseResponse
putCache
(
@LogParams
@RequestBody
@Validated
PutCacheVo
request
)
{
public
BaseResponse
putCache
(
@LogParams
@RequestBody
@Validated
PutCacheVo
request
)
{
...
...
shopping-cart-application-service/src/main/java/cn/freemud/demo/adapter/service/CalculationSharingAdapter.java
View file @
30d26a81
...
@@ -249,8 +249,7 @@ public class CalculationSharingAdapter {
...
@@ -249,8 +249,7 @@ public class CalculationSharingAdapter {
private
List
<
GetCalculationDiscountBO
.
CalculationDiscountCoupon
>
buildCoupons
(
List
<
GetCalculationDiscountBO
.
CalculationDiscountCoupon
>
oldCoupons
,
List
<
CouponCode
>
coupons
){
private
List
<
GetCalculationDiscountBO
.
CalculationDiscountCoupon
>
buildCoupons
(
List
<
GetCalculationDiscountBO
.
CalculationDiscountCoupon
>
oldCoupons
,
List
<
CouponCode
>
coupons
){
ApiLog
.
info
(
"批量使用优惠券前,oldCoupons,coupons"
,
oldCoupons
,
coupons
);
//ApiLog.info("批量使用优惠券前,oldCoupons,coupons",oldCoupons,coupons);
for
(
int
i
=
0
;
i
<
oldCoupons
.
size
()
;
i
++){
for
(
int
i
=
0
;
i
<
oldCoupons
.
size
()
;
i
++){
GetCalculationDiscountBO
.
CalculationDiscountCoupon
oldCoupon
=
oldCoupons
.
get
(
i
);
GetCalculationDiscountBO
.
CalculationDiscountCoupon
oldCoupon
=
oldCoupons
.
get
(
i
);
oldCoupon
.
setUseIndex
(
i
);
oldCoupon
.
setUseIndex
(
i
);
...
@@ -274,7 +273,7 @@ public class CalculationSharingAdapter {
...
@@ -274,7 +273,7 @@ public class CalculationSharingAdapter {
}
}
}
}
ApiLog
.
info
(
"批量使用优惠券后,oldCoupons,coupons"
,
oldCoupons
,
coupons
);
//
ApiLog.info("批量使用优惠券后,oldCoupons,coupons",oldCoupons,coupons);
return
oldCoupons
;
return
oldCoupons
;
}
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/demo/manager/promotion/KgdPromotionServiceImpl.java
View file @
30d26a81
...
@@ -44,7 +44,8 @@ public class KgdPromotionServiceImpl implements PromotionService{
...
@@ -44,7 +44,8 @@ public class KgdPromotionServiceImpl implements PromotionService{
CalculationSharingDiscountRequestDto
shareDiscountRequestDto
=
promotionBO2DTOAdapter
.
convert2CalculationSharingDiscountRequestDto
(
getCalculationDiscountBO
);
CalculationSharingDiscountRequestDto
shareDiscountRequestDto
=
promotionBO2DTOAdapter
.
convert2CalculationSharingDiscountRequestDto
(
getCalculationDiscountBO
);
CalculationSharingDiscountResponseDto
calculationSharingDiscountResponseDto
=
null
;
CalculationSharingDiscountResponseDto
calculationSharingDiscountResponseDto
=
null
;
try
{
try
{
ApiLog
.
debug
(
"start sharing discount dto={}"
,
JSON
.
toJSONString
(
shareDiscountRequestDto
));
//ApiLog.debug("start sharing discount dto={}", JSON.toJSONString(shareDiscountRequestDto));
ApiLog
.
printLog
(
"start sharing discount dto={}"
,
JSON
.
toJSONString
(
shareDiscountRequestDto
),
null
,
null
);
calculationSharingDiscountResponseDto
=
calculationClient
.
calculationSharingDiscount
(
shareDiscountRequestDto
);
calculationSharingDiscountResponseDto
=
calculationClient
.
calculationSharingDiscount
(
shareDiscountRequestDto
);
}
}
catch
(
Exception
e
)
{
catch
(
Exception
e
)
{
...
...
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/impl/PlatformApportionService.java
View file @
30d26a81
...
@@ -2,6 +2,7 @@ package cn.freemud.demo.service.impl;
...
@@ -2,6 +2,7 @@ package cn.freemud.demo.service.impl;
import
cn.freemud.adapter.CouponAdapter
;
import
cn.freemud.adapter.CouponAdapter
;
import
cn.freemud.base.entity.BaseResponse
;
import
cn.freemud.base.entity.BaseResponse
;
import
cn.freemud.constant.ApplicationConstant
;
import
cn.freemud.demo.entities.bo.SendGoods
;
import
cn.freemud.demo.entities.bo.SendGoods
;
import
cn.freemud.demo.entities.bo.goods.*
;
import
cn.freemud.demo.entities.bo.goods.*
;
import
cn.freemud.demo.entities.bo.promotion.GetCalculationDiscountBO
;
import
cn.freemud.demo.entities.bo.promotion.GetCalculationDiscountBO
;
...
@@ -17,6 +18,7 @@ import cn.freemud.enums.*;
...
@@ -17,6 +18,7 @@ import cn.freemud.enums.*;
import
cn.freemud.interceptor.ServiceException
;
import
cn.freemud.interceptor.ServiceException
;
import
cn.freemud.service.CouponService
;
import
cn.freemud.service.CouponService
;
import
cn.freemud.utils.PropertyConvertUtil
;
import
cn.freemud.utils.PropertyConvertUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.freemud.application.sdk.api.log.ApiLog
;
import
com.freemud.application.sdk.api.log.ApiLog
;
import
com.freemud.application.sdk.api.productcenter.request.product.valid.ValidateShopProductType
;
import
com.freemud.application.sdk.api.productcenter.request.product.valid.ValidateShopProductType
;
import
com.freemud.sdk.api.assortment.shoppingcart.constant.CommonsConstant
;
import
com.freemud.sdk.api.assortment.shoppingcart.constant.CommonsConstant
;
...
@@ -26,6 +28,7 @@ import org.apache.commons.collections4.CollectionUtils;
...
@@ -26,6 +28,7 @@ import org.apache.commons.collections4.CollectionUtils;
import
org.apache.commons.collections4.MapUtils
;
import
org.apache.commons.collections4.MapUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.*
;
import
java.util.*
;
...
@@ -35,7 +38,6 @@ import static java.util.stream.Collectors.toList;
...
@@ -35,7 +38,6 @@ import static java.util.stream.Collectors.toList;
@Service
@Service
public
class
PlatformApportionService
extends
AbstractApportionService
{
public
class
PlatformApportionService
extends
AbstractApportionService
{
@Autowired
@Autowired
private
ProductManager
productManager
;
private
ProductManager
productManager
;
@Autowired
@Autowired
...
@@ -246,8 +248,10 @@ public class PlatformApportionService extends AbstractApportionService {
...
@@ -246,8 +248,10 @@ public class PlatformApportionService extends AbstractApportionService {
private
List
<
GetCalculationDiscountBO
.
CalculationDiscountCoupon
>
buildCoupons
(
List
<
GetCalculationDiscountBO
.
CalculationDiscountCoupon
>
oldCoupons
,
List
<
ShoppingCartGoodsApportionBO
.
couponCode
>
coupons
){
private
List
<
GetCalculationDiscountBO
.
CalculationDiscountCoupon
>
buildCoupons
(
List
<
GetCalculationDiscountBO
.
CalculationDiscountCoupon
>
oldCoupons
,
List
<
ShoppingCartGoodsApportionBO
.
couponCode
>
coupons
){
ApiLog
.
info
(
"批量使用优惠券前,oldCoupons,coupons"
,
oldCoupons
,
coupons
);
//ApiLog.info("批量使用优惠券前,oldCoupons,coupons",oldCoupons,coupons);
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"批量使用优惠券前,oldCoupons,coupons"
,
JSON
.
toJSONString
(
oldCoupons
),
JSON
.
toJSONString
(
coupons
),
null
);
}
for
(
int
i
=
0
;
i
<
oldCoupons
.
size
()
;
i
++){
for
(
int
i
=
0
;
i
<
oldCoupons
.
size
()
;
i
++){
GetCalculationDiscountBO
.
CalculationDiscountCoupon
oldCoupon
=
oldCoupons
.
get
(
i
);
GetCalculationDiscountBO
.
CalculationDiscountCoupon
oldCoupon
=
oldCoupons
.
get
(
i
);
oldCoupon
.
setUseIndex
(
i
);
oldCoupon
.
setUseIndex
(
i
);
...
@@ -272,7 +276,7 @@ public class PlatformApportionService extends AbstractApportionService {
...
@@ -272,7 +276,7 @@ public class PlatformApportionService extends AbstractApportionService {
}
}
}
}
ApiLog
.
info
(
"批量使用优惠券后,oldCoupons,coupons"
,
oldCoupons
,
coupons
);
//
ApiLog.info("批量使用优惠券后,oldCoupons,coupons",oldCoupons,coupons);
return
oldCoupons
;
return
oldCoupons
;
}
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/factory/AbstractShoppingCartImpl.java
View file @
30d26a81
...
@@ -214,7 +214,7 @@ public abstract class AbstractShoppingCartImpl implements ShoppingCartNewService
...
@@ -214,7 +214,7 @@ public abstract class AbstractShoppingCartImpl implements ShoppingCartNewService
if
(
StringUtils
.
isBlank
(
receiveId
))
{
if
(
StringUtils
.
isBlank
(
receiveId
))
{
return
deliveryAmount
;
return
deliveryAmount
;
}
}
ApiLog
.
debug
(
"获取配送配逻辑 tackingNo:{},storeDeliveryUseOld:{},receiveId:{},partnerId:{},storeId:{}"
,
LogThreadLocal
.
getTrackingNo
(),
storeDeliveryUseOld
,
receiveId
,
partnerId
,
storeId
);
//
ApiLog.debug("获取配送配逻辑 tackingNo:{},storeDeliveryUseOld:{},receiveId:{},partnerId:{},storeId:{}", LogThreadLocal.getTrackingNo(), storeDeliveryUseOld, receiveId, partnerId, storeId);
if
(
storeDeliveryUseOld
)
{
if
(
storeDeliveryUseOld
)
{
deliveryAmount
=
Long
.
parseLong
(
getDeliveryAmount
(
receiveId
,
partnerId
,
storeId
).
toString
());
deliveryAmount
=
Long
.
parseLong
(
getDeliveryAmount
(
receiveId
,
partnerId
,
storeId
).
toString
());
shoppingCartGoodsResponseVo
.
setDeliveryFeeZeroReason
(
0
);
shoppingCartGoodsResponseVo
.
setDeliveryFeeZeroReason
(
0
);
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/delivery/impl/GradDeliveryServiceImpl.java
View file @
30d26a81
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
package
cn
.
freemud
.
service
.
delivery
.
impl
;
package
cn
.
freemud
.
service
.
delivery
.
impl
;
import
cn.freemud.constant.ApplicationConstant
;
import
cn.freemud.entities.dto.store.GetEstimateDeliveryRequest
;
import
cn.freemud.entities.dto.store.GetEstimateDeliveryRequest
;
import
cn.freemud.entities.dto.store.StoreCBaseResponse
;
import
cn.freemud.entities.dto.store.StoreCBaseResponse
;
import
cn.freemud.entities.dto.store.StoreCBaseResponseDto
;
import
cn.freemud.entities.dto.store.StoreCBaseResponseDto
;
...
@@ -21,6 +22,7 @@ import cn.freemud.enums.ResponseResult;
...
@@ -21,6 +22,7 @@ import cn.freemud.enums.ResponseResult;
import
cn.freemud.interceptor.ServiceException
;
import
cn.freemud.interceptor.ServiceException
;
import
cn.freemud.service.delivery.DeliveryService
;
import
cn.freemud.service.delivery.DeliveryService
;
import
cn.freemud.service.store.StoreBaseApiClient
;
import
cn.freemud.service.store.StoreBaseApiClient
;
import
com.alibaba.fastjson.JSON
;
import
com.freemud.application.sdk.api.log.ApiLog
;
import
com.freemud.application.sdk.api.log.ApiLog
;
import
com.freemud.application.sdk.api.log.LogThreadLocal
;
import
com.freemud.application.sdk.api.log.LogThreadLocal
;
import
com.freemud.application.sdk.api.membercenter.request.QueryReceiveAddressRequest
;
import
com.freemud.application.sdk.api.membercenter.request.QueryReceiveAddressRequest
;
...
@@ -140,7 +142,10 @@ public class GradDeliveryServiceImpl extends AbstractDeliveryServiceImpl impleme
...
@@ -140,7 +142,10 @@ public class GradDeliveryServiceImpl extends AbstractDeliveryServiceImpl impleme
request
.
setPartnerId
(
partnerId
);
request
.
setPartnerId
(
partnerId
);
request
.
setStoreCode
(
storeCode
);
request
.
setStoreCode
(
storeCode
);
StoreCBaseResponse
<
StoreCBaseResponseDto
>
responseDto
=
storeBaseApiClient
.
queryDeliverDetail
(
request
);
StoreCBaseResponse
<
StoreCBaseResponseDto
>
responseDto
=
storeBaseApiClient
.
queryDeliverDetail
(
request
);
ApiLog
.
info
(
"fisherman 获取门店预计送达时间"
,
request
,
responseDto
);
//ApiLog.info("fisherman 获取门店预计送达时间",request,responseDto);
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"fisherman 获取门店预计送达时间"
,
JSON
.
toJSONString
(
request
),
JSON
.
toJSONString
(
responseDto
),
null
);
}
if
(
responseDto
==
null
)
{
if
(
responseDto
==
null
)
{
throw
new
ServiceException
(
ResponseResult
.
SYSTEM_BUSINESS_ERROR
);
throw
new
ServiceException
(
ResponseResult
.
SYSTEM_BUSINESS_ERROR
);
}
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/AssortmentSdkService.java
View file @
30d26a81
...
@@ -2,6 +2,7 @@ package cn.freemud.service.impl;
...
@@ -2,6 +2,7 @@ package cn.freemud.service.impl;
import
ch.qos.logback.classic.Level
;
import
ch.qos.logback.classic.Level
;
import
cn.freemud.base.entity.BaseResponse
;
import
cn.freemud.base.entity.BaseResponse
;
import
cn.freemud.constant.ApplicationConstant
;
import
cn.freemud.constant.ResponseCodeConstant
;
import
cn.freemud.constant.ResponseCodeConstant
;
import
cn.freemud.entities.dto.GetProductInfoDto
;
import
cn.freemud.entities.dto.GetProductInfoDto
;
import
cn.freemud.entities.dto.ProductInfosDto
;
import
cn.freemud.entities.dto.ProductInfosDto
;
...
@@ -81,7 +82,10 @@ public class AssortmentSdkService {
...
@@ -81,7 +82,10 @@ public class AssortmentSdkService {
cartParamDto
.
setUserId
(
userId
);
cartParamDto
.
setUserId
(
userId
);
BaseResponse
<
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
>
baseResponse
=
shoppingCartService
.
getCartGoods
(
cartParamDto
,
LogThreadLocal
.
getTrackingNo
());
BaseResponse
<
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
>
baseResponse
=
shoppingCartService
.
getCartGoods
(
cartParamDto
,
LogThreadLocal
.
getTrackingNo
());
if
(
baseResponse
==
null
||
!
ResponseResult
.
SUCCESS
.
getCode
().
equals
(
baseResponse
.
getCode
())
||
baseResponse
.
getResult
()
==
null
)
{
if
(
baseResponse
==
null
||
!
ResponseResult
.
SUCCESS
.
getCode
().
equals
(
baseResponse
.
getCode
())
||
baseResponse
.
getResult
()
==
null
)
{
ErrorLog
.
printLog
(
SDKCommonBaseContextWare
.
getAppName
(),
LogThreadLocal
.
getTrackingNo
(),
getClass
(),
"getCartGoods:"
+
JSONObject
.
toJSONString
(
baseResponse
),
cartParamDto
,
Level
.
ERROR
);
/*ErrorLog.printLog(SDKCommonBaseContextWare.getAppName(), LogThreadLocal.getTrackingNo(), getClass(),"getCartGoods:" + JSONObject.toJSONString(baseResponse), cartParamDto, Level.ERROR);*/
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"getCartGoods:"
,
SDKCommonBaseContextWare
.
getAppName
(),
LogThreadLocal
.
getTrackingNo
(),
JSONObject
.
toJSONString
(
baseResponse
));
}
return
null
;
return
null
;
}
}
...
@@ -321,7 +325,10 @@ public class AssortmentSdkService {
...
@@ -321,7 +325,10 @@ public class AssortmentSdkService {
ProductInfosDto
productInfosDto
=
storeItemClient
.
listProductInfos
(
getProductInfoDto
);
ProductInfosDto
productInfosDto
=
storeItemClient
.
listProductInfos
(
getProductInfoDto
);
if
(!
ResponseCodeConstant
.
RESPONSE_SUCCESS
.
equals
(
productInfosDto
.
getErrcode
())
||
CollectionUtils
.
isEmpty
(
productInfosDto
.
getData
().
getProducts
()))
{
if
(!
ResponseCodeConstant
.
RESPONSE_SUCCESS
.
equals
(
productInfosDto
.
getErrcode
())
||
CollectionUtils
.
isEmpty
(
productInfosDto
.
getData
().
getProducts
()))
{
ApiLog
.
info
(
"查询商品信息失败,getProductInfoDto,baseResponse"
,
getProductInfoDto
,
productInfosDto
);
// ApiLog.info("查询商品信息失败,getProductInfoDto,baseResponse",getProductInfoDto,productInfosDto);
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"查询商品信息失败,getProductInfoDto,baseResponse"
,
JSON
.
toJSONString
(
getProductInfoDto
),
JSON
.
toJSONString
(
productInfosDto
),
null
);
}
return
null
;
return
null
;
}
}
return
productInfosDto
.
getData
().
getProducts
();
return
productInfosDto
.
getData
().
getProducts
();
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/CouponServiceImpl.java
View file @
30d26a81
...
@@ -17,6 +17,7 @@ import cn.freemud.adapter.CouponAdapter;
...
@@ -17,6 +17,7 @@ import cn.freemud.adapter.CouponAdapter;
import
cn.freemud.adapter.StoreAdapter
;
import
cn.freemud.adapter.StoreAdapter
;
import
cn.freemud.adapter.StoreItemAdapter
;
import
cn.freemud.adapter.StoreItemAdapter
;
import
cn.freemud.base.util.DateUtil
;
import
cn.freemud.base.util.DateUtil
;
import
cn.freemud.constant.ApplicationConstant
;
import
cn.freemud.constant.ResponseCodeConstant
;
import
cn.freemud.constant.ResponseCodeConstant
;
import
cn.freemud.demo.manager.coupon.Finals
;
import
cn.freemud.demo.manager.coupon.Finals
;
import
cn.freemud.entities.dto.*
;
import
cn.freemud.entities.dto.*
;
...
@@ -762,7 +763,10 @@ public class CouponServiceImpl implements CouponService {
...
@@ -762,7 +763,10 @@ public class CouponServiceImpl implements CouponService {
@Override
@Override
public
CheckSpqInfoResponseDto
checkSpqInfo
(
CheckSpqInfoRequestDto
requestDto
)
{
public
CheckSpqInfoResponseDto
checkSpqInfo
(
CheckSpqInfoRequestDto
requestDto
)
{
ApiLog
.
debug
(
"checkSpqInfo****"
+
gson
.
toJson
(
requestDto
));
// ApiLog.debug("checkSpqInfo****" + gson.toJson(requestDto));
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"checkSpqInfo****"
,
gson
.
toJson
(
requestDto
),
null
,
null
);
}
String
partnerId
=
requestDto
.
getPartnerId
();
String
partnerId
=
requestDto
.
getPartnerId
();
String
couponCode
=
requestDto
.
getCouponCode
();
String
couponCode
=
requestDto
.
getCouponCode
();
String
storeId
=
requestDto
.
getStoreId
();
String
storeId
=
requestDto
.
getStoreId
();
...
@@ -836,7 +840,10 @@ public class CouponServiceImpl implements CouponService {
...
@@ -836,7 +840,10 @@ public class CouponServiceImpl implements CouponService {
dto
.
setSkuName
(
StringUtils
.
isNotBlank
(
productsVo
.
getSkuName
())
?
productsVo
.
getSkuName
()
:
productsVo
.
getSpuName
());
dto
.
setSkuName
(
StringUtils
.
isNotBlank
(
productsVo
.
getSkuName
())
?
productsVo
.
getSkuName
()
:
productsVo
.
getSpuName
());
dto
.
setPicture
(
productsVo
.
getSpuPicture
());
dto
.
setPicture
(
productsVo
.
getSpuPicture
());
dto
.
setCouponType
(
0
);
dto
.
setCouponType
(
0
);
ApiLog
.
debug
(
"dto***"
+
dto
);
// ApiLog.debug("dto***" + dto);
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"dto***"
,
JSON
.
toJSONString
(
dto
),
null
,
null
);
}
return
dto
;
return
dto
;
}
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/MaterialPromotionService.java
View file @
30d26a81
package
cn
.
freemud
.
service
.
impl
;
package
cn
.
freemud
.
service
.
impl
;
import
cn.freemud.adapter.ShoppingCartConvertAdapter
;
import
cn.freemud.adapter.ShoppingCartConvertAdapter
;
import
cn.freemud.constant.ApplicationConstant
;
import
cn.freemud.entities.dto.ActivityCalculationDiscountResponseDto
;
import
cn.freemud.entities.dto.ActivityCalculationDiscountResponseDto
;
import
cn.freemud.entities.dto.UserLoginInfoDto
;
import
cn.freemud.entities.dto.UserLoginInfoDto
;
import
cn.freemud.entities.dto.activity.ActivityDiscountsDto
;
import
cn.freemud.entities.dto.activity.ActivityDiscountsDto
;
...
@@ -9,6 +10,7 @@ import cn.freemud.entities.dto.shoppingCart.ShoppingCartGoodsDto;
...
@@ -9,6 +10,7 @@ import cn.freemud.entities.dto.shoppingCart.ShoppingCartGoodsDto;
import
cn.freemud.entities.vo.*
;
import
cn.freemud.entities.vo.*
;
import
cn.freemud.enums.GoodsTypeEnum
;
import
cn.freemud.enums.GoodsTypeEnum
;
import
cn.freemud.service.IPromotionService
;
import
cn.freemud.service.IPromotionService
;
import
com.alibaba.fastjson.JSON
;
import
com.freemud.application.sdk.api.log.ApiLog
;
import
com.freemud.application.sdk.api.log.ApiLog
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.extern.log4j.Log4j
;
import
lombok.extern.log4j.Log4j
;
...
@@ -83,9 +85,15 @@ public class MaterialPromotionService implements IPromotionService {
...
@@ -83,9 +85,15 @@ public class MaterialPromotionService implements IPromotionService {
@Override
@Override
public
void
updateShoppingCartGoodsApportion
(
ShoppingCartGoodsResponseVo
shoppingCartGoodsResponseVo
,
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
calculationDiscountResult
,
ShoppingCartGoodsDto
shoppingCartGoodsDto
,
CreateOrderVo
.
PremiumExchangeActivity
premiumExchangeActivity
,
ShoppingCartInfoRequestVo
shoppingCartInfoRequestVo
)
{
public
void
updateShoppingCartGoodsApportion
(
ShoppingCartGoodsResponseVo
shoppingCartGoodsResponseVo
,
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
calculationDiscountResult
,
ShoppingCartGoodsDto
shoppingCartGoodsDto
,
CreateOrderVo
.
PremiumExchangeActivity
premiumExchangeActivity
,
ShoppingCartInfoRequestVo
shoppingCartInfoRequestVo
)
{
HashMap
<
String
,
MaterialApportion
>
map
=
getApportionGoodsDetail
(
calculationDiscountResult
);
HashMap
<
String
,
MaterialApportion
>
map
=
getApportionGoodsDetail
(
calculationDiscountResult
);
ApiLog
.
debug
(
"updateShoppingCartGoodsApportion->map:"
+
map
);
// ApiLog.debug("updateShoppingCartGoodsApportion->map:" + map);
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"updateShoppingCartGoodsApportion->map:"
,
JSON
.
toJSONString
(
map
),
null
,
null
);
}
List
<
ShoppingCartGoodsDto
.
CartGoodsDetailDto
>
products
=
shoppingCartGoodsDto
.
getProducts
();
List
<
ShoppingCartGoodsDto
.
CartGoodsDetailDto
>
products
=
shoppingCartGoodsDto
.
getProducts
();
ApiLog
.
debug
(
"updateShoppingCartGoodsApportion->product:"
+
products
);
// ApiLog.debug("updateShoppingCartGoodsApportion->product:" + products);
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"updateShoppingCartGoodsApportion->product:"
,
JSON
.
toJSONString
(
products
),
null
,
null
);
}
if
(
map
.
size
()
>
0
)
{
if
(
map
.
size
()
>
0
)
{
String
pk
=
""
;
String
pk
=
""
;
for
(
ShoppingCartGoodsDto
.
CartGoodsDetailDto
product
:
products
)
{
for
(
ShoppingCartGoodsDto
.
CartGoodsDetailDto
product
:
products
)
{
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartCollageServiceImpl.java
View file @
30d26a81
...
@@ -4,6 +4,7 @@ import cn.freemud.adapter.ActivityAdapter;
...
@@ -4,6 +4,7 @@ import cn.freemud.adapter.ActivityAdapter;
import
cn.freemud.adapter.CouponAdapter
;
import
cn.freemud.adapter.CouponAdapter
;
import
cn.freemud.adapter.ShoppingCartConvertAdapter
;
import
cn.freemud.adapter.ShoppingCartConvertAdapter
;
import
cn.freemud.base.entity.BaseResponse
;
import
cn.freemud.base.entity.BaseResponse
;
import
cn.freemud.constant.ApplicationConstant
;
import
cn.freemud.constant.ResponseCodeConstant
;
import
cn.freemud.constant.ResponseCodeConstant
;
import
cn.freemud.constant.ShoppingCartConstant
;
import
cn.freemud.constant.ShoppingCartConstant
;
import
cn.freemud.entities.dto.*
;
import
cn.freemud.entities.dto.*
;
...
@@ -239,7 +240,10 @@ public class ShoppingCartCollageServiceImpl extends AbstractShoppingCartImpl imp
...
@@ -239,7 +240,10 @@ public class ShoppingCartCollageServiceImpl extends AbstractShoppingCartImpl imp
.
build
();
.
build
();
List
<
CollageMemberState
>
collageMemberState
=
collageOrderBaseService
.
getCollageMemberState
(
collageOrderDto
).
getResult
();
List
<
CollageMemberState
>
collageMemberState
=
collageOrderBaseService
.
getCollageMemberState
(
collageOrderDto
).
getResult
();
if
(
collageMemberState
==
null
||
collageMemberState
.
isEmpty
()){
if
(
collageMemberState
==
null
||
collageMemberState
.
isEmpty
()){
ApiLog
.
info
(
"splitByUser 参单人员为空,partnerId:{},storeId:{},createUserId:{},currentUserId:{}"
,
partnerId
,
storeId
,
createUserId
,
currentUserId
);
// ApiLog.info("splitByUser 参单人员为空,partnerId:{},storeId:{},createUserId:{},currentUserId:{}",partnerId,storeId,createUserId,currentUserId);
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"splitByUser 参单人员为空,partnerId:{},storeId:{},createUserId:{},currentUserId:{}"
+
partnerId
,
storeId
,
createUserId
,
currentUserId
);
}
return
null
;
return
null
;
}
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartMallServiceImpl.java
View file @
30d26a81
...
@@ -16,6 +16,7 @@ import cn.freemud.adapter.ActivityAdapter;
...
@@ -16,6 +16,7 @@ import cn.freemud.adapter.ActivityAdapter;
import
cn.freemud.adapter.CouponAdapter
;
import
cn.freemud.adapter.CouponAdapter
;
import
cn.freemud.adapter.ShoppingCartConvertAdapter
;
import
cn.freemud.adapter.ShoppingCartConvertAdapter
;
import
cn.freemud.base.entity.BaseResponse
;
import
cn.freemud.base.entity.BaseResponse
;
import
cn.freemud.constant.ApplicationConstant
;
import
cn.freemud.constant.ResponseCodeConstant
;
import
cn.freemud.constant.ResponseCodeConstant
;
import
cn.freemud.constant.ShoppingCartConstant
;
import
cn.freemud.constant.ShoppingCartConstant
;
import
cn.freemud.entities.dto.*
;
import
cn.freemud.entities.dto.*
;
...
@@ -930,7 +931,10 @@ public class ShoppingCartMallServiceImpl implements ShoppingCartNewService {
...
@@ -930,7 +931,10 @@ public class ShoppingCartMallServiceImpl implements ShoppingCartNewService {
private
List
<
CalculationSharingDiscountRequestDto
.
CalculationDiscountCoupon
>
buildCoupons
(
List
<
CalculationSharingDiscountRequestDto
.
CalculationDiscountCoupon
>
oldCoupons
,
List
<
ShoppingCartInfoRequestVo
.
couponCode
>
coupons
){
private
List
<
CalculationSharingDiscountRequestDto
.
CalculationDiscountCoupon
>
buildCoupons
(
List
<
CalculationSharingDiscountRequestDto
.
CalculationDiscountCoupon
>
oldCoupons
,
List
<
ShoppingCartInfoRequestVo
.
couponCode
>
coupons
){
ApiLog
.
info
(
"批量使用优惠券前,oldCoupons,coupons"
,
oldCoupons
,
coupons
);
// ApiLog.info("批量使用优惠券前,oldCoupons,coupons",oldCoupons,coupons);
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"批量使用优惠券前,oldCoupons,coupons"
,
JSON
.
toJSONString
(
oldCoupons
),
JSON
.
toJSONString
(
coupons
),
null
);
}
for
(
int
i
=
0
;
i
<
oldCoupons
.
size
()
;
i
++){
for
(
int
i
=
0
;
i
<
oldCoupons
.
size
()
;
i
++){
CalculationSharingDiscountRequestDto
.
CalculationDiscountCoupon
oldCoupon
=
oldCoupons
.
get
(
i
);
CalculationSharingDiscountRequestDto
.
CalculationDiscountCoupon
oldCoupon
=
oldCoupons
.
get
(
i
);
...
@@ -956,7 +960,10 @@ public class ShoppingCartMallServiceImpl implements ShoppingCartNewService {
...
@@ -956,7 +960,10 @@ public class ShoppingCartMallServiceImpl implements ShoppingCartNewService {
}
}
}
}
ApiLog
.
info
(
"批量使用优惠券后,oldCoupons,coupons"
,
oldCoupons
,
coupons
);
// ApiLog.info("批量使用优惠券后,oldCoupons,coupons",oldCoupons,coupons);
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"批量使用优惠券后,oldCoupons,coupons"
,
JSON
.
toJSONString
(
oldCoupons
),
JSON
.
toJSONString
(
coupons
),
null
);
}
return
oldCoupons
;
return
oldCoupons
;
}
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartMealServiceImpl.java
View file @
30d26a81
...
@@ -205,7 +205,8 @@ public class ShoppingCartMealServiceImpl implements ShoppingCartNewService {
...
@@ -205,7 +205,8 @@ public class ShoppingCartMealServiceImpl implements ShoppingCartNewService {
assortmentSdkService
.
updateGoodsQtyBySdk
(
customerInfo
.
getPartnerId
(),
customerInfo
.
getMemberId
(),
assortmentSdkService
.
updateGoodsQtyBySdk
(
customerInfo
.
getPartnerId
(),
customerInfo
.
getMemberId
(),
customerInfo
.
getStoreId
(),
requestVo
.
getCartGoodsUid
(),
requestVo
.
getQty
(),
customerInfo
.
getTableNumber
(),
this
.
mealCartBaseService
);
customerInfo
.
getStoreId
(),
requestVo
.
getCartGoodsUid
(),
requestVo
.
getQty
(),
customerInfo
.
getTableNumber
(),
this
.
mealCartBaseService
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
ErrorLog
.
errorConvertJson
(
SDKCommonBaseContextWare
.
getAppName
(),
LogThreadLocal
.
getTrackingNo
(),
getClass
(),
"updateGoodsQty:"
+
e
.
getMessage
(),
e
);
// ErrorLog.errorConvertJson(SDKCommonBaseContextWare.getAppName(), LogThreadLocal.getTrackingNo(), getClass(), "updateGoodsQty:" + e.getMessage(), e);
ErrorLog
.
errorConvertJson
(
getClass
(),
"updateGoodsQty:"
,
e
);
return
ResponseUtil
.
error
(
ResponseResult
.
SHOPPING_CART_VERSION_ERROR
,
"购物车商品有变动,请手动刷新再修改"
);
return
ResponseUtil
.
error
(
ResponseResult
.
SHOPPING_CART_VERSION_ERROR
,
"购物车商品有变动,请手动刷新再修改"
);
}
finally
{
}
finally
{
doUnlock
(
requestVo
.
getCartGoodsUid
());
doUnlock
(
requestVo
.
getCartGoodsUid
());
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
View file @
30d26a81
...
@@ -19,6 +19,7 @@ import cn.freemud.adapter.StoreItemAdapter;
...
@@ -19,6 +19,7 @@ import cn.freemud.adapter.StoreItemAdapter;
import
cn.freemud.base.entity.BaseResponse
;
import
cn.freemud.base.entity.BaseResponse
;
import
cn.freemud.base.util.DateUtil
;
import
cn.freemud.base.util.DateUtil
;
import
cn.freemud.base.util.JsonUtil
;
import
cn.freemud.base.util.JsonUtil
;
import
cn.freemud.constant.ApplicationConstant
;
import
cn.freemud.constant.ResponseCodeConstant
;
import
cn.freemud.constant.ResponseCodeConstant
;
import
cn.freemud.constant.ShoppingCartConstant
;
import
cn.freemud.constant.ShoppingCartConstant
;
import
cn.freemud.demo.controller.ShoppingCartDemoController
;
import
cn.freemud.demo.controller.ShoppingCartDemoController
;
...
@@ -719,7 +720,10 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
...
@@ -719,7 +720,10 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
,
sendGoods
,
sendGoods
,
deliveryAmount
,
deliveryAmount
,
null
);
,
null
);
ApiLog
.
info
(
"fisherman 新算价 配送费字段数据 01 "
,
calculationSharingDiscountResult
,
shoppingCartGoodsResponseVo
);
// ApiLog.info("fisherman 新算价 配送费字段数据 01 ",calculationSharingDiscountResult,shoppingCartGoodsResponseVo);
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"批量使用优惠券前,oldCoupons,coupons"
,
JSON
.
toJSONString
(
calculationSharingDiscountResult
),
JSON
.
toJSONString
(
shoppingCartGoodsResponseVo
),
null
);
}
sharingCartService
.
distribute
(
calculationSharingDiscountResult
sharingCartService
.
distribute
(
calculationSharingDiscountResult
,
cartGoodsList
,
cartGoodsList
,
shoppingCartGoodsResponseVo
,
shoppingCartGoodsResponseVo
...
@@ -734,7 +738,10 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
...
@@ -734,7 +738,10 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
,
shoppingCartInfoRequestVo
.
getFlag
()
,
shoppingCartInfoRequestVo
.
getFlag
()
,
userId
,
userId
,
storeId
);
,
storeId
);
ApiLog
.
info
(
"fisherman 新算价 配送费字段数据 02 "
,
null
,
shoppingCartGoodsResponseVo
);
// ApiLog.info("fisherman 新算价 配送费字段数据 02 ",null,shoppingCartGoodsResponseVo);shoppingCartGoodsResponseVo
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"fisherman 新算价 配送费字段数据 02 "
,
JSON
.
toJSONString
(
shoppingCartGoodsResponseVo
),
null
,
null
);
}
buildShoppingCartGoodsResponse
(
shoppingCartGoodsResponseVo
,
calculationSharingDiscountResult
,
shoppingCartInfoRequestVo
.
getFlag
(),
partnerId
);
buildShoppingCartGoodsResponse
(
shoppingCartGoodsResponseVo
,
calculationSharingDiscountResult
,
shoppingCartInfoRequestVo
.
getFlag
(),
partnerId
);
}
}
else
{
else
{
...
@@ -817,7 +824,10 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
...
@@ -817,7 +824,10 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
}
}
// 添加购物车商品总价和加价购商品总价,现在是自己计算,后面需要优化为促销计算, 这段要删除
// 添加购物车商品总价和加价购商品总价,现在是自己计算,后面需要优化为促销计算, 这段要删除
ApiLog
.
info
(
"fisherman 新算价 校验入参券是否可用new "
,
shoppingCartGoodsResponseVo
,
shoppingCartInfoRequestVo
.
getCouponCodes
());
// ApiLog.info("fisherman 新算价 校验入参券是否可用new ",shoppingCartGoodsResponseVo,shoppingCartInfoRequestVo.getCouponCodes());
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"fisherman 新算价 校验入参券是否可用new "
,
JSON
.
toJSONString
(
shoppingCartGoodsResponseVo
),
JSON
.
toJSONString
(
shoppingCartInfoRequestVo
.
getCouponCodes
()),
null
);
}
// 校验入参券是否可用
// 校验入参券是否可用
if
(!
checkAvailableCoupon
(
shoppingCartGoodsResponseVo
,
shoppingCartInfoRequestVo
.
getCouponCode
())){
if
(!
checkAvailableCoupon
(
shoppingCartGoodsResponseVo
,
shoppingCartInfoRequestVo
.
getCouponCode
())){
return
ResponseUtil
.
error
(
ResponseResult
.
SHOPPING_CART_COUPON_NOT_USE
);
return
ResponseUtil
.
error
(
ResponseResult
.
SHOPPING_CART_COUPON_NOT_USE
);
...
@@ -2472,7 +2482,10 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
...
@@ -2472,7 +2482,10 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
if
(
StringUtils
.
isBlank
(
receiveId
)
&&
!
Objects
.
equals
(
orderType
,
CreateOrderType
.
TAKE_OUT
.
getCode
()))
{
if
(
StringUtils
.
isBlank
(
receiveId
)
&&
!
Objects
.
equals
(
orderType
,
CreateOrderType
.
TAKE_OUT
.
getCode
()))
{
return
deliveryAmount
;
return
deliveryAmount
;
}
}
ApiLog
.
debug
(
"获取配送配逻辑 tackingNo:{},storeDeliveryUseOld:{},receiveId:{},partnerId:{},storeId:{}"
,
LogThreadLocal
.
getTrackingNo
(),
storeDeliveryUseOld
,
receiveId
,
partnerId
,
storeId
);
// ApiLog.debug("获取配送配逻辑 tackingNo:{},storeDeliveryUseOld:{},receiveId:{},partnerId:{},storeId:{}", LogThreadLocal.getTrackingNo(), storeDeliveryUseOld, receiveId, partnerId, storeId);
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"获取配送配逻辑 tackingNo:{},storeDeliveryUseOld:{},receiveId:{},partnerId:{},storeId:{}"
,
LogThreadLocal
.
getTrackingNo
(),
JSON
.
toJSONString
(
storeDeliveryUseOld
),
"receiveId:"
+
receiveId
+
",partnerId:"
+
partnerId
+
",storeId:"
+
storeId
);
}
if
(
storeDeliveryUseOld
)
{
if
(
storeDeliveryUseOld
)
{
deliveryAmount
=
Long
.
parseLong
(
getDeliveryAmount
(
receiveId
,
partnerId
,
storeId
).
toString
());
deliveryAmount
=
Long
.
parseLong
(
getDeliveryAmount
(
receiveId
,
partnerId
,
storeId
).
toString
());
shoppingCartGoodsResponseVo
.
setDeliveryFeeZeroReason
(
0
);
shoppingCartGoodsResponseVo
.
setDeliveryFeeZeroReason
(
0
);
...
@@ -2822,7 +2835,10 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
...
@@ -2822,7 +2835,10 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
List
<
ShoppingCartInfoRequestVo
.
couponCode
>
coupons
){
List
<
ShoppingCartInfoRequestVo
.
couponCode
>
coupons
){
ApiLog
.
info
(
"批量使用优惠券前,oldCoupons,coupons"
,
oldCoupons
,
coupons
);
// ApiLog.info("批量使用优惠券前,oldCoupons,coupons",oldCoupons,coupons);
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"批量使用优惠券前,oldCoupons,coupons"
,
JSON
.
toJSONString
(
oldCoupons
),
JSON
.
toJSONString
(
coupons
),
null
);
}
for
(
int
i
=
0
;
i
<
oldCoupons
.
size
()
;
i
++){
for
(
int
i
=
0
;
i
<
oldCoupons
.
size
()
;
i
++){
CalculationSharingDiscountRequestDto
.
CalculationDiscountCoupon
oldCoupon
=
oldCoupons
.
get
(
i
);
CalculationSharingDiscountRequestDto
.
CalculationDiscountCoupon
oldCoupon
=
oldCoupons
.
get
(
i
);
...
@@ -2848,7 +2864,10 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
...
@@ -2848,7 +2864,10 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
}
}
}
}
ApiLog
.
info
(
"批量使用优惠券后,oldCoupons,coupons"
,
oldCoupons
,
coupons
);
// ApiLog.info("批量使用优惠券后,oldCoupons,coupons",oldCoupons,coupons);
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"批量使用优惠券后,oldCoupons,coupons"
,
JSON
.
toJSONString
(
oldCoupons
),
JSON
.
toJSONString
(
coupons
),
null
);
}
return
oldCoupons
;
return
oldCoupons
;
}
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculationCommonService.java
View file @
30d26a81
package
cn
.
freemud
.
service
.
impl
.
calculate
;
package
cn
.
freemud
.
service
.
impl
.
calculate
;
import
cn.freemud.base.entity.BaseResponse
;
import
cn.freemud.base.entity.BaseResponse
;
import
cn.freemud.constant.ApplicationConstant
;
import
cn.freemud.constant.ShoppingCartConstant
;
import
cn.freemud.constant.ShoppingCartConstant
;
import
cn.freemud.demo.entities.bo.goods.CalculationDiscountBO
;
import
cn.freemud.demo.entities.bo.goods.CalculationDiscountBO
;
import
cn.freemud.demo.entities.bo.goods.ShoppingCartApportionBO
;
import
cn.freemud.demo.entities.bo.goods.ShoppingCartApportionBO
;
...
@@ -70,7 +71,10 @@ public class CalculationCommonService {
...
@@ -70,7 +71,10 @@ public class CalculationCommonService {
/**
/**
* 使用促销算价赋值行记录
* 使用促销算价赋值行记录
*/
*/
ApiLog
.
debug
(
"initShoppingCart={},discountResult={}"
,
JSON
.
toJSON
(
cartGoodsList
),
JSON
.
toJSON
(
discountResult
));
// ApiLog.debug("initShoppingCart={},discountResult={}", JSON.toJSON(cartGoodsList),JSON.toJSON(discountResult));
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"initShoppingCart={},discountResult={}"
,
JSON
.
toJSONString
(
cartGoodsList
),
JSON
.
toJSONString
(
discountResult
),
null
);
}
List
<
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
>
goods
=
null
;
List
<
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
>
goods
=
null
;
if
(
discountResult
!=
null
&&
CollectionUtils
.
isNotEmpty
(
discountResult
.
getGoods
()))
{
if
(
discountResult
!=
null
&&
CollectionUtils
.
isNotEmpty
(
discountResult
.
getGoods
()))
{
goods
=
discountResult
.
getGoods
();
goods
=
discountResult
.
getGoods
();
...
@@ -217,7 +221,10 @@ public class CalculationCommonService {
...
@@ -217,7 +221,10 @@ public class CalculationCommonService {
public
ShoppingCartGoodsDto
.
CartGoodsDetailDto
convertCartGoods2DetailGoodsList
(
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
calculationGoods
public
ShoppingCartGoodsDto
.
CartGoodsDetailDto
convertCartGoods2DetailGoodsList
(
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
calculationGoods
,
CartGoods
cartGoods
,
CartGoods
cartGoods
,
String
partnerId
)
{
,
String
partnerId
)
{
ApiLog
.
debug
(
"convertCartGoods2DetailGoodsList ->calculationGoods:{},cartGoods:{}"
,
calculationGoods
,
cartGoods
);
// ApiLog.debug("convertCartGoods2DetailGoodsList ->calculationGoods:{},cartGoods:{}", calculationGoods, cartGoods);
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"convertCartGoods2DetailGoodsList ->calculationGoods:{},cartGoods:{}"
,
JSON
.
toJSONString
(
calculationGoods
),
JSON
.
toJSONString
(
cartGoods
),
null
);
}
ShoppingCartGoodsDto
.
CartGoodsDetailDto
cartGoodsDetailDto
=
this
.
convertCartGoods2DetailGoods
(
calculationGoods
,
cartGoods
,
partnerId
);
ShoppingCartGoodsDto
.
CartGoodsDetailDto
cartGoodsDetailDto
=
this
.
convertCartGoods2DetailGoods
(
calculationGoods
,
cartGoods
,
partnerId
);
return
cartGoodsDetailDto
;
return
cartGoodsDetailDto
;
}
}
...
@@ -231,7 +238,10 @@ public class CalculationCommonService {
...
@@ -231,7 +238,10 @@ public class CalculationCommonService {
*/
*/
public
ShoppingCartApportionBO
.
CartGoodsDetailDto
convertCartGoods2NewDetailGoodsList
(
CalculationDiscountBO
.
CalculationDiscountResult
.
Goods
calculationGoods
public
ShoppingCartApportionBO
.
CartGoodsDetailDto
convertCartGoods2NewDetailGoodsList
(
CalculationDiscountBO
.
CalculationDiscountResult
.
Goods
calculationGoods
,
CartGoods
cartGoods
,
String
partnerId
)
{
,
CartGoods
cartGoods
,
String
partnerId
)
{
ApiLog
.
debug
(
"convertCartGoods2DetailGoodsList ->calculationGoods:{},cartGoods:{}"
,
calculationGoods
,
cartGoods
);
// ApiLog.debug("convertCartGoods2DetailGoodsList ->calculationGoods:{},cartGoods:{}", calculationGoods, cartGoods);
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"convertCartGoods2DetailGoodsList ->calculationGoods:{},cartGoods:{}"
,
JSON
.
toJSONString
(
calculationGoods
),
JSON
.
toJSONString
(
cartGoods
),
null
);
}
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
oldGoods
=
mapperFacade
.
map
(
calculationGoods
,
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
class
);
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
oldGoods
=
mapperFacade
.
map
(
calculationGoods
,
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
class
);
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculationSharingDiscountService.java
View file @
30d26a81
package
cn
.
freemud
.
service
.
impl
.
calculate
;
package
cn
.
freemud
.
service
.
impl
.
calculate
;
import
cn.freemud.constant.ApplicationConstant
;
import
cn.freemud.constant.ResponseCodeConstant
;
import
cn.freemud.constant.ResponseCodeConstant
;
import
cn.freemud.entities.dto.CheckSpqInfoRequestDto
;
import
cn.freemud.entities.dto.CheckSpqInfoRequestDto
;
import
cn.freemud.entities.dto.CheckSpqInfoResponseDto
;
import
cn.freemud.entities.dto.CheckSpqInfoResponseDto
;
...
@@ -102,10 +103,16 @@ public class CalculationSharingDiscountService {
...
@@ -102,10 +103,16 @@ public class CalculationSharingDiscountService {
CheckSpqInfoResponseDto
checkSpqInfo
=
null
;
CheckSpqInfoResponseDto
checkSpqInfo
=
null
;
if
(
GoodsTypeEnum
.
HG_COUPON_GOODS
.
getGoodsType
().
equals
(
cartGoods
.
getGoodsType
()))
{
if
(
GoodsTypeEnum
.
HG_COUPON_GOODS
.
getGoodsType
().
equals
(
cartGoods
.
getGoodsType
()))
{
checkSpqInfo
=
couponService
.
checkSpqInfo
(
checkSpqInfoRequestDto
,
cartGoods
.
getSkuId
());
checkSpqInfo
=
couponService
.
checkSpqInfo
(
checkSpqInfoRequestDto
,
cartGoods
.
getSkuId
());
ApiLog
.
debug
(
"coupon:{},{}"
,
"hg"
,
JSON
.
toJSONString
(
checkSpqInfo
));
// ApiLog.debug("coupon:{},{}", "hg", JSON.toJSONString(checkSpqInfo));
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"coupon:{},{}"
,
"hg"
,
JSON
.
toJSONString
(
checkSpqInfo
),
null
);
}
}
else
{
}
else
{
checkSpqInfo
=
couponService
.
checkSpqInfo
(
checkSpqInfoRequestDto
);
checkSpqInfo
=
couponService
.
checkSpqInfo
(
checkSpqInfoRequestDto
);
ApiLog
.
debug
(
"coupon:{},{}"
,
"sp"
,
JSON
.
toJSONString
(
checkSpqInfo
));
// ApiLog.debug("coupon:{},{}", "sp", JSON.toJSONString(checkSpqInfo));
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"coupon:{},{}"
,
"sp"
,
JSON
.
toJSONString
(
checkSpqInfo
),
null
);
}
}
}
if
(
null
==
checkSpqInfo
)
{
if
(
null
==
checkSpqInfo
)
{
cartGoodsList
.
remove
(
i
);
cartGoodsList
.
remove
(
i
);
...
@@ -180,7 +187,10 @@ public class CalculationSharingDiscountService {
...
@@ -180,7 +187,10 @@ public class CalculationSharingDiscountService {
//剔除商品数量为空的
//剔除商品数量为空的
calculationDiscountGoodsList
.
removeIf
(
v
->
v
.
getGoodsQuantity
().
equals
(
0
));
calculationDiscountGoodsList
.
removeIf
(
v
->
v
.
getGoodsQuantity
().
equals
(
0
));
if
(
CollectionUtils
.
isEmpty
(
calculationDiscountGoodsList
))
{
if
(
CollectionUtils
.
isEmpty
(
calculationDiscountGoodsList
))
{
ApiLog
.
debug
(
"calculationDiscountGoodsList:{}"
,
JSON
.
toJSON
(
calculationDiscountGoodsList
));
// ApiLog.debug("calculationDiscountGoodsList:{}", JSON.toJSON(calculationDiscountGoodsList));
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"calculationDiscountGoodsList:{}"
,
JSON
.
toJSONString
(
calculationDiscountGoodsList
),
null
,
null
);
}
//throw new BizServiceException(ResponseResult.SHOPPING_CART_COUPON_NOT_EXIST,"参数促销计算商品有异常");
//throw new BizServiceException(ResponseResult.SHOPPING_CART_COUPON_NOT_EXIST,"参数促销计算商品有异常");
return
null
;
return
null
;
}
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/promotion/AdditionSharingService.java
View file @
30d26a81
package
cn
.
freemud
.
service
.
impl
.
calculate
.
promotion
;
package
cn
.
freemud
.
service
.
impl
.
calculate
.
promotion
;
import
cn.freemud.constant.ApplicationConstant
;
import
cn.freemud.constant.ShoppingCartConstant
;
import
cn.freemud.constant.ShoppingCartConstant
;
import
cn.freemud.entities.dto.activity.ActivityDiscountsDto
;
import
cn.freemud.entities.dto.activity.ActivityDiscountsDto
;
import
cn.freemud.entities.dto.calculate.CalculationSharingDiscountResponseDto
;
import
cn.freemud.entities.dto.calculate.CalculationSharingDiscountResponseDto
;
...
@@ -13,6 +14,7 @@ import cn.freemud.service.ItemService;
...
@@ -13,6 +14,7 @@ import cn.freemud.service.ItemService;
import
cn.freemud.service.impl.AssortmentSdkService
;
import
cn.freemud.service.impl.AssortmentSdkService
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.freemud.application.sdk.api.log.ApiLog
;
import
com.freemud.application.sdk.api.log.ApiLog
;
import
com.freemud.application.sdk.api.log.ThirdPartyLog
;
import
com.freemud.application.sdk.api.productcenter.domain.ProductBeanDTO
;
import
com.freemud.application.sdk.api.productcenter.domain.ProductBeanDTO
;
import
com.freemud.sdk.api.assortment.shoppingcart.enums.BusinessTypeEnum
;
import
com.freemud.sdk.api.assortment.shoppingcart.enums.BusinessTypeEnum
;
import
com.freemud.sdk.api.assortment.shoppingcart.service.impl.ShoppingCartBaseServiceImpl
;
import
com.freemud.sdk.api.assortment.shoppingcart.service.impl.ShoppingCartBaseServiceImpl
;
...
@@ -180,7 +182,7 @@ public class AdditionSharingService {
...
@@ -180,7 +182,7 @@ public class AdditionSharingService {
*/
*/
private
ResponseResult
checkAdditionalGoods
(
List
<
CreateOrderVo
.
PremiumExchangeActivity
.
Product
>
additionalProducts
private
ResponseResult
checkAdditionalGoods
(
List
<
CreateOrderVo
.
PremiumExchangeActivity
.
Product
>
additionalProducts
,
List
<
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
SendActivity
>
additionalActivityList
)
{
,
List
<
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
SendActivity
>
additionalActivityList
)
{
ApiLog
.
debug
(
"checkAdditionalGoods additionalProducts:{}<---->additionalActivityList:{}"
,
JSON
.
toJSONString
(
additionalProducts
),
JSON
.
toJSONString
(
additionalActivityList
));
//
ApiLog.debug("checkAdditionalGoods additionalProducts:{}<---->additionalActivityList:{}", JSON.toJSONString(additionalProducts), JSON.toJSONString(additionalActivityList));
//无加价购活动
//无加价购活动
if
(
CollectionUtils
.
isEmpty
(
additionalActivityList
))
{
if
(
CollectionUtils
.
isEmpty
(
additionalActivityList
))
{
return
ResponseResult
.
PREMIUM_EXCHANGE_ACTIVITY_NOT_EXIST
;
return
ResponseResult
.
PREMIUM_EXCHANGE_ACTIVITY_NOT_EXIST
;
...
@@ -253,7 +255,10 @@ public class AdditionSharingService {
...
@@ -253,7 +255,10 @@ public class AdditionSharingService {
if
(
getProductsVoMap
.
isEmpty
())
{
if
(
getProductsVoMap
.
isEmpty
())
{
throw
new
ServiceException
(
ResponseResult
.
PREMIUM_EXCHANGE_ACTIVITY_NOT_EXIST
);
throw
new
ServiceException
(
ResponseResult
.
PREMIUM_EXCHANGE_ACTIVITY_NOT_EXIST
);
}
}
ApiLog
.
debug
(
"getProductsVoMap:{}"
,
JSON
.
toJSONString
(
getProductsVoMap
));
//ApiLog.debug("getProductsVoMap:{}", JSON.toJSONString(getProductsVoMap));
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"getProductsVoMap:{}"
,
JSON
.
toJSONString
(
getProductsVoMap
),
null
,
null
);
}
// 获取计算返回的价格
// 获取计算返回的价格
Long
originalTotalAmount
=
shoppingCartGoodsResponseVo
.
getOriginalTotalAmount
();
Long
originalTotalAmount
=
shoppingCartGoodsResponseVo
.
getOriginalTotalAmount
();
//Long totalAmount = shoppingCartGoodsDto.getTotalAmount();
//Long totalAmount = shoppingCartGoodsDto.getTotalAmount();
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
View file @
30d26a81
...
@@ -4,6 +4,7 @@ import ch.qos.logback.classic.Level;
...
@@ -4,6 +4,7 @@ import ch.qos.logback.classic.Level;
import
cn.freemud.adapter.ActivityAdapter
;
import
cn.freemud.adapter.ActivityAdapter
;
import
cn.freemud.adapter.ShoppingCartConvertAdapter
;
import
cn.freemud.adapter.ShoppingCartConvertAdapter
;
import
cn.freemud.base.entity.BaseResponse
;
import
cn.freemud.base.entity.BaseResponse
;
import
cn.freemud.constant.ApplicationConstant
;
import
cn.freemud.constant.ResponseCodeConstant
;
import
cn.freemud.constant.ResponseCodeConstant
;
import
cn.freemud.constant.ShoppingCartConstant
;
import
cn.freemud.constant.ShoppingCartConstant
;
import
cn.freemud.entities.dto.*
;
import
cn.freemud.entities.dto.*
;
...
@@ -236,7 +237,10 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -236,7 +237,10 @@ public class ShoppingCartMCoffeeServiceImpl {
}
}
List
<
CartGoods
>
newCartGoods
=
null
;
List
<
CartGoods
>
newCartGoods
=
null
;
ApiLog
.
debug
(
"【oldGoodsList】:{} ,【addCartGoods】:{}"
,
JSONObject
.
toJSONString
(
oldCartGoodsList
),
JSONObject
.
toJSONString
(
addCartGoods
));
// ApiLog.debug("【oldGoodsList】:{} ,【addCartGoods】:{}",JSONObject.toJSONString(oldCartGoodsList),JSONObject.toJSONString(addCartGoods));
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"【oldGoodsList】:{} ,【addCartGoods】:{}"
,
JSONObject
.
toJSONString
(
oldCartGoodsList
),
JSONObject
.
toJSONString
(
addCartGoods
),
null
);
}
if
(
StringUtils
.
equals
(
"9999"
,
skuId
))
{
if
(
StringUtils
.
equals
(
"9999"
,
skuId
))
{
// 将月享卡2.0的虚拟商品保存到购物车中
// 将月享卡2.0的虚拟商品保存到购物车中
oldCartGoodsList
.
add
(
addCartGoods
);
oldCartGoodsList
.
add
(
addCartGoods
);
...
@@ -798,7 +802,10 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -798,7 +802,10 @@ public class ShoppingCartMCoffeeServiceImpl {
*/
*/
if
(
null
!=
cartGoods
.
getMonthCardInfo
()){
if
(
null
!=
cartGoods
.
getMonthCardInfo
()){
cartGoods
.
getMonthCardInfo
().
setIsUseMonthCard
(
requestVo
.
getIsUseMonthCard
());
cartGoods
.
getMonthCardInfo
().
setIsUseMonthCard
(
requestVo
.
getIsUseMonthCard
());
ApiLog
.
info
(
"【清除券信息】是否使用月享卡优惠:{},月享卡实体:{}"
,
requestVo
.
getIsUseMonthCard
(),
JSONObject
.
toJSONString
(
cartGoods
));
//ApiLog.info("【清除券信息】是否使用月享卡优惠:{},月享卡实体:{}",requestVo.getIsUseMonthCard(),JSONObject.toJSONString(cartGoods));
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"【清除券信息】是否使用月享卡优惠:{},月享卡实体:{}"
,
String
.
valueOf
(
requestVo
.
getIsUseMonthCard
()),
JSONObject
.
toJSONString
(
cartGoods
),
null
);
}
}
}
}
}
cartGoodsList
=
cartGoodsList
.
stream
().
filter
(
cartGoods
->
!
StringUtils
.
equals
(
"9999"
,
cartGoods
.
getSkuId
())).
collect
(
Collectors
.
toList
());
cartGoodsList
=
cartGoodsList
.
stream
().
filter
(
cartGoods
->
!
StringUtils
.
equals
(
"9999"
,
cartGoods
.
getSkuId
())).
collect
(
Collectors
.
toList
());
...
@@ -833,10 +840,16 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -833,10 +840,16 @@ public class ShoppingCartMCoffeeServiceImpl {
// 先验证商品是否存在
// 先验证商品是否存在
List
<
CartGoods
>
cartGoodsList
=
assortmentSdkService
.
getShoppingCart
(
partnerId
,
storeId
,
userId
,
null
,
null
,
shoppingCartBaseService
);
List
<
CartGoods
>
cartGoodsList
=
assortmentSdkService
.
getShoppingCart
(
partnerId
,
storeId
,
userId
,
null
,
null
,
shoppingCartBaseService
);
ApiLog
.
debug
(
"cartGoodsList: {}"
,
JSONObject
.
toJSONString
(
cartGoodsList
));
//ApiLog.debug("cartGoodsList: {}",JSONObject.toJSONString(cartGoodsList));
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"cartGoodsList: {}"
,
JSONObject
.
toJSONString
(
cartGoodsList
),
null
,
null
);
}
List
<
CartGoods
>
cartSendGoodsList
=
assortmentSdkService
.
getShoppingCartSendGoods
(
partnerId
,
storeId
,
userId
,
sessionId
,
""
,
shoppingCartBaseService
);
List
<
CartGoods
>
cartSendGoodsList
=
assortmentSdkService
.
getShoppingCartSendGoods
(
partnerId
,
storeId
,
userId
,
sessionId
,
""
,
shoppingCartBaseService
);
ApiLog
.
debug
(
"cartSendGoodsList: {}"
,
JSONObject
.
toJSONString
(
cartSendGoodsList
));
//ApiLog.debug("cartSendGoodsList: {}",JSONObject.toJSONString(cartSendGoodsList));
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"cartGoodsList: {}"
,
JSONObject
.
toJSONString
(
cartSendGoodsList
),
null
,
null
);
}
CartGoods
cartGoods
=
null
;
CartGoods
cartGoods
=
null
;
String
skuId
=
""
;
String
skuId
=
""
;
Integer
finalQty
=
qty
;
Integer
finalQty
=
qty
;
...
@@ -1004,10 +1017,16 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -1004,10 +1017,16 @@ public class ShoppingCartMCoffeeServiceImpl {
// 获取购物车商品
// 获取购物车商品
List
<
CartGoods
>
cartGoodsList
=
assortmentSdkService
.
getShoppingCart
(
partnerId
,
storeId
,
userId
,
sessionId
,
""
,
shoppingCartBaseService
);
List
<
CartGoods
>
cartGoodsList
=
assortmentSdkService
.
getShoppingCart
(
partnerId
,
storeId
,
userId
,
sessionId
,
""
,
shoppingCartBaseService
);
ApiLog
.
debug
(
"cartGoodsList: {}"
,
JSONObject
.
toJSONString
(
cartGoodsList
));
// ApiLog.debug("cartGoodsList: {}",JSONObject.toJSONString(cartGoodsList));
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"cartGoodsList: {}"
,
JSONObject
.
toJSONString
(
cartGoodsList
),
null
,
null
);
}
List
<
CartGoods
>
cartSendGoodsList
=
assortmentSdkService
.
getShoppingCartSendGoods
(
partnerId
,
storeId
,
userId
,
sessionId
,
""
,
shoppingCartBaseService
);
List
<
CartGoods
>
cartSendGoodsList
=
assortmentSdkService
.
getShoppingCartSendGoods
(
partnerId
,
storeId
,
userId
,
sessionId
,
""
,
shoppingCartBaseService
);
ApiLog
.
debug
(
"cartSendGoodsList: {}"
,
JSONObject
.
toJSONString
(
cartSendGoodsList
));
// ApiLog.debug("cartSendGoodsList: {}",JSONObject.toJSONString(cartSendGoodsList));
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"cartSendGoodsList: {}"
,
JSONObject
.
toJSONString
(
cartSendGoodsList
),
null
,
null
);
}
CartGoods
monthCardProduct
=
null
;
CartGoods
monthCardProduct
=
null
;
// 如果购物车商品不为空, 则check购物车中所有商品
// 如果购物车商品不为空, 则check购物车中所有商品
if
(
CollectionUtils
.
isNotEmpty
(
cartGoodsList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
cartGoodsList
))
{
...
@@ -1275,9 +1294,15 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -1275,9 +1294,15 @@ public class ShoppingCartMCoffeeServiceImpl {
// 获取购物车商品
// 获取购物车商品
List
<
CartGoods
>
cartGoodsList
=
assortmentSdkService
.
getShoppingCart
(
partnerId
,
storeId
,
userId
,
null
,
tableNumber
,
shoppingCartBaseService
);
List
<
CartGoods
>
cartGoodsList
=
assortmentSdkService
.
getShoppingCart
(
partnerId
,
storeId
,
userId
,
null
,
tableNumber
,
shoppingCartBaseService
);
ApiLog
.
debug
(
"cartGoodsList: {}"
,
JSONObject
.
toJSONString
(
cartGoodsList
));
//ApiLog.debug("cartGoodsList: {}",JSONObject.toJSONString(cartGoodsList));
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"cartGoodsList: {}"
,
JSONObject
.
toJSONString
(
cartGoodsList
),
null
,
null
);
}
List
<
CartGoods
>
cartSendGoodsList
=
assortmentSdkService
.
getShoppingCartSendGoods
(
partnerId
,
storeId
,
userId
,
null
,
tableNumber
,
shoppingCartBaseService
);
List
<
CartGoods
>
cartSendGoodsList
=
assortmentSdkService
.
getShoppingCartSendGoods
(
partnerId
,
storeId
,
userId
,
null
,
tableNumber
,
shoppingCartBaseService
);
ApiLog
.
debug
(
"cartSendGoodsList: {}"
,
JSONObject
.
toJSONString
(
cartSendGoodsList
));
//ApiLog.debug("cartSendGoodsList: {}",JSONObject.toJSONString(cartSendGoodsList));
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"cartSendGoodsList: {}"
,
JSONObject
.
toJSONString
(
cartSendGoodsList
),
null
,
null
);
}
if
(
cartGoodsList
==
null
||
CollectionUtils
.
isEmpty
(
cartGoodsList
))
{
if
(
cartGoodsList
==
null
||
CollectionUtils
.
isEmpty
(
cartGoodsList
))
{
throw
new
ServiceException
(
ResponseResult
.
SHOPPING_CART_GETINFO_INVAILD
);
throw
new
ServiceException
(
ResponseResult
.
SHOPPING_CART_GETINFO_INVAILD
);
}
}
...
@@ -1412,7 +1437,10 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -1412,7 +1437,10 @@ public class ShoppingCartMCoffeeServiceImpl {
// 获取原门店购物车商品
// 获取原门店购物车商品
List
<
CartGoods
>
cartGoodsList
=
assortmentSdkService
.
getShoppingCart
(
partnerId
,
fromStoreId
,
userId
,
sessionId
,
""
,
shoppingCartBaseService
);
List
<
CartGoods
>
cartGoodsList
=
assortmentSdkService
.
getShoppingCart
(
partnerId
,
fromStoreId
,
userId
,
sessionId
,
""
,
shoppingCartBaseService
);
ApiLog
.
debug
(
"【switchCardGoods】原门店数据: {} {}"
,
requestVo
.
getSessionId
(),
JSONObject
.
toJSONString
(
cartGoodsList
));
//ApiLog.debug("【switchCardGoods】原门店数据: {} {}", requestVo.getSessionId(), JSONObject.toJSONString(cartGoodsList));
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"【switchCardGoods】原门店数据: {} {}"
,
requestVo
.
getSessionId
(),
JSONObject
.
toJSONString
(
cartGoodsList
),
null
);
}
// 如果购物车商品不为空, 则check购物车中所有商品
// 如果购物车商品不为空, 则check购物车中所有商品
if
(
CollectionUtils
.
isEmpty
(
cartGoodsList
))
{
if
(
CollectionUtils
.
isEmpty
(
cartGoodsList
))
{
return
ResponseUtil
.
success
(
shoppingCartGoodsResponseVo
);
return
ResponseUtil
.
success
(
shoppingCartGoodsResponseVo
);
...
@@ -1812,7 +1840,10 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -1812,7 +1840,10 @@ public class ShoppingCartMCoffeeServiceImpl {
nowCartGoodsList
.
addAll
(
oldCartGoodsList
);
nowCartGoodsList
.
addAll
(
oldCartGoodsList
);
}
}
if
(
CollectionUtils
.
isNotEmpty
(
newCartGoodsList
)){
if
(
CollectionUtils
.
isNotEmpty
(
newCartGoodsList
)){
ApiLog
.
debug
(
"【merge-before】:{} ,【newCardGoods】:{}"
,
JSONObject
.
toJSONString
(
nowCartGoodsList
),
JSONObject
.
toJSONString
(
newCartGoods
));
//ApiLog.debug("【merge-before】:{} ,【newCardGoods】:{}",JSONObject.toJSONString(nowCartGoodsList),JSONObject.toJSONString(newCartGoods));
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"【merge-before】:{} ,【newCardGoods】:{}"
,
JSONObject
.
toJSONString
(
nowCartGoodsList
),
JSONObject
.
toJSONString
(
newCartGoods
),
null
);
}
newCartGoodsList
.
forEach
(
newCartGood
->
{
newCartGoodsList
.
forEach
(
newCartGood
->
{
int
index
;
int
index
;
if
((
index
=
nowCartGoodsList
.
indexOf
(
newCartGood
))
>=
0
)
{
if
((
index
=
nowCartGoodsList
.
indexOf
(
newCartGood
))
>=
0
)
{
...
@@ -2706,7 +2737,10 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -2706,7 +2737,10 @@ public class ShoppingCartMCoffeeServiceImpl {
cartGoods
.
getMonthCardInfo
().
setCardCode
(
productBindingCouponType
.
getVirtualCouponCode
());
cartGoods
.
getMonthCardInfo
().
setCardCode
(
productBindingCouponType
.
getVirtualCouponCode
());
cartGoods
.
getMonthCardInfo
().
setCardNo
(
productBindingCouponType
.
getCardId
());
cartGoods
.
getMonthCardInfo
().
setCardNo
(
productBindingCouponType
.
getCardId
());
cartGoods
.
getMonthCardInfo
().
setType
(
cartGoods
.
getMonthCardInfo
().
getType
());
cartGoods
.
getMonthCardInfo
().
setType
(
cartGoods
.
getMonthCardInfo
().
getType
());
ApiLog
.
debug
(
"【月享卡】信息替换成功,cartGoods:{},productInfo:{}"
,
cartGoods
.
toString
(),
result
.
toString
());
//ApiLog.debug("【月享卡】信息替换成功,cartGoods:{},productInfo:{}",cartGoods.toString(),result.toString());
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"【月享卡】信息替换成功,cartGoods:{},productInfo:{}"
,
cartGoods
.
toString
(),
result
.
toString
(),
null
);
}
}
}
}
}
}
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/CouponDiscountCalculation.java
View file @
30d26a81
...
@@ -3,6 +3,7 @@ package cn.freemud.service.impl.mcoffee.calculation;
...
@@ -3,6 +3,7 @@ package cn.freemud.service.impl.mcoffee.calculation;
import
cn.freemud.adapter.CouponAdapter
;
import
cn.freemud.adapter.CouponAdapter
;
import
cn.freemud.base.entity.BaseResponse
;
import
cn.freemud.base.entity.BaseResponse
;
import
cn.freemud.base.util.DateUtil
;
import
cn.freemud.base.util.DateUtil
;
import
cn.freemud.constant.ApplicationConstant
;
import
cn.freemud.entities.dto.*
;
import
cn.freemud.entities.dto.*
;
import
cn.freemud.entities.dto.activity.ActivityDiscountsDto
;
import
cn.freemud.entities.dto.activity.ActivityDiscountsDto
;
import
cn.freemud.entities.dto.shoppingCart.ShoppingCartGoodsDto
;
import
cn.freemud.entities.dto.shoppingCart.ShoppingCartGoodsDto
;
...
@@ -195,7 +196,10 @@ public class CouponDiscountCalculation {
...
@@ -195,7 +196,10 @@ public class CouponDiscountCalculation {
}
}
if
(
CollectionUtils
.
isNotEmpty
(
discountsNew
))
{
if
(
CollectionUtils
.
isNotEmpty
(
discountsNew
))
{
useCoupon
=
true
;
useCoupon
=
true
;
ApiLog
.
debug
(
"couponDiscountCalculation:{}"
,
discountsNew
);
// ApiLog.debug("couponDiscountCalculation:{}",discountsNew);
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"couponDiscountCalculation:{}"
,
JSON
.
toJSONString
(
discountsNew
),
null
,
null
);
}
//这里过滤掉了 月享卡2.0,因为月享卡2.0商品不用展示划线价,故显示原价
//这里过滤掉了 月享卡2.0,因为月享卡2.0商品不用展示划线价,故显示原价
Optional
<
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
GoodsDiscount
>
targetDiscount
=
discountsNew
.
stream
()
Optional
<
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
GoodsDiscount
>
targetDiscount
=
discountsNew
.
stream
()
.
filter
(
t
->
ActivityTypeEnum
.
TYPE_32
.
getCode
().
equals
(
t
.
getType
())
.
filter
(
t
->
ActivityTypeEnum
.
TYPE_32
.
getCode
().
equals
(
t
.
getType
())
...
@@ -281,7 +285,10 @@ public class CouponDiscountCalculation {
...
@@ -281,7 +285,10 @@ public class CouponDiscountCalculation {
AtomicBoolean
changed
=
new
AtomicBoolean
();
AtomicBoolean
changed
=
new
AtomicBoolean
();
changed
.
set
(
false
);
changed
.
set
(
false
);
if
(
CollectionUtils
.
isNotEmpty
(
cartGoodsList
)){
if
(
CollectionUtils
.
isNotEmpty
(
cartGoodsList
)){
ApiLog
.
debug
(
"合并买3赠1商品券 【merge-before】 : {} "
,
JSONObject
.
toJSONString
(
nowCartGoodsList
));
// ApiLog.debug("合并买3赠1商品券 【merge-before】 : {} ", JSONObject.toJSONString(nowCartGoodsList));
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"合并买3赠1商品券 【merge-before】 : {} "
,
JSONObject
.
toJSONString
(
nowCartGoodsList
),
null
,
null
);
}
for
(
int
i
=
cartGoodsList
.
size
()
-
1
;
i
>=
1
;
i
--)
{
for
(
int
i
=
cartGoodsList
.
size
()
-
1
;
i
>=
1
;
i
--)
{
CartGoods
cartGoods
=
cartGoodsList
.
get
(
i
);
CartGoods
cartGoods
=
cartGoodsList
.
get
(
i
);
int
index2
=
nowCartGoodsList
.
indexOf
(
cartGoods
);
int
index2
=
nowCartGoodsList
.
indexOf
(
cartGoods
);
...
@@ -294,9 +301,15 @@ public class CouponDiscountCalculation {
...
@@ -294,9 +301,15 @@ public class CouponDiscountCalculation {
cartGoodsNow
.
setOriginalAmount
(
cartGoodsNow
.
getOriginalAmount
()
+
cartGoods
.
getOriginalAmount
());
cartGoodsNow
.
setOriginalAmount
(
cartGoodsNow
.
getOriginalAmount
()
+
cartGoods
.
getOriginalAmount
());
nowCartGoodsList
.
remove
(
i
);
nowCartGoodsList
.
remove
(
i
);
}
}
ApiLog
.
debug
(
"合并买3赠1商品券 【merge-ing】 : {} "
,
JSONObject
.
toJSONString
(
nowCartGoodsList
));
// ApiLog.debug("合并买3赠1商品券 【merge-ing】 : {} ", JSONObject.toJSONString(nowCartGoodsList));
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"合并买3赠1商品券 【merge-ing】 : {} "
,
JSONObject
.
toJSONString
(
nowCartGoodsList
),
null
,
null
);
}
}
// ApiLog.debug("合并买3赠1商品券 【merge-after】 : {} ", JSONObject.toJSONString(nowCartGoodsList));
if
(
ApplicationConstant
.
printDebug
){
ApiLog
.
printLog
(
"合并买3赠1商品券 【merge-after】 : {} "
,
JSONObject
.
toJSONString
(
nowCartGoodsList
),
null
,
null
);
}
}
ApiLog
.
debug
(
"合并买3赠1商品券 【merge-after】 : {} "
,
JSONObject
.
toJSONString
(
nowCartGoodsList
));
}
}
if
(
changed
.
get
())
{
if
(
changed
.
get
())
{
cartGoodsList
.
clear
();
cartGoodsList
.
clear
();
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/thirdparty/ActivityClient.java
View file @
30d26a81
...
@@ -30,14 +30,14 @@ public interface ActivityClient {
...
@@ -30,14 +30,14 @@ public interface ActivityClient {
* 统一活动查询接口
* 统一活动查询接口
*/
*/
@PostMapping
(
"/activity/query"
)
@PostMapping
(
"/activity/query"
)
@IgnoreFeignLogAnnotation
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
statusCodeFieldName
=
ResponseCodeKeyConstant
.
STATUS_CODE
,
messageFieldName
=
ResponseCodeKeyConstant
.
MSG
)
//
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.STATUS_CODE,messageFieldName=ResponseCodeKeyConstant.MSG)
ActivityQueryResponseDto
query
(
ActivityQueryRequestDto
activityQueryRequestDto
);
ActivityQueryResponseDto
query
(
ActivityQueryRequestDto
activityQueryRequestDto
);
/**
/**
* 优惠金额计算
* 优惠金额计算
*/
*/
@PostMapping
(
"/calculation/discount"
)
@PostMapping
(
"/calculation/discount"
)
@IgnoreFeignLogAnnotation
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
statusCodeFieldName
=
ResponseCodeKeyConstant
.
STATUS_CODE
,
messageFieldName
=
ResponseCodeKeyConstant
.
MSG
)
//
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.STATUS_CODE,messageFieldName=ResponseCodeKeyConstant.MSG)
ActivityCalculationDiscountResponseDto
calculationDiscount
(
ActivityCalculationDiscountRequestDto
activityCalculationDiscountRequestDto
);
ActivityCalculationDiscountResponseDto
calculationDiscount
(
ActivityCalculationDiscountRequestDto
activityCalculationDiscountRequestDto
);
/**
/**
...
@@ -60,6 +60,6 @@ public interface ActivityClient {
...
@@ -60,6 +60,6 @@ public interface ActivityClient {
* @return
* @return
*/
*/
@PostMapping
(
"/calculation/discount/sharing"
)
@PostMapping
(
"/calculation/discount/sharing"
)
@IgnoreFeignLogAnnotation
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
statusCodeFieldName
=
ResponseCodeKeyConstant
.
STATUS_CODE
,
messageFieldName
=
ResponseCodeKeyConstant
.
MSG
)
//
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.STATUS_CODE,messageFieldName=ResponseCodeKeyConstant.MSG)
ActivityCalculationDiscountResponseDto
calculationDiscountSharing
(
ActivityCalculationDiscountRequestDto
activityCalculationDiscountRequestDto
);
ActivityCalculationDiscountResponseDto
calculationDiscountSharing
(
ActivityCalculationDiscountRequestDto
activityCalculationDiscountRequestDto
);
}
}
shopping-cart-application-service/src/main/java/cn/freemud/service/thirdparty/CalculationClient.java
View file @
30d26a81
...
@@ -19,6 +19,6 @@ public interface CalculationClient {
...
@@ -19,6 +19,6 @@ public interface CalculationClient {
* 促销新的算价对接
* 促销新的算价对接
*/
*/
@PostMapping
(
"/promotioncenter/calculateservice/discount/sharing"
)
@PostMapping
(
"/promotioncenter/calculateservice/discount/sharing"
)
@IgnoreFeignLogAnnotation
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
statusCodeFieldName
=
ResponseCodeKeyConstant
.
STATUS_CODE
,
messageFieldName
=
ResponseCodeKeyConstant
.
MEG
)
//
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.STATUS_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
CalculationSharingDiscountResponseDto
calculationSharingDiscount
(
CalculationSharingDiscountRequestDto
shareDiscountRequestDto
);
CalculationSharingDiscountResponseDto
calculationSharingDiscount
(
CalculationSharingDiscountRequestDto
shareDiscountRequestDto
);
}
}
shopping-cart-application-service/src/main/java/cn/freemud/service/thirdparty/CardBinClient.java
View file @
30d26a81
...
@@ -21,7 +21,7 @@ public interface CardBinClient {
...
@@ -21,7 +21,7 @@ public interface CardBinClient {
* @return
* @return
*/
*/
@PostMapping
(
"/getAppKey"
)
@PostMapping
(
"/getAppKey"
)
@IgnoreFeignLogAnnotation
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
statusCodeFieldName
=
ResponseCodeKeyConstant
.
STATUS_CODE
,
messageFieldName
=
ResponseCodeKeyConstant
.
MEG
)
//
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.STATUS_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
GetAppKeyResponseDto
getAppKey
(
GetAppKeyRequestDto
requestDto
);
GetAppKeyResponseDto
getAppKey
(
GetAppKeyRequestDto
requestDto
);
/**
/**
...
@@ -30,7 +30,7 @@ public interface CardBinClient {
...
@@ -30,7 +30,7 @@ public interface CardBinClient {
* @return
* @return
*/
*/
@PostMapping
(
value
=
"/batchQueryActivityInfo"
)
@PostMapping
(
value
=
"/batchQueryActivityInfo"
)
@IgnoreFeignLogAnnotation
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
statusCodeFieldName
=
ResponseCodeKeyConstant
.
STATUS_CODE
,
messageFieldName
=
ResponseCodeKeyConstant
.
MEG
)
//
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.STATUS_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
BatchQueryActivityInfoResponseDto
batchQueryActivityInfo
(
BatchQueryActivityInfoRequestDto
requestDto
);
BatchQueryActivityInfoResponseDto
batchQueryActivityInfo
(
BatchQueryActivityInfoRequestDto
requestDto
);
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/thirdparty/CouponOnlineClient.java
View file @
30d26a81
...
@@ -21,7 +21,7 @@ public interface CouponOnlineClient {
...
@@ -21,7 +21,7 @@ public interface CouponOnlineClient {
/**
/**
* 查询券详情
* 查询券详情
*/
*/
@IgnoreFeignLogAnnotation
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
statusCodeFieldName
=
ResponseCodeKeyConstant
.
STATUS_CODE
)
//
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.STATUS_CODE)
@PostMapping
(
value
=
"/code_v4"
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
,
@PostMapping
(
value
=
"/code_v4"
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
,
consumes
=
{
MediaType
.
APPLICATION_FORM_URLENCODED_VALUE
}
consumes
=
{
MediaType
.
APPLICATION_FORM_URLENCODED_VALUE
}
)
)
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/thirdparty/CustomerApplicationClient.java
View file @
30d26a81
...
@@ -29,12 +29,12 @@ public interface CustomerApplicationClient {
...
@@ -29,12 +29,12 @@ public interface CustomerApplicationClient {
@PostMapping
(
value
=
"/membercard/getPaidRule"
)
@PostMapping
(
value
=
"/membercard/getPaidRule"
)
@IgnoreFeignLogAnnotation
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
})
//
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR})
BaseResponse
<
GetPaidRuleResponseDto
>
getPaidRule
(
GetPaidRuleRequestDto
getPaidRuleRequestDto
);
BaseResponse
<
GetPaidRuleResponseDto
>
getPaidRule
(
GetPaidRuleRequestDto
getPaidRuleRequestDto
);
@PostMapping
(
value
=
"/user/getSessionUserInfo"
)
@PostMapping
(
value
=
"/user/getSessionUserInfo"
)
@IgnoreFeignLogAnnotation
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
})
//
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR})
BaseResponse
<
CustomerInfoVo
>
getSessionUserInfo
(
GetSessionUserInfoDto
getSessionUserInfoDto
);
BaseResponse
<
CustomerInfoVo
>
getSessionUserInfo
(
GetSessionUserInfoDto
getSessionUserInfoDto
);
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/thirdparty/ProductClient.java
View file @
30d26a81
...
@@ -32,12 +32,12 @@ import java.util.List;
...
@@ -32,12 +32,12 @@ import java.util.List;
public
interface
ProductClient
{
public
interface
ProductClient
{
@PostMapping
({
"/Shop/ListMenuMustProduct"
})
@PostMapping
({
"/Shop/ListMenuMustProduct"
})
@IgnoreFeignLogAnnotation
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
statusCodeFieldName
=
ResponseCodeKeyConstant
.
ERR_CODE
,
messageFieldName
=
ResponseCodeKeyConstant
.
ERR_MSG
)
//
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName = ResponseCodeKeyConstant.ERR_MSG)
ProductBaseResponse
<
List
<
String
>>
getRequiredProductList
(
@RequestBody
RequiredProductRequest
request
);
ProductBaseResponse
<
List
<
String
>>
getRequiredProductList
(
@RequestBody
RequiredProductRequest
request
);
@PostMapping
({
"/Shop/ValidateShopProduct/Reason"
})
@PostMapping
({
"/Shop/ValidateShopProduct/Reason"
})
@IgnoreFeignLogAnnotation
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
statusCodeFieldName
=
ResponseCodeKeyConstant
.
ERR_CODE
,
messageFieldName
=
ResponseCodeKeyConstant
.
ERR_MSG
)
//
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName = ResponseCodeKeyConstant.ERR_MSG)
ProductBaseResponse
<
ValiadShopProductResponse
>
validateShopProductAboutReason
(
@RequestBody
ValidateShopProductRequest
request
);
ProductBaseResponse
<
ValiadShopProductResponse
>
validateShopProductAboutReason
(
@RequestBody
ValidateShopProductRequest
request
);
}
}
shopping-cart-application-service/src/main/java/cn/freemud/service/thirdparty/StockClient.java
View file @
30d26a81
...
@@ -32,7 +32,7 @@ public interface StockClient {
...
@@ -32,7 +32,7 @@ public interface StockClient {
* 前端查询多个商品库存信息
* 前端查询多个商品库存信息
*/
*/
@PostMapping
(
"/getAvailableStocks"
)
@PostMapping
(
"/getAvailableStocks"
)
@IgnoreFeignLogAnnotation
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
})
//
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR})
GetProductStockResponseDto
getAvailableStocks
(
@RequestBody
GetProductStockRequestDto
requestDto
);
GetProductStockResponseDto
getAvailableStocks
(
@RequestBody
GetProductStockRequestDto
requestDto
);
/**
/**
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/thirdparty/StoreItemClient.java
View file @
30d26a81
...
@@ -42,14 +42,14 @@ public interface StoreItemClient {
...
@@ -42,14 +42,14 @@ public interface StoreItemClient {
* 根据商品id查询门店特定时间段菜单
* 根据商品id查询门店特定时间段菜单
*/
*/
@PostMapping
(
value
=
"/Menu/GetMenuByIds"
)
@PostMapping
(
value
=
"/Menu/GetMenuByIds"
)
@IgnoreFeignLogAnnotation
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
statusCodeFieldName
=
ResponseCodeKeyConstant
.
ERR_CODE
,
messageFieldName
=
ResponseCodeKeyConstant
.
MEG
)
//
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
GetMenuByIdsResponseDto
getMenuCategoryByIds
(
@RequestBody
GetMenuCategoryByIdsDto
getMenuCategoryByIdsDto
);
GetMenuByIdsResponseDto
getMenuCategoryByIds
(
@RequestBody
GetMenuCategoryByIdsDto
getMenuCategoryByIdsDto
);
/**
/**
* 获取商品的详细信息
* 获取商品的详细信息
*/
*/
@PostMapping
(
"/Shop/ListProductInfoByIdList"
)
@PostMapping
(
"/Shop/ListProductInfoByIdList"
)
@IgnoreFeignLogAnnotation
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
statusCodeFieldName
=
ResponseCodeKeyConstant
.
ERR_CODE
,
messageFieldName
=
ResponseCodeKeyConstant
.
MEG
)
//
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
ProductInfosDto
listProductInfos
(
@RequestBody
GetProductInfoDto
getProductInfoDto
);
ProductInfosDto
listProductInfos
(
@RequestBody
GetProductInfoDto
getProductInfoDto
);
/**
/**
...
@@ -57,20 +57,20 @@ public interface StoreItemClient {
...
@@ -57,20 +57,20 @@ public interface StoreItemClient {
* @return
* @return
*/
*/
@PostMapping
(
"/Product/GetSpectionProductBySkuId"
)
@PostMapping
(
"/Product/GetSpectionProductBySkuId"
)
@IgnoreFeignLogAnnotation
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
statusCodeFieldName
=
ResponseCodeKeyConstant
.
ERR_CODE
,
messageFieldName
=
ResponseCodeKeyConstant
.
MEG
)
//
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
ProductListDto
getSpuIdsBySkuIds
(
@RequestBody
GetSpuIdsBySkuIdsDto
requestDto
);
ProductListDto
getSpuIdsBySkuIds
(
@RequestBody
GetSpuIdsBySkuIdsDto
requestDto
);
/**
/**
* 校验商品可用性
* 校验商品可用性
*/
*/
@PostMapping
(
"Shop/ValidateShopProduct"
)
@PostMapping
(
"Shop/ValidateShopProduct"
)
@IgnoreFeignLogAnnotation
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
statusCodeFieldName
=
ResponseCodeKeyConstant
.
ERR_CODE
,
messageFieldName
=
ResponseCodeKeyConstant
.
MEG
)
//
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
ProductResponseDTO
<
ValiadShopProductResponse
>
validateShopProduct
(
@RequestBody
ValidateShopProductRequest
request
);
ProductResponseDTO
<
ValiadShopProductResponse
>
validateShopProduct
(
@RequestBody
ValidateShopProductRequest
request
);
/**
/**
* 校验商品在当前门店是否可售
* 校验商品在当前门店是否可售
*/
*/
@PostMapping
(
"/Shop/validateShopContainProduct"
)
@PostMapping
(
"/Shop/validateShopContainProduct"
)
@IgnoreFeignLogAnnotation
(
excludeStatusCodes
=
{
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
},
statusCodeFieldName
=
ResponseCodeKeyConstant
.
ERR_CODE
,
messageFieldName
=
ResponseCodeKeyConstant
.
MEG
)
//
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
ValidateProductInfosDto
validateShopContainProduct
(
@RequestBody
GetValidateProductInfoDto
getProductInfoDto
);
ValidateProductInfosDto
validateShopContainProduct
(
@RequestBody
GetValidateProductInfoDto
getProductInfoDto
);
}
}
shopping-cart-application-service/src/main/resources/logback.xml
View file @
30d26a81
...
@@ -11,13 +11,21 @@
...
@@ -11,13 +11,21 @@
</layout>
</layout>
</encoder>
</encoder>
</appender>
</appender>
<appender
name=
"STDOUT_SKYWALKING"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder
class=
"ch.qos.logback.core.encoder.LayoutWrappingEncoder"
>
<layout
class=
"org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout"
>
<pattern>
{"timestamp":"%d", "level":"%p", "projectName":"${PROJECT_NAME:-}", "grayVersion":"${eureka.instance.metadataMap.version}", "tid":"%tid", "scenarios":"%X{scenarios}", "message":%m}%n
</pattern>
</layout>
</encoder>
</appender>
<springProfile
name=
"default"
>
<springProfile
name=
"default"
>
<logger
name=
"cn.freemud"
level=
"debug"
additivity=
"false"
>
<logger
name=
"cn.freemud"
level=
"debug"
additivity=
"false"
>
<appender-ref
ref=
"STDOUT"
/>
<appender-ref
ref=
"STDOUT
_SKYWALKING
"
/>
</logger>
</logger>
<logger
name=
"com.freemud"
level=
"debug"
additivity=
"false"
>
<logger
name=
"com.freemud"
level=
"debug"
additivity=
"false"
>
<appender-ref
ref=
"STDOUT"
/>
<appender-ref
ref=
"STDOUT
_SKYWALKING
"
/>
</logger>
</logger>
<appender
name=
"FREEMUD_DEV_DEBUG"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<appender
name=
"FREEMUD_DEV_DEBUG"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${LOG_HOME}/${PROJECT_NAME}/freemud_api_${PROJECT_NAME}-dev.log
</file>
<file>
${LOG_HOME}/${PROJECT_NAME}/freemud_api_${PROJECT_NAME}-dev.log
</file>
...
@@ -35,25 +43,25 @@
...
@@ -35,25 +43,25 @@
<appender-ref
ref=
"FREEMUD_DEV_DEBUG"
/>
<appender-ref
ref=
"FREEMUD_DEV_DEBUG"
/>
</logger>
</logger>
<logger
name=
"com.freemud"
level=
"debug"
additivity=
"false"
>
<logger
name=
"com.freemud"
level=
"debug"
additivity=
"false"
>
<appender-ref
ref=
"STDOUT"
/>
<appender-ref
ref=
"STDOUT
_SKYWALKING
"
/>
</logger>
</logger>
</springProfile>
</springProfile>
<springProfile
name=
"mock"
>
<springProfile
name=
"mock"
>
<logger
name=
"cn.freemud"
level=
"debug"
additivity=
"false"
>
<logger
name=
"cn.freemud"
level=
"debug"
additivity=
"false"
>
<appender-ref
ref=
"STDOUT"
/>
<appender-ref
ref=
"STDOUT
_SKYWALKING
"
/>
</logger>
</logger>
<logger
name=
"com.freemud"
level=
"debug"
additivity=
"false"
>
<logger
name=
"com.freemud"
level=
"debug"
additivity=
"false"
>
<appender-ref
ref=
"STDOUT"
/>
<appender-ref
ref=
"STDOUT
_SKYWALKING
"
/>
</logger>
</logger>
</springProfile>
</springProfile>
<springProfile
name=
"qa"
>
<springProfile
name=
"qa"
>
<logger
name=
"cn.freemud"
level=
"debug"
additivity=
"false"
>
<logger
name=
"cn.freemud"
level=
"debug"
additivity=
"false"
>
<appender-ref
ref=
"STDOUT"
/>
<appender-ref
ref=
"STDOUT
_SKYWALKING
"
/>
</logger>
</logger>
<logger
name=
"com.freemud"
level=
"debug"
additivity=
"false"
>
<logger
name=
"com.freemud"
level=
"debug"
additivity=
"false"
>
<appender-ref
ref=
"STDOUT"
/>
<appender-ref
ref=
"STDOUT
_SKYWALKING
"
/>
</logger>
</logger>
</springProfile>
</springProfile>
...
@@ -81,18 +89,18 @@
...
@@ -81,18 +89,18 @@
<springProfile
name=
"pro"
>
<springProfile
name=
"pro"
>
<logger
name=
"cn.freemud"
level=
"info"
additivity=
"false"
>
<logger
name=
"cn.freemud"
level=
"info"
additivity=
"false"
>
<appender-ref
ref=
"STDOUT"
/>
<appender-ref
ref=
"STDOUT
_SKYWALKING
"
/>
</logger>
</logger>
<logger
name=
"com.freemud"
level=
"info"
additivity=
"false"
>
<logger
name=
"com.freemud"
level=
"info"
additivity=
"false"
>
<appender-ref
ref=
"STDOUT"
/>
<appender-ref
ref=
"STDOUT
_SKYWALKING
"
/>
</logger>
</logger>
</springProfile>
</springProfile>
<root
level=
"info"
>
<root
level=
"info"
>
<appender-ref
ref=
"STDOUT"
/>
<appender-ref
ref=
"STDOUT
_SKYWALKING
"
/>
</root>
</root>
</configuration>
</configuration>
\ 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