Merge branch 'dev' into test
# Conflicts: # cash-service/market-service/src/main/java/com/czg/service/market/service/impl/MkDistributionUserServiceImpl.java
This commit is contained in:
@@ -34,6 +34,17 @@ public class CzgControllerAdvice {
|
||||
@ExceptionHandler(value = Exception.class)
|
||||
@ResponseStatus(HttpStatus.OK)
|
||||
public CzgResult<Object> errorHandler(Exception ex) {
|
||||
Throwable rootCause = ex;
|
||||
while (rootCause.getCause() != null) {
|
||||
rootCause = rootCause.getCause();
|
||||
if (rootCause instanceof CzgException) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 处理自定义异常
|
||||
if (rootCause instanceof CzgException czgException) {
|
||||
return CzgResult.failure(czgException.getCode(), czgException.getMessage());
|
||||
}
|
||||
setErrorLog(ex);
|
||||
return CzgResult.failure(CzgRespCode.SYSTEM_ERROR.getCode(), ex.getMessage());
|
||||
}
|
||||
@@ -143,7 +154,7 @@ public class CzgControllerAdvice {
|
||||
}
|
||||
|
||||
private void setErrorLog(Exception ex) {
|
||||
log.error("错误",ex);
|
||||
log.error(ex.getMessage());
|
||||
log.error("错误",ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public interface ShopUserService extends IService<ShopUser> {
|
||||
/**
|
||||
* 获取邀请用户列表
|
||||
*/
|
||||
Page<InviteUserVO> getInviteUser(Long getDistributionUserId, Long shopUserId, Long distributionLevelId, Integer page, Integer size);
|
||||
Page<InviteUserVO> getInviteUser(Long getDistributionUserId, Long shopId, Long shopUserId, Long distributionLevelId, Integer page, Integer size);
|
||||
|
||||
|
||||
boolean updateInfo(ShopUser shopUser);
|
||||
|
||||
@@ -40,6 +40,7 @@ public class MkDistributionUser implements Serializable {
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
@Id
|
||||
private Long shopId;
|
||||
|
||||
private Long userId;
|
||||
|
||||
@@ -67,7 +67,7 @@ public interface MkDistributionUserService extends IService<MkDistributionUser>
|
||||
/**
|
||||
* 获取分销员邀请人分页列表
|
||||
*/
|
||||
Page<InviteUserVO> getInviteUser(Long id, Long shopUserId, Long distributionLevelId, Integer page, Integer size);
|
||||
Page<InviteUserVO> getInviteUser(Long id, Long shopId, Long shopUserId, Long distributionLevelId, Integer page, Integer size);
|
||||
|
||||
/**
|
||||
* 分销员:按消费金额升级等级
|
||||
@@ -97,7 +97,7 @@ public interface MkDistributionUserService extends IService<MkDistributionUser>
|
||||
* 删除分销员
|
||||
* 逻辑删除分销员
|
||||
*/
|
||||
void deleteDistributionUser(Long id);
|
||||
void deleteDistributionUser(Long id, Long shopId);
|
||||
|
||||
|
||||
|
||||
@@ -152,4 +152,6 @@ public interface MkDistributionUserService extends IService<MkDistributionUser>
|
||||
* CANCELLED: 已撤销
|
||||
*/
|
||||
void withdrawNotify(String outBillNo, String state, String failReason);
|
||||
|
||||
MkDistributionUser getMkDistributionUserByIdAndShopId(Long shopUserId, Long shopId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user