Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e201ceeb
authored
Oct 28, 2020
by
水库浪子
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
根据员工id获取客户
1 parent
7ee4478a
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
67 additions
and
2 deletions
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeCustomerController.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeCustomerMapper.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeCustomerService.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerServiceImpl.java
linkwe-wecom/src/main/resources/mapper/wecom/WeCustomerMapper.xml
linkwe-wecom/src/main/resources/mapper/wecom/WeUserMapper.xml
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeCustomerController.java
View file @
e201cee
...
@@ -48,6 +48,19 @@ public class WeCustomerController extends BaseController
...
@@ -48,6 +48,19 @@ public class WeCustomerController extends BaseController
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
/**
* 根据员工ID获取客户
* @return
*/
@PreAuthorize
(
"@ss.hasPermi('customerManage:customer:list')"
)
@GetMapping
(
"/getCustomersByUserId/{userId}"
)
public
AjaxResult
getCustomersByUserId
(
@PathVariable
String
userId
){
return
AjaxResult
.
success
(
weCustomerService
.
getCustomersByUserId
(
userId
));
}
// /**
// /**
// * 导出企业微信客户列表
// * 导出企业微信客户列表
// */
// */
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeCustomerMapper.java
View file @
e201cee
...
@@ -4,6 +4,8 @@ import java.util.List;
...
@@ -4,6 +4,8 @@ import java.util.List;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.linkwechat.wecom.domain.WeCustomer
;
import
com.linkwechat.wecom.domain.WeCustomer
;
import
com.linkwechat.wecom.domain.WeUser
;
import
org.apache.ibatis.annotations.Param
;
/**
/**
* 企业微信客户Mapper接口
* 企业微信客户Mapper接口
...
@@ -60,4 +62,12 @@ public interface WeCustomerMapper extends BaseMapper<WeCustomer>
...
@@ -60,4 +62,12 @@ public interface WeCustomerMapper extends BaseMapper<WeCustomer>
* @return 结果
* @return 结果
*/
*/
public
int
deleteWeCustomerByIds
(
Long
[]
ids
);
public
int
deleteWeCustomerByIds
(
Long
[]
ids
);
/**
* 根据员工ID获取客户
* @param userId
* @return
*/
public
List
<
WeUser
>
getCustomersByUserId
(
@Param
(
"userId"
)
String
userId
);
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeCustomerService.java
View file @
e201cee
package
com
.
linkwechat
.
wecom
.
service
;
package
com
.
linkwechat
.
wecom
.
service
;
import
java.util.List
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.linkwechat.wecom.domain.WeCustomer
;
import
com.linkwechat.wecom.domain.WeCustomer
;
import
com.linkwechat.wecom.domain.WeUser
;
import
com.linkwechat.wecom.domain.vo.WeLeaveUserInfoAllocateVo
;
import
com.linkwechat.wecom.domain.vo.WeLeaveUserInfoAllocateVo
;
import
com.linkwechat.wecom.domain.vo.WeMakeCustomerTag
;
import
com.linkwechat.wecom.domain.vo.WeMakeCustomerTag
;
import
java.util.List
;
/**
/**
* 企业微信客户Service接口
* 企业微信客户Service接口
*
*
...
@@ -58,4 +59,12 @@ public interface IWeCustomerService extends IService<WeCustomer>
...
@@ -58,4 +59,12 @@ public interface IWeCustomerService extends IService<WeCustomer>
* @param weMakeCustomerTag
* @param weMakeCustomerTag
*/
*/
public
void
removeLabel
(
WeMakeCustomerTag
weMakeCustomerTag
);
public
void
removeLabel
(
WeMakeCustomerTag
weMakeCustomerTag
);
/**
* 根据员工ID获取客户
* @param userId
* @return
*/
public
List
<
WeUser
>
getCustomersByUserId
(
String
userId
);
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerServiceImpl.java
View file @
e201cee
...
@@ -449,4 +449,15 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper,WeCustom
...
@@ -449,4 +449,15 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper,WeCustom
}
}
/**
* 根据员工ID获取客户
* @param userId
* @return
*/
@Override
public
List
<
WeUser
>
getCustomersByUserId
(
String
userId
)
{
return
this
.
baseMapper
.
getCustomersByUserId
(
userId
);
}
}
}
linkwe-wecom/src/main/resources/mapper/wecom/WeCustomerMapper.xml
View file @
e201cee
...
@@ -138,4 +138,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -138,4 +138,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</foreach>
</delete>
</delete>
<select
id=
"getCustomersByUserId"
resultType=
"com.linkwechat.wecom.domain.WeUser"
>
SELECT
wc.external_userid,
wc.`name`,
wc.avatar,
wc.type,
wc.gender,
wc.unionid,
wc.birthday,
wc.corp_name,
wc.corp_full_name,
wc.position
FROM
`we_flower_customer_rel` wfcr
LEFT JOIN we_customer wc ON wc.external_userid = wfcr.external_userid
WHERE
wfcr.user_id = #{userId}
</select>
</mapper>
</mapper>
\ No newline at end of file
\ No newline at end of file
linkwe-wecom/src/main/resources/mapper/wecom/WeUserMapper.xml
View file @
e201cee
...
@@ -270,4 +270,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -270,4 +270,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</mapper>
</mapper>
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment