BUGFIX: 查询affiliate时,不显示已删除的记录,删除affiliate时,状态也修改
This commit is contained in:
@@ -212,10 +212,7 @@ public class AffiliateServiceImpl extends ServiceImpl<AffiliateMapper, Affiliate
|
||||
|
||||
// operationType Active -> 激活 | Inactive -> 关闭 | Delete -> 删除
|
||||
if (!StringUtil.isNullOrEmpty(operationType)) {
|
||||
if (operationType.equals("Delete")) {
|
||||
baseMapper.deleteById(id);
|
||||
return;
|
||||
} else if (operationType.equals("Active") || operationType.equals("Inactive")) {
|
||||
if (operationType.equals("Delete") || operationType.equals("Active") || operationType.equals("Inactive")) {
|
||||
affiliate.setStatus(operationType);
|
||||
} else {
|
||||
throw new BusinessException("unknown.operationType");
|
||||
@@ -223,6 +220,10 @@ public class AffiliateServiceImpl extends ServiceImpl<AffiliateMapper, Affiliate
|
||||
}
|
||||
affiliate.setUpdateTime(LocalDateTime.now());
|
||||
baseMapper.updateById(affiliate);
|
||||
|
||||
if (operationType.equals("Delete")) {
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
|
||||
// 定时计算佣金
|
||||
|
||||
Reference in New Issue
Block a user