Commit c1670481 authored by Smile's avatar Smile

需求134后台-集运-包裹列表-转运 客户联系人请求当是筛选时返回开通集运服务客户

parent 3b1877e8
...@@ -86,6 +86,9 @@ public interface CustomerContactsMapper extends BaseMapperX<CustomerContactsDO> ...@@ -86,6 +86,9 @@ public interface CustomerContactsMapper extends BaseMapperX<CustomerContactsDO>
"<when test = 'phone != null and phone != \"\" '>", "<when test = 'phone != null and phone != \"\" '>",
"and IFNULL(cc.`phone_new`,'') like concat('%', concat(#{phone}, '%'))", "and IFNULL(cc.`phone_new`,'') like concat('%', concat(#{phone}, '%'))",
"</when>", "</when>",
"<when test = 'isConsService != null and isConsService != \"\" '>",
"and c.is_cons_service = #{isConsService}",
"</when>",
"<when test = 'type != null and type != \"\" '>", "<when test = 'type != null and type != \"\" '>",
"and FIND_IN_SET(#{type}, c.type) ", "and FIND_IN_SET(#{type}, c.type) ",
"</when>", "</when>",
...@@ -104,7 +107,8 @@ public interface CustomerContactsMapper extends BaseMapperX<CustomerContactsDO> ...@@ -104,7 +107,8 @@ public interface CustomerContactsMapper extends BaseMapperX<CustomerContactsDO>
@Param("phone") String phone, @Param("phone") String phone,
@Param("type") String type, @Param("type") String type,
@Param("ids") Collection<Long> ids, @Param("ids") Collection<Long> ids,
@Param("customerId") Long customerId); @Param("customerId") Long customerId,
@Param("isConsService") Boolean isConsService);
@ResultType(CustomerContactsDto.class) @ResultType(CustomerContactsDto.class)
......
...@@ -105,9 +105,10 @@ public interface CustomerContactsService extends IService<CustomerContactsDO> { ...@@ -105,9 +105,10 @@ public interface CustomerContactsService extends IService<CustomerContactsDO> {
* @param type * @param type
* @param ids 联系人ID * @param ids 联系人ID
* @param customerId 客户ID * @param customerId 客户ID
* @param isConsService 客户是否开通集运服务
* @return 联系人列表 * @return 联系人列表
*/ */
PageResult<CustomerContactsDto> selectBySearchKey(String searchKey,String phone, String type, Collection<Long> ids, Long customerId, PageParam page); PageResult<CustomerContactsDto> selectBySearchKey(String searchKey,String phone, String type, Collection<Long> ids, Long customerId,Boolean isConsService, PageParam page);
/* /*
添加的客户选择函数 添加的客户选择函数
......
...@@ -157,10 +157,10 @@ public class CustomerContactsServiceImpl extends AbstractService<CustomerContact ...@@ -157,10 +157,10 @@ public class CustomerContactsServiceImpl extends AbstractService<CustomerContact
} }
@Override @Override
public PageResult<CustomerContactsDto> selectBySearchKey(String searchKey, String phone, String type, Collection<Long> ids, Long customerId, PageParam page) { public PageResult<CustomerContactsDto> selectBySearchKey(String searchKey, String phone, String type, Collection<Long> ids, Long customerId,Boolean isConsService,PageParam page) {
IPage<CustomerContactsDto> mpPage = MyBatisUtils.buildPage(page); IPage<CustomerContactsDto> mpPage = MyBatisUtils.buildPage(page);
customerContactsMapper.selectBySearchKey(mpPage, searchKey, phone, customerContactsMapper.selectBySearchKey(mpPage, searchKey, phone,
type, ids, customerId); type, ids, customerId,isConsService);
return PageResult.of(mpPage); return PageResult.of(mpPage);
} }
......
...@@ -167,19 +167,26 @@ public class CustomerContactsController { ...@@ -167,19 +167,26 @@ public class CustomerContactsController {
@ApiImplicitParam(name = "phone", value = "请输入联系人电话搜索", example = "电话", dataTypeClass = String.class), @ApiImplicitParam(name = "phone", value = "请输入联系人电话搜索", example = "电话", dataTypeClass = String.class),
@ApiImplicitParam(name = "type", value = "客户类型", example = "1", dataTypeClass = String.class), @ApiImplicitParam(name = "type", value = "客户类型", example = "1", dataTypeClass = String.class),
@ApiImplicitParam(name = "ids", value = "编号列表", example = "1024,2048", dataTypeClass = List.class), @ApiImplicitParam(name = "ids", value = "编号列表", example = "1024,2048", dataTypeClass = List.class),
@ApiImplicitParam(name = "customerId", value = "客户ID", example = "1024", dataTypeClass = Long.class) @ApiImplicitParam(name = "customerId", value = "客户ID", example = "1024", dataTypeClass = Long.class),
@ApiImplicitParam(name = "isConsTransform", value = "是否转运", example = "false", dataTypeClass = Boolean.class)
}) })
public CommonResult<PageResult<CustomerContactsDto>> selectBySearchKey( public CommonResult<PageResult<CustomerContactsDto>> selectBySearchKey(
@RequestParam(value = "searchKey", required = false) String searchKey, @RequestParam(value = "searchKey", required = false) String searchKey,
@RequestParam(value = "phone", required = false) String phone, @RequestParam(value = "phone", required = false) String phone,
@RequestParam(value = "type", required = false) String type, @RequestParam(value = "type", required = false) String type,
@RequestParam(value = "ids", required = false) Collection<Long> ids, @RequestParam(value = "ids", required = false) Collection<Long> ids,
@RequestParam(value = "customerId", required = false) Long customerId @RequestParam(value = "customerId", required = false) Long customerId,
@RequestParam(value = "isConsTransform", required = false) Boolean isConsTransform
, PageParam page) { , PageParam page) {
Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); Long loginUserId = SecurityFrameworkUtils.getLoginUserId();
Boolean isConsService = null;
//包裹转运时筛选所有转运服务客户
if (isConsTransform!=null&&isConsTransform){
isConsService = true;
}
return success(customerContactsService.selectBySearchKey(searchKey, phone, return success(customerContactsService.selectBySearchKey(searchKey, phone,
type, ids, customerId, page)); type, ids, customerId,isConsService,page));
} }
/* /*
......
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