|
|
@@ -12,7 +12,6 @@ import com.qtzl.alterSales.manager.model.protocol.sales.AflSignChannelsInfoFindR |
|
|
|
import com.qtzl.alterSales.manager.service.AfterSalesCmd; |
|
|
|
import com.qtzl.alterSales.manager.vo.DropInfoVo; |
|
|
|
import com.txffp.api.core.manager.comm.annotation.ApiHandler; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.data.domain.Sort; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
@@ -40,7 +39,7 @@ public class AflSignChannelsInfoFindHandler extends AbstractAfterSalesManager<Af |
|
|
|
public String handleInternal(String filename, AflSignChannelsInfoFindRequest request) throws ServiceHandleException { |
|
|
|
try { |
|
|
|
List<AflSignChannelsInfo> aflSignChannelsInfoList = select(request); |
|
|
|
if (aflSignChannelsInfoList == null||aflSignChannelsInfoList.size()>1){ |
|
|
|
if (aflSignChannelsInfoList == null||aflSignChannelsInfoList.size()==0){ |
|
|
|
return new NoAttributeResponse().toJson(); |
|
|
|
} |
|
|
|
List<DropInfoVo> formVoList = aflSignChannelsInfoList.stream().map(this::toVo).collect(Collectors.toList()); |
|
|
@@ -58,9 +57,6 @@ public class AflSignChannelsInfoFindHandler extends AbstractAfterSalesManager<Af |
|
|
|
private List<AflSignChannelsInfo> select(AflSignChannelsInfoFindRequest request) throws ServiceHandleException { |
|
|
|
return aflSignChannelsInfoRepo.findAll(((root, query, cb) -> { |
|
|
|
List<Predicate> list = Lists.newArrayList(); |
|
|
|
if (!StringUtils.isEmpty(request.getChannelName())) { |
|
|
|
list.add(cb.like(root.get("channelName"), "%"+request.getChannelName()+"%")); |
|
|
|
} |
|
|
|
list.add(cb.equal(root.<Integer>get("status"), 0)); |
|
|
|
//查询为未删除的数据 |
|
|
|
list.add(cb.equal(root.<Integer>get("isDelete"), 0)); |