Commit 46d61a65 authored by lcl's avatar lcl

排序规则修改

parent 4b4f93d4
......@@ -29,7 +29,8 @@ public class CustomerDecisionChainServiceImpl implements ICustomerDecisionChainS
@Override
public List<CustomerDecisionChain> selectList(CustomerDecisionChainSearchDto dto) {
return baseMapper.selectList(Wrappers.<CustomerDecisionChain>lambdaQuery()
.eq(CustomerDecisionChain::getCustomerId,dto.getCustomerId()));
.eq(CustomerDecisionChain::getCustomerId, dto.getCustomerId())
.orderByDesc(CustomerDecisionChain::getCreateTime));
}
/**
......@@ -63,7 +64,7 @@ public class CustomerDecisionChainServiceImpl implements ICustomerDecisionChainS
*/
@Override
public boolean update(CustomerDecisionChain customerDecisionChain) {
if(ObjectUtils.isEmpty(customerDecisionChain.getId())) throw new BeanException("id不能为空!");
if (ObjectUtils.isEmpty(customerDecisionChain.getId())) throw new BeanException("id不能为空!");
verifyParameter(customerDecisionChain);
return baseMapper.updateById(customerDecisionChain) > 0;
}
......@@ -81,10 +82,11 @@ public class CustomerDecisionChainServiceImpl implements ICustomerDecisionChainS
/**
* 参数验证
*
* @param customerDecisionChain
*/
private void verifyParameter(CustomerDecisionChain customerDecisionChain){
if(ObjectUtils.isEmpty(customerDecisionChain.getCustomerId())) throw new BeanException("客户id不能为空!");
private void verifyParameter(CustomerDecisionChain customerDecisionChain) {
if (ObjectUtils.isEmpty(customerDecisionChain.getCustomerId())) throw new BeanException("客户id不能为空!");
customerDecisionChain.setUpdateId(SecurityUtils.getUserId());
customerDecisionChain.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName());
}
......
......@@ -39,6 +39,7 @@
) bi3 on bi3.customer_id = ct.customer_id
where ctu.user_id = #{dto.userId}
<if test="dto.companyName != null and dto.companyName != '' "> and ct.company_name like concat('%',#{dto.companyName},'%')</if>
order by ct.create_time desc
</select>
<select id="selectUserList" resultType="com.dsk.system.domain.customer.Customer">
......
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