查询登陆人的客户
This commit is contained in:
parent
f22be83321
commit
3f4b903f89
@ -1,6 +1,7 @@
|
|||||||
package com.pusong.business.controller;
|
package com.pusong.business.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaIgnore;
|
import cn.dev33.satoken.annotation.SaIgnore;
|
||||||
import com.pusong.business.domain.bo.PsCustomCallbackBo;
|
import com.pusong.business.domain.bo.PsCustomCallbackBo;
|
||||||
@ -47,7 +48,7 @@ public class PsCustomController extends BaseController {
|
|||||||
|
|
||||||
@SaCheckPermission("business:customInfo:list")
|
@SaCheckPermission("business:customInfo:list")
|
||||||
@GetMapping("/listByLoginUser")
|
@GetMapping("/listByLoginUser")
|
||||||
public R<List<PsCustomInfoVo>> listByLoginUser() {
|
public R<List<Map<String,Object>>> listByLoginUser() {
|
||||||
return R.ok(psCustomInfoService.listByLoginUser());
|
return R.ok(psCustomInfoService.listByLoginUser());
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -38,15 +38,15 @@ import java.util.List;
|
|||||||
public class PsHomeController extends BaseController {
|
public class PsHomeController extends BaseController {
|
||||||
|
|
||||||
private final IPsCustomInfoService psCustomInfoService;
|
private final IPsCustomInfoService psCustomInfoService;
|
||||||
/**
|
// /**
|
||||||
* 查询登陆人下所有的客户名称和id
|
// * 查询登陆人下所有的客户名称和id
|
||||||
*/
|
// */
|
||||||
@RepeatSubmit()
|
// @RepeatSubmit()
|
||||||
@SaCheckPermission("business:customInfo:list")
|
// @SaCheckPermission("business:customInfo:list")
|
||||||
@GetMapping("/listByLoginUser")
|
// @GetMapping("/listByLoginUser")
|
||||||
public R<List<PsCustomInfoVo>> listByLoginUser() {
|
// public R<List<PsCustomInfoVo>> listByLoginUser() {
|
||||||
return R.ok(psCustomInfoService.listByLoginUser());
|
// return R.ok(psCustomInfoService.listByLoginUser());
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ import com.pusong.common.mybatis.core.page.PageQuery;
|
|||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 客户基本信息Service接口
|
* 客户基本信息Service接口
|
||||||
@ -30,7 +31,7 @@ public interface IPsCustomInfoService {
|
|||||||
* 查询登陆人下所有的客户名称和id
|
* 查询登陆人下所有的客户名称和id
|
||||||
* @return 客户id和姓名
|
* @return 客户id和姓名
|
||||||
*/
|
*/
|
||||||
List<PsCustomInfoVo> listByLoginUser();
|
List<Map<String,Object>> listByLoginUser();
|
||||||
/**
|
/**
|
||||||
* 分页查询客户基本信息列表
|
* 分页查询客户基本信息列表
|
||||||
*
|
*
|
||||||
|
@ -74,10 +74,19 @@ public class PsCustomInfoServiceImpl implements IPsCustomInfoService {
|
|||||||
* @return 客户id和姓名
|
* @return 客户id和姓名
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<PsCustomInfoVo> listByLoginUser() {
|
public List<Map<String,Object>> listByLoginUser() {
|
||||||
//查询客户基本信息
|
//查询客户基本信息
|
||||||
return baseMapper.selectVoList(new QueryWrapper<PsCustomInfo>().select("id","custom_name")
|
List<PsCustomInfo> list = baseMapper.selectList(new QueryWrapper<PsCustomInfo>().select("id", "custom_name")
|
||||||
.lambda().eq(PsCustomInfo::getDelFlag, 0));
|
.lambda().eq(PsCustomInfo::getDelFlag, 0).isNotNull(PsCustomInfo::getCustomName));
|
||||||
|
List<Map<String,Object>> listmap = new ArrayList<>();
|
||||||
|
list.forEach(item->{
|
||||||
|
Map<String,Object> map = new HashMap<>();
|
||||||
|
map.put("id",item.getId());
|
||||||
|
map.put("customName",item.getCustomName());
|
||||||
|
listmap.add(map);
|
||||||
|
});
|
||||||
|
|
||||||
|
return listmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user