```
feat(qr-login): 修改二维码登录数据时间字段类型为字符串 将 QrLoginData 中的 createTime 和 expireTime 字段从 Date 类型修改为 String 类型,便于序列化和传输。同时在扫码登录逻辑中增加调试日志输出, 方便排查问题。 chore(cms): 移除多个 CMS 模块的控制器代码 删除以下 CMS 模块的控制器文件: - CmsAdController - CmsAdRecordController - CmsArticleCategoryController- CmsArticleCommentController- CmsArticleContentController - CmsArticleController - CmsArticleCountController这些控制器可能已迁移至其他模块或采用新的实现方式。 ```
This commit is contained in:
@@ -40,12 +40,12 @@ public class QrLoginData {
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
private String createTime;
|
||||
|
||||
/**
|
||||
* 过期时间
|
||||
*/
|
||||
private Date expireTime;
|
||||
private String expireTime;
|
||||
|
||||
/**
|
||||
* JWT访问令牌(确认后生成)
|
||||
|
||||
@@ -173,6 +173,7 @@ public class QrLoginServiceImpl implements QrLoginService {
|
||||
throw new RuntimeException("用户已被冻结");
|
||||
}
|
||||
|
||||
System.out.println("扫码登录->user = " + user);
|
||||
// 生成JWT token
|
||||
JwtSubject jwtSubject = new JwtSubject(user.getUsername(), user.getTenantId());
|
||||
String accessToken = JwtUtil.buildToken(jwtSubject, configProperties.getTokenExpireTime(), configProperties.getTokenKey());
|
||||
@@ -182,7 +183,9 @@ public class QrLoginServiceImpl implements QrLoginService {
|
||||
qrLoginData.setUserId(userId);
|
||||
qrLoginData.setUsername(user.getUsername());
|
||||
qrLoginData.setAccessToken(accessToken);
|
||||
|
||||
System.out.println("qrLoginData = " + qrLoginData);
|
||||
System.out.println("token = " + token);
|
||||
System.out.println("getUsername. = " + user.getUsername());
|
||||
// 更新Redis中的数据
|
||||
redisUtil.set(redisKey, qrLoginData, 60L, TimeUnit.SECONDS); // 给前端60秒时间获取token
|
||||
|
||||
|
||||
@@ -1,120 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsAdService;
|
||||
import com.gxwebsoft.cms.entity.CmsAd;
|
||||
import com.gxwebsoft.cms.param.CmsAdParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 广告位控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Tag(name = "广告位管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-ad")
|
||||
public class CmsAdController extends BaseController {
|
||||
@Resource
|
||||
private CmsAdService cmsAdService;
|
||||
|
||||
@Operation(summary = "分页查询广告位")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsAd>> page(CmsAdParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsAdService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部广告位")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsAd>> list(CmsAdParam param) {
|
||||
PageParam<CmsAd, CmsAdParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(cmsAdService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(cmsAdService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsAd:list')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据id查询广告位")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsAd> get(@PathVariable("id") Integer id) {
|
||||
return success(cmsAdService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(cmsAdService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加广告位")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsAd cmsAd) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
cmsAd.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (cmsAdService.save(cmsAd)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改广告位")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsAd cmsAd) {
|
||||
if (cmsAdService.updateById(cmsAd)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除广告位")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsAdService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加广告位")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsAd> list) {
|
||||
if (cmsAdService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改广告位")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsAd> batchParam) {
|
||||
if (batchParam.update(cmsAdService, "ad_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除广告位")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsAdService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsAdRecordService;
|
||||
import com.gxwebsoft.cms.entity.CmsAdRecord;
|
||||
import com.gxwebsoft.cms.param.CmsAdRecordParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 广告图片控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Tag(name = "广告图片管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-ad-record")
|
||||
public class CmsAdRecordController extends BaseController {
|
||||
@Resource
|
||||
private CmsAdRecordService cmsAdRecordService;
|
||||
|
||||
@Operation(summary = "分页查询广告图片")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsAdRecord>> page(CmsAdRecordParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsAdRecordService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部广告图片")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsAdRecord>> list(CmsAdRecordParam param) {
|
||||
PageParam<CmsAdRecord, CmsAdRecordParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(cmsAdRecordService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(cmsAdRecordService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsAdRecord:list')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据id查询广告图片")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsAdRecord> get(@PathVariable("id") Integer id) {
|
||||
return success(cmsAdRecordService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(cmsAdRecordService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加广告图片")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsAdRecord cmsAdRecord) {
|
||||
if (cmsAdRecordService.save(cmsAdRecord)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改广告图片")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsAdRecord cmsAdRecord) {
|
||||
if (cmsAdRecordService.updateById(cmsAdRecord)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除广告图片")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsAdRecordService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加广告图片")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsAdRecord> list) {
|
||||
if (cmsAdRecordService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改广告图片")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsAdRecord> batchParam) {
|
||||
if (batchParam.update(cmsAdRecordService, "ad_record_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除广告图片")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsAdRecordService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsArticleCategoryService;
|
||||
import com.gxwebsoft.cms.entity.CmsArticleCategory;
|
||||
import com.gxwebsoft.cms.param.CmsArticleCategoryParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文章分类表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Tag(name = "文章分类表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-article-category")
|
||||
public class CmsArticleCategoryController extends BaseController {
|
||||
@Resource
|
||||
private CmsArticleCategoryService cmsArticleCategoryService;
|
||||
|
||||
@Operation(summary = "分页查询文章分类表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsArticleCategory>> page(CmsArticleCategoryParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsArticleCategoryService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部文章分类表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsArticleCategory>> list(CmsArticleCategoryParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsArticleCategoryService.listRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "根据id查询文章分类表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsArticleCategory> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(cmsArticleCategoryService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加文章分类表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsArticleCategory cmsArticleCategory) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
cmsArticleCategory.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (cmsArticleCategoryService.save(cmsArticleCategory)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改文章分类表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsArticleCategory cmsArticleCategory) {
|
||||
if (cmsArticleCategoryService.updateById(cmsArticleCategory)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除文章分类表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsArticleCategoryService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加文章分类表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsArticleCategory> list) {
|
||||
if (cmsArticleCategoryService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改文章分类表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsArticleCategory> batchParam) {
|
||||
if (batchParam.update(cmsArticleCategoryService, "category_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除文章分类表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsArticleCategoryService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsArticleCommentService;
|
||||
import com.gxwebsoft.cms.entity.CmsArticleComment;
|
||||
import com.gxwebsoft.cms.param.CmsArticleCommentParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文章评论表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Tag(name = "文章评论表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-article-comment")
|
||||
public class CmsArticleCommentController extends BaseController {
|
||||
@Resource
|
||||
private CmsArticleCommentService cmsArticleCommentService;
|
||||
|
||||
@Operation(summary = "分页查询文章评论表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsArticleComment>> page(CmsArticleCommentParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsArticleCommentService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部文章评论表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsArticleComment>> list(CmsArticleCommentParam param) {
|
||||
PageParam<CmsArticleComment, CmsArticleCommentParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(cmsArticleCommentService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(cmsArticleCommentService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsArticleComment:list')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据id查询文章评论表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsArticleComment> get(@PathVariable("id") Integer id) {
|
||||
return success(cmsArticleCommentService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(cmsArticleCommentService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加文章评论表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsArticleComment cmsArticleComment) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
cmsArticleComment.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (cmsArticleCommentService.save(cmsArticleComment)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改文章评论表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsArticleComment cmsArticleComment) {
|
||||
if (cmsArticleCommentService.updateById(cmsArticleComment)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除文章评论表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsArticleCommentService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加文章评论表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsArticleComment> list) {
|
||||
if (cmsArticleCommentService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改文章评论表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsArticleComment> batchParam) {
|
||||
if (batchParam.update(cmsArticleCommentService, "comment_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除文章评论表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsArticleCommentService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsArticleContentService;
|
||||
import com.gxwebsoft.cms.entity.CmsArticleContent;
|
||||
import com.gxwebsoft.cms.param.CmsArticleContentParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文章记录表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Tag(name = "文章记录表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-article-content")
|
||||
public class CmsArticleContentController extends BaseController {
|
||||
@Resource
|
||||
private CmsArticleContentService cmsArticleContentService;
|
||||
|
||||
@Operation(summary = "分页查询文章记录表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsArticleContent>> page(CmsArticleContentParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsArticleContentService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部文章记录表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsArticleContent>> list(CmsArticleContentParam param) {
|
||||
PageParam<CmsArticleContent, CmsArticleContentParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(cmsArticleContentService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(cmsArticleContentService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsArticleContent:list')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据id查询文章记录表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsArticleContent> get(@PathVariable("id") Integer id) {
|
||||
return success(cmsArticleContentService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(cmsArticleContentService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加文章记录表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsArticleContent cmsArticleContent) {
|
||||
if (cmsArticleContentService.save(cmsArticleContent)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改文章记录表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsArticleContent cmsArticleContent) {
|
||||
if (cmsArticleContentService.updateById(cmsArticleContent)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除文章记录表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsArticleContentService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加文章记录表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsArticleContent> list) {
|
||||
if (cmsArticleContentService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改文章记录表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsArticleContent> batchParam) {
|
||||
if (batchParam.update(cmsArticleContentService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除文章记录表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsArticleContentService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,218 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.alipay.api.domain.Article;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.gxwebsoft.cms.entity.CmsArticleContent;
|
||||
import com.gxwebsoft.cms.param.CmsNavigationParam;
|
||||
import com.gxwebsoft.cms.service.CmsArticleContentService;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsArticleService;
|
||||
import com.gxwebsoft.cms.entity.CmsArticle;
|
||||
import com.gxwebsoft.cms.param.CmsArticleParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.common.system.service.UserService;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 文章控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Tag(name = "文章管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-article")
|
||||
public class CmsArticleController extends BaseController {
|
||||
@Resource
|
||||
private CmsArticleService cmsArticleService;
|
||||
@Resource
|
||||
private CmsArticleContentService articleContentService;
|
||||
@Resource
|
||||
private UserService userService;
|
||||
|
||||
@Operation(summary = "分页查询文章")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsArticle>> page(CmsArticleParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsArticleService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部文章")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsArticle>> list(CmsArticleParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsArticleService.listRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "根据id查询文章")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsArticle> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
CmsArticle article = cmsArticleService.getByIdRel(id);
|
||||
// 更新阅读数量
|
||||
article.setActualViews(article.getActualViews() + 1);
|
||||
cmsArticleService.updateById(article);
|
||||
// 附加文字内容
|
||||
CmsArticleContent content = articleContentService.getOne(new LambdaQueryWrapper<CmsArticleContent>().eq(CmsArticleContent::getArticleId,article.getArticleId()).last("limit 1"));
|
||||
if(content != null){
|
||||
article.setContent(content.getContent());
|
||||
}
|
||||
return success(article);
|
||||
}
|
||||
@PreAuthorize("hasAuthority('cms:cmsArticle:save')")
|
||||
@Operation(summary = "添加文章")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsArticle article) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
article.setUserId(loginUser.getUserId());
|
||||
article.setAuthor(loginUser.getNickname());
|
||||
article.setMerchantId(loginUser.getMerchantId());
|
||||
}
|
||||
// 是否密码可见
|
||||
if(article.getPermission() == 2){
|
||||
article.setPassword(userService.encodePassword(article.getPassword()));
|
||||
}
|
||||
if (cmsArticleService.save(article)) {
|
||||
// 保存文章内容
|
||||
final CmsArticleContent content = new CmsArticleContent();
|
||||
content.setArticleId(article.getArticleId());
|
||||
content.setContent(article.getContent());
|
||||
articleContentService.save(content);
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsArticle:update')")
|
||||
@Operation(summary = "修改文章")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsArticle cmsArticle) {
|
||||
// 是否密码可见
|
||||
if(cmsArticle.getPermission() == 2){
|
||||
cmsArticle.setPassword(userService.encodePassword(cmsArticle.getPassword()));
|
||||
}
|
||||
if (cmsArticleService.updateById(cmsArticle)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsArticle:remove')")
|
||||
@Operation(summary = "删除文章")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsArticleService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsArticle:save')")
|
||||
@Operation(summary = "批量添加文章")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsArticle> list) {
|
||||
if (cmsArticleService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsArticle:update')")
|
||||
@Operation(summary = "批量修改文章")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsArticle> batchParam) {
|
||||
if (batchParam.update(cmsArticleService, "article_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsArticle:remove')")
|
||||
@Operation(summary = "批量删除文章")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsArticleService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "读取上一篇")
|
||||
@GetMapping("/getPrevious/{id}")
|
||||
public ApiResult<CmsArticle> getPrevious(@PathVariable("id") Integer id) {
|
||||
LambdaQueryWrapper<CmsArticle> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.lt(CmsArticle::getArticleId,id);
|
||||
wrapper.eq(CmsArticle::getStatus,0);
|
||||
wrapper.eq(CmsArticle::getType,0);
|
||||
wrapper.orderByDesc(CmsArticle::getArticleId);
|
||||
wrapper.last("limit 1");
|
||||
final CmsArticle article = cmsArticleService.getOne(wrapper);
|
||||
return success(article);
|
||||
}
|
||||
|
||||
@Operation(summary = "读取下一篇")
|
||||
@GetMapping("/getNext/{id}")
|
||||
public ApiResult<CmsArticle> getNext(@PathVariable("id") Integer id) {
|
||||
LambdaQueryWrapper<CmsArticle> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.gt(CmsArticle::getArticleId,id);
|
||||
wrapper.eq(CmsArticle::getStatus,0);
|
||||
wrapper.eq(CmsArticle::getType,0);
|
||||
wrapper.orderByAsc(CmsArticle::getArticleId);
|
||||
wrapper.last("limit 1");
|
||||
final CmsArticle article = cmsArticleService.getOne(wrapper);
|
||||
return success(article);
|
||||
}
|
||||
|
||||
@Operation(summary = "统计信息")
|
||||
@GetMapping("/data")
|
||||
public ApiResult<Map<String, Integer>> data(CmsArticleParam param) {
|
||||
Map<String, Integer> data = new HashMap<>();
|
||||
final LambdaQueryWrapper<CmsArticle> wrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
if(param.getMerchantId() != null){
|
||||
wrapper.eq(CmsArticle::getMerchantId,param.getMerchantId());
|
||||
}
|
||||
|
||||
Integer totalNum = cmsArticleService.count(
|
||||
wrapper.eq(CmsArticle::getDeleted,0).eq(CmsArticle::getStatus,0)
|
||||
);
|
||||
data.put("totalNum", totalNum);
|
||||
|
||||
Integer totalNum2 = cmsArticleService.count(
|
||||
wrapper.eq(CmsArticle::getStatus,1)
|
||||
);
|
||||
data.put("totalNum2", totalNum2);
|
||||
|
||||
Integer totalNum3 = cmsArticleService.count(
|
||||
wrapper.gt(CmsArticle::getStatus,1)
|
||||
);
|
||||
data.put("totalNum3", totalNum3);
|
||||
|
||||
return success(data);
|
||||
}
|
||||
|
||||
@Operation(summary = "密码校验")
|
||||
@GetMapping("/checkArticlePassword")
|
||||
public ApiResult<?> checkArticlePassword(CmsArticle param) {
|
||||
if (!userService.comparePassword(param.getPassword(), param.getPassword2())) {
|
||||
return fail("密码不正确");
|
||||
}
|
||||
return success("密码正确");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsArticleCountService;
|
||||
import com.gxwebsoft.cms.entity.CmsArticleCount;
|
||||
import com.gxwebsoft.cms.param.CmsArticleCountParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 点赞文章控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Tag(name = "点赞文章管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-article-count")
|
||||
public class CmsArticleCountController extends BaseController {
|
||||
@Resource
|
||||
private CmsArticleCountService cmsArticleCountService;
|
||||
|
||||
@Operation(summary = "分页查询点赞文章")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsArticleCount>> page(CmsArticleCountParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsArticleCountService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部点赞文章")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsArticleCount>> list(CmsArticleCountParam param) {
|
||||
PageParam<CmsArticleCount, CmsArticleCountParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(cmsArticleCountService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(cmsArticleCountService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsArticleCount:list')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据id查询点赞文章")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsArticleCount> get(@PathVariable("id") Integer id) {
|
||||
return success(cmsArticleCountService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(cmsArticleCountService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加点赞文章")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsArticleCount cmsArticleCount) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
cmsArticleCount.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (cmsArticleCountService.save(cmsArticleCount)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改点赞文章")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsArticleCount cmsArticleCount) {
|
||||
if (cmsArticleCountService.updateById(cmsArticleCount)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除点赞文章")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsArticleCountService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加点赞文章")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsArticleCount> list) {
|
||||
if (cmsArticleCountService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改点赞文章")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsArticleCount> batchParam) {
|
||||
if (batchParam.update(cmsArticleCountService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除点赞文章")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsArticleCountService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsArticleLikeService;
|
||||
import com.gxwebsoft.cms.entity.CmsArticleLike;
|
||||
import com.gxwebsoft.cms.param.CmsArticleLikeParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 点赞文章控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Tag(name = "点赞文章管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-article-like")
|
||||
public class CmsArticleLikeController extends BaseController {
|
||||
@Resource
|
||||
private CmsArticleLikeService cmsArticleLikeService;
|
||||
|
||||
@Operation(summary = "分页查询点赞文章")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsArticleLike>> page(CmsArticleLikeParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsArticleLikeService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部点赞文章")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsArticleLike>> list(CmsArticleLikeParam param) {
|
||||
PageParam<CmsArticleLike, CmsArticleLikeParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(cmsArticleLikeService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(cmsArticleLikeService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsArticleLike:list')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据id查询点赞文章")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsArticleLike> get(@PathVariable("id") Integer id) {
|
||||
return success(cmsArticleLikeService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(cmsArticleLikeService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加点赞文章")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsArticleLike cmsArticleLike) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
cmsArticleLike.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (cmsArticleLikeService.save(cmsArticleLike)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改点赞文章")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsArticleLike cmsArticleLike) {
|
||||
if (cmsArticleLikeService.updateById(cmsArticleLike)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除点赞文章")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsArticleLikeService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加点赞文章")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsArticleLike> list) {
|
||||
if (cmsArticleLikeService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改点赞文章")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsArticleLike> batchParam) {
|
||||
if (batchParam.update(cmsArticleLikeService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除点赞文章")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsArticleLikeService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsComponentsService;
|
||||
import com.gxwebsoft.cms.entity.CmsComponents;
|
||||
import com.gxwebsoft.cms.param.CmsComponentsParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 组件控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Tag(name = "组件管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-components")
|
||||
public class CmsComponentsController extends BaseController {
|
||||
@Resource
|
||||
private CmsComponentsService cmsComponentsService;
|
||||
|
||||
@Operation(summary = "分页查询组件")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsComponents>> page(CmsComponentsParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsComponentsService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部组件")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsComponents>> list(CmsComponentsParam param) {
|
||||
PageParam<CmsComponents, CmsComponentsParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(cmsComponentsService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(cmsComponentsService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsComponents:list')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据id查询组件")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsComponents> get(@PathVariable("id") Integer id) {
|
||||
return success(cmsComponentsService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(cmsComponentsService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加组件")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsComponents cmsComponents) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
cmsComponents.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (cmsComponentsService.save(cmsComponents)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改组件")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsComponents cmsComponents) {
|
||||
if (cmsComponentsService.updateById(cmsComponents)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除组件")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsComponentsService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加组件")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsComponents> list) {
|
||||
if (cmsComponentsService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改组件")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsComponents> batchParam) {
|
||||
if (batchParam.update(cmsComponentsService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除组件")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsComponentsService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsDesignService;
|
||||
import com.gxwebsoft.cms.entity.CmsDesign;
|
||||
import com.gxwebsoft.cms.param.CmsDesignParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 页面管理记录表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Tag(name = "页面管理记录表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-design")
|
||||
public class CmsDesignController extends BaseController {
|
||||
@Resource
|
||||
private CmsDesignService cmsDesignService;
|
||||
|
||||
@Operation(summary = "分页查询页面管理记录表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsDesign>> page(CmsDesignParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsDesignService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部页面管理记录表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsDesign>> list(CmsDesignParam param) {
|
||||
PageParam<CmsDesign, CmsDesignParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(cmsDesignService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(cmsDesignService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsDesign:list')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据id查询页面管理记录表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsDesign> get(@PathVariable("id") Integer id) {
|
||||
return success(cmsDesignService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(cmsDesignService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加页面管理记录表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsDesign cmsDesign) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
cmsDesign.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (cmsDesignService.save(cmsDesign)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改页面管理记录表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsDesign cmsDesign) {
|
||||
if (cmsDesignService.updateById(cmsDesign)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除页面管理记录表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsDesignService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加页面管理记录表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsDesign> list) {
|
||||
if (cmsDesignService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改页面管理记录表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsDesign> batchParam) {
|
||||
if (batchParam.update(cmsDesignService, "page_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除页面管理记录表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsDesignService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsDesignRecordService;
|
||||
import com.gxwebsoft.cms.entity.CmsDesignRecord;
|
||||
import com.gxwebsoft.cms.param.CmsDesignRecordParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 页面组件表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Tag(name = "页面组件表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-design-record")
|
||||
public class CmsDesignRecordController extends BaseController {
|
||||
@Resource
|
||||
private CmsDesignRecordService cmsDesignRecordService;
|
||||
|
||||
@Operation(summary = "分页查询页面组件表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsDesignRecord>> page(CmsDesignRecordParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsDesignRecordService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部页面组件表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsDesignRecord>> list(CmsDesignRecordParam param) {
|
||||
PageParam<CmsDesignRecord, CmsDesignRecordParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(cmsDesignRecordService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(cmsDesignRecordService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsDesignRecord:list')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据id查询页面组件表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsDesignRecord> get(@PathVariable("id") Integer id) {
|
||||
return success(cmsDesignRecordService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(cmsDesignRecordService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加页面组件表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsDesignRecord cmsDesignRecord) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
cmsDesignRecord.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (cmsDesignRecordService.save(cmsDesignRecord)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改页面组件表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsDesignRecord cmsDesignRecord) {
|
||||
if (cmsDesignRecordService.updateById(cmsDesignRecord)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除页面组件表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsDesignRecordService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加页面组件表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsDesignRecord> list) {
|
||||
if (cmsDesignRecordService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改页面组件表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsDesignRecord> batchParam) {
|
||||
if (batchParam.update(cmsDesignRecordService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除页面组件表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsDesignRecordService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsDocsBookService;
|
||||
import com.gxwebsoft.cms.entity.CmsDocsBook;
|
||||
import com.gxwebsoft.cms.param.CmsDocsBookParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 书籍记录表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Tag(name = "书籍记录表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-docs-book")
|
||||
public class CmsDocsBookController extends BaseController {
|
||||
@Resource
|
||||
private CmsDocsBookService cmsDocsBookService;
|
||||
|
||||
@Operation(summary = "分页查询书籍记录表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsDocsBook>> page(CmsDocsBookParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsDocsBookService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部书籍记录表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsDocsBook>> list(CmsDocsBookParam param) {
|
||||
PageParam<CmsDocsBook, CmsDocsBookParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(cmsDocsBookService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(cmsDocsBookService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsDocsBook:list')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据id查询书籍记录表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsDocsBook> get(@PathVariable("id") Integer id) {
|
||||
return success(cmsDocsBookService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(cmsDocsBookService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加书籍记录表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsDocsBook cmsDocsBook) {
|
||||
if (cmsDocsBookService.save(cmsDocsBook)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改书籍记录表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsDocsBook cmsDocsBook) {
|
||||
if (cmsDocsBookService.updateById(cmsDocsBook)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除书籍记录表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsDocsBookService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加书籍记录表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsDocsBook> list) {
|
||||
if (cmsDocsBookService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改书籍记录表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsDocsBook> batchParam) {
|
||||
if (batchParam.update(cmsDocsBookService, "book_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除书籍记录表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsDocsBookService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsDocsContentService;
|
||||
import com.gxwebsoft.cms.entity.CmsDocsContent;
|
||||
import com.gxwebsoft.cms.param.CmsDocsContentParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文档内容记录表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Tag(name = "文档内容记录表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-docs-content")
|
||||
public class CmsDocsContentController extends BaseController {
|
||||
@Resource
|
||||
private CmsDocsContentService cmsDocsContentService;
|
||||
|
||||
@Operation(summary = "分页查询文档内容记录表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsDocsContent>> page(CmsDocsContentParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsDocsContentService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部文档内容记录表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsDocsContent>> list(CmsDocsContentParam param) {
|
||||
PageParam<CmsDocsContent, CmsDocsContentParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(cmsDocsContentService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(cmsDocsContentService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsDocsContent:list')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据id查询文档内容记录表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsDocsContent> get(@PathVariable("id") Integer id) {
|
||||
return success(cmsDocsContentService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(cmsDocsContentService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加文档内容记录表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsDocsContent cmsDocsContent) {
|
||||
if (cmsDocsContentService.save(cmsDocsContent)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改文档内容记录表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsDocsContent cmsDocsContent) {
|
||||
if (cmsDocsContentService.updateById(cmsDocsContent)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除文档内容记录表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsDocsContentService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加文档内容记录表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsDocsContent> list) {
|
||||
if (cmsDocsContentService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改文档内容记录表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsDocsContent> batchParam) {
|
||||
if (batchParam.update(cmsDocsContentService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除文档内容记录表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsDocsContentService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsDocsService;
|
||||
import com.gxwebsoft.cms.entity.CmsDocs;
|
||||
import com.gxwebsoft.cms.param.CmsDocsParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文档管理记录表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Tag(name = "文档管理记录表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-docs")
|
||||
public class CmsDocsController extends BaseController {
|
||||
@Resource
|
||||
private CmsDocsService cmsDocsService;
|
||||
|
||||
@Operation(summary = "分页查询文档管理记录表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsDocs>> page(CmsDocsParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsDocsService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部文档管理记录表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsDocs>> list(CmsDocsParam param) {
|
||||
PageParam<CmsDocs, CmsDocsParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(cmsDocsService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(cmsDocsService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsDocs:list')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据id查询文档管理记录表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsDocs> get(@PathVariable("id") Integer id) {
|
||||
return success(cmsDocsService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(cmsDocsService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加文档管理记录表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsDocs cmsDocs) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
cmsDocs.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (cmsDocsService.save(cmsDocs)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改文档管理记录表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsDocs cmsDocs) {
|
||||
if (cmsDocsService.updateById(cmsDocs)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除文档管理记录表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsDocsService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加文档管理记录表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsDocs> list) {
|
||||
if (cmsDocsService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改文档管理记录表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsDocs> batchParam) {
|
||||
if (batchParam.update(cmsDocsService, "docs_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除文档管理记录表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsDocsService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,182 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.gxwebsoft.cms.mapper.CmsDomainMapper;
|
||||
import com.gxwebsoft.common.core.utils.RedisUtil;
|
||||
import com.gxwebsoft.common.core.web.*;
|
||||
import com.gxwebsoft.cms.service.CmsDomainService;
|
||||
import com.gxwebsoft.cms.entity.CmsDomain;
|
||||
import com.gxwebsoft.cms.param.CmsDomainParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网站域名记录表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:36:14
|
||||
*/
|
||||
@Tag(name = "网站域名记录表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-domain")
|
||||
public class CmsDomainController extends BaseController {
|
||||
@Resource
|
||||
private CmsDomainService cmsDomainService;
|
||||
@Resource
|
||||
private CmsDomainMapper cmsDomainMapper;
|
||||
@Resource
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
@Operation(summary = "分页查询网站域名记录表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsDomain>> page(CmsDomainParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsDomainService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部网站域名记录表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsDomain>> list(CmsDomainParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsDomainService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsDomain:list')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据id查询网站域名记录表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsDomain> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(cmsDomainService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加网站域名记录表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsDomain cmsDomain) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
cmsDomain.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (cmsDomainService.save(cmsDomain)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改网站域名记录表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsDomain cmsDomain) {
|
||||
if (cmsDomainService.updateById(cmsDomain)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除网站域名记录表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsDomainService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加网站域名记录表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsDomain> list) {
|
||||
if (cmsDomainService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改网站域名记录表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsDomain> batchParam) {
|
||||
if (batchParam.update(cmsDomainService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除网站域名记录表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsDomainService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "查询授权域名信息")
|
||||
@GetMapping("/getTenantIdByDomain")
|
||||
public ApiResult<?> getTenantIdByDomain(CmsDomainParam param) {
|
||||
final CmsDomain domain = cmsDomainService.getOne(new LambdaQueryWrapper<CmsDomain>().eq(CmsDomain::getDomain, param.getDomain()).last("limit 1"));
|
||||
return success(domain);
|
||||
}
|
||||
|
||||
@Operation(summary = "授权二级域名")
|
||||
@PostMapping("/domain")
|
||||
public ApiResult<?> domain(@RequestBody CmsDomain cmsDomain) {
|
||||
final User loginUser = getLoginUser();
|
||||
String key = "Domain:" + cmsDomain.getDomain();
|
||||
final Integer tenantId = loginUser.getTenantId();
|
||||
final CmsDomain domain = cmsDomainService.getOne(new LambdaQueryWrapper<CmsDomain>()
|
||||
.eq(CmsDomain::getWebsiteId, cmsDomain.getWebsiteId()).last("limit 1"));
|
||||
if (ObjectUtil.isNotEmpty(domain)) {
|
||||
// 重写缓存
|
||||
redisUtil.set(key,tenantId);
|
||||
domain.setDomain(cmsDomain.getDomain());
|
||||
cmsDomainService.updateById(domain);
|
||||
return success("授权成功");
|
||||
}
|
||||
if(ObjectUtil.isEmpty(domain)){
|
||||
cmsDomain.setUserId(loginUser.getUserId());
|
||||
cmsDomain.setSortNumber(100);
|
||||
cmsDomain.setStatus(1);
|
||||
cmsDomain.setHostName("@");
|
||||
cmsDomain.setWebsiteId(cmsDomain.getWebsiteId());
|
||||
cmsDomain.setTenantId(tenantId);
|
||||
if(cmsDomainService.save(cmsDomain)){
|
||||
// 重写缓存
|
||||
redisUtil.set(key,tenantId);
|
||||
return success("授权成功");
|
||||
}
|
||||
}
|
||||
return fail("授权失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "查询授权主域名")
|
||||
@GetMapping("/getAuthorizedDomain/{id}")
|
||||
public ApiResult<?> getAuthorizedDomain(@PathVariable("id") Integer id) {
|
||||
final List<CmsDomain> list = cmsDomainService.list(new LambdaQueryWrapper<CmsDomain>()
|
||||
.eq(CmsDomain::getWebsiteId, id)
|
||||
.eq(CmsDomain::getStatus, 1)
|
||||
.eq(CmsDomain::getDeleted, 0)
|
||||
.orderByAsc(CmsDomain::getSortNumber));
|
||||
if (CollectionUtil.isEmpty(list)) {
|
||||
return fail("未授权域名");
|
||||
}
|
||||
return success(list.get(0));
|
||||
}
|
||||
|
||||
@Operation(summary = "检查域名是否已存在")
|
||||
@GetMapping("/existence")
|
||||
public ApiResult<?> existence(ExistenceParam<CmsDomain> param) {
|
||||
if (param.isExistence(cmsDomainService, CmsDomain::getDomain)) {
|
||||
return success(param.getValue() + "已存在");
|
||||
}
|
||||
return fail(param.getValue() + "不存在");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsFormService;
|
||||
import com.gxwebsoft.cms.entity.CmsForm;
|
||||
import com.gxwebsoft.cms.param.CmsFormParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 表单设计表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Tag(name = "表单设计表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-form")
|
||||
public class CmsFormController extends BaseController {
|
||||
@Resource
|
||||
private CmsFormService cmsFormService;
|
||||
|
||||
@Operation(summary = "分页查询表单设计表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsForm>> page(CmsFormParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsFormService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部表单设计表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsForm>> list(CmsFormParam param) {
|
||||
PageParam<CmsForm, CmsFormParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(cmsFormService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(cmsFormService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsForm:list')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据id查询表单设计表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsForm> get(@PathVariable("id") Integer id) {
|
||||
return success(cmsFormService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(cmsFormService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加表单设计表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsForm cmsForm) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
cmsForm.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (cmsFormService.save(cmsForm)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改表单设计表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsForm cmsForm) {
|
||||
if (cmsFormService.updateById(cmsForm)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除表单设计表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsFormService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加表单设计表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsForm> list) {
|
||||
if (cmsFormService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改表单设计表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsForm> batchParam) {
|
||||
if (batchParam.update(cmsFormService, "form_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除表单设计表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsFormService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsFormRecordService;
|
||||
import com.gxwebsoft.cms.entity.CmsFormRecord;
|
||||
import com.gxwebsoft.cms.param.CmsFormRecordParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 表单数据记录表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Tag(name = "表单数据记录表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-form-record")
|
||||
public class CmsFormRecordController extends BaseController {
|
||||
@Resource
|
||||
private CmsFormRecordService cmsFormRecordService;
|
||||
|
||||
@Operation(summary = "分页查询表单数据记录表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsFormRecord>> page(CmsFormRecordParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsFormRecordService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部表单数据记录表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsFormRecord>> list(CmsFormRecordParam param) {
|
||||
PageParam<CmsFormRecord, CmsFormRecordParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(cmsFormRecordService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(cmsFormRecordService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsFormRecord:list')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据id查询表单数据记录表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsFormRecord> get(@PathVariable("id") Integer id) {
|
||||
return success(cmsFormRecordService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(cmsFormRecordService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加表单数据记录表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsFormRecord cmsFormRecord) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
cmsFormRecord.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (cmsFormRecordService.save(cmsFormRecord)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改表单数据记录表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsFormRecord cmsFormRecord) {
|
||||
if (cmsFormRecordService.updateById(cmsFormRecord)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除表单数据记录表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsFormRecordService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加表单数据记录表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsFormRecord> list) {
|
||||
if (cmsFormRecordService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改表单数据记录表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsFormRecord> batchParam) {
|
||||
if (batchParam.update(cmsFormRecordService, "form_record_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除表单数据记录表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsFormRecordService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsLinkService;
|
||||
import com.gxwebsoft.cms.entity.CmsLink;
|
||||
import com.gxwebsoft.cms.param.CmsLinkParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 常用链接控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Tag(name = "常用链接管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-link")
|
||||
public class CmsLinkController extends BaseController {
|
||||
@Resource
|
||||
private CmsLinkService cmsLinkService;
|
||||
|
||||
@Operation(summary = "分页查询常用链接")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsLink>> page(CmsLinkParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsLinkService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部常用链接")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsLink>> list(CmsLinkParam param) {
|
||||
PageParam<CmsLink, CmsLinkParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(cmsLinkService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(cmsLinkService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsLink:list')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据id查询常用链接")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsLink> get(@PathVariable("id") Integer id) {
|
||||
return success(cmsLinkService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(cmsLinkService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加常用链接")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsLink cmsLink) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
cmsLink.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (cmsLinkService.save(cmsLink)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改常用链接")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsLink cmsLink) {
|
||||
if (cmsLinkService.updateById(cmsLink)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除常用链接")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsLinkService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加常用链接")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsLink> list) {
|
||||
if (cmsLinkService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改常用链接")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsLink> batchParam) {
|
||||
if (batchParam.update(cmsLinkService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除常用链接")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsLinkService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsMpAdService;
|
||||
import com.gxwebsoft.cms.entity.CmsMpAd;
|
||||
import com.gxwebsoft.cms.param.CmsMpAdParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 小程序广告位控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Tag(name = "小程序广告位管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-mp-ad")
|
||||
public class CmsMpAdController extends BaseController {
|
||||
@Resource
|
||||
private CmsMpAdService cmsMpAdService;
|
||||
|
||||
@Operation(summary = "分页查询小程序广告位")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsMpAd>> page(CmsMpAdParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsMpAdService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部小程序广告位")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsMpAd>> list(CmsMpAdParam param) {
|
||||
PageParam<CmsMpAd, CmsMpAdParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(cmsMpAdService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(cmsMpAdService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsMpAd:list')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据id查询小程序广告位")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsMpAd> get(@PathVariable("id") Integer id) {
|
||||
return success(cmsMpAdService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(cmsMpAdService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加小程序广告位")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsMpAd cmsMpAd) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
cmsMpAd.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (cmsMpAdService.save(cmsMpAd)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改小程序广告位")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsMpAd cmsMpAd) {
|
||||
if (cmsMpAdService.updateById(cmsMpAd)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除小程序广告位")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsMpAdService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加小程序广告位")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsMpAd> list) {
|
||||
if (cmsMpAdService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改小程序广告位")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsMpAd> batchParam) {
|
||||
if (batchParam.update(cmsMpAdService, "ad_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除小程序广告位")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsMpAdService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsMpService;
|
||||
import com.gxwebsoft.cms.entity.CmsMp;
|
||||
import com.gxwebsoft.cms.param.CmsMpParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 小程序信息控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Tag(name = "小程序信息管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-mp")
|
||||
public class CmsMpController extends BaseController {
|
||||
@Resource
|
||||
private CmsMpService cmsMpService;
|
||||
|
||||
@Operation(summary = "分页查询小程序信息")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsMp>> page(CmsMpParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsMpService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部小程序信息")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsMp>> list(CmsMpParam param) {
|
||||
PageParam<CmsMp, CmsMpParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(cmsMpService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(cmsMpService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsMp:list')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据id查询小程序信息")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsMp> get(@PathVariable("id") Integer id) {
|
||||
return success(cmsMpService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(cmsMpService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加小程序信息")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsMp cmsMp) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
cmsMp.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (cmsMpService.save(cmsMp)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改小程序信息")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsMp cmsMp) {
|
||||
if (cmsMpService.updateById(cmsMp)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除小程序信息")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsMpService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加小程序信息")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsMp> list) {
|
||||
if (cmsMpService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改小程序信息")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsMp> batchParam) {
|
||||
if (batchParam.update(cmsMpService, "mp_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除小程序信息")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsMpService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsMpFieldService;
|
||||
import com.gxwebsoft.cms.entity.CmsMpField;
|
||||
import com.gxwebsoft.cms.param.CmsMpFieldParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 小程序配置控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Tag(name = "小程序配置管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-mp-field")
|
||||
public class CmsMpFieldController extends BaseController {
|
||||
@Resource
|
||||
private CmsMpFieldService cmsMpFieldService;
|
||||
|
||||
@Operation(summary = "分页查询小程序配置")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsMpField>> page(CmsMpFieldParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsMpFieldService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部小程序配置")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsMpField>> list(CmsMpFieldParam param) {
|
||||
PageParam<CmsMpField, CmsMpFieldParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(cmsMpFieldService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(cmsMpFieldService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsMpField:list')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据id查询小程序配置")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsMpField> get(@PathVariable("id") Integer id) {
|
||||
return success(cmsMpFieldService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(cmsMpFieldService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加小程序配置")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsMpField cmsMpField) {
|
||||
if (cmsMpFieldService.save(cmsMpField)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改小程序配置")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsMpField cmsMpField) {
|
||||
if (cmsMpFieldService.updateById(cmsMpField)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除小程序配置")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsMpFieldService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加小程序配置")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsMpField> list) {
|
||||
if (cmsMpFieldService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改小程序配置")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsMpField> batchParam) {
|
||||
if (batchParam.update(cmsMpFieldService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除小程序配置")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsMpFieldService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsMpMenuService;
|
||||
import com.gxwebsoft.cms.entity.CmsMpMenu;
|
||||
import com.gxwebsoft.cms.param.CmsMpMenuParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 小程序端菜单控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Tag(name = "小程序端菜单管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-mp-menu")
|
||||
public class CmsMpMenuController extends BaseController {
|
||||
@Resource
|
||||
private CmsMpMenuService cmsMpMenuService;
|
||||
|
||||
@Operation(summary = "分页查询小程序端菜单")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsMpMenu>> page(CmsMpMenuParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsMpMenuService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部小程序端菜单")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsMpMenu>> list(CmsMpMenuParam param) {
|
||||
PageParam<CmsMpMenu, CmsMpMenuParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(cmsMpMenuService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(cmsMpMenuService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsMpMenu:list')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据id查询小程序端菜单")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsMpMenu> get(@PathVariable("id") Integer id) {
|
||||
return success(cmsMpMenuService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(cmsMpMenuService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加小程序端菜单")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsMpMenu cmsMpMenu) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
cmsMpMenu.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (cmsMpMenuService.save(cmsMpMenu)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改小程序端菜单")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsMpMenu cmsMpMenu) {
|
||||
if (cmsMpMenuService.updateById(cmsMpMenu)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除小程序端菜单")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsMpMenuService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加小程序端菜单")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsMpMenu> list) {
|
||||
if (cmsMpMenuService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改小程序端菜单")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsMpMenu> batchParam) {
|
||||
if (batchParam.update(cmsMpMenuService, "menu_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除小程序端菜单")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsMpMenuService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,173 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.gxwebsoft.cms.entity.CmsDesign;
|
||||
import com.gxwebsoft.cms.mapper.CmsNavigationMapper;
|
||||
import com.gxwebsoft.cms.service.CmsDesignService;
|
||||
import com.gxwebsoft.common.core.utils.CommonUtil;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsNavigationService;
|
||||
import com.gxwebsoft.cms.entity.CmsNavigation;
|
||||
import com.gxwebsoft.cms.param.CmsNavigationParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.common.system.service.UserService;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网站导航记录表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Tag(name = "网站导航记录表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-navigation")
|
||||
public class CmsNavigationController extends BaseController {
|
||||
@Resource
|
||||
private CmsNavigationService cmsNavigationService;
|
||||
@Resource
|
||||
private CmsDesignService cmsDesignService;
|
||||
@Resource
|
||||
private UserService userService;
|
||||
|
||||
@Operation(summary = "分页查询网站导航记录表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsNavigation>> page(CmsNavigationParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsNavigationService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部网站导航记录表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsNavigation>> list(CmsNavigationParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsNavigationService.listRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "根据id查询网站导航记录表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsNavigation> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(cmsNavigationService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加网站导航记录表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsNavigation cmsNavigation) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
cmsNavigation.setUserId(loginUser.getUserId());
|
||||
cmsNavigation.setTenantId(loginUser.getTenantId());
|
||||
}
|
||||
if (cmsNavigationService.save(cmsNavigation)) {
|
||||
// 添加成功事务处理
|
||||
cmsNavigationService.saveAsync(cmsNavigation);
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改网站导航记录表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsNavigation cmsNavigation) {
|
||||
if (cmsNavigationService.updateById(cmsNavigation)) {
|
||||
// 修改成功事务处理
|
||||
cmsNavigationService.saveAsync(cmsNavigation);
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除网站导航记录表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsNavigationService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加网站导航记录表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsNavigation> list) {
|
||||
if (cmsNavigationService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改网站导航记录表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsNavigation> batchParam) {
|
||||
if (batchParam.update(cmsNavigationService, "navigation_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除网站导航记录表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsNavigationService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
@Operation(summary = "获取树形结构的网站导航数据")
|
||||
@GetMapping("/tree")
|
||||
public ApiResult<List<CmsNavigation>> tree(CmsNavigationParam param) {
|
||||
param.setHide(0);
|
||||
final List<CmsNavigation> navigations = cmsNavigationService.listRel(param);
|
||||
return success(CommonUtil.toTreeData(navigations, 0, CmsNavigation::getParentId, CmsNavigation::getNavigationId, CmsNavigation::setChildren));
|
||||
}
|
||||
|
||||
@Operation(summary = "根据path获取导航")
|
||||
@GetMapping("/getNavigationByPath")
|
||||
public ApiResult<CmsNavigation> getNavigationByPath(CmsNavigationParam param) {
|
||||
final CmsNavigation one = cmsNavigationService.getOne(new LambdaUpdateWrapper<CmsNavigation>().eq(CmsNavigation::getPath, param.getPath()).last("limit 1"));
|
||||
|
||||
System.out.println("one = " + one);
|
||||
final CmsNavigation navigation = cmsNavigationService.getOne(new LambdaQueryWrapper<CmsNavigation>().eq(CmsNavigation::getPath, param.getPath()).last("limit 1"));
|
||||
System.out.println("navigation = " + navigation);
|
||||
// 页面元素
|
||||
final CmsDesign design = cmsDesignService.getOne(new LambdaUpdateWrapper<CmsDesign>().eq(CmsDesign::getCategoryId,one.getNavigationId()).last("limit 1"));
|
||||
System.out.println("design = " + design);
|
||||
// 上级导航
|
||||
if (!navigation.getParentId().equals(0)) {
|
||||
final CmsNavigation parent = cmsNavigationService.getById(navigation.getParentId());
|
||||
navigation.setParentPath(parent.getPath());
|
||||
navigation.setParentName(parent.getTitle());
|
||||
}
|
||||
// 页面信息
|
||||
navigation.setDesign(design);
|
||||
// 页面布局
|
||||
if (ObjectUtil.isNotEmpty(design)) {
|
||||
navigation.setLayout(design.getLayout());
|
||||
}
|
||||
return success(navigation);
|
||||
}
|
||||
|
||||
@Operation(summary = "密码校验")
|
||||
@GetMapping("/checkNavigationPassword")
|
||||
public ApiResult<?> checkNavigationPassword(CmsNavigationParam param) {
|
||||
if (!userService.comparePassword(param.getPassword(), param.getPassword2())) {
|
||||
return fail("密码不正确");
|
||||
}
|
||||
return success("密码正确");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,150 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.gxwebsoft.cms.param.CmsProductSpecParam;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsProductService;
|
||||
import com.gxwebsoft.cms.entity.CmsProduct;
|
||||
import com.gxwebsoft.cms.param.CmsProductParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 产品控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-27 16:03:44
|
||||
*/
|
||||
@Tag(name = "产品管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-product")
|
||||
public class CmsProductController extends BaseController {
|
||||
@Resource
|
||||
private CmsProductService cmsProductService;
|
||||
|
||||
@Operation(summary = "分页查询产品")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsProduct>> page(CmsProductParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsProductService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部产品")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsProduct>> list(CmsProductParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsProductService.listRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "根据id查询产品")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsProduct> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(cmsProductService.getByIdRel(id));
|
||||
}
|
||||
@PreAuthorize("hasAuthority('cms:cmsProduct:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "添加产品")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsProduct cmsProduct) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
cmsProduct.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (cmsProductService.save(cmsProduct)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
@PreAuthorize("hasAuthority('cms:cmsProduct:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "修改产品")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsProduct cmsProduct) {
|
||||
if (cmsProductService.updateById(cmsProduct)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
@PreAuthorize("hasAuthority('cms:cmsProduct:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "删除产品")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsProductService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
@PreAuthorize("hasAuthority('cms:cmsProduct:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量添加产品")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsProduct> list) {
|
||||
if (cmsProductService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
@PreAuthorize("hasAuthority('cms:cmsProduct:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改产品")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsProduct> batchParam) {
|
||||
if (batchParam.update(cmsProductService, "product_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
@PreAuthorize("hasAuthority('cms:cmsProduct:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量删除产品")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsProductService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "统计信息")
|
||||
@GetMapping("/data")
|
||||
public ApiResult<Map<String, Integer>> data(CmsProductSpecParam param) {
|
||||
Map<String, Integer> data = new HashMap<>();
|
||||
final LambdaQueryWrapper<CmsProduct> wrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
if(param.getMerchantId() != null){
|
||||
wrapper.eq(CmsProduct::getMerchantId,param.getMerchantId());
|
||||
}
|
||||
|
||||
Integer totalNum = cmsProductService.count(
|
||||
wrapper.eq(CmsProduct::getDeleted,0).eq(CmsProduct::getStatus,0)
|
||||
);
|
||||
data.put("totalNum", totalNum);
|
||||
|
||||
Integer totalNum2 = cmsProductService.count(
|
||||
wrapper.eq(CmsProduct::getStatus,1)
|
||||
);
|
||||
data.put("totalNum2", totalNum2);
|
||||
|
||||
Integer totalNum3 = cmsProductService.count(
|
||||
wrapper.gt(CmsProduct::getStatus,1)
|
||||
);
|
||||
data.put("totalNum3", totalNum3);
|
||||
|
||||
return success(data);
|
||||
}
|
||||
}
|
||||
@@ -1,116 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsProductSpecService;
|
||||
import com.gxwebsoft.cms.entity.CmsProductSpec;
|
||||
import com.gxwebsoft.cms.param.CmsProductSpecParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 规格控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-27 16:03:44
|
||||
*/
|
||||
@Tag(name = "规格管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-product-spec")
|
||||
public class CmsProductSpecController extends BaseController {
|
||||
@Resource
|
||||
private CmsProductSpecService cmsProductSpecService;
|
||||
|
||||
@Operation(summary = "分页查询规格")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsProductSpec>> page(CmsProductSpecParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsProductSpecService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部规格")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsProductSpec>> list(CmsProductSpecParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsProductSpecService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsProductSpec:list')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据id查询规格")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsProductSpec> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(cmsProductSpecService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加规格")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsProductSpec cmsProductSpec) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
cmsProductSpec.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (cmsProductSpecService.save(cmsProductSpec)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改规格")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsProductSpec cmsProductSpec) {
|
||||
if (cmsProductSpecService.updateById(cmsProductSpec)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除规格")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsProductSpecService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加规格")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsProductSpec> list) {
|
||||
if (cmsProductSpecService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改规格")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsProductSpec> batchParam) {
|
||||
if (batchParam.update(cmsProductSpecService, "spec_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除规格")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsProductSpecService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,111 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsProductSpecValueService;
|
||||
import com.gxwebsoft.cms.entity.CmsProductSpecValue;
|
||||
import com.gxwebsoft.cms.param.CmsProductSpecValueParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 规格值控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-27 16:03:44
|
||||
*/
|
||||
@Tag(name = "规格值管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-product-spec-value")
|
||||
public class CmsProductSpecValueController extends BaseController {
|
||||
@Resource
|
||||
private CmsProductSpecValueService cmsProductSpecValueService;
|
||||
|
||||
@Operation(summary = "分页查询规格值")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsProductSpecValue>> page(CmsProductSpecValueParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsProductSpecValueService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部规格值")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsProductSpecValue>> list(CmsProductSpecValueParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsProductSpecValueService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsProductSpecValue:list')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据id查询规格值")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsProductSpecValue> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(cmsProductSpecValueService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加规格值")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsProductSpecValue cmsProductSpecValue) {
|
||||
if (cmsProductSpecValueService.save(cmsProductSpecValue)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改规格值")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsProductSpecValue cmsProductSpecValue) {
|
||||
if (cmsProductSpecValueService.updateById(cmsProductSpecValue)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除规格值")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsProductSpecValueService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加规格值")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsProductSpecValue> list) {
|
||||
if (cmsProductSpecValueService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改规格值")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsProductSpecValue> batchParam) {
|
||||
if (batchParam.update(cmsProductSpecValueService, "spec_value_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除规格值")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsProductSpecValueService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,111 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsProductUrlService;
|
||||
import com.gxwebsoft.cms.entity.CmsProductUrl;
|
||||
import com.gxwebsoft.cms.param.CmsProductUrlParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 域名控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-27 16:03:44
|
||||
*/
|
||||
@Tag(name = "域名管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-product-url")
|
||||
public class CmsProductUrlController extends BaseController {
|
||||
@Resource
|
||||
private CmsProductUrlService cmsProductUrlService;
|
||||
|
||||
@Operation(summary = "分页查询域名")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsProductUrl>> page(CmsProductUrlParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsProductUrlService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部域名")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsProductUrl>> list(CmsProductUrlParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsProductUrlService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsProductUrl:list')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据id查询域名")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsProductUrl> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(cmsProductUrlService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加域名")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsProductUrl cmsProductUrl) {
|
||||
if (cmsProductUrlService.save(cmsProductUrl)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改域名")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsProductUrl cmsProductUrl) {
|
||||
if (cmsProductUrlService.updateById(cmsProductUrl)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除域名")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsProductUrlService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加域名")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsProductUrl> list) {
|
||||
if (cmsProductUrlService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改域名")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsProductUrl> batchParam) {
|
||||
if (batchParam.update(cmsProductUrlService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除域名")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsProductUrlService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,281 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.gxwebsoft.cms.entity.CmsDomain;
|
||||
import com.gxwebsoft.cms.entity.CmsNavigation;
|
||||
import com.gxwebsoft.cms.entity.CmsWebsiteField;
|
||||
import com.gxwebsoft.cms.param.CmsNavigationParam;
|
||||
import com.gxwebsoft.cms.service.CmsDomainService;
|
||||
import com.gxwebsoft.cms.service.CmsNavigationService;
|
||||
import com.gxwebsoft.cms.service.CmsWebsiteFieldService;
|
||||
import com.gxwebsoft.common.core.security.JwtUtil;
|
||||
import com.gxwebsoft.common.core.utils.CommonUtil;
|
||||
import com.gxwebsoft.common.core.utils.RedisUtil;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsWebsiteService;
|
||||
import com.gxwebsoft.cms.entity.CmsWebsite;
|
||||
import com.gxwebsoft.cms.param.CmsWebsiteParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.Company;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.common.system.service.CompanyService;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static com.gxwebsoft.common.core.constants.WebsiteConstants.CACHE_KEY_ROOT_SITE_INFO;
|
||||
|
||||
/**
|
||||
* 网站信息记录表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:36:14
|
||||
*/
|
||||
@Slf4j
|
||||
@Tag(name = "网站信息记录表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-website")
|
||||
public class CmsWebsiteController extends BaseController {
|
||||
@Resource
|
||||
private CmsWebsiteService cmsWebsiteService;
|
||||
@Resource
|
||||
private RedisUtil redisUtil;
|
||||
@Resource
|
||||
private CmsWebsiteFieldService cmsWebsiteFieldService;
|
||||
@Resource
|
||||
private CmsNavigationService cmsNavigationService;
|
||||
@Resource
|
||||
private CompanyService companyService;
|
||||
@Resource
|
||||
private CmsDomainService domainService;
|
||||
|
||||
@Operation(summary = "分页查询网站信息记录表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsWebsite>> page(CmsWebsiteParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsWebsiteService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部网站信息记录表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsWebsite>> list(CmsWebsiteParam param) {
|
||||
PageParam<CmsWebsite, CmsWebsiteParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(cmsWebsiteService.list(page.getOrderWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(cmsWebsiteService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:website:list')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据id查询网站信息记录表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsWebsite> get(@PathVariable("id") Integer id) {
|
||||
return success(cmsWebsiteService.getById(id));
|
||||
// 使用关联查询
|
||||
//return success(cmsWebsiteService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:website:save')")
|
||||
@Operation(summary = "添加网站信息记录表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsWebsite cmsWebsite) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
cmsWebsite.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (cmsWebsiteService.save(cmsWebsite)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:website:update')")
|
||||
@Operation(summary = "修改网站信息记录表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsWebsite cmsWebsite) {
|
||||
if (cmsWebsiteService.updateById(cmsWebsite)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:website:remove')")
|
||||
@Operation(summary = "删除网站信息记录表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsWebsiteService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:website:save')")
|
||||
@Operation(summary = "批量添加网站信息记录表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsWebsite> list) {
|
||||
if (cmsWebsiteService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:website:update')")
|
||||
@Operation(summary = "批量修改网站信息记录表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsWebsite> batchParam) {
|
||||
if (batchParam.update(cmsWebsiteService, "website_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:website:remove')")
|
||||
@Operation(summary = "批量删除网站信息记录表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsWebsiteService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "网站基本信息")
|
||||
@GetMapping("/getSiteInfo")
|
||||
public ApiResult<CmsWebsite> getSiteInfo(HttpServletRequest request) {
|
||||
String key = CACHE_KEY_ROOT_SITE_INFO.concat(getTenantId().toString());
|
||||
final String siteInfo = redisUtil.get(key);
|
||||
String access_token = JwtUtil.getAccessToken(request);
|
||||
|
||||
// 从缓存读取信息
|
||||
if(StrUtil.isNotBlank(siteInfo)){
|
||||
log.info("/getSiteInfo = {}",getTenantId());
|
||||
// return success(JSONObject.parseObject(siteInfo,CmsWebsite.class));
|
||||
}
|
||||
// 判断是否存在
|
||||
if (cmsWebsiteService.count() == 0) {
|
||||
final Integer tenantId = getTenantId();
|
||||
final CmsWebsite cmsWebsite = new CmsWebsite();
|
||||
cmsWebsite.setTenantId(tenantId);
|
||||
final Company company = companyService.getOne(new LambdaQueryWrapper<Company>().last("limit 1"));
|
||||
if (ObjectUtil.isNotEmpty(company)) {
|
||||
cmsWebsite.setDomain(company.getDomain());
|
||||
cmsWebsite.setWebsiteName(company.getShortName());
|
||||
cmsWebsite.setWebsiteCode(company.getCompanyCode());
|
||||
cmsWebsite.setWebsiteIcon("/favicon.ico");
|
||||
}
|
||||
final boolean save = cmsWebsiteService.save(cmsWebsite);
|
||||
return fail("站点不存在",null);
|
||||
}
|
||||
|
||||
// 获取站点信息
|
||||
final CmsWebsite website = cmsWebsiteService.getOne(new LambdaQueryWrapper<CmsWebsite>().eq(CmsWebsite::getDeleted, 0).last("limit 1"));
|
||||
|
||||
// 站点配置参数
|
||||
HashMap<String, Object> config = new HashMap<>();
|
||||
final List<CmsWebsiteField> fields = cmsWebsiteFieldService.list(new LambdaQueryWrapper<CmsWebsiteField>().eq(CmsWebsiteField::getDeleted,0));
|
||||
fields.forEach(d -> {
|
||||
config.put(d.getName(), d.getValue());
|
||||
});
|
||||
final List<CmsDomain> domains = domainService.list(new LambdaQueryWrapper<CmsDomain>()
|
||||
.eq(CmsDomain::getDeleted,0)
|
||||
.eq(CmsDomain::getStatus, 1)
|
||||
.eq(CmsDomain::getUserId,website.getUserId())
|
||||
.eq(CmsDomain::getTenantId, getTenantId())
|
||||
.orderByAsc(CmsDomain::getSortNumber)
|
||||
);
|
||||
if (!CollectionUtils.isEmpty(domains)) {
|
||||
// 已授权的域名
|
||||
domains.forEach(d -> {
|
||||
config.put("Domain_" + d.getId(), d.getDomain());
|
||||
});
|
||||
// 主域名(默认选第一条记录)
|
||||
config.put("Domain", domains.get(0).getDomain());
|
||||
}
|
||||
website.setConfig(config);
|
||||
|
||||
// 网站导航
|
||||
final CmsNavigationParam navigationParam = new CmsNavigationParam();
|
||||
navigationParam.setHide(0);
|
||||
navigationParam.setTop(0);
|
||||
navigationParam.setBottom(null);
|
||||
final List<CmsNavigation> topNavs = cmsNavigationService.listRel(navigationParam);
|
||||
// 顶部菜单
|
||||
website.setTopNavs(CommonUtil.toTreeData(topNavs, 0, CmsNavigation::getParentId, CmsNavigation::getNavigationId, CmsNavigation::setChildren));
|
||||
navigationParam.setTop(null);
|
||||
navigationParam.setBottom(0);
|
||||
final List<CmsNavigation> bottomNavs = cmsNavigationService.listRel(navigationParam);
|
||||
// 底部菜单
|
||||
website.setBottomNavs(CommonUtil.toTreeData(bottomNavs, 0, CmsNavigation::getParentId, CmsNavigation::getNavigationId, CmsNavigation::setChildren));
|
||||
|
||||
// 当前登录用户
|
||||
if(access_token != null){
|
||||
final User loginUser = getLoginUser();
|
||||
website.setLoginUser(loginUser);
|
||||
}
|
||||
|
||||
// 服务器时间
|
||||
HashMap<String, Object> serverTime = new HashMap<>();
|
||||
// 今天日期
|
||||
DateTime date = DateUtil.date();
|
||||
String today= DateUtil.today();
|
||||
// 明天日期
|
||||
final DateTime dateTime = DateUtil.tomorrow();
|
||||
String tomorrow = DateUtil.format(dateTime, "yyyy-MM-dd");
|
||||
// 后天日期
|
||||
final DateTime dateTime2 = DateUtil.offsetDay(date, 2);
|
||||
final String afterDay = DateUtil.format(dateTime2, "yyyy-MM-dd");
|
||||
// 今天星期几
|
||||
final int week = DateUtil.thisDayOfWeek();
|
||||
final DateTime nextWeek = DateUtil.nextWeek();
|
||||
serverTime.put("now",DateUtil.now());
|
||||
serverTime.put("today",today);
|
||||
serverTime.put("tomorrow",tomorrow);
|
||||
serverTime.put("afterDay",afterDay);
|
||||
serverTime.put("week",week);
|
||||
serverTime.put("nextWeek",nextWeek);
|
||||
website.setServerTime(serverTime);
|
||||
|
||||
redisUtil.set(key,website,1L, TimeUnit.DAYS);
|
||||
|
||||
return success(website);
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:website:remove')")
|
||||
@Operation(summary = "清除缓存")
|
||||
@DeleteMapping("/clearSiteInfo/{key}")
|
||||
public ApiResult<?> clearSiteInfo(@PathVariable("key") String key) {
|
||||
final String siteInfo = redisUtil.get(key);
|
||||
// 清除指定key
|
||||
redisUtil.delete(key);
|
||||
// 清除小程序缓存
|
||||
redisUtil.delete("MpInfo:".concat(getTenantId().toString()));
|
||||
// 清除网站缓存
|
||||
redisUtil.delete(CACHE_KEY_ROOT_SITE_INFO.concat(getTenantId().toString()));
|
||||
// 清除存储空间
|
||||
redisUtil.delete("StorageIsFull:".concat(getTenantId().toString()));
|
||||
// 选择支付方式
|
||||
redisUtil.delete("SelectPayment:".concat(getTenantId().toString()));
|
||||
return success("清除成功");
|
||||
}
|
||||
}
|
||||
@@ -1,126 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsWebsiteFieldService;
|
||||
import com.gxwebsoft.cms.entity.CmsWebsiteField;
|
||||
import com.gxwebsoft.cms.param.CmsWebsiteFieldParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.common.system.entity.WebsiteField;
|
||||
import com.gxwebsoft.common.system.param.WebsiteFieldParam;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应用参数控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:36:14
|
||||
*/
|
||||
@Tag(name = "应用参数管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-website-field")
|
||||
public class CmsWebsiteFieldController extends BaseController {
|
||||
@Resource
|
||||
private CmsWebsiteFieldService cmsWebsiteFieldService;
|
||||
|
||||
@Operation(summary = "分页查询应用参数")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsWebsiteField>> page(CmsWebsiteFieldParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsWebsiteFieldService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部应用参数")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsWebsiteField>> list(CmsWebsiteFieldParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsWebsiteFieldService.listRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "根据id查询应用参数")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsWebsiteField> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(cmsWebsiteFieldService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加应用参数")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsWebsiteField cmsWebsiteField) {
|
||||
if (cmsWebsiteFieldService.save(cmsWebsiteField)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改应用参数")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsWebsiteField cmsWebsiteField) {
|
||||
if (cmsWebsiteFieldService.updateById(cmsWebsiteField)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除应用参数")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsWebsiteFieldService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加应用参数")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsWebsiteField> list) {
|
||||
if (cmsWebsiteFieldService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改应用参数")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsWebsiteField> batchParam) {
|
||||
if (batchParam.update(cmsWebsiteFieldService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除应用参数")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsWebsiteFieldService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "获取网站配置参数-对象形式")
|
||||
@GetMapping("/config")
|
||||
public ApiResult<?> getConfig(CmsWebsiteFieldParam param) {
|
||||
// 使用关联查询
|
||||
final List<CmsWebsiteField> fields = cmsWebsiteFieldService.listRel(param);
|
||||
|
||||
HashMap<String, Object> config = new HashMap<>();
|
||||
fields.forEach(d -> {
|
||||
config.put(d.getName(), d.getValue());
|
||||
});
|
||||
System.out.println("config = " + config);
|
||||
return success(config);
|
||||
}
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 广告位
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsAd对象", description = "广告位")
|
||||
public class CmsAd implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "ID")
|
||||
@TableId(value = "ad_id", type = IdType.AUTO)
|
||||
private Integer adId;
|
||||
|
||||
@Schema(description = "页面ID")
|
||||
private Integer designId;
|
||||
|
||||
@Schema(description = "广告类型")
|
||||
private String adType;
|
||||
|
||||
@Schema(description = "广告位名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "宽")
|
||||
private String width;
|
||||
|
||||
@Schema(description = "高")
|
||||
private String height;
|
||||
|
||||
@Schema(description = "广告图片")
|
||||
private String images;
|
||||
|
||||
@Schema(description = "路由/链接地址")
|
||||
private String path;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "页面ID")
|
||||
private Integer pageId;
|
||||
|
||||
@Schema(description = "页面名称")
|
||||
private String pageName;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 广告图片
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsAdRecord对象", description = "广告图片")
|
||||
public class CmsAdRecord implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "ID")
|
||||
@TableId(value = "ad_record_id", type = IdType.AUTO)
|
||||
private Integer adRecordId;
|
||||
|
||||
@Schema(description = "广告标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "图片地址")
|
||||
private String path;
|
||||
|
||||
@Schema(description = "链接地址")
|
||||
private String url;
|
||||
|
||||
@Schema(description = "广告位ID")
|
||||
private Integer adId;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -1,172 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 文章
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsArticle对象", description = "文章")
|
||||
public class CmsArticle implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "文章ID")
|
||||
@TableId(value = "article_id", type = IdType.AUTO)
|
||||
private Integer articleId;
|
||||
|
||||
@Schema(description = "文章标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "文章类型 0常规 1视频")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "文章模型")
|
||||
private String model;
|
||||
|
||||
@Schema(description = "列表显示方式(10小图展示 20大图展示)")
|
||||
private Integer showType;
|
||||
|
||||
@Schema(description = "话题")
|
||||
private String topic;
|
||||
|
||||
@Schema(description = "文章分类ID")
|
||||
private Integer categoryId;
|
||||
|
||||
@Schema(description = "当前分类")
|
||||
@TableField(exist = false)
|
||||
private String categoryName;
|
||||
|
||||
@Schema(description = "父级分类ID")
|
||||
@TableField(exist = false)
|
||||
private Integer parentId;
|
||||
|
||||
@Schema(description = "父级分类")
|
||||
@TableField(exist = false)
|
||||
private String parentName;
|
||||
|
||||
@Schema(description = "封面图")
|
||||
private String image;
|
||||
|
||||
@Schema(description = "来源")
|
||||
private String source;
|
||||
|
||||
@Schema(description = "虚拟阅读量(仅用作展示)")
|
||||
private Integer virtualViews;
|
||||
|
||||
@Schema(description = "实际阅读量")
|
||||
private Integer actualViews;
|
||||
|
||||
@Schema(description = "可见类型 0所有人 1登录可见 2密码可见")
|
||||
private Integer permission;
|
||||
|
||||
@Schema(description = "访问密码")
|
||||
private String password;
|
||||
|
||||
@Schema(description = "验证密码(前端回传)")
|
||||
@TableField(exist = false)
|
||||
private String password2;
|
||||
|
||||
@Schema(description = "发布来源客户端 (APP、H5、小程序等)")
|
||||
private String platform;
|
||||
|
||||
@Schema(description = "文章附件")
|
||||
private String files;
|
||||
|
||||
@Schema(description = "视频地址")
|
||||
private String video;
|
||||
|
||||
@Schema(description = "接受的文件类型")
|
||||
private String accept;
|
||||
|
||||
@Schema(description = "经度")
|
||||
private String longitude;
|
||||
|
||||
@Schema(description = "纬度")
|
||||
private String latitude;
|
||||
|
||||
@Schema(description = "所在省份")
|
||||
private String province;
|
||||
|
||||
@Schema(description = "所在城市")
|
||||
private String city;
|
||||
|
||||
@Schema(description = "所在辖区")
|
||||
private String region;
|
||||
|
||||
@Schema(description = "街道地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "点赞数")
|
||||
private Integer likes;
|
||||
|
||||
@Schema(description = "评论数")
|
||||
private Integer commentNumbers;
|
||||
|
||||
@Schema(description = "提醒谁看")
|
||||
private String toUsers;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "作者")
|
||||
private String author;
|
||||
|
||||
@Schema(description = "商户ID")
|
||||
private Long merchantId;
|
||||
|
||||
@Schema(description = "商户名称")
|
||||
private String merchantName;
|
||||
|
||||
@Schema(description = "商户名称")
|
||||
private String merchantAvatar;
|
||||
|
||||
@Schema(description = "昵称")
|
||||
@TableField(exist = false)
|
||||
private String nickname;
|
||||
|
||||
@Schema(description = "头像")
|
||||
@TableField(exist = false)
|
||||
private String avatar;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "状态, 0已发布, 1待审核 2已驳回 3违规内容")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
private Date updateTime;
|
||||
|
||||
@Schema(description = "文章内容")
|
||||
@TableField(exist = false)
|
||||
private String content;
|
||||
|
||||
}
|
||||
@@ -1,92 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 文章分类表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsArticleCategory对象", description = "文章分类表")
|
||||
public class CmsArticleCategory implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "文章分类ID")
|
||||
@TableId(value = "category_id", type = IdType.AUTO)
|
||||
private Integer categoryId;
|
||||
|
||||
@Schema(description = "分类标识")
|
||||
private String categoryCode;
|
||||
|
||||
@Schema(description = "分类名称")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "类型 0列表 1单页 2外链")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "分类图片")
|
||||
private String image;
|
||||
|
||||
@Schema(description = "上级分类ID")
|
||||
private Integer parentId;
|
||||
|
||||
@Schema(description = "路由/链接地址")
|
||||
private String path;
|
||||
|
||||
@Schema(description = "组件路径")
|
||||
private String component;
|
||||
|
||||
@Schema(description = "绑定的页面")
|
||||
private Integer pageId;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "文章数量")
|
||||
private Integer count;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)")
|
||||
private Integer hide;
|
||||
|
||||
@Schema(description = "是否推荐")
|
||||
private Integer recommend;
|
||||
|
||||
@Schema(description = "是否显示在首页")
|
||||
private Integer showIndex;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1禁用")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 文章评论表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsArticleComment对象", description = "文章评论表")
|
||||
public class CmsArticleComment implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "评价ID")
|
||||
@TableId(value = "comment_id", type = IdType.AUTO)
|
||||
private Integer commentId;
|
||||
|
||||
@Schema(description = "文章ID")
|
||||
private Integer articleId;
|
||||
|
||||
@Schema(description = "评分 (10好评 20中评 30差评)")
|
||||
private Integer score;
|
||||
|
||||
@Schema(description = "评价内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "是否为图片评价")
|
||||
private Integer isPicture;
|
||||
|
||||
@Schema(description = "评论者ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "被评价者ID")
|
||||
private Integer toUserId;
|
||||
|
||||
@Schema(description = "回复的评论ID")
|
||||
private Integer replyCommentId;
|
||||
|
||||
@Schema(description = "回复者ID")
|
||||
private Integer replyUserId;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "状态, 0未读, 1已读")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 文章记录表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsArticleContent对象", description = "文章记录表")
|
||||
public class CmsArticleContent implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "文章ID")
|
||||
private Integer articleId;
|
||||
|
||||
@Schema(description = "文章内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 点赞文章
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsArticleCount对象", description = "点赞文章")
|
||||
public class CmsArticleCount implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "主键ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "文章ID")
|
||||
private Integer articleId;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 点赞文章
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsArticleLike对象", description = "点赞文章")
|
||||
public class CmsArticleLike implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "主键ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "文章ID")
|
||||
private Integer articleId;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 组件
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsComponents对象", description = "组件")
|
||||
public class CmsComponents implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "组件标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "关联导航ID")
|
||||
private Integer navigationId;
|
||||
|
||||
@Schema(description = "组件类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "页面关键词")
|
||||
private String keywords;
|
||||
|
||||
@Schema(description = "页面描述")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "组件路径")
|
||||
private String path;
|
||||
|
||||
@Schema(description = "组件图标")
|
||||
private String icon;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 页面管理记录表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsDesign对象", description = "页面管理记录表")
|
||||
public class CmsDesign implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "ID")
|
||||
@TableId(value = "page_id", type = IdType.AUTO)
|
||||
private Integer pageId;
|
||||
|
||||
@Schema(description = "页面标题")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "所属栏目ID")
|
||||
private Integer categoryId;
|
||||
|
||||
@Schema(description = "页面关键词")
|
||||
private String keywords;
|
||||
|
||||
@Schema(description = "页面描述")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "路由地址")
|
||||
@TableField(exist = false)
|
||||
private String path;
|
||||
|
||||
@Schema(description = "组件路径")
|
||||
@TableField(exist = false)
|
||||
private String component;
|
||||
|
||||
@Schema(description = "缩列图")
|
||||
private String photo;
|
||||
|
||||
@Schema(description = "购买链接")
|
||||
private String buyUrl;
|
||||
|
||||
@Schema(description = "页面样式")
|
||||
private String style;
|
||||
|
||||
@Schema(description = "页面内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "是否开启布局")
|
||||
private Boolean showLayout;
|
||||
|
||||
@Schema(description = "页面布局")
|
||||
private String layout;
|
||||
|
||||
@Schema(description = "上级id, 0是顶级")
|
||||
private Integer parentId;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "设为首页")
|
||||
private Integer home;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 页面组件表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsDesignRecord对象", description = "页面组件表")
|
||||
public class CmsDesignRecord implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "关联导航ID")
|
||||
private Integer navigationId;
|
||||
|
||||
@Schema(description = "组件")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "组件标识")
|
||||
private String dictCode;
|
||||
|
||||
@Schema(description = "组件样式")
|
||||
private String styles;
|
||||
|
||||
@Schema(description = "卡片阴影显示时机")
|
||||
private String shadow;
|
||||
|
||||
@Schema(description = "页面关键词")
|
||||
private String keywords;
|
||||
|
||||
@Schema(description = "页面描述")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "页面路由地址")
|
||||
private String path;
|
||||
|
||||
@Schema(description = "缩列图")
|
||||
private String photo;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 文档管理记录表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsDocs对象", description = "文档管理记录表")
|
||||
public class CmsDocs implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "文档ID")
|
||||
@TableId(value = "docs_id", type = IdType.AUTO)
|
||||
private Integer docsId;
|
||||
|
||||
@Schema(description = "文档标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "上级目录")
|
||||
private Integer parentId;
|
||||
|
||||
@Schema(description = "书籍ID")
|
||||
private Integer bookId;
|
||||
|
||||
@Schema(description = "可见性(public,private,protected)")
|
||||
private String visibility;
|
||||
|
||||
@Schema(description = "虚拟阅读量(仅用作展示)")
|
||||
private Integer virtualViews;
|
||||
|
||||
@Schema(description = "实际阅读量")
|
||||
private Integer actualViews;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 书籍记录表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsDocsBook对象", description = "书籍记录表")
|
||||
public class CmsDocsBook implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "ID")
|
||||
@TableId(value = "book_id", type = IdType.AUTO)
|
||||
private Integer bookId;
|
||||
|
||||
@Schema(description = "书籍名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "书籍标识")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "封面图")
|
||||
private String photo;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "文档内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 文档内容记录表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsDocsContent对象", description = "文档内容记录表")
|
||||
public class CmsDocsContent implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "文档ID")
|
||||
private Integer docsId;
|
||||
|
||||
@Schema(description = "文档内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 网站域名记录表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:36:14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsDomain对象", description = "网站域名记录表")
|
||||
public class CmsDomain implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "类型 0赠送域名 1绑定域名 ")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "域名")
|
||||
private String domain;
|
||||
|
||||
@Schema(description = "主机记录")
|
||||
private String hostName;
|
||||
|
||||
@Schema(description = "记录值")
|
||||
private String hostValue;
|
||||
|
||||
@Schema(description = "状态")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "排序号")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "网站ID")
|
||||
private Integer websiteId;
|
||||
|
||||
@Schema(description = "租户ID")
|
||||
private Integer appId;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 表单设计表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsForm对象", description = "表单设计表")
|
||||
public class CmsForm implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "ID")
|
||||
@TableId(value = "form_id", type = IdType.AUTO)
|
||||
private Integer formId;
|
||||
|
||||
@Schema(description = "表单标题")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "顶部图片")
|
||||
private String photo;
|
||||
|
||||
@Schema(description = "背景图片")
|
||||
private String background;
|
||||
|
||||
@Schema(description = "视频文件")
|
||||
private String video;
|
||||
|
||||
@Schema(description = "提交次数")
|
||||
private Integer submitNumber;
|
||||
|
||||
@Schema(description = "页面布局")
|
||||
private String layout;
|
||||
|
||||
@Schema(description = "是否隐藏顶部图片")
|
||||
private Integer hidePhoto;
|
||||
|
||||
@Schema(description = "是否隐藏背景图片")
|
||||
private Integer hideBackground;
|
||||
|
||||
@Schema(description = "是否隐藏视频")
|
||||
private Integer hideVideo;
|
||||
|
||||
@Schema(description = "背景图片透明度")
|
||||
private BigDecimal opacity;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "商户ID")
|
||||
private Long merchantId;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 表单数据记录表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsFormRecord对象", description = "表单数据记录表")
|
||||
public class CmsFormRecord implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "ID")
|
||||
@TableId(value = "form_record_id", type = IdType.AUTO)
|
||||
private Integer formRecordId;
|
||||
|
||||
@Schema(description = "手机号")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "表单数据")
|
||||
private String formData;
|
||||
|
||||
@Schema(description = "表单ID")
|
||||
private Integer formId;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "商户ID")
|
||||
private Long merchantId;
|
||||
|
||||
@Schema(description = "姓名")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 常用链接
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsLink对象", description = "常用链接")
|
||||
public class CmsLink implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "自增ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "链接名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "图标")
|
||||
private String icon;
|
||||
|
||||
@Schema(description = "链接地址")
|
||||
private String url;
|
||||
|
||||
@Schema(description = "链接分类")
|
||||
private String linkType;
|
||||
|
||||
@Schema(description = "应用ID")
|
||||
private Integer appId;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "是否推荐")
|
||||
private Integer recommend;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1待确认")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 小程序信息
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsMp对象", description = "小程序信息")
|
||||
public class CmsMp implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "ID")
|
||||
@TableId(value = "mp_id", type = IdType.AUTO)
|
||||
private Integer mpId;
|
||||
|
||||
@Schema(description = "是否主账号")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "小程序ID")
|
||||
private String appId;
|
||||
|
||||
@Schema(description = "小程序密钥")
|
||||
private String appSecret;
|
||||
|
||||
@Schema(description = "小程序名称")
|
||||
private String mpName;
|
||||
|
||||
@Schema(description = "小程序简称")
|
||||
private String shortName;
|
||||
|
||||
@Schema(description = "头像")
|
||||
private String avatar;
|
||||
|
||||
@Schema(description = "小程序码")
|
||||
private String mpQrcode;
|
||||
|
||||
@Schema(description = "微信认证")
|
||||
private Integer authentication;
|
||||
|
||||
@Schema(description = "主体信息")
|
||||
private String companyName;
|
||||
|
||||
@Schema(description = "小程序备案")
|
||||
private String icpNo;
|
||||
|
||||
@Schema(description = "登录邮箱")
|
||||
private String email;
|
||||
|
||||
@Schema(description = "登录密码")
|
||||
private String password;
|
||||
|
||||
@Schema(description = "原始ID")
|
||||
private String ghId;
|
||||
|
||||
@Schema(description = "入口页面")
|
||||
private String mainPath;
|
||||
|
||||
@Schema(description = "过期时间")
|
||||
private Date expirationTime;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "介绍")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 小程序广告位
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsMpAd对象", description = "小程序广告位")
|
||||
public class CmsMpAd implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "ID")
|
||||
@TableId(value = "ad_id", type = IdType.AUTO)
|
||||
private Integer adId;
|
||||
|
||||
@Schema(description = "页面ID")
|
||||
private Integer pageId;
|
||||
|
||||
@Schema(description = "广告类型")
|
||||
private String adType;
|
||||
|
||||
@Schema(description = "广告位名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "宽")
|
||||
private String width;
|
||||
|
||||
@Schema(description = "高")
|
||||
private String height;
|
||||
|
||||
@Schema(description = "广告图片")
|
||||
private String images;
|
||||
|
||||
@Schema(description = "路由/链接地址")
|
||||
private String path;
|
||||
|
||||
@Schema(description = "页面名称")
|
||||
private String pageName;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 小程序配置
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsMpField对象", description = "小程序配置")
|
||||
public class CmsMpField implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "自增ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "类型,0文本 1图片 2其他")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "名称")
|
||||
private String value;
|
||||
|
||||
@Schema(description = "页面ID")
|
||||
private Integer pageId;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -1,123 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 小程序端菜单
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsMpMenu对象", description = "小程序端菜单")
|
||||
public class CmsMpMenu implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "ID")
|
||||
@TableId(value = "menu_id", type = IdType.AUTO)
|
||||
private Integer menuId;
|
||||
|
||||
@Schema(description = "上级id, 0是顶级")
|
||||
private Integer parentId;
|
||||
|
||||
@Schema(description = "菜单名称")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "类型 0功能图标 1订单状态图标 2首页导航图标 3 商城导航图标 4管理人员功能图标")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "是否微信小程序菜单")
|
||||
private Boolean isMpWeixin;
|
||||
|
||||
@Schema(description = "菜单路由地址")
|
||||
private String path;
|
||||
|
||||
@Schema(description = "菜单组件地址, 目录可为空")
|
||||
private String component;
|
||||
|
||||
@Schema(description = "打开位置")
|
||||
private String target;
|
||||
|
||||
@Schema(description = "菜单图标")
|
||||
private String avatar;
|
||||
|
||||
@Schema(description = "图标颜色")
|
||||
private String color;
|
||||
|
||||
@Schema(description = "上传图标")
|
||||
private String icon;
|
||||
|
||||
@Schema(description = "是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)")
|
||||
private Integer hide;
|
||||
|
||||
@Schema(description = "位置 0不限 1顶部 2底部")
|
||||
private Integer position;
|
||||
|
||||
@Schema(description = "0 第一行 1第二行")
|
||||
private Integer rows;
|
||||
|
||||
@Schema(description = "菜单侧栏选中的path")
|
||||
private String active;
|
||||
|
||||
@Schema(description = "其它路由元信息")
|
||||
private String meta;
|
||||
|
||||
@Schema(description = "绑定的页面")
|
||||
private Integer pageId;
|
||||
|
||||
@Schema(description = "绑定的文章分类ID")
|
||||
private Integer articleCategoryId;
|
||||
|
||||
@Schema(description = "绑定的文章ID")
|
||||
private Integer articleId;
|
||||
|
||||
@Schema(description = "绑定的表单ID")
|
||||
private Integer formId;
|
||||
|
||||
@Schema(description = "绑定的书籍标识")
|
||||
private String bookCode;
|
||||
|
||||
@Schema(description = "绑定的商品分类ID")
|
||||
private Integer goodsCategoryId;
|
||||
|
||||
@Schema(description = "绑定的商品ID")
|
||||
private Integer goodsId;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "是否管理人员可见")
|
||||
private Integer adminShow;
|
||||
|
||||
@Schema(description = "设为首页")
|
||||
private Integer home;
|
||||
|
||||
@Schema(description = "分组名称")
|
||||
private String groupName;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 小程序页面
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsMpPages对象", description = "小程序页面")
|
||||
public class CmsMpPages implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "上级id, 0是顶级")
|
||||
private Integer parentId;
|
||||
|
||||
@Schema(description = "页面名称")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "页面路径")
|
||||
private String path;
|
||||
|
||||
@Schema(description = "设为首页")
|
||||
private Integer home;
|
||||
|
||||
@Schema(description = "分包")
|
||||
private String subpackage;
|
||||
|
||||
@Schema(description = "图标")
|
||||
private String icon;
|
||||
|
||||
@Schema(description = "未选中图标")
|
||||
private String iconPath;
|
||||
|
||||
@Schema(description = "选中的图标")
|
||||
private String selectedIconPath;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -1,167 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 网站导航记录表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsNavigation对象", description = "网站导航记录表")
|
||||
public class CmsNavigation implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "ID")
|
||||
@TableId(value = "navigation_id", type = IdType.AUTO)
|
||||
private Integer navigationId;
|
||||
|
||||
@Schema(description = "上级id, 0是顶级")
|
||||
private Integer parentId;
|
||||
|
||||
@Schema(description = "菜单名称")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "模型")
|
||||
private String model;
|
||||
|
||||
@Schema(description = "标识")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "菜单路由地址")
|
||||
private String path;
|
||||
|
||||
@Schema(description = "菜单组件地址, 目录可为空")
|
||||
private String component;
|
||||
|
||||
@Schema(description = "打开位置")
|
||||
private String target;
|
||||
|
||||
@Schema(description = "菜单图标")
|
||||
private String icon;
|
||||
|
||||
@Schema(description = "图标颜色")
|
||||
private String color;
|
||||
|
||||
@Schema(description = "是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)")
|
||||
private Integer hide;
|
||||
|
||||
@Schema(description = "可见类型 0所有人 1登录可见 2密码可见")
|
||||
private Integer permission;
|
||||
|
||||
@Schema(description = "访问密码")
|
||||
private String password;
|
||||
|
||||
@Schema(description = "验证密码(前端回传)")
|
||||
@TableField(exist = false)
|
||||
private String password2;
|
||||
|
||||
@Schema(description = "位置 0不限 1顶部 2底部")
|
||||
private Integer position;
|
||||
|
||||
@Schema(description = "仅在顶部显示")
|
||||
private Integer top;
|
||||
|
||||
@Schema(description = "仅在底部显示")
|
||||
private Integer bottom;
|
||||
|
||||
@Schema(description = "菜单侧栏选中的path")
|
||||
private String active;
|
||||
|
||||
@Schema(description = "其它路由元信息")
|
||||
private String meta;
|
||||
|
||||
@Schema(description = "css样式")
|
||||
private String style;
|
||||
|
||||
@Schema(description = "父级栏目路由")
|
||||
private String parentPath;
|
||||
|
||||
@Schema(description = "父级栏目名称")
|
||||
private String parentName;
|
||||
|
||||
@Schema(description = "模型名称")
|
||||
private String modelName;
|
||||
|
||||
@Schema(description = "类型(已废弃)")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "绑定的页面(已废弃)")
|
||||
private Integer pageId;
|
||||
|
||||
@Schema(description = "是否微信小程序菜单")
|
||||
private Boolean isMpWeixin;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "设为首页")
|
||||
private Integer home;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
|
||||
@Schema(description = "页面名称")
|
||||
@TableField(exist = false)
|
||||
private String pageName;
|
||||
|
||||
@Schema(description = "子菜单")
|
||||
@TableField(exist = false)
|
||||
private List<CmsNavigation> children;
|
||||
|
||||
@Schema(description = "页面布局")
|
||||
@TableField(exist = false)
|
||||
private String layout;
|
||||
|
||||
@Schema(description = "关联的页面")
|
||||
@TableField(exist = false)
|
||||
private CmsDesign design;
|
||||
|
||||
@Schema(description = "当前栏目名称")
|
||||
@TableField(exist = false)
|
||||
private String categoryName;
|
||||
|
||||
@Schema(description = "当前栏目链接")
|
||||
@TableField(exist = false)
|
||||
private String categoryPath;
|
||||
|
||||
public String getCategoryName() {
|
||||
return this.title;
|
||||
}
|
||||
|
||||
public String getCategoryPath() {
|
||||
return this.path;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,118 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 产品
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-27 16:03:44
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsProduct对象", description = "产品")
|
||||
public class CmsProduct implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "自增ID")
|
||||
@TableId(value = "product_id", type = IdType.AUTO)
|
||||
private Integer productId;
|
||||
|
||||
@Schema(description = "类型 0软件产品 1实物商品 2虚拟商品")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "产品编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "产品标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "封面图")
|
||||
private String image;
|
||||
|
||||
@Schema(description = "标签")
|
||||
private String tag;
|
||||
|
||||
@Schema(description = "产品详情")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "父级分类ID")
|
||||
private Integer parentId;
|
||||
|
||||
@Schema(description = "产品分类ID")
|
||||
private Integer categoryId;
|
||||
|
||||
@Schema(description = "产品规格 0单规格 1多规格")
|
||||
private Integer specs;
|
||||
|
||||
@Schema(description = "货架")
|
||||
private String position;
|
||||
|
||||
@Schema(description = "单位名称 (个)")
|
||||
private String unitName;
|
||||
|
||||
@Schema(description = "进货价格")
|
||||
private BigDecimal price;
|
||||
|
||||
@Schema(description = "销售价格")
|
||||
private BigDecimal salePrice;
|
||||
|
||||
@Schema(description = "库存计算方式(10下单减库存 20付款减库存)")
|
||||
private Integer deductStockType;
|
||||
|
||||
@Schema(description = "轮播图")
|
||||
private String files;
|
||||
|
||||
@Schema(description = "销量")
|
||||
private Integer sales;
|
||||
|
||||
@Schema(description = "库存")
|
||||
private Integer stock;
|
||||
|
||||
@Schema(description = "消费赚取积分")
|
||||
private BigDecimal gainIntegral;
|
||||
|
||||
@Schema(description = "推荐")
|
||||
private Integer recommend;
|
||||
|
||||
@Schema(description = "商户ID")
|
||||
private Long merchantId;
|
||||
|
||||
@Schema(description = "状态(0:未上架,1:上架)")
|
||||
private Boolean isShow;
|
||||
|
||||
@Schema(description = "状态, 0上架 1待上架 2待审核 3审核不通过")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "排序号")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 规格
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-27 16:03:44
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsProductSpec对象", description = "规格")
|
||||
public class CmsProductSpec implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "规格ID")
|
||||
@TableId(value = "spec_id", type = IdType.AUTO)
|
||||
private Integer specId;
|
||||
|
||||
@Schema(description = "规格名称")
|
||||
private String specName;
|
||||
|
||||
@Schema(description = "规格值")
|
||||
private String specValue;
|
||||
|
||||
@Schema(description = "创建用户")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "更新者")
|
||||
private Integer updater;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1待修,2异常已修,3异常未修")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "排序号")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 规格值
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-27 16:03:44
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsProductSpecValue对象", description = "规格值")
|
||||
public class CmsProductSpecValue implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "规格值ID")
|
||||
@TableId(value = "spec_value_id", type = IdType.AUTO)
|
||||
private Integer specValueId;
|
||||
|
||||
@Schema(description = "规格组ID")
|
||||
private Integer specId;
|
||||
|
||||
@Schema(description = "规格值")
|
||||
private String specValue;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "排序号")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 域名
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-27 16:03:44
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsProductUrl对象", description = "域名")
|
||||
public class CmsProductUrl implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "自增ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "产品ID")
|
||||
private Integer productId;
|
||||
|
||||
@Schema(description = "域名类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "域名")
|
||||
private String domain;
|
||||
|
||||
@Schema(description = "账号")
|
||||
private String account;
|
||||
|
||||
@Schema(description = "密码")
|
||||
private String password;
|
||||
|
||||
@Schema(description = "商户ID")
|
||||
private Integer merchantId;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1待确认")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
}
|
||||
@@ -1,207 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.common.system.entity.WebsiteField;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 网站信息记录表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:36:14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsWebsite对象", description = "网站信息记录表")
|
||||
public class CmsWebsite implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "站点ID")
|
||||
@TableId(value = "website_id", type = IdType.AUTO)
|
||||
private Integer websiteId;
|
||||
|
||||
@Schema(description = "网站名称")
|
||||
private String websiteName;
|
||||
|
||||
@Schema(description = "网站标识")
|
||||
private String websiteCode;
|
||||
|
||||
@Schema(description = "网站LOGO")
|
||||
private String websiteIcon;
|
||||
|
||||
@Schema(description = "网站LOGO")
|
||||
private String websiteLogo;
|
||||
|
||||
@Schema(description = "网站LOGO(深色模式)")
|
||||
private String websiteDarkLogo;
|
||||
|
||||
@Schema(description = "网站类型")
|
||||
private String websiteType;
|
||||
|
||||
@Schema(description = "网站关键词")
|
||||
private String keywords;
|
||||
|
||||
@Schema(description = "域名前缀")
|
||||
private String prefix;
|
||||
|
||||
@Schema(description = "绑定域名")
|
||||
private String domain;
|
||||
|
||||
@Schema(description = "全局样式")
|
||||
private String style;
|
||||
|
||||
@Schema(description = "后台管理地址")
|
||||
private String adminUrl;
|
||||
|
||||
@Schema(description = "应用版本 10免费版 20授权版 30永久授权")
|
||||
private Integer version;
|
||||
|
||||
@Schema(description = "服务到期时间")
|
||||
private Date expirationTime;
|
||||
|
||||
@Schema(description = "模版ID")
|
||||
private Integer templateId;
|
||||
|
||||
@Schema(description = "行业类型(父级)")
|
||||
private String industryParent;
|
||||
|
||||
@Schema(description = "行业类型(子级)")
|
||||
private String industryChild;
|
||||
|
||||
@Schema(description = "企业ID")
|
||||
private Integer companyId;
|
||||
|
||||
@Schema(description = "所在国家")
|
||||
private String country;
|
||||
|
||||
@Schema(description = "所在省份")
|
||||
private String province;
|
||||
|
||||
@Schema(description = "所在城市")
|
||||
private String city;
|
||||
|
||||
@Schema(description = "所在辖区")
|
||||
private String region;
|
||||
|
||||
@Schema(description = "经度")
|
||||
private String longitude;
|
||||
|
||||
@Schema(description = "纬度")
|
||||
private String latitude;
|
||||
|
||||
@Schema(description = "街道地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "联系电话")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "电子邮箱")
|
||||
private String email;
|
||||
|
||||
@Schema(description = "ICP备案号")
|
||||
private String icpNo;
|
||||
|
||||
@Schema(description = "公安备案")
|
||||
private String policeNo;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "是否推荐")
|
||||
private Integer recommend;
|
||||
|
||||
@Schema(description = "状态 0未开通 1运行中 2维护中 3已关闭 4已欠费停机 5违规关停")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "维护说明")
|
||||
private String statusText;
|
||||
|
||||
@Schema(description = "关闭说明")
|
||||
private String statusClose;
|
||||
|
||||
@Schema(description = "全局样式")
|
||||
private String styles;
|
||||
|
||||
@Schema(description = "排序号")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
private Date updateTime;
|
||||
|
||||
@Schema(description = "预设字段")
|
||||
@TableField(exist = false)
|
||||
private HashMap<String, Object> fields;
|
||||
|
||||
@Schema(description = "小程序导航图标")
|
||||
@TableField(exist = false)
|
||||
private Map<String, List<CmsMpMenu>> mpMenus;
|
||||
|
||||
@Schema(description = "网站导航栏")
|
||||
@TableField(exist = false)
|
||||
private List<CmsNavigation> navigations;
|
||||
|
||||
@Schema(description = "顶部菜单")
|
||||
@TableField(exist = false)
|
||||
private List<CmsNavigation> topNavs;
|
||||
|
||||
@Schema(description = "底部菜单")
|
||||
@TableField(exist = false)
|
||||
private List<CmsNavigation> bottomNavs;
|
||||
|
||||
@Schema(description = "幻灯片广告")
|
||||
@TableField(exist = false)
|
||||
private CmsAd slide;
|
||||
|
||||
@Schema(description = "站点广告")
|
||||
@TableField(exist = false)
|
||||
private List<CmsAd> ads;
|
||||
|
||||
@Schema(description = "首页布局")
|
||||
@TableField(exist = false)
|
||||
private String layout;
|
||||
|
||||
@Schema(description = "友情链接")
|
||||
@TableField(exist = false)
|
||||
private List<CmsLink> links;
|
||||
|
||||
@Schema(description = "配置信息")
|
||||
@TableField(exist = false)
|
||||
private Object config;
|
||||
|
||||
@Schema(description = "服务器时间")
|
||||
@TableField(exist = false)
|
||||
private HashMap<String, Object> serverTime;
|
||||
|
||||
@Schema(description = "当前登录用户")
|
||||
@TableField(exist = false)
|
||||
private User loginUser;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 应用参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:36:14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsWebsiteField对象", description = "应用参数")
|
||||
public class CmsWebsiteField implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "自增ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "类型,0文本 1图片 2其他")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "默认值")
|
||||
private String defaultValue;
|
||||
|
||||
@Schema(description = "可修改的值 [on|off]")
|
||||
private String modifyRange;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "css样式")
|
||||
private String style;
|
||||
|
||||
@Schema(description = "名称")
|
||||
private String value;
|
||||
|
||||
@Schema(description = "国际化语言")
|
||||
private String lang;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsAd;
|
||||
import com.gxwebsoft.cms.param.CmsAdParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 广告位Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsAdMapper extends BaseMapper<CmsAd> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsAd>
|
||||
*/
|
||||
List<CmsAd> selectPageRel(@Param("page") IPage<CmsAd> page,
|
||||
@Param("param") CmsAdParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsAd> selectListRel(@Param("param") CmsAdParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsAdRecord;
|
||||
import com.gxwebsoft.cms.param.CmsAdRecordParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 广告图片Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsAdRecordMapper extends BaseMapper<CmsAdRecord> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsAdRecord>
|
||||
*/
|
||||
List<CmsAdRecord> selectPageRel(@Param("page") IPage<CmsAdRecord> page,
|
||||
@Param("param") CmsAdRecordParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsAdRecord> selectListRel(@Param("param") CmsAdRecordParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsArticleCategory;
|
||||
import com.gxwebsoft.cms.param.CmsArticleCategoryParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文章分类表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsArticleCategoryMapper extends BaseMapper<CmsArticleCategory> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsArticleCategory>
|
||||
*/
|
||||
List<CmsArticleCategory> selectPageRel(@Param("page") IPage<CmsArticleCategory> page,
|
||||
@Param("param") CmsArticleCategoryParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsArticleCategory> selectListRel(@Param("param") CmsArticleCategoryParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsArticleComment;
|
||||
import com.gxwebsoft.cms.param.CmsArticleCommentParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文章评论表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsArticleCommentMapper extends BaseMapper<CmsArticleComment> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsArticleComment>
|
||||
*/
|
||||
List<CmsArticleComment> selectPageRel(@Param("page") IPage<CmsArticleComment> page,
|
||||
@Param("param") CmsArticleCommentParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsArticleComment> selectListRel(@Param("param") CmsArticleCommentParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsArticleContent;
|
||||
import com.gxwebsoft.cms.param.CmsArticleContentParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文章记录表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsArticleContentMapper extends BaseMapper<CmsArticleContent> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsArticleContent>
|
||||
*/
|
||||
List<CmsArticleContent> selectPageRel(@Param("page") IPage<CmsArticleContent> page,
|
||||
@Param("param") CmsArticleContentParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsArticleContent> selectListRel(@Param("param") CmsArticleContentParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsArticleCount;
|
||||
import com.gxwebsoft.cms.param.CmsArticleCountParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 点赞文章Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsArticleCountMapper extends BaseMapper<CmsArticleCount> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsArticleCount>
|
||||
*/
|
||||
List<CmsArticleCount> selectPageRel(@Param("page") IPage<CmsArticleCount> page,
|
||||
@Param("param") CmsArticleCountParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsArticleCount> selectListRel(@Param("param") CmsArticleCountParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsArticleLike;
|
||||
import com.gxwebsoft.cms.param.CmsArticleLikeParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 点赞文章Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsArticleLikeMapper extends BaseMapper<CmsArticleLike> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsArticleLike>
|
||||
*/
|
||||
List<CmsArticleLike> selectPageRel(@Param("page") IPage<CmsArticleLike> page,
|
||||
@Param("param") CmsArticleLikeParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsArticleLike> selectListRel(@Param("param") CmsArticleLikeParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsArticle;
|
||||
import com.gxwebsoft.cms.param.CmsArticleParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文章Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsArticleMapper extends BaseMapper<CmsArticle> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsArticle>
|
||||
*/
|
||||
List<CmsArticle> selectPageRel(@Param("page") IPage<CmsArticle> page,
|
||||
@Param("param") CmsArticleParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsArticle> selectListRel(@Param("param") CmsArticleParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsComponents;
|
||||
import com.gxwebsoft.cms.param.CmsComponentsParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 组件Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsComponentsMapper extends BaseMapper<CmsComponents> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsComponents>
|
||||
*/
|
||||
List<CmsComponents> selectPageRel(@Param("page") IPage<CmsComponents> page,
|
||||
@Param("param") CmsComponentsParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsComponents> selectListRel(@Param("param") CmsComponentsParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsDesign;
|
||||
import com.gxwebsoft.cms.param.CmsDesignParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 页面管理记录表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsDesignMapper extends BaseMapper<CmsDesign> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsDesign>
|
||||
*/
|
||||
List<CmsDesign> selectPageRel(@Param("page") IPage<CmsDesign> page,
|
||||
@Param("param") CmsDesignParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsDesign> selectListRel(@Param("param") CmsDesignParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsDesignRecord;
|
||||
import com.gxwebsoft.cms.param.CmsDesignRecordParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 页面组件表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsDesignRecordMapper extends BaseMapper<CmsDesignRecord> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsDesignRecord>
|
||||
*/
|
||||
List<CmsDesignRecord> selectPageRel(@Param("page") IPage<CmsDesignRecord> page,
|
||||
@Param("param") CmsDesignRecordParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsDesignRecord> selectListRel(@Param("param") CmsDesignRecordParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsDocsBook;
|
||||
import com.gxwebsoft.cms.param.CmsDocsBookParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 书籍记录表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsDocsBookMapper extends BaseMapper<CmsDocsBook> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsDocsBook>
|
||||
*/
|
||||
List<CmsDocsBook> selectPageRel(@Param("page") IPage<CmsDocsBook> page,
|
||||
@Param("param") CmsDocsBookParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsDocsBook> selectListRel(@Param("param") CmsDocsBookParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsDocsContent;
|
||||
import com.gxwebsoft.cms.param.CmsDocsContentParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文档内容记录表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsDocsContentMapper extends BaseMapper<CmsDocsContent> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsDocsContent>
|
||||
*/
|
||||
List<CmsDocsContent> selectPageRel(@Param("page") IPage<CmsDocsContent> page,
|
||||
@Param("param") CmsDocsContentParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsDocsContent> selectListRel(@Param("param") CmsDocsContentParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsDocs;
|
||||
import com.gxwebsoft.cms.param.CmsDocsParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文档管理记录表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsDocsMapper extends BaseMapper<CmsDocs> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsDocs>
|
||||
*/
|
||||
List<CmsDocs> selectPageRel(@Param("page") IPage<CmsDocs> page,
|
||||
@Param("param") CmsDocsParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsDocs> selectListRel(@Param("param") CmsDocsParam param);
|
||||
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsDomain;
|
||||
import com.gxwebsoft.cms.param.CmsDomainParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网站域名记录表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:36:14
|
||||
*/
|
||||
public interface CmsDomainMapper extends BaseMapper<CmsDomain> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsDomain>
|
||||
*/
|
||||
List<CmsDomain> selectPageRel(@Param("page") IPage<CmsDomain> page,
|
||||
@Param("param") CmsDomainParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsDomain> selectListRel(@Param("param") CmsDomainParam param);
|
||||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
CmsDomain getDomain(@Param("domain") String domain);
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsForm;
|
||||
import com.gxwebsoft.cms.param.CmsFormParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 表单设计表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsFormMapper extends BaseMapper<CmsForm> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsForm>
|
||||
*/
|
||||
List<CmsForm> selectPageRel(@Param("page") IPage<CmsForm> page,
|
||||
@Param("param") CmsFormParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsForm> selectListRel(@Param("param") CmsFormParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsFormRecord;
|
||||
import com.gxwebsoft.cms.param.CmsFormRecordParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 表单数据记录表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsFormRecordMapper extends BaseMapper<CmsFormRecord> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsFormRecord>
|
||||
*/
|
||||
List<CmsFormRecord> selectPageRel(@Param("page") IPage<CmsFormRecord> page,
|
||||
@Param("param") CmsFormRecordParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsFormRecord> selectListRel(@Param("param") CmsFormRecordParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsLink;
|
||||
import com.gxwebsoft.cms.param.CmsLinkParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 常用链接Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsLinkMapper extends BaseMapper<CmsLink> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsLink>
|
||||
*/
|
||||
List<CmsLink> selectPageRel(@Param("page") IPage<CmsLink> page,
|
||||
@Param("param") CmsLinkParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsLink> selectListRel(@Param("param") CmsLinkParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsMpAd;
|
||||
import com.gxwebsoft.cms.param.CmsMpAdParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 小程序广告位Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsMpAdMapper extends BaseMapper<CmsMpAd> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsMpAd>
|
||||
*/
|
||||
List<CmsMpAd> selectPageRel(@Param("page") IPage<CmsMpAd> page,
|
||||
@Param("param") CmsMpAdParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsMpAd> selectListRel(@Param("param") CmsMpAdParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsMpField;
|
||||
import com.gxwebsoft.cms.param.CmsMpFieldParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 小程序配置Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsMpFieldMapper extends BaseMapper<CmsMpField> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsMpField>
|
||||
*/
|
||||
List<CmsMpField> selectPageRel(@Param("page") IPage<CmsMpField> page,
|
||||
@Param("param") CmsMpFieldParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsMpField> selectListRel(@Param("param") CmsMpFieldParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsMp;
|
||||
import com.gxwebsoft.cms.param.CmsMpParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 小程序信息Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsMpMapper extends BaseMapper<CmsMp> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsMp>
|
||||
*/
|
||||
List<CmsMp> selectPageRel(@Param("page") IPage<CmsMp> page,
|
||||
@Param("param") CmsMpParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsMp> selectListRel(@Param("param") CmsMpParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsMpMenu;
|
||||
import com.gxwebsoft.cms.param.CmsMpMenuParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 小程序端菜单Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsMpMenuMapper extends BaseMapper<CmsMpMenu> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsMpMenu>
|
||||
*/
|
||||
List<CmsMpMenu> selectPageRel(@Param("page") IPage<CmsMpMenu> page,
|
||||
@Param("param") CmsMpMenuParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsMpMenu> selectListRel(@Param("param") CmsMpMenuParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsMpPages;
|
||||
import com.gxwebsoft.cms.param.CmsMpPagesParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 小程序页面Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsMpPagesMapper extends BaseMapper<CmsMpPages> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsMpPages>
|
||||
*/
|
||||
List<CmsMpPages> selectPageRel(@Param("page") IPage<CmsMpPages> page,
|
||||
@Param("param") CmsMpPagesParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsMpPages> selectListRel(@Param("param") CmsMpPagesParam param);
|
||||
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsNavigation;
|
||||
import com.gxwebsoft.cms.param.CmsNavigationParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网站导航记录表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsNavigationMapper extends BaseMapper<CmsNavigation> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsNavigation>
|
||||
*/
|
||||
List<CmsNavigation> selectPageRel(@Param("page") IPage<CmsNavigation> page,
|
||||
@Param("param") CmsNavigationParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsNavigation> selectListRel(@Param("param") CmsNavigationParam param);
|
||||
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsProduct;
|
||||
import com.gxwebsoft.cms.param.CmsProductParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 产品Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-27 16:03:44
|
||||
*/
|
||||
public interface CmsProductMapper extends BaseMapper<CmsProduct> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsProduct>
|
||||
*/
|
||||
List<CmsProduct> selectPageRel(@Param("page") IPage<CmsProduct> page,
|
||||
@Param("param") CmsProductParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsProduct> selectListRel(@Param("param") CmsProductParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsProductSpec;
|
||||
import com.gxwebsoft.cms.param.CmsProductSpecParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 规格Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-27 16:03:44
|
||||
*/
|
||||
public interface CmsProductSpecMapper extends BaseMapper<CmsProductSpec> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsProductSpec>
|
||||
*/
|
||||
List<CmsProductSpec> selectPageRel(@Param("page") IPage<CmsProductSpec> page,
|
||||
@Param("param") CmsProductSpecParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsProductSpec> selectListRel(@Param("param") CmsProductSpecParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsProductSpecValue;
|
||||
import com.gxwebsoft.cms.param.CmsProductSpecValueParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 规格值Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-27 16:03:44
|
||||
*/
|
||||
public interface CmsProductSpecValueMapper extends BaseMapper<CmsProductSpecValue> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsProductSpecValue>
|
||||
*/
|
||||
List<CmsProductSpecValue> selectPageRel(@Param("page") IPage<CmsProductSpecValue> page,
|
||||
@Param("param") CmsProductSpecValueParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsProductSpecValue> selectListRel(@Param("param") CmsProductSpecValueParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsProductUrl;
|
||||
import com.gxwebsoft.cms.param.CmsProductUrlParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 域名Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-27 16:03:44
|
||||
*/
|
||||
public interface CmsProductUrlMapper extends BaseMapper<CmsProductUrl> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsProductUrl>
|
||||
*/
|
||||
List<CmsProductUrl> selectPageRel(@Param("page") IPage<CmsProductUrl> page,
|
||||
@Param("param") CmsProductUrlParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsProductUrl> selectListRel(@Param("param") CmsProductUrlParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsWebsiteField;
|
||||
import com.gxwebsoft.cms.param.CmsWebsiteFieldParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应用参数Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:36:14
|
||||
*/
|
||||
public interface CmsWebsiteFieldMapper extends BaseMapper<CmsWebsiteField> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsWebsiteField>
|
||||
*/
|
||||
List<CmsWebsiteField> selectPageRel(@Param("page") IPage<CmsWebsiteField> page,
|
||||
@Param("param") CmsWebsiteFieldParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsWebsiteField> selectListRel(@Param("param") CmsWebsiteFieldParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.cms.entity.CmsWebsite;
|
||||
import com.gxwebsoft.cms.param.CmsWebsiteParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网站信息记录表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:36:14
|
||||
*/
|
||||
public interface CmsWebsiteMapper extends BaseMapper<CmsWebsite> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsWebsite>
|
||||
*/
|
||||
List<CmsWebsite> selectPageRel(@Param("page") IPage<CmsWebsite> page,
|
||||
@Param("param") CmsWebsiteParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsWebsite> selectListRel(@Param("param") CmsWebsiteParam param);
|
||||
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.cms.mapper.CmsAdMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM cms_ad a
|
||||
<where>
|
||||
<if test="param.adId != null">
|
||||
AND a.ad_id = #{param.adId}
|
||||
</if>
|
||||
<if test="param.designId != null">
|
||||
AND a.design_id = #{param.designId}
|
||||
</if>
|
||||
<if test="param.adType != null">
|
||||
AND a.ad_type LIKE CONCAT('%', #{param.adType}, '%')
|
||||
</if>
|
||||
<if test="param.name != null">
|
||||
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
||||
</if>
|
||||
<if test="param.width != null">
|
||||
AND a.width LIKE CONCAT('%', #{param.width}, '%')
|
||||
</if>
|
||||
<if test="param.height != null">
|
||||
AND a.height LIKE CONCAT('%', #{param.height}, '%')
|
||||
</if>
|
||||
<if test="param.images != null">
|
||||
AND a.images LIKE CONCAT('%', #{param.images}, '%')
|
||||
</if>
|
||||
<if test="param.path != null">
|
||||
AND a.path LIKE CONCAT('%', #{param.path}, '%')
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.pageId != null">
|
||||
AND a.page_id = #{param.pageId}
|
||||
</if>
|
||||
<if test="param.pageName != null">
|
||||
AND a.page_name LIKE CONCAT('%', #{param.pageName}, '%')
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsAd">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsAd">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,53 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.cms.mapper.CmsAdRecordMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM cms_ad_record a
|
||||
<where>
|
||||
<if test="param.adRecordId != null">
|
||||
AND a.ad_record_id = #{param.adRecordId}
|
||||
</if>
|
||||
<if test="param.title != null">
|
||||
AND a.title LIKE CONCAT('%', #{param.title}, '%')
|
||||
</if>
|
||||
<if test="param.path != null">
|
||||
AND a.path LIKE CONCAT('%', #{param.path}, '%')
|
||||
</if>
|
||||
<if test="param.url != null">
|
||||
AND a.url LIKE CONCAT('%', #{param.url}, '%')
|
||||
</if>
|
||||
<if test="param.adId != null">
|
||||
AND a.ad_id = #{param.adId}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsAdRecord">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsAdRecord">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,86 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.cms.mapper.CmsArticleCategoryMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM cms_article_category a
|
||||
<where>
|
||||
<if test="param.categoryId != null">
|
||||
AND a.category_id = #{param.categoryId}
|
||||
</if>
|
||||
<if test="param.categoryCode != null">
|
||||
AND a.category_code LIKE CONCAT('%', #{param.categoryCode}, '%')
|
||||
</if>
|
||||
<if test="param.title != null">
|
||||
AND a.title LIKE CONCAT('%', #{param.title}, '%')
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type = #{param.type}
|
||||
</if>
|
||||
<if test="param.image != null">
|
||||
AND a.image LIKE CONCAT('%', #{param.image}, '%')
|
||||
</if>
|
||||
<if test="param.parentId != null">
|
||||
AND a.parent_id = #{param.parentId}
|
||||
</if>
|
||||
<if test="param.path != null">
|
||||
AND a.path LIKE CONCAT('%', #{param.path}, '%')
|
||||
</if>
|
||||
<if test="param.component != null">
|
||||
AND a.component LIKE CONCAT('%', #{param.component}, '%')
|
||||
</if>
|
||||
<if test="param.pageId != null">
|
||||
AND a.page_id = #{param.pageId}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.count != null">
|
||||
AND a.count = #{param.count}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.hide != null">
|
||||
AND a.hide = #{param.hide}
|
||||
</if>
|
||||
<if test="param.recommend != null">
|
||||
AND a.recommend = #{param.recommend}
|
||||
</if>
|
||||
<if test="param.showIndex != null">
|
||||
AND a.show_index = #{param.showIndex}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsArticleCategory">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsArticleCategory">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,71 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.cms.mapper.CmsArticleCommentMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM cms_article_comment a
|
||||
<where>
|
||||
<if test="param.commentId != null">
|
||||
AND a.comment_id = #{param.commentId}
|
||||
</if>
|
||||
<if test="param.articleId != null">
|
||||
AND a.article_id = #{param.articleId}
|
||||
</if>
|
||||
<if test="param.score != null">
|
||||
AND a.score = #{param.score}
|
||||
</if>
|
||||
<if test="param.content != null">
|
||||
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||
</if>
|
||||
<if test="param.isPicture != null">
|
||||
AND a.is_picture = #{param.isPicture}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.toUserId != null">
|
||||
AND a.to_user_id = #{param.toUserId}
|
||||
</if>
|
||||
<if test="param.replyCommentId != null">
|
||||
AND a.reply_comment_id = #{param.replyCommentId}
|
||||
</if>
|
||||
<if test="param.replyUserId != null">
|
||||
AND a.reply_user_id = #{param.replyUserId}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsArticleComment">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsArticleComment">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,38 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.cms.mapper.CmsArticleContentMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM cms_article_content a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.articleId != null">
|
||||
AND a.article_id = #{param.articleId}
|
||||
</if>
|
||||
<if test="param.content != null">
|
||||
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsArticleContent">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsArticleContent">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,38 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.cms.mapper.CmsArticleCountMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM cms_article_count a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.articleId != null">
|
||||
AND a.article_id = #{param.articleId}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsArticleCount">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsArticleCount">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,38 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.cms.mapper.CmsArticleLikeMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM cms_article_like a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.articleId != null">
|
||||
AND a.article_id = #{param.articleId}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsArticleLike">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsArticleLike">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,122 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.cms.mapper.CmsArticleMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*,b.title as categoryName,b.parent_Id as parentId,c.title as parentName,d.nickname,d.avatar
|
||||
FROM cms_article a
|
||||
LEFT JOIN cms_navigation b ON a.category_id = b.navigation_id
|
||||
LEFT JOIN cms_navigation c ON b.parent_id = c.navigation_id
|
||||
LEFT JOIN sys_user d ON a.user_id = d.user_id
|
||||
<where>
|
||||
<if test="param.articleId != null">
|
||||
AND a.article_id = #{param.articleId}
|
||||
</if>
|
||||
<if test="param.title != null">
|
||||
AND a.title LIKE CONCAT('%', #{param.title}, '%')
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type = #{param.type}
|
||||
</if>
|
||||
<if test="param.model != null">
|
||||
AND a.model LIKE CONCAT('%', #{param.model}, '%')
|
||||
</if>
|
||||
<if test="param.showType != null">
|
||||
AND a.show_type = #{param.showType}
|
||||
</if>
|
||||
<if test="param.topic != null">
|
||||
AND a.topic LIKE CONCAT('%', #{param.topic}, '%')
|
||||
</if>
|
||||
<if test="param.categoryId != null">
|
||||
AND a.category_id = #{param.categoryId}
|
||||
</if>
|
||||
<if test="param.image != null">
|
||||
AND a.image LIKE CONCAT('%', #{param.image}, '%')
|
||||
</if>
|
||||
<if test="param.source != null">
|
||||
AND a.source LIKE CONCAT('%', #{param.source}, '%')
|
||||
</if>
|
||||
<if test="param.virtualViews != null">
|
||||
AND a.virtual_views = #{param.virtualViews}
|
||||
</if>
|
||||
<if test="param.actualViews != null">
|
||||
AND a.actual_views = #{param.actualViews}
|
||||
</if>
|
||||
<if test="param.platform != null">
|
||||
AND a.platform LIKE CONCAT('%', #{param.platform}, '%')
|
||||
</if>
|
||||
<if test="param.files != null">
|
||||
AND a.files LIKE CONCAT('%', #{param.files}, '%')
|
||||
</if>
|
||||
<if test="param.video != null">
|
||||
AND a.video LIKE CONCAT('%', #{param.video}, '%')
|
||||
</if>
|
||||
<if test="param.accept != null">
|
||||
AND a.accept LIKE CONCAT('%', #{param.accept}, '%')
|
||||
</if>
|
||||
<if test="param.longitude != null">
|
||||
AND a.longitude LIKE CONCAT('%', #{param.longitude}, '%')
|
||||
</if>
|
||||
<if test="param.latitude != null">
|
||||
AND a.latitude LIKE CONCAT('%', #{param.latitude}, '%')
|
||||
</if>
|
||||
<if test="param.province != null">
|
||||
AND a.province LIKE CONCAT('%', #{param.province}, '%')
|
||||
</if>
|
||||
<if test="param.city != null">
|
||||
AND a.city LIKE CONCAT('%', #{param.city}, '%')
|
||||
</if>
|
||||
<if test="param.region != null">
|
||||
AND a.region LIKE CONCAT('%', #{param.region}, '%')
|
||||
</if>
|
||||
<if test="param.address != null">
|
||||
AND a.address LIKE CONCAT('%', #{param.address}, '%')
|
||||
</if>
|
||||
<if test="param.likes != null">
|
||||
AND a.likes = #{param.likes}
|
||||
</if>
|
||||
<if test="param.commentNumbers != null">
|
||||
AND a.comment_numbers = #{param.commentNumbers}
|
||||
</if>
|
||||
<if test="param.toUsers != null">
|
||||
AND a.to_users LIKE CONCAT('%', #{param.toUsers}, '%')
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsArticle">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsArticle">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,65 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.cms.mapper.CmsComponentsMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM cms_components a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.title != null">
|
||||
AND a.title LIKE CONCAT('%', #{param.title}, '%')
|
||||
</if>
|
||||
<if test="param.navigationId != null">
|
||||
AND a.navigation_id = #{param.navigationId}
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type LIKE CONCAT('%', #{param.type}, '%')
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND a.keywords LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
</if>
|
||||
<if test="param.description != null">
|
||||
AND a.description LIKE CONCAT('%', #{param.description}, '%')
|
||||
</if>
|
||||
<if test="param.path != null">
|
||||
AND a.path LIKE CONCAT('%', #{param.path}, '%')
|
||||
</if>
|
||||
<if test="param.icon != null">
|
||||
AND a.icon LIKE CONCAT('%', #{param.icon}, '%')
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsComponents">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsComponents">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user