Commit 7bc0cadf authored by Smile's avatar Smile Committed by wux

会员积分规则匹配,当有两个不相冲突的积分规则,只匹配一个问题修改

parent 141ac79e
......@@ -16,6 +16,8 @@ import cn.iocoder.yudao.module.customer.vo.customer.customerContacts.CustomerCon
import cn.iocoder.yudao.module.customer.vo.customer.customerContacts.CustomerContactsPageReqVO;
import cn.iocoder.yudao.module.customer.vo.customer.customerContacts.CustomerContactsUpdateReqVO;
import cn.iocoder.yudao.module.ecw.service.paramValid.ParamValidatorService;
import cn.iocoder.yudao.module.member.api.user.MemberUserApi;
import cn.iocoder.yudao.module.member.api.user.dto.UserRespDTO;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.commons.lang3.StringUtils;
......@@ -44,6 +46,8 @@ public class CustomerContactsServiceImpl extends AbstractService<CustomerContact
private CustomerContactsMapper customerContactsMapper;
@Resource
private ParamValidatorService paramValidatorService;
@Resource
private MemberUserApi memberUserApi;
@Override
public Long createCustomerContacts(CustomerContactsCreateReqVO createReqVO) {
......@@ -124,7 +128,14 @@ public class CustomerContactsServiceImpl extends AbstractService<CustomerContact
@Override
public List<CustomerContactsDO> getCustomerContactsListByCustomerId(Long customerId) {
return customerContactsMapper.selectList(new LambdaQueryWrapperX<CustomerContactsDO>().eqIfPresent(CustomerContactsDO::getCustomerId, customerId));
List<CustomerContactsDO> customerContactsDOS = customerContactsMapper.selectList(new LambdaQueryWrapperX<CustomerContactsDO>().eqIfPresent(CustomerContactsDO::getCustomerId, customerId));
customerContactsDOS.forEach(customerContactsDO -> {
if (customerContactsDO.getUserid()!=null) {
UserRespDTO user = memberUserApi.getUser(customerContactsDO.getUserid());
customerContactsDO.setUsername(user.getNickname());
}
});
return customerContactsDOS;
}
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment