|
@@ -36,7 +36,7 @@ public class UserAllocationServiceImpl extends ServiceImpl<UserAllocationMapper,
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public List<UserAllocation> getByParams(Long projectId, String systemType,Integer accountStatus) {
|
|
|
|
|
|
+ public List<UserAllocation> getByParams(Long projectId, String systemType, Integer accountStatus) {
|
|
QueryWrapper<UserAllocation> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<UserAllocation> queryWrapper = new QueryWrapper<>();
|
|
if (null != projectId && projectId != 0) {
|
|
if (null != projectId && projectId != 0) {
|
|
queryWrapper.eq("project_id", projectId);
|
|
queryWrapper.eq("project_id", projectId);
|
|
@@ -44,8 +44,8 @@ public class UserAllocationServiceImpl extends ServiceImpl<UserAllocationMapper,
|
|
if (null != systemType && !"".equals(systemType.trim())) {
|
|
if (null != systemType && !"".equals(systemType.trim())) {
|
|
queryWrapper.eq("system_type", systemType);
|
|
queryWrapper.eq("system_type", systemType);
|
|
}
|
|
}
|
|
- if(null!=accountStatus){
|
|
|
|
- queryWrapper.eq("account_status",accountStatus);
|
|
|
|
|
|
+ if (null != accountStatus) {
|
|
|
|
+ queryWrapper.eq("account_status", accountStatus);
|
|
}
|
|
}
|
|
queryWrapper.orderByDesc("id");
|
|
queryWrapper.orderByDesc("id");
|
|
return this.list(queryWrapper);
|
|
return this.list(queryWrapper);
|
|
@@ -53,34 +53,34 @@ public class UserAllocationServiceImpl extends ServiceImpl<UserAllocationMapper,
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Map<String, Object> getPangolinAccountListByParams(String userId, JSONObject data) {
|
|
public Map<String, Object> getPangolinAccountListByParams(String userId, JSONObject data) {
|
|
- Map<String,Object>result = new HashMap<>();
|
|
|
|
|
|
+ Map<String, Object> result = new HashMap<>();
|
|
Long projectId = data.getLong("project_id");
|
|
Long projectId = data.getLong("project_id");
|
|
- QueryWrapper<UserAllocation>queryWrapper = new QueryWrapper<>();
|
|
|
|
|
|
+ QueryWrapper<UserAllocation> queryWrapper = new QueryWrapper<>();
|
|
queryWrapper.eq("media_id", CtopAdConstant.PLATFORM_TYPE_PANGOLIN);
|
|
queryWrapper.eq("media_id", CtopAdConstant.PLATFORM_TYPE_PANGOLIN);
|
|
- if(null != userId&&!"".equals(userId.trim())){
|
|
|
|
- queryWrapper.eq("user_id",userId);
|
|
|
|
|
|
+ if (null != userId && !"".equals(userId.trim())) {
|
|
|
|
+ queryWrapper.eq("user_id", userId);
|
|
}
|
|
}
|
|
- if(null != projectId&&projectId != 0){
|
|
|
|
- queryWrapper.eq("project_id",projectId);
|
|
|
|
|
|
+ if (null != projectId && projectId != 0) {
|
|
|
|
+ queryWrapper.eq("project_id", projectId);
|
|
}
|
|
}
|
|
List<UserAllocation> allocations = this.list(queryWrapper);
|
|
List<UserAllocation> allocations = this.list(queryWrapper);
|
|
ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
|
|
ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
|
|
- result.put("data",allocations);
|
|
|
|
|
|
+ result.put("data", allocations);
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Map<String, Object> getPangolinProjectListByParams(String userId) {
|
|
public Map<String, Object> getPangolinProjectListByParams(String userId) {
|
|
- Map<String,Object>result = new HashMap<>();
|
|
|
|
- QueryWrapper<UserAllocation>queryWrapper = new QueryWrapper<>();
|
|
|
|
|
|
+ Map<String, Object> result = new HashMap<>();
|
|
|
|
+ QueryWrapper<UserAllocation> queryWrapper = new QueryWrapper<>();
|
|
queryWrapper.select("distinct project_id,project_name");
|
|
queryWrapper.select("distinct project_id,project_name");
|
|
- queryWrapper.eq("media_id",CtopAdConstant.PLATFORM_TYPE_PANGOLIN);
|
|
|
|
- if(null != userId&&!"".equals(userId.trim())){
|
|
|
|
- queryWrapper.eq("user_id",userId);
|
|
|
|
|
|
+ queryWrapper.eq("media_id", CtopAdConstant.PLATFORM_TYPE_PANGOLIN);
|
|
|
|
+ if (null != userId && !"".equals(userId.trim())) {
|
|
|
|
+ queryWrapper.eq("user_id", userId);
|
|
}
|
|
}
|
|
List<UserAllocation> allocations = this.list(queryWrapper);
|
|
List<UserAllocation> allocations = this.list(queryWrapper);
|
|
ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
|
|
ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
|
|
- result.put("data",allocations);
|
|
|
|
|
|
+ result.put("data", allocations);
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -98,4 +98,9 @@ public class UserAllocationServiceImpl extends ServiceImpl<UserAllocationMapper,
|
|
public String getAdvertiserIdByAccountId(Long accountId) {
|
|
public String getAdvertiserIdByAccountId(Long accountId) {
|
|
return userAllocationMapper.queryAdvertiserId(accountId);
|
|
return userAllocationMapper.queryAdvertiserId(accountId);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public List<JSONObject> getAccountListByProject(Long projectId) {
|
|
|
|
+ return userAllocationMapper.getAccountListByProject(projectId);
|
|
|
|
+ }
|
|
}
|
|
}
|