Commit 046bb944 by 吴迪

修改bug 05.16-05.18

parent ddcdf2ef
......@@ -8,6 +8,7 @@ import io.office.modules.manage.entity.IndexCarouselManageEntity;
import io.office.modules.manage.entity.NewsEntity;
import io.office.modules.manage.entity.TopicnewsEntity;
import io.office.modules.manage.entity.dto.NewsParams;
import io.office.modules.manage.service.NewsService;
import io.office.modules.manage.service.TopicnewsService;
import io.office.modules.sys.controller.AbstractController;
import lombok.extern.slf4j.Slf4j;
......@@ -92,6 +93,8 @@ public class CenterController extends AbstractController {
}
}
@Autowired
private NewsService newsService;
/**
* 删除
*/
......@@ -103,9 +106,10 @@ public class CenterController extends AbstractController {
try {
if (CollectionUtils.isNotEmpty(ids)) {
for (Long id : ids) {
TopicnewsEntity topicnewsEntity = topicnewsService.getById(id);
NewsEntity newsEntity = newsService.getById(id);
// TopicnewsEntity topicnewsEntity = (TopicnewsEntity) newsEntity;
//MedicalEntity medicalServiceById = (MedicalEntity) pictureServiceById;
if (topicnewsEntity.getNewslevels() == 0) {
if (newsEntity.getLevels() == 0) {
return R.error("当前级别为0不能删除!");
}
}
......
......@@ -8,10 +8,13 @@ import java.util.Map;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.office.common.annotation.SysLog;
import io.office.modules.manage.entity.NewsEntity;
import io.office.modules.manage.entity.ProductEntity;
import io.office.modules.manage.service.NewsService;
import io.office.modules.manage.utils.IdKeysConstant;
import io.office.modules.manage.utils.IdWorkerUtils;
import io.office.modules.sys.controller.AbstractController;
import org.apache.commons.collections.CollectionUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
......@@ -92,6 +95,8 @@ public class LogisticsController extends AbstractController {
return R.ok("修改成功!");
}
@Autowired
private NewsService newsService;
/**
* 删除
*/
......@@ -102,15 +107,18 @@ public class LogisticsController extends AbstractController {
public R delete(@RequestBody List<String> ids){
if (CollectionUtil.isNotEmpty(ids)) {
if (CollectionUtils.isNotEmpty(ids)) {
for (String id : ids) {
LogisticsEntity logisticsEntity = logisticsService.getById(id);
if (logisticsEntity.getLevel() == 0) {
NewsEntity newsEntity = newsService.getById(id);
// TopicnewsEntity topicnewsEntity = (TopicnewsEntity) newsEntity;
//MedicalEntity medicalServiceById = (MedicalEntity) pictureServiceById;
if (newsEntity.getLevels() == 0) {
return R.error("当前级别为0不能删除!");
}
}
}
LogisticsEntity logistics = new LogisticsEntity();
String username = getUser().getUsername();
// logistics.setEditor(username);
......
......@@ -8,6 +8,7 @@ import io.office.modules.manage.entity.IndexCarouselManageEntity;
import io.office.modules.manage.entity.NewsEntity;
import io.office.modules.manage.entity.TopicnewsEntity;
import io.office.modules.manage.entity.dto.NewsParams;
import io.office.modules.manage.service.NewsService;
import io.office.modules.manage.service.TopicnewsService;
import io.office.modules.sys.controller.AbstractController;
import lombok.extern.slf4j.Slf4j;
......@@ -32,6 +33,8 @@ public class RulesAndRegulationsController extends AbstractController {
@Autowired
private TopicnewsService topicnewsService;
@Autowired
private NewsService newsService;
/**
* 列表
*/
......@@ -105,9 +108,10 @@ public class RulesAndRegulationsController extends AbstractController {
if (CollectionUtils.isNotEmpty(ids)) {
for (Long id : ids) {
TopicnewsEntity topicnewsEntity = topicnewsService.getById(id);
NewsEntity newsEntity = newsService.getById(id);
// TopicnewsEntity topicnewsEntity = (TopicnewsEntity) newsEntity;
//MedicalEntity medicalServiceById = (MedicalEntity) pictureServiceById;
if (topicnewsEntity.getNewslevels() == 0) {
if (newsEntity.getLevels() == 0) {
return R.error("当前级别为0不能删除!");
}
}
......
......@@ -11,6 +11,7 @@ import io.office.modules.manage.entity.IndexCarouselManageEntity;
import io.office.modules.manage.entity.NewsEntity;
import io.office.modules.manage.entity.TopicnewsEntity;
import io.office.modules.manage.entity.dto.NewsParams;
import io.office.modules.manage.service.NewsService;
import io.office.modules.manage.service.TopicnewsService;
import io.office.modules.manage.vo.request.TopicNewsPartyRequestVo;
import io.office.modules.sys.controller.AbstractController;
......@@ -96,7 +97,8 @@ public class TopicnewsController extends AbstractController {
return R.error(e.getMessage());
}
}
@Autowired
private NewsService newsService;
/**
* 删除
*/
......@@ -108,10 +110,10 @@ public class TopicnewsController extends AbstractController {
try {
if (CollectionUtils.isNotEmpty(ids)) {
for (Long id : ids) {
TopicnewsEntity topicnewsEntity = topicnewsService.getById(id);
//IndexCarouselManageEntity indexCarouselManageEntity = (IndexCarouselManageEntity) topicnewsEntity;
NewsEntity newsEntity = newsService.getById(id);
// TopicnewsEntity topicnewsEntity = (TopicnewsEntity) newsEntity;
//MedicalEntity medicalServiceById = (MedicalEntity) pictureServiceById;
if (topicnewsEntity.getNewslevels() == 0) {
if (newsEntity.getLevels() == 0) {
return R.error("当前级别为0不能删除!");
}
}
......
......@@ -61,7 +61,7 @@
and inputDate BETWEEN #{params.inputDateStart} AND #{params.inputDateEnd}
</if>
<choose>
<when test="params.pictureLevel !=null and params.pictureLevel !=0">
<when test="params.pictureLevel !=null ">
AND PicLevel = #{params.pictureLevel}
</when>
<otherwise>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment