Browse Source

代码提交

huangwenjie 5 years ago
parent
commit
c9f349e6d9

+ 1 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/article/ArticleEndpoint.java

@ -142,7 +142,7 @@ public class ArticleEndpoint extends EnvelopRestEndpoint {
			@ApiParam(name = "id", value = "id", required = true)
			@RequestParam(value = "id", required = true)String id)throws Exception {
		Boolean flag = knowledgeCategoryService.updateDel(id);
		if (!flag) {
		if (flag) {
			return success("操作成功");
		}else{
			return failed("操作失败");

+ 2 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/service/consult/KnowledgeCategoryService.java

@ -9,6 +9,7 @@ import com.yihu.mysql.query.BaseJpaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.transaction.Transactional;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.Date;
@ -48,6 +49,7 @@ public class KnowledgeCategoryService extends BaseJpaService<KnowledgeCategoryDO
		return knowledgeCategoryDao.save(knowledgeCategoryDO);
	}
	
	@Transactional
	public Boolean updateDel(String code) {
		List<KnowledgeArticleDO> byCategory = articleDao.findByCategory(code);
		if (null != byCategory && byCategory.size() > 0) {