main
parent
f31ab471eb
commit
58b112cd28
|
|
@ -122,9 +122,9 @@ public class AppTopicController extends BaseController
|
|||
{
|
||||
|
||||
if (appTopicService.hasChildById(id)) {
|
||||
return warn("存在子集数据,不允许删除");
|
||||
return AjaxResult.error(2001,"存在子集数据,不允许删除");
|
||||
}
|
||||
|
||||
return toAjax(appTopicService.deleteAppTopicByIds(id));
|
||||
return appTopicService.deleteAppTopicByIds(id);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.ruoyi.app.service;
|
|||
import java.util.List;
|
||||
import com.ruoyi.app.domain.AppTopic;
|
||||
import com.ruoyi.app.domain.vo.AppTopicVo;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
|
||||
/**
|
||||
* 话题信息Service接口
|
||||
|
|
@ -51,7 +52,7 @@ public interface IAppTopicService
|
|||
* @param ids 需要删除的话题信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppTopicByIds(Long id);
|
||||
public AjaxResult deleteAppTopicByIds(Long id);
|
||||
|
||||
/**
|
||||
* 删除话题信息信息
|
||||
|
|
|
|||
|
|
@ -160,9 +160,9 @@ public class AppProvinceServiceImpl implements IAppProvinceService {
|
|||
}
|
||||
areaVos.add(areaVo);
|
||||
}
|
||||
areaVos.stream().filter(area -> area.getId()==35).forEach(area -> {
|
||||
areaVos.stream().filter(area -> area.getId()==999).forEach(area -> {
|
||||
AppCountry appCountry = new AppCountry();
|
||||
appCountry.setParentId(35L);
|
||||
appCountry.setParentId(999L);
|
||||
List<AppCountry> appCountries = appCountryMapper.selectAppCountryList(appCountry);
|
||||
List<AreaVo> collect = appCountries.stream().map(country -> {
|
||||
AreaVo areaVo = new AreaVo();
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import java.util.List;
|
|||
|
||||
import com.ruoyi.app.domain.vo.AppTopicVo;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -111,9 +112,13 @@ public class AppTopicServiceImpl implements IAppTopicService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAppTopicById(Long id)
|
||||
public AjaxResult deleteAppTopicById(Long id)
|
||||
{
|
||||
return appTopicMapper.deleteAppTopicById(id);
|
||||
AppTopic appTopic = appTopicMapper.selectAppTopicById(id);
|
||||
if (appTopic != null && appTopic.getName().equals("vip")){
|
||||
return AjaxResult.error(2001,"不允许删除vip分类!");
|
||||
}
|
||||
return AjaxResult.success(appTopicMapper.deleteAppTopicById(id));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -54,6 +54,9 @@ public class AppUserDynamicServiceImpl implements IAppUserDynamicService
|
|||
@Autowired
|
||||
private AppUserFansMapper appUserFansMapper;
|
||||
|
||||
@Autowired
|
||||
private AppCountryMapper appCountryMapper;
|
||||
|
||||
/**
|
||||
* 查询App用户动态
|
||||
*
|
||||
|
|
@ -189,6 +192,12 @@ public class AppUserDynamicServiceImpl implements IAppUserDynamicService
|
|||
List<AppUserDynamicVo> list = appUserDynamicMapper.selectDynamicList(appUserDynamic);
|
||||
for (AppUserDynamicVo appUserDynamicVo : list) {
|
||||
Long id = appUserDynamicVo.getId();
|
||||
if (appUserDynamicVo.getCityId() == 999) {
|
||||
appUserDynamicVo.setCityName("");
|
||||
appUserDynamicVo.setProvinceName("");
|
||||
AppCountry appCountry = appCountryMapper.selectAppCountryById(Long.valueOf(appUserDynamicVo.getTownId()));
|
||||
appUserDynamicVo.setTownName(appCountry != null ? appCountry.getName() : "");
|
||||
}
|
||||
// 图片信息
|
||||
AppDynamicImg appDynamicImg = new AppDynamicImg();
|
||||
appDynamicImg.setUserDynamicId(id);
|
||||
|
|
|
|||
Loading…
Reference in New Issue