-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
194 additions
and
140 deletions.
There are no files selected for viewing
33 changes: 0 additions & 33 deletions
33
generator/mybatis-plus/src/main/java/cn/zm/plus/web/entity/BusComments.java
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
generator/mybatis-plus/src/main/java/cn/zm/plus/web/entity/dto/BusCommentsDTO.java
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
generator/mybatis-plus/src/main/java/cn/zm/plus/web/entity/vo/BusCommentsVO.java
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
generator/mybatis-plus/src/main/java/cn/zm/plus/web/service/IBusCommentsService.java
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
generator/mybatis-plus/src/main/java/cn/zm/plus/web/service/impl/BusCommentsServiceImpl.java
This file was deleted.
Oops, something went wrong.
56 changes: 56 additions & 0 deletions
56
...r/trip-web-api/src/main/java/cn/zm/trip/restful/ViewScenicSpotCommentsUserController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package cn.zm.trip.restful; | ||
|
||
import cn.zm.common.base.ResResult; | ||
import cn.zm.mybatis.base.BaseController; | ||
import cn.zm.trip.entity.dto.ViewScenicSpotCommentsUserDTO; | ||
import cn.zm.trip.entity.vo.ViewScenicSpotCommentsUserVO; | ||
import cn.zm.trip.service.IViewScenicSpotCommentsUserService; | ||
import org.springframework.web.bind.annotation.RestController; | ||
import com.baomidou.mybatisplus.core.metadata.IPage; | ||
import io.swagger.annotations.ApiImplicitParam; | ||
import io.swagger.annotations.ApiImplicitParams; | ||
import io.swagger.annotations.ApiOperation; | ||
import io.swagger.annotations.Api; | ||
import org.springframework.validation.annotation.Validated; | ||
import org.springframework.web.bind.annotation.*; | ||
import javax.annotation.Resource; | ||
import java.util.Objects; | ||
import java.util.List; | ||
|
||
/** | ||
* VIEW | ||
* @author 十渊 | ||
* @since 2022-07-12 | ||
*/ | ||
@RequestMapping("viewScenicSpotCommentsUser") | ||
@RestController | ||
@Api(tags = "视图-景点评论用户关联") | ||
public class ViewScenicSpotCommentsUserController extends BaseController { | ||
|
||
@Resource | ||
private IViewScenicSpotCommentsUserService viewScenicSpotCommentsUserService; | ||
|
||
@GetMapping | ||
@ApiOperation("VIEWpage查询") | ||
// @ApiImplicitParams({ | ||
// @ApiImplicitParam(name = "page", value = "当前页数", defaultValue = "1"), | ||
// @ApiImplicitParam(name = "size", value = "每页个数", defaultValue = "10"), | ||
// @ApiImplicitParam(name = "orderByColumn", value = "排序字段"), | ||
// @ApiImplicitParam(name = "isDesc", value = "是否降序") | ||
// }) | ||
public ResResult<IPage<ViewScenicSpotCommentsUserVO>> getByPage(@Validated ViewScenicSpotCommentsUserDTO viewScenicSpotCommentsUser) { | ||
// TODO 分页查询 | ||
IPage<ViewScenicSpotCommentsUserVO> page = viewScenicSpotCommentsUserService.selectByPage(getPage(), viewScenicSpotCommentsUser); | ||
return ResResult.succ(page); | ||
} | ||
|
||
|
||
@GetMapping("{id}") | ||
@ApiOperation("VIEW查询(id)") | ||
public ResResult<ViewScenicSpotCommentsUserVO> get(@PathVariable String id) { | ||
// TODO 查询 | ||
boolean aNull = Objects.isNull(viewScenicSpotCommentsUserService.getById(id)); | ||
return ResResult.succ(aNull ? null : viewScenicSpotCommentsUserService.getById(id).convert()); | ||
} | ||
|
||
} |
29 changes: 29 additions & 0 deletions
29
...eb-server/trip-web-entity/src/main/java/cn/zm/trip/entity/ViewScenicSpotCommentsUser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package cn.zm.trip.entity; | ||
|
||
import cn.zm.trip.entity.vo.ViewScenicSpotCommentsUserVO; | ||
import com.baomidou.mybatisplus.annotation.TableName; | ||
import cn.zm.mybatis.utils.ObjectConvert; | ||
import io.swagger.annotations.ApiModel; | ||
import io.swagger.annotations.ApiModelProperty; | ||
import lombok.Data; | ||
import lombok.experimental.Accessors; | ||
|
||
@Data | ||
@Accessors(chain = true) | ||
@TableName("view_scenic_spot_comments_user") | ||
@ApiModel(value="ViewScenicSpotCommentsUser对象", description="VIEW") | ||
public class ViewScenicSpotCommentsUser extends ObjectConvert<ViewScenicSpotCommentsUserVO>{ | ||
@ApiModelProperty(value = "名称") | ||
private String name; | ||
@ApiModelProperty(value = "头像") | ||
private String avatar; | ||
@ApiModelProperty(value = "电话号码") | ||
private String phone; | ||
@ApiModelProperty(value = "简介") | ||
private String intro; | ||
@ApiModelProperty(value = "父评论id") | ||
private Long parentId; | ||
@ApiModelProperty(value = "内容") | ||
private String content; | ||
} | ||
|
29 changes: 29 additions & 0 deletions
29
...er/trip-web-entity/src/main/java/cn/zm/trip/entity/dto/ViewScenicSpotCommentsUserDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package cn.zm.trip.entity.dto; | ||
|
||
import cn.zm.trip.entity.ViewScenicSpotCommentsUser; | ||
import com.baomidou.mybatisplus.annotation.TableName; | ||
import cn.zm.mybatis.utils.ObjectConvert; | ||
import io.swagger.annotations.ApiModel; | ||
import io.swagger.annotations.ApiModelProperty; | ||
import lombok.Data; | ||
import lombok.experimental.Accessors; | ||
|
||
@Data | ||
@Accessors(chain = true) | ||
@TableName("view_scenic_spot_comments_user") | ||
@ApiModel(value="ViewScenicSpotCommentsUserDTO对象", description="VIEW") | ||
public class ViewScenicSpotCommentsUserDTO extends ObjectConvert<ViewScenicSpotCommentsUser>{ | ||
@ApiModelProperty(value = "名称") | ||
private String name; | ||
@ApiModelProperty(value = "头像") | ||
private String avatar; | ||
@ApiModelProperty(value = "电话号码") | ||
private String phone; | ||
@ApiModelProperty(value = "简介") | ||
private String intro; | ||
@ApiModelProperty(value = "父评论id") | ||
private Long parentId; | ||
@ApiModelProperty(value = "内容") | ||
private String content; | ||
} | ||
|
28 changes: 28 additions & 0 deletions
28
...rver/trip-web-entity/src/main/java/cn/zm/trip/entity/vo/ViewScenicSpotCommentsUserVO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package cn.zm.trip.entity.vo; | ||
|
||
import com.baomidou.mybatisplus.annotation.TableName; | ||
import cn.zm.mybatis.utils.ObjectConvert; | ||
import io.swagger.annotations.ApiModel; | ||
import io.swagger.annotations.ApiModelProperty; | ||
import lombok.Data; | ||
import lombok.experimental.Accessors; | ||
|
||
@Data | ||
@Accessors(chain = true) | ||
@TableName("view_scenic_spot_comments_user") | ||
@ApiModel(value="ViewScenicSpotCommentsUserVO对象", description="VIEW") | ||
public class ViewScenicSpotCommentsUserVO { | ||
@ApiModelProperty(value = "名称") | ||
private String name; | ||
@ApiModelProperty(value = "头像") | ||
private String avatar; | ||
@ApiModelProperty(value = "电话号码") | ||
private String phone; | ||
@ApiModelProperty(value = "简介") | ||
private String intro; | ||
@ApiModelProperty(value = "父评论id") | ||
private Long parentId; | ||
@ApiModelProperty(value = "内容") | ||
private String content; | ||
} | ||
|
10 changes: 10 additions & 0 deletions
10
...ver/trip-web-mapper/src/main/java/cn/zm/trip/mapper/ViewScenicSpotCommentsUserMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package cn.zm.trip.mapper; | ||
|
||
import cn.zm.trip.entity.ViewScenicSpotCommentsUser; | ||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
import org.apache.ibatis.annotations.Mapper; | ||
|
||
@Mapper | ||
public interface ViewScenicSpotCommentsUserMapper extends BaseMapper<ViewScenicSpotCommentsUser> { | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
...trip-web-service/src/main/java/cn/zm/trip/service/IViewScenicSpotCommentsUserService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package cn.zm.trip.service; | ||
|
||
import cn.zm.trip.entity.ViewScenicSpotCommentsUser; | ||
import cn.zm.trip.entity.dto.ViewScenicSpotCommentsUserDTO; | ||
import cn.zm.trip.entity.vo.ViewScenicSpotCommentsUserVO; | ||
import com.baomidou.mybatisplus.core.metadata.IPage; | ||
import com.baomidou.mybatisplus.extension.service.IService; | ||
|
||
public interface IViewScenicSpotCommentsUserService extends IService<ViewScenicSpotCommentsUser> { | ||
/** | ||
* 分页查询 | ||
* | ||
* @param page 分页信息 | ||
* @param ViewScenicSpotCommentsUser VIEW入参 | ||
* @return 分页结果 | ||
*/ | ||
IPage<ViewScenicSpotCommentsUserVO> selectByPage(IPage<ViewScenicSpotCommentsUser> page, ViewScenicSpotCommentsUserDTO ViewScenicSpotCommentsUser); | ||
} |
24 changes: 24 additions & 0 deletions
24
...-service/src/main/java/cn/zm/trip/service/impl/ViewScenicSpotCommentsUserServiceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package cn.zm.trip.service.impl; | ||
|
||
import cn.zm.mybatis.utils.ConvertUtil; | ||
import cn.zm.trip.entity.ViewScenicSpotCommentsUser; | ||
import cn.zm.trip.entity.dto.ViewScenicSpotCommentsUserDTO; | ||
import cn.zm.trip.entity.vo.ViewScenicSpotCommentsUserVO; | ||
import cn.zm.trip.mapper.ViewScenicSpotCommentsUserMapper; | ||
import cn.zm.trip.service.IViewScenicSpotCommentsUserService; | ||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
import org.springframework.stereotype.Service; | ||
import org.springframework.transaction.annotation.Transactional; | ||
import com.baomidou.mybatisplus.core.metadata.IPage; | ||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
|
||
|
||
@Service | ||
@Transactional(rollbackFor = Exception.class) | ||
public class ViewScenicSpotCommentsUserServiceImpl extends ServiceImpl<ViewScenicSpotCommentsUserMapper, ViewScenicSpotCommentsUser> implements IViewScenicSpotCommentsUserService { | ||
@Override | ||
public IPage<ViewScenicSpotCommentsUserVO> selectByPage(IPage<ViewScenicSpotCommentsUser> page, ViewScenicSpotCommentsUserDTO view_scenic_spot_comments_user) { | ||
IPage<ViewScenicSpotCommentsUser> view_scenic_spot_comments_userPage = baseMapper.selectPage(page, new QueryWrapper<>(view_scenic_spot_comments_user.convert())); | ||
return ConvertUtil.buildPage(view_scenic_spot_comments_userPage); | ||
} | ||
} |