Merge branch 'master' of https://gitee.com/virus010101/linfeng-community
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 112 KiB |
Before Width: | Height: | Size: 356 KiB After Width: | Height: | Size: 146 KiB |
Before Width: | Height: | Size: 276 KiB After Width: | Height: | Size: 231 KiB |
Before Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 109 KiB |
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 92 KiB |
@ -64,7 +64,10 @@ public class CategoryServiceImpl extends ServiceImpl<CategoryDao, CategoryEntity
|
||||
if (count > 0) {
|
||||
throw new LinfengException("分类名不能重复");
|
||||
}
|
||||
this.save(category);
|
||||
boolean save = this.save(category);
|
||||
if(!save){
|
||||
throw new LinfengException("分类保存失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -86,6 +89,7 @@ public class CategoryServiceImpl extends ServiceImpl<CategoryDao, CategoryEntity
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateCategory(CategoryEntity category) {
|
||||
Integer count = this.lambdaQuery()
|
||||
.eq(CategoryEntity::getCateName, category.getCateName())
|
||||
@ -93,7 +97,10 @@ public class CategoryServiceImpl extends ServiceImpl<CategoryDao, CategoryEntity
|
||||
if (count > 1) {
|
||||
throw new LinfengException("分类名不能重复");
|
||||
}
|
||||
this.updateById(category);
|
||||
boolean update = this.updateById(category);
|
||||
if(!update){
|
||||
throw new LinfengException("分类更新失败");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -26,6 +26,7 @@ public class AppCategoryController {
|
||||
private CategoryService categoryService;
|
||||
|
||||
|
||||
|
||||
@GetMapping("/classList")
|
||||
@ApiOperation("分类列表")
|
||||
public R classList(){
|
||||
|
@ -48,17 +48,17 @@ public class CommentThumbsServiceImpl extends ServiceImpl<CommentThumbsDao, Comm
|
||||
|
||||
/**
|
||||
* 是否点赞
|
||||
* @param uid
|
||||
* @param id
|
||||
* @param uid 用户id
|
||||
* @param id 评论id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Boolean isThumbs(Integer uid, Long id) {
|
||||
CommentThumbsEntity one = baseMapper.selectOne(new LambdaQueryWrapper<CommentThumbsEntity>()
|
||||
CommentThumbsEntity commentThumbs = this.lambdaQuery()
|
||||
.eq(CommentThumbsEntity::getCId, id)
|
||||
.eq(CommentThumbsEntity::getUid, uid));
|
||||
|
||||
return Optional.ofNullable(one).isPresent();
|
||||
.eq(CommentThumbsEntity::getUid, uid)
|
||||
.one();
|
||||
return Optional.ofNullable(commentThumbs).isPresent();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -70,8 +70,8 @@ public class CommentThumbsServiceImpl extends ServiceImpl<CommentThumbsDao, Comm
|
||||
|
||||
/**
|
||||
* 点赞
|
||||
* @param request
|
||||
* @param user
|
||||
* @param request 请求体
|
||||
* @param user 用户实体
|
||||
*/
|
||||
@Override
|
||||
public void addThumbs(AddThumbsForm request, AppUserEntity user) {
|
||||
@ -93,8 +93,8 @@ public class CommentThumbsServiceImpl extends ServiceImpl<CommentThumbsDao, Comm
|
||||
|
||||
/**
|
||||
* 取消点赞
|
||||
* @param request
|
||||
* @param user
|
||||
* @param request 请求体
|
||||
* @param user 用户实体
|
||||
*/
|
||||
@Override
|
||||
public void cancelThumbs(AddThumbsForm request, AppUserEntity user) {
|
||||
|
@ -38,8 +38,6 @@ spring:
|
||||
min-idle: 5 # 连接池中的最小空闲连接
|
||||
mvc:
|
||||
throw-exception-if-no-handler-found: true
|
||||
# resources:
|
||||
# add-mappings: false
|
||||
|
||||
|
||||
#mybatis
|
||||
@ -88,8 +86,8 @@ linfeng:
|
||||
#文件大小限制
|
||||
oss:
|
||||
# 文件大小用户端和后台管理端 单位M
|
||||
max-size: 10
|
||||
admin-max-size: 5
|
||||
max-size: 30
|
||||
admin-max-size: 10
|
||||
|
||||
# 是否开启短信验证码 todo
|
||||
sms:
|
||||
|
@ -3,7 +3,13 @@
|
||||
<text class="title">页面迷路啦~</text>
|
||||
<text class="info">请确认访问地址是否有误</text>
|
||||
<u-button type="primary" class="btn-home" @click="goHome">返回首页</u-button>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<u-button type="success" @click="goWebsite">前往官网演示</u-button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5 -->
|
||||
<u-button type="success" @click="goWebsite">前往官网</u-button>
|
||||
<!-- #endif -->
|
||||
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
|