|
@@ -3,6 +3,7 @@ package cn.com.ctop.common.module.service.impl;
|
|
import cn.com.ctop.common.module.entity.UserAllocation;
|
|
import cn.com.ctop.common.module.entity.UserAllocation;
|
|
import cn.com.ctop.common.module.mapper.UserAllocationMapper;
|
|
import cn.com.ctop.common.module.mapper.UserAllocationMapper;
|
|
import cn.com.ctop.common.module.service.IUserAllocationService;
|
|
import cn.com.ctop.common.module.service.IUserAllocationService;
|
|
|
|
+import cn.com.ctop.common.module.utils.Check;
|
|
import cn.com.ctop.common.module.utils.CtopAdConstant;
|
|
import cn.com.ctop.common.module.utils.CtopAdConstant;
|
|
import cn.com.ctop.common.module.utils.ResultMapUtils;
|
|
import cn.com.ctop.common.module.utils.ResultMapUtils;
|
|
import cn.com.ctop.common.module.utils.StatusCode;
|
|
import cn.com.ctop.common.module.utils.StatusCode;
|
|
@@ -158,8 +159,8 @@ public class UserAllocationServiceImpl extends ServiceImpl<UserAllocationMapper,
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public List<UserAllocation> getAccountListByUserIdAndProductId(String userId, Long projectId,Long productId) {
|
|
|
|
- return userAllocationMapper.getAccountListByUserIdAndProductId(userId,projectId,productId);
|
|
|
|
|
|
+ public List<UserAllocation> getAccountListByUserIdAndProductId(String userId, Long projectId, Long productId) {
|
|
|
|
+ return userAllocationMapper.getAccountListByUserIdAndProductId(userId, projectId, productId);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -168,8 +169,10 @@ public class UserAllocationServiceImpl extends ServiceImpl<UserAllocationMapper,
|
|
List list = new ArrayList();
|
|
List list = new ArrayList();
|
|
for (int i = 0; i < projectList.size(); i++) {
|
|
for (int i = 0; i < projectList.size(); i++) {
|
|
JSONObject jsonObject = projectList.get(i);
|
|
JSONObject jsonObject = projectList.get(i);
|
|
- list.add(jsonObject.getLong("projectId"));
|
|
|
|
- map.put(jsonObject.getLong("projectId"), new ArrayList<>());
|
|
|
|
|
|
+ if (!Check.isNull(jsonObject)) {
|
|
|
|
+ list.add(jsonObject.getLong("projectId"));
|
|
|
|
+ map.put(jsonObject.getLong("projectId"), new ArrayList<>());
|
|
|
|
+ }
|
|
}
|
|
}
|
|
List<JSONObject> jsonList = userAllocationMapper.getAccountListByProjectList(list);
|
|
List<JSONObject> jsonList = userAllocationMapper.getAccountListByProjectList(list);
|
|
for (int i = 0; i < jsonList.size(); i++) {
|
|
for (int i = 0; i < jsonList.size(); i++) {
|
|
@@ -193,8 +196,8 @@ public class UserAllocationServiceImpl extends ServiceImpl<UserAllocationMapper,
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public boolean updateProjectStrategyStatus(Long accountId, Integer projectStrategy) {
|
|
public boolean updateProjectStrategyStatus(Long accountId, Integer projectStrategy) {
|
|
- int num = userAllocationMapper.updateProjectStrategyStatus(accountId, projectStrategy);
|
|
|
|
- return num>0;
|
|
|
|
|
|
+ int num = userAllocationMapper.updateProjectStrategyStatus(accountId, projectStrategy);
|
|
|
|
+ return num > 0;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|