|
@@ -71,7 +71,7 @@ public class KuaishouPromoterServiceImpl implements IKuaishouPromoterService {
|
|
|
* @return 快手达人 信息
|
|
|
*/
|
|
|
@Override
|
|
|
- public List<KuaishouPromoter> selectKuaishouPromoterList(Long userId, Long promoterId, String promoterNickName, String parameter, String orderBy) {
|
|
|
+ public List<KuaishouPromoter> selectKuaishouPromoterList(Long userId, Long promoterId, String promoterNickName, String mediaId, String parameter, String orderBy) {
|
|
|
String roleKey = sysUserService.getRoleKeyByUserId(userId);
|
|
|
List<Long> userList = null;
|
|
|
//角色:供应链管理员、招商、招商经理可以看到所有的达人信息
|
|
@@ -109,7 +109,7 @@ public class KuaishouPromoterServiceImpl implements IKuaishouPromoterService {
|
|
|
orderBy = "desc";
|
|
|
}
|
|
|
PageUtils.startPage();
|
|
|
- List<KuaishouPromoter> list = kuaishouPromoterMapper.selectKuaishouPromoterList(userList, promoterId, promoterNickName, parameter, orderBy);
|
|
|
+ List<KuaishouPromoter> list = kuaishouPromoterMapper.selectKuaishouPromoterList(userList, promoterId, promoterNickName, mediaId, parameter, orderBy);
|
|
|
list.forEach(ent -> {
|
|
|
JSONObject follow = kuaishouPromoterMapper.getFollowUpRecordsByUserId(ent.getPromoterId(), ent.getUserId());
|
|
|
ent.setFollowUpRecord(Check.isNull(follow) ? "-" : follow.getString("txt"));
|
|
@@ -153,7 +153,7 @@ public class KuaishouPromoterServiceImpl implements IKuaishouPromoterService {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
try {
|
|
|
- editPromoter(promoter.getId(), promoter.getPromoterId(), true);
|
|
|
+ editPromoter(promoter.getId(), promoter.getMediaId(), promoter.getPromoterId(), true);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -232,7 +232,7 @@ public class KuaishouPromoterServiceImpl implements IKuaishouPromoterService {
|
|
|
promoter.setUserName(sysUser.getNickName());
|
|
|
}
|
|
|
kuaishouPromoterMapper.insertKuaishouPromoter(promoter);
|
|
|
- editPromoter(promoter.getId(), promoter.getPromoterId(), true);
|
|
|
+ editPromoter(promoter.getId(), promoter.getMediaId(), promoter.getPromoterId(), true);
|
|
|
result.put("code", 200);
|
|
|
result.put("msg", "success");
|
|
|
return result;
|
|
@@ -241,7 +241,7 @@ public class KuaishouPromoterServiceImpl implements IKuaishouPromoterService {
|
|
|
/**
|
|
|
* 同步更新数据
|
|
|
*/
|
|
|
- private void editPromoter(Long id, Long promoterId, boolean flag) {
|
|
|
+ private void editPromoter(Long id, String mediaId, Long promoterId, boolean flag) {
|
|
|
try {
|
|
|
if (flag) {
|
|
|
/*缓存标记,每日第一次访问调用该接口,更新达人部分(昵称,省市,粉丝,总销售,头像等)数据*/
|
|
@@ -289,7 +289,7 @@ public class KuaishouPromoterServiceImpl implements IKuaishouPromoterService {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
try {
|
|
|
- list.forEach(kuaishouPromoter -> editPromoter(kuaishouPromoter.getId(), kuaishouPromoter.getPromoterId(), false));
|
|
|
+ list.forEach(kuaishouPromoter -> editPromoter(kuaishouPromoter.getId(), kuaishouPromoter.getMediaId(), kuaishouPromoter.getPromoterId(), false));
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -409,7 +409,7 @@ public class KuaishouPromoterServiceImpl implements IKuaishouPromoterService {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
try {
|
|
|
- editPromoter(promoter.getId(), promoter.getPromoterId(), true);
|
|
|
+ editPromoter(promoter.getId(), promoter.getMediaId(), promoter.getPromoterId(), true);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|