Merge branch 'dev'
This commit is contained in:
@@ -13,6 +13,7 @@ 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.context.annotation.Lazy;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -34,6 +35,7 @@ public class BszxBmController extends BaseController {
|
||||
@Resource
|
||||
private BszxBmService bszxBmService;
|
||||
@Resource
|
||||
@Lazy
|
||||
private CmsArticleService cmsArticleService;
|
||||
|
||||
@PreAuthorize("hasAuthority('bszx:bszxBm:list')")
|
||||
|
||||
@@ -18,6 +18,7 @@ import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -74,4 +75,17 @@ public class BszxOrderController extends BaseController {
|
||||
return success(result);
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "统计订单总金额")
|
||||
@GetMapping("/total")
|
||||
public ApiResult<BigDecimal> total() {
|
||||
try {
|
||||
BigDecimal totalAmount = bszxPayService.total();
|
||||
return success(totalAmount);
|
||||
} catch (Exception e) {
|
||||
// 异常时返回0,保持接口稳定性
|
||||
return success(BigDecimal.ZERO);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ public class BszxPayController extends BaseController {
|
||||
final HashMap<String, Object> map = new HashMap<>();
|
||||
final LambdaQueryWrapper<BszxPay> wrapper = new LambdaQueryWrapper<>();
|
||||
final BigDecimal bigDecimal = bszxPayService.sumMoney(wrapper);
|
||||
Long count = bszxPayService.count(new LambdaQueryWrapper<BszxPay>());
|
||||
Long count = (long) bszxPayService.count(new LambdaQueryWrapper<BszxPay>());
|
||||
map.put("numbers", count);
|
||||
map.put("totalMoney", bigDecimal);
|
||||
return success(map);
|
||||
|
||||
@@ -85,7 +85,7 @@ public class BszxPayRankingController extends BaseController {
|
||||
wrapper.eq(BszxPay::getFormId, item.getArticleId());
|
||||
ranking.setFormId(item.getArticleId());
|
||||
ranking.setFormName(item.getTitle());
|
||||
ranking.setNumber(bszxPayService.count(wrapper));
|
||||
ranking.setNumber((long) bszxPayService.count(wrapper));
|
||||
ranking.setTotalPrice(bszxPayService.sumMoney(wrapper));
|
||||
rankings.add(ranking);
|
||||
});
|
||||
|
||||
@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.bszx.entity.BszxPay;
|
||||
import com.gxwebsoft.bszx.param.BszxPayParam;
|
||||
import com.gxwebsoft.project.entity.Project;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
@@ -48,4 +47,11 @@ public interface BszxPayService extends IService<BszxPay> {
|
||||
String generatePayCert(Integer id) throws Exception;
|
||||
|
||||
BigDecimal sumMoney(LambdaQueryWrapper<BszxPay> between);
|
||||
|
||||
/**
|
||||
* 统计捐款总金额
|
||||
*
|
||||
* @return 捐款总金额
|
||||
*/
|
||||
BigDecimal total();
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.gxwebsoft.common.core.utils.ImageUtil;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
@@ -49,6 +50,7 @@ public class BszxBmServiceImpl extends ServiceImpl<BszxBmMapper, BszxBm> impleme
|
||||
@Resource
|
||||
private ConfigProperties config;
|
||||
@Resource
|
||||
@Lazy
|
||||
private CmsArticleService cmsArticleService;
|
||||
@Resource
|
||||
private BszxClassService bszxClassService;
|
||||
@@ -133,13 +135,13 @@ public class BszxBmServiceImpl extends ServiceImpl<BszxBmMapper, BszxBm> impleme
|
||||
//执行图片合并
|
||||
combiner.combine();
|
||||
|
||||
if (!FileUtil.exist(uploadPath + "file/poster/" + item.getTenantId() + "/bm")) {
|
||||
FileUtil.mkdir(uploadPath + "file/poster/" + item.getTenantId() + "/bm");
|
||||
if (!FileUtil.exist(uploadPath + "/file/poster/" + item.getTenantId() + "/bm")) {
|
||||
FileUtil.mkdir(uploadPath + "/file/poster/" + item.getTenantId() + "/bm");
|
||||
}
|
||||
String basePath = "/poster/" + item.getTenantId() + "/bm/big-" + item.getId() + ".jpg";
|
||||
String smallPath = "/poster/" + item.getTenantId() + "/bm/" + item.getId() + ".jpg";
|
||||
String filename = uploadPath + "file" + basePath;
|
||||
String smallFileName = uploadPath + "file" + smallPath;
|
||||
String filename = uploadPath + "/file" + basePath;
|
||||
String smallFileName = uploadPath + "/file" + smallPath;
|
||||
combiner.save(filename);
|
||||
|
||||
File input = new File(filename);
|
||||
|
||||
@@ -123,13 +123,13 @@ public class BszxPayServiceImpl extends ServiceImpl<BszxPayMapper, BszxPay> impl
|
||||
//执行图片合并
|
||||
combiner.combine();
|
||||
|
||||
if (!FileUtil.exist(uploadPath + "file/poster/" + payCert.getTenantId() + "/pay")) {
|
||||
FileUtil.mkdir(uploadPath + "file/poster/" + payCert.getTenantId() + "/pay");
|
||||
if (!FileUtil.exist(uploadPath + "/file/poster/" + payCert.getTenantId() + "/pay")) {
|
||||
FileUtil.mkdir(uploadPath + "/file/poster/" + payCert.getTenantId() + "/pay");
|
||||
}
|
||||
String basePath = "/poster/" + payCert.getTenantId() + "/pay/big-" + id + ".jpg";
|
||||
String smallPath = "/poster/" + payCert.getTenantId() + "/pay/" + id + ".jpg";
|
||||
String filename = uploadPath + "file" + basePath;
|
||||
String smallFileName = uploadPath + "file" + smallPath;
|
||||
String filename = uploadPath + "/file" + basePath;
|
||||
String smallFileName = uploadPath + "/file" + smallPath;
|
||||
combiner.save(filename);
|
||||
|
||||
File input = new File(filename);
|
||||
@@ -147,4 +147,23 @@ public class BszxPayServiceImpl extends ServiceImpl<BszxPayMapper, BszxPay> impl
|
||||
public BigDecimal sumMoney(LambdaQueryWrapper<BszxPay> wrapper) {
|
||||
return baseMapper.selectSumMoney(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal total() {
|
||||
try {
|
||||
// 使用数据库聚合查询统计捐款总金额,性能更高
|
||||
LambdaQueryWrapper<BszxPay> wrapper = new LambdaQueryWrapper<>();
|
||||
BigDecimal total = baseMapper.selectSumMoney(wrapper);
|
||||
|
||||
if (total == null) {
|
||||
total = BigDecimal.ZERO;
|
||||
}
|
||||
|
||||
return total;
|
||||
|
||||
} catch (Exception e) {
|
||||
// 异常时返回0,确保接口稳定性
|
||||
return BigDecimal.ZERO;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ 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.context.annotation.Lazy;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -52,6 +53,7 @@ public class CmsArticleController extends BaseController {
|
||||
@Resource
|
||||
private CmsArticleContentService articleContentService;
|
||||
@Resource
|
||||
@Lazy
|
||||
private CmsNavigationService cmsNavigationService;
|
||||
@Resource
|
||||
private CmsModelService cmsModelService;
|
||||
@@ -235,17 +237,17 @@ public class CmsArticleController extends BaseController {
|
||||
wrapper.eq(CmsArticle::getMerchantId, param.getMerchantId());
|
||||
}
|
||||
|
||||
Long totalNum = cmsArticleService.count(
|
||||
long totalNum = cmsArticleService.count(
|
||||
wrapper.eq(CmsArticle::getDeleted, 0).eq(CmsArticle::getStatus, 0)
|
||||
);
|
||||
data.put("totalNum", Math.toIntExact(totalNum));
|
||||
|
||||
Long totalNum2 = cmsArticleService.count(
|
||||
long totalNum2 = cmsArticleService.count(
|
||||
wrapper.eq(CmsArticle::getStatus, 1)
|
||||
);
|
||||
data.put("totalNum2", Math.toIntExact(totalNum2));
|
||||
|
||||
Long totalNum3 = cmsArticleService.count(
|
||||
long totalNum3 = cmsArticleService.count(
|
||||
wrapper.gt(CmsArticle::getStatus, 1)
|
||||
);
|
||||
data.put("totalNum3", Math.toIntExact(totalNum3));
|
||||
|
||||
@@ -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.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,283 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import cn.hutool.core.date.DateField;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.gxwebsoft.cms.entity.CmsMpField;
|
||||
import com.gxwebsoft.cms.entity.CmsMpMenu;
|
||||
import com.gxwebsoft.cms.entity.CmsMpPages;
|
||||
import com.gxwebsoft.cms.service.CmsMpFieldService;
|
||||
import com.gxwebsoft.cms.service.CmsMpMenuService;
|
||||
import com.gxwebsoft.cms.service.CmsMpPagesService;
|
||||
import com.gxwebsoft.common.core.utils.JSONUtil;
|
||||
import com.gxwebsoft.common.core.utils.RedisUtil;
|
||||
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.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.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* 小程序信息控制器
|
||||
*
|
||||
* @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;
|
||||
@Resource
|
||||
private CmsMpPagesService cmsMpPagesService;
|
||||
@Resource
|
||||
private CmsMpFieldService mpFieldService;
|
||||
@Resource
|
||||
private CmsMpMenuService cmsMpMenuService;
|
||||
@Resource
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
@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) {
|
||||
// 使用关联查询
|
||||
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.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("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "小程序基本信息")
|
||||
@GetMapping("/getMpInfo")
|
||||
public ApiResult<?> getMpInfo() {
|
||||
final Integer tenantId = getTenantId();
|
||||
String key = "MpInfo:" + tenantId;
|
||||
System.out.println("key = " + key);
|
||||
final String mpInfo = redisUtil.get(key);
|
||||
|
||||
if (tenantId.equals(0)) {
|
||||
return fail("租户ID不存在", null);
|
||||
}
|
||||
System.out.println("mpInfo = " + mpInfo);
|
||||
// 从缓存读取信息
|
||||
if (StrUtil.isNotBlank(mpInfo)) {
|
||||
final Object object = JSONUtil.parseObject(mpInfo, Object.class);
|
||||
System.out.println("object = " + object);
|
||||
return success(object);
|
||||
}
|
||||
|
||||
// 获取小程序
|
||||
if (cmsMpService.count(new LambdaUpdateWrapper<CmsMp>().eq(CmsMp::getDeleted, 0)) == 0) {
|
||||
// 创建小程序
|
||||
createMp();
|
||||
}
|
||||
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
|
||||
// 获取小程序
|
||||
final CmsMp mp = cmsMpService.getOne(new LambdaQueryWrapper<CmsMp>().eq(CmsMp::getTenantId, tenantId).last("limit 1"));
|
||||
mp.setAppSecret(null);
|
||||
map.put("mp", mp);
|
||||
|
||||
// 原生导航条
|
||||
final List<CmsMpPages> tabBar = cmsMpPagesService.list(new LambdaQueryWrapper<CmsMpPages>().eq(CmsMpPages::getSubpackage, "MainPackage").last("limit 5"));
|
||||
map.put("tabBar", tabBar);
|
||||
|
||||
// 配置信息
|
||||
HashMap<String, Object> config = new HashMap<>();
|
||||
config.put("LICENSE_CODE", "");
|
||||
config.put("MAP_KEY", "");
|
||||
final List<CmsMpField> fields = mpFieldService.list();
|
||||
fields.forEach(d -> {
|
||||
config.put(d.getName(), d.getValue());
|
||||
});
|
||||
map.put("config", config);
|
||||
|
||||
// 服务器时间
|
||||
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()); // 2024-07-18 22:06:36
|
||||
serverTime.put("today", today); // 2024-07-18
|
||||
serverTime.put("tomorrow", tomorrow); // 2024-07-19
|
||||
serverTime.put("afterDay", afterDay); // 2024-07-20
|
||||
serverTime.put("nextWeek", nextWeek); // 2024-07-25 22:06:36
|
||||
serverTime.put("week", week); // 5
|
||||
map.put("serverTime", serverTime);
|
||||
redisUtil.set(key, map, 1L, TimeUnit.DAYS);
|
||||
return success(map);
|
||||
}
|
||||
|
||||
private void createMp() {
|
||||
System.out.println("创建小程序 = ");
|
||||
final User loginUser = getLoginUser();
|
||||
final Integer tenantId = getTenantId();
|
||||
// 创建网站记录
|
||||
final CmsMp mp = new CmsMp();
|
||||
mp.setTenantId(tenantId);
|
||||
mp.setAppId("小程序ID");
|
||||
mp.setMpName("小程序名称");
|
||||
mp.setMainPath("/pages/index");
|
||||
if (loginUser != null) {
|
||||
mp.setUserId(getLoginUserId());
|
||||
}
|
||||
mp.setExpirationTime(DateUtil.offset(DateUtil.date(), DateField.YEAR, 1));
|
||||
cmsMpService.save(mp);
|
||||
|
||||
// 创建底部导航栏
|
||||
final CmsMpPages mpPages = new CmsMpPages();
|
||||
mpPages.setHome(1);
|
||||
mpPages.setTitle("首页");
|
||||
mpPages.setPath("/pages/index");
|
||||
mpPages.setSubpackage("MainPackage");
|
||||
mpPages.setIcon("HomeOutlined");
|
||||
mpPages.setSortNumber(0);
|
||||
mpPages.setTenantId(tenantId);
|
||||
cmsMpPagesService.save(mpPages);
|
||||
mpPages.setHome(0);
|
||||
mpPages.setTitle("分类");
|
||||
mpPages.setPath("/pages/category");
|
||||
mpPages.setSubpackage("MainPackage");
|
||||
mpPages.setIcon("AppstoreOutlined");
|
||||
mpPages.setSortNumber(0);
|
||||
cmsMpPagesService.save(mpPages);
|
||||
mpPages.setTitle("购物车");
|
||||
mpPages.setPath("/pages/category");
|
||||
mpPages.setSubpackage("MainPackage");
|
||||
mpPages.setIcon("ShoppingCartOutlined");
|
||||
mpPages.setSortNumber(0);
|
||||
cmsMpPagesService.save(mpPages);
|
||||
mpPages.setTitle("我的");
|
||||
mpPages.setPath("/pages/user");
|
||||
mpPages.setSubpackage("MainPackage");
|
||||
mpPages.setIcon("UserOutlined");
|
||||
mpPages.setSortNumber(0);
|
||||
cmsMpPagesService.save(mpPages);
|
||||
|
||||
// 创建导航图标
|
||||
final CmsMpMenu mpMenu = new CmsMpMenu();
|
||||
mpMenu.setTenantId(tenantId);
|
||||
mpMenu.setTitle("分类1");
|
||||
mpMenu.setIcon("PictureOutlined");
|
||||
mpMenu.setPath("/package/order");
|
||||
mpMenu.setTarget("uni.navigateTo");
|
||||
cmsMpMenuService.save(mpMenu);
|
||||
mpMenu.setTitle("分类2");
|
||||
mpMenu.setIcon("PictureOutlined");
|
||||
mpMenu.setPath("/package/order");
|
||||
cmsMpMenuService.save(mpMenu);
|
||||
mpMenu.setTitle("分类3");
|
||||
mpMenu.setIcon("PictureOutlined");
|
||||
mpMenu.setPath("/package/order");
|
||||
cmsMpMenuService.save(mpMenu);
|
||||
mpMenu.setTitle("分类4");
|
||||
mpMenu.setIcon("PictureOutlined");
|
||||
mpMenu.setPath("/package/order");
|
||||
cmsMpMenuService.save(mpMenu);
|
||||
|
||||
// 小程序配置信息
|
||||
CmsMpField field = new CmsMpField();
|
||||
field.setName("mpLogo");
|
||||
mpFieldService.save(field);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,114 +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 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,115 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsMpPagesService;
|
||||
import com.gxwebsoft.cms.entity.CmsMpPages;
|
||||
import com.gxwebsoft.cms.param.CmsMpPagesParam;
|
||||
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.List;
|
||||
|
||||
/**
|
||||
* 小程序页面控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Tag(name = "小程序页面管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-mp-pages")
|
||||
public class CmsMpPagesController extends BaseController {
|
||||
@Resource
|
||||
private CmsMpPagesService cmsMpPagesService;
|
||||
|
||||
@Operation(summary = "分页查询小程序页面")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsMpPages>> page(CmsMpPagesParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsMpPagesService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部小程序页面")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsMpPages>> list(CmsMpPagesParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsMpPagesService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsMpPages:list')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据id查询小程序页面")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsMpPages> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(cmsMpPagesService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加小程序页面")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsMpPages cmsMpPages) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
cmsMpPages.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (cmsMpPagesService.save(cmsMpPages)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "修改小程序页面")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsMpPages cmsMpPages) {
|
||||
if (cmsMpPagesService.updateById(cmsMpPages)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除小程序页面")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsMpPagesService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量添加小程序页面")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsMpPages> list) {
|
||||
if (cmsMpPagesService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量修改小程序页面")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsMpPages> batchParam) {
|
||||
if (batchParam.update(cmsMpPagesService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除小程序页面")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsMpPagesService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,131 +0,0 @@
|
||||
package com.gxwebsoft.cms.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.utils.CommonUtil;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.cms.service.CmsOrderService;
|
||||
import com.gxwebsoft.cms.entity.CmsOrder;
|
||||
import com.gxwebsoft.cms.param.CmsOrderParam;
|
||||
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.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-11-25 12:14:05
|
||||
*/
|
||||
@Tag(name = "订单管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/cms/cms-order")
|
||||
public class CmsOrderController extends BaseController {
|
||||
@Resource
|
||||
private CmsOrderService cmsOrderService;
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsOrder:list')")
|
||||
@Operation(summary = "分页查询订单")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<CmsOrder>> page(CmsOrderParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsOrderService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsOrder:list')")
|
||||
@Operation(summary = "查询全部订单")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CmsOrder>> list(CmsOrderParam param) {
|
||||
// 使用关联查询
|
||||
return success(cmsOrderService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsOrder:list')")
|
||||
@Operation(summary = "根据id查询订单")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CmsOrder> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(cmsOrderService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加订单")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody CmsOrder cmsOrder) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
cmsOrder.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if(cmsOrder.getCode() == null){
|
||||
return fail("验证码不正确",null);
|
||||
}
|
||||
if(cmsOrder.getOrderNo() == null){
|
||||
cmsOrder.setOrderNo(CommonUtil.createOrderNo());
|
||||
}
|
||||
// 默认语言
|
||||
if(cmsOrder.getLang() == null){
|
||||
cmsOrder.setLang("zh_CN");
|
||||
}
|
||||
if (cmsOrderService.save(cmsOrder)) {
|
||||
return success("提交成功");
|
||||
}
|
||||
return fail("提交失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsOrder:update')")
|
||||
@Operation(summary = "修改订单")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody CmsOrder cmsOrder) {
|
||||
if (cmsOrderService.updateById(cmsOrder)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsOrder:remove')")
|
||||
@Operation(summary = "删除订单")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (cmsOrderService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsOrder:save')")
|
||||
@Operation(summary = "批量添加订单")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<CmsOrder> list) {
|
||||
if (cmsOrderService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsOrder:update')")
|
||||
@Operation(summary = "批量修改订单")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CmsOrder> batchParam) {
|
||||
if (batchParam.update(cmsOrderService, "order_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:cmsOrder:remove')")
|
||||
@Operation(summary = "批量删除订单")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (cmsOrderService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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 = Math.toIntExact(cmsProductService.count(
|
||||
wrapper.eq(CmsProduct::getDeleted, 0).eq(CmsProduct::getStatus, 0)
|
||||
));
|
||||
data.put("totalNum", totalNum);
|
||||
|
||||
Integer totalNum2 = Math.toIntExact(cmsProductService.count(
|
||||
wrapper.eq(CmsProduct::getStatus, 1)
|
||||
));
|
||||
data.put("totalNum2", totalNum2);
|
||||
|
||||
Integer totalNum3 = Math.toIntExact(cmsProductService.count(
|
||||
wrapper.gt(CmsProduct::getStatus, 1)
|
||||
));
|
||||
data.put("totalNum3", totalNum3);
|
||||
|
||||
return success(data);
|
||||
}
|
||||
}
|
||||
@@ -1,115 +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.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,109 +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.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
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,109 +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.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
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,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;
|
||||
|
||||
}
|
||||
@@ -29,12 +29,16 @@ public class CmsDesign implements Serializable {
|
||||
@TableId(value = "page_id", type = IdType.AUTO)
|
||||
private Integer pageId;
|
||||
|
||||
@Schema(description = "页面标题")
|
||||
@Schema(description = "页面")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "所属栏目ID")
|
||||
private Integer categoryId;
|
||||
|
||||
@Schema(description = "所属栏目")
|
||||
@TableField(exist = false)
|
||||
private String categoryName;
|
||||
|
||||
@Schema(description = "页面模型")
|
||||
private String model;
|
||||
|
||||
|
||||
@@ -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,131 +0,0 @@
|
||||
package com.gxwebsoft.cms.entity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
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-11-25 12:14:05
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(name = "CmsOrder对象", description = "订单")
|
||||
public class CmsOrder implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "订单号")
|
||||
@TableId(value = "order_id", type = IdType.AUTO)
|
||||
private Integer orderId;
|
||||
|
||||
@Schema(description = "订单标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "模型名称")
|
||||
private String model;
|
||||
|
||||
@Schema(description = "订单编号")
|
||||
private String orderNo;
|
||||
|
||||
@Schema(description = "订单类型,0商城 1询价 2留言")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "关联文章ID")
|
||||
private Integer articleId;
|
||||
|
||||
@Schema(description = "关联网站ID")
|
||||
private Integer websiteId;
|
||||
|
||||
@Schema(description = "真实姓名")
|
||||
private String realName;
|
||||
|
||||
@Schema(description = "手机号码")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "电子邮箱")
|
||||
private String email;
|
||||
|
||||
@Schema(description = "联系地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "订单内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "订单附件")
|
||||
private String files;
|
||||
|
||||
@Schema(description = "订单总额")
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
@Schema(description = "实际付款")
|
||||
private BigDecimal payPrice;
|
||||
|
||||
@Schema(description = "报价询价")
|
||||
private BigDecimal price;
|
||||
|
||||
@Schema(description = "购买数量")
|
||||
private Integer totalNum;
|
||||
|
||||
@Schema(description = "二维码地址,保存订单号,支付成功后才生成")
|
||||
private String qrcode;
|
||||
|
||||
@Schema(description = "下单渠道,0网站 1小程序 2其他")
|
||||
private Integer channel;
|
||||
|
||||
@Schema(description = "过期时间")
|
||||
private Date expirationTime;
|
||||
|
||||
@Schema(description = "订单是否已结算(0未结算 1已结算)")
|
||||
private Boolean isSettled;
|
||||
|
||||
@Schema(description = "用户id")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "国际化语言")
|
||||
private String lang;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "排序号")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "图像验证码")
|
||||
@TableField(exist = false)
|
||||
private String code;
|
||||
|
||||
@Schema(description = "栏目ID")
|
||||
@TableField(exist = false)
|
||||
private Integer categoryId;
|
||||
|
||||
public String getLang() {
|
||||
if(this.lang == null || this.lang.equals("zh")){
|
||||
return "zh_CN";
|
||||
}
|
||||
return this.lang;
|
||||
}
|
||||
}
|
||||
@@ -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.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-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 Date createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
@@ -1,55 +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 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 Date createTime;
|
||||
|
||||
}
|
||||
@@ -1,46 +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 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 Date createTime;
|
||||
|
||||
}
|
||||
@@ -1,61 +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 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 Long merchantId;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1待确认")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
}
|
||||
@@ -254,7 +254,7 @@ public class CmsWebsite implements Serializable {
|
||||
|
||||
@Schema(description = "小程序导航图标")
|
||||
@TableField(exist = false)
|
||||
private Map<String, List<CmsMpMenu>> mpMenus;
|
||||
private Map<String, List<CmsNavigation>> mpMenus;
|
||||
|
||||
@Schema(description = "网站导航栏")
|
||||
@TableField(exist = false)
|
||||
|
||||
@@ -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.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,42 +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.CmsNavigation;
|
||||
import com.gxwebsoft.cms.entity.CmsOrder;
|
||||
import com.gxwebsoft.cms.param.CmsNavigationParam;
|
||||
import com.gxwebsoft.cms.param.CmsOrderParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-11-25 12:14:05
|
||||
*/
|
||||
public interface CmsOrderMapper extends BaseMapper<CmsOrder> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CmsOrder>
|
||||
*/
|
||||
List<CmsOrder> selectPageRel(@Param("page") IPage<CmsOrder> page,
|
||||
@Param("param") CmsOrderParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CmsOrder> selectListRel(@Param("param") CmsOrderParam param);
|
||||
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
List<CmsOrder> selectListAllRel(@Param("param") CmsOrderParam 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,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>
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*,b.lang_category_id
|
||||
SELECT a.*,b.lang_category_id, b.title as categoryName
|
||||
FROM cms_design a
|
||||
LEFT JOIN cms_navigation b ON a.category_id = b.navigation_id
|
||||
<where>
|
||||
|
||||
@@ -1,74 +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.CmsMpAdMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM cms_mp_ad a
|
||||
<where>
|
||||
<if test="param.adId != null">
|
||||
AND a.ad_id = #{param.adId}
|
||||
</if>
|
||||
<if test="param.pageId != null">
|
||||
AND a.page_id = #{param.pageId}
|
||||
</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.pageName != null">
|
||||
AND a.page_name LIKE CONCAT('%', #{param.pageName}, '%')
|
||||
</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.CmsMpAd">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsMpAd">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,56 +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.CmsMpFieldMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM cms_mp_field a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type = #{param.type}
|
||||
</if>
|
||||
<if test="param.name != null">
|
||||
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.value != null">
|
||||
AND a.value LIKE CONCAT('%', #{param.value}, '%')
|
||||
</if>
|
||||
<if test="param.pageId != null">
|
||||
AND a.page_id = #{param.pageId}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</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.CmsMpField">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsMpField">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,95 +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.CmsMpMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM cms_mp a
|
||||
<where>
|
||||
<if test="param.mpId != null">
|
||||
AND a.mp_id = #{param.mpId}
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type = #{param.type}
|
||||
</if>
|
||||
<if test="param.appId != null">
|
||||
AND a.app_id LIKE CONCAT('%', #{param.appId}, '%')
|
||||
</if>
|
||||
<if test="param.appSecret != null">
|
||||
AND a.app_secret LIKE CONCAT('%', #{param.appSecret}, '%')
|
||||
</if>
|
||||
<if test="param.mpName != null">
|
||||
AND a.mp_name LIKE CONCAT('%', #{param.mpName}, '%')
|
||||
</if>
|
||||
<if test="param.shortName != null">
|
||||
AND a.short_name LIKE CONCAT('%', #{param.shortName}, '%')
|
||||
</if>
|
||||
<if test="param.avatar != null">
|
||||
AND a.avatar LIKE CONCAT('%', #{param.avatar}, '%')
|
||||
</if>
|
||||
<if test="param.mpQrcode != null">
|
||||
AND a.mp_qrcode LIKE CONCAT('%', #{param.mpQrcode}, '%')
|
||||
</if>
|
||||
<if test="param.authentication != null">
|
||||
AND a.authentication = #{param.authentication}
|
||||
</if>
|
||||
<if test="param.companyName != null">
|
||||
AND a.company_name LIKE CONCAT('%', #{param.companyName}, '%')
|
||||
</if>
|
||||
<if test="param.icpNo != null">
|
||||
AND a.icp_no LIKE CONCAT('%', #{param.icpNo}, '%')
|
||||
</if>
|
||||
<if test="param.email != null">
|
||||
AND a.email LIKE CONCAT('%', #{param.email}, '%')
|
||||
</if>
|
||||
<if test="param.password != null">
|
||||
AND a.password LIKE CONCAT('%', #{param.password}, '%')
|
||||
</if>
|
||||
<if test="param.ghId != null">
|
||||
AND a.gh_id LIKE CONCAT('%', #{param.ghId}, '%')
|
||||
</if>
|
||||
<if test="param.mainPath != null">
|
||||
AND a.main_path LIKE CONCAT('%', #{param.mainPath}, '%')
|
||||
</if>
|
||||
<if test="param.expirationTime != null">
|
||||
AND a.expiration_time LIKE CONCAT('%', #{param.expirationTime}, '%')
|
||||
</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.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</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.CmsMp">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsMp">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,119 +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.CmsMpMenuMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM cms_mp_menu a
|
||||
<where>
|
||||
<if test="param.menuId != null">
|
||||
AND a.menu_id = #{param.menuId}
|
||||
</if>
|
||||
<if test="param.parentId != null">
|
||||
AND a.parent_id = #{param.parentId}
|
||||
</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.isMpWeixin != null">
|
||||
AND a.is_mp_weixin = #{param.isMpWeixin}
|
||||
</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.target != null">
|
||||
AND a.target LIKE CONCAT('%', #{param.target}, '%')
|
||||
</if>
|
||||
<if test="param.avatar != null">
|
||||
AND a.avatar LIKE CONCAT('%', #{param.avatar}, '%')
|
||||
</if>
|
||||
<if test="param.color != null">
|
||||
AND a.color LIKE CONCAT('%', #{param.color}, '%')
|
||||
</if>
|
||||
<if test="param.icon != null">
|
||||
AND a.icon LIKE CONCAT('%', #{param.icon}, '%')
|
||||
</if>
|
||||
<if test="param.hide != null">
|
||||
AND a.hide = #{param.hide}
|
||||
</if>
|
||||
<if test="param.position != null">
|
||||
AND a.position = #{param.position}
|
||||
</if>
|
||||
<if test="param.rows != null">
|
||||
AND a.rows = #{param.rows}
|
||||
</if>
|
||||
<if test="param.active != null">
|
||||
AND a.active LIKE CONCAT('%', #{param.active}, '%')
|
||||
</if>
|
||||
<if test="param.meta != null">
|
||||
AND a.meta LIKE CONCAT('%', #{param.meta}, '%')
|
||||
</if>
|
||||
<if test="param.pageId != null">
|
||||
AND a.page_id = #{param.pageId}
|
||||
</if>
|
||||
<if test="param.articleCategoryId != null">
|
||||
AND a.article_category_id = #{param.articleCategoryId}
|
||||
</if>
|
||||
<if test="param.articleId != null">
|
||||
AND a.article_id = #{param.articleId}
|
||||
</if>
|
||||
<if test="param.formId != null">
|
||||
AND a.form_id = #{param.formId}
|
||||
</if>
|
||||
<if test="param.bookCode != null">
|
||||
AND a.book_code LIKE CONCAT('%', #{param.bookCode}, '%')
|
||||
</if>
|
||||
<if test="param.goodsCategoryId != null">
|
||||
AND a.goods_category_id = #{param.goodsCategoryId}
|
||||
</if>
|
||||
<if test="param.goodsId != null">
|
||||
AND a.goods_id = #{param.goodsId}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.adminShow != null">
|
||||
AND a.admin_show = #{param.adminShow}
|
||||
</if>
|
||||
<if test="param.home != null">
|
||||
AND a.home = #{param.home}
|
||||
</if>
|
||||
<if test="param.groupName != null">
|
||||
AND a.group_name LIKE CONCAT('%', #{param.groupName}, '%')
|
||||
</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.CmsMpMenu">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsMpMenu">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,74 +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.CmsMpPagesMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM cms_mp_pages a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.parentId != null">
|
||||
AND a.parent_id = #{param.parentId}
|
||||
</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.home != null">
|
||||
AND a.home = #{param.home}
|
||||
</if>
|
||||
<if test="param.subpackage != null">
|
||||
AND a.subpackage LIKE CONCAT('%', #{param.subpackage}, '%')
|
||||
</if>
|
||||
<if test="param.icon != null">
|
||||
AND a.icon LIKE CONCAT('%', #{param.icon}, '%')
|
||||
</if>
|
||||
<if test="param.iconPath != null">
|
||||
AND a.icon_path LIKE CONCAT('%', #{param.iconPath}, '%')
|
||||
</if>
|
||||
<if test="param.selectedIconPath != null">
|
||||
AND a.selected_icon_path LIKE CONCAT('%', #{param.selectedIconPath}, '%')
|
||||
</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.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</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.CmsMpPages">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsMpPages">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,120 +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.CmsOrderMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*, b.category_id, c.user_id as websiteUserId
|
||||
FROM cms_order a
|
||||
LEFT JOIN cms_article b ON a.article_id = b.article_id
|
||||
LEFT JOIN cms_website c ON a.tenant_id = c.tenant_id
|
||||
<where>
|
||||
<if test="param.orderId != null">
|
||||
AND a.order_id = #{param.orderId}
|
||||
</if>
|
||||
<if test="param.title != null">
|
||||
AND a.title LIKE CONCAT('%', #{param.title}, '%')
|
||||
</if>
|
||||
<if test="param.orderNo != null">
|
||||
AND a.order_no LIKE CONCAT('%', #{param.orderNo}, '%')
|
||||
</if>
|
||||
<if test="param.model != null">
|
||||
AND a.model = #{param.model}
|
||||
</if>
|
||||
<if test="param.lang != null">
|
||||
AND a.lang = #{param.lang}
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type = #{param.type}
|
||||
</if>
|
||||
<if test="param.articleId != null">
|
||||
AND a.article_id = #{param.articleId}
|
||||
</if>
|
||||
<if test="param.websiteId != null">
|
||||
AND a.website_id = #{param.websiteId}
|
||||
</if>
|
||||
<if test="param.realName != null">
|
||||
AND a.real_name LIKE CONCAT('%', #{param.realName}, '%')
|
||||
</if>
|
||||
<if test="param.phone != null">
|
||||
AND a.phone LIKE CONCAT('%', #{param.phone}, '%')
|
||||
</if>
|
||||
<if test="param.email != null">
|
||||
AND a.email LIKE CONCAT('%', #{param.email}, '%')
|
||||
</if>
|
||||
<if test="param.content != null">
|
||||
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||
</if>
|
||||
<if test="param.totalPrice != null">
|
||||
AND a.total_price = #{param.totalPrice}
|
||||
</if>
|
||||
<if test="param.payPrice != null">
|
||||
AND a.pay_price = #{param.payPrice}
|
||||
</if>
|
||||
<if test="param.price != null">
|
||||
AND a.price = #{param.price}
|
||||
</if>
|
||||
<if test="param.totalNum != null">
|
||||
AND a.total_num = #{param.totalNum}
|
||||
</if>
|
||||
<if test="param.qrcode != null">
|
||||
AND a.qrcode LIKE CONCAT('%', #{param.qrcode}, '%')
|
||||
</if>
|
||||
<if test="param.channel != null">
|
||||
AND a.channel = #{param.channel}
|
||||
</if>
|
||||
<if test="param.expirationTime != null">
|
||||
AND a.expiration_time LIKE CONCAT('%', #{param.expirationTime}, '%')
|
||||
</if>
|
||||
<if test="param.isSettled != null">
|
||||
AND a.is_settled = #{param.isSettled}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.websiteUserId != null">
|
||||
AND c.user_id = #{param.websiteUserId}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</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>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.title LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.content LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.phone = #{param.keywords}
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.CmsOrder">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsOrder">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<select id="selectListAllRel" resultType="com.gxwebsoft.cms.entity.CmsOrder">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,110 +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.CmsProductMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM cms_product a
|
||||
<where>
|
||||
<if test="param.productId != null">
|
||||
AND a.product_id = #{param.productId}
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type = #{param.type}
|
||||
</if>
|
||||
<if test="param.code != null">
|
||||
AND a.code LIKE CONCAT('%', #{param.code}, '%')
|
||||
</if>
|
||||
<if test="param.title != null">
|
||||
AND a.title LIKE CONCAT('%', #{param.title}, '%')
|
||||
</if>
|
||||
<if test="param.image != null">
|
||||
AND a.image LIKE CONCAT('%', #{param.image}, '%')
|
||||
</if>
|
||||
<if test="param.content != null">
|
||||
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||
</if>
|
||||
<if test="param.parentId != null">
|
||||
AND a.parent_id = #{param.parentId}
|
||||
</if>
|
||||
<if test="param.categoryId != null">
|
||||
AND a.category_id = #{param.categoryId}
|
||||
</if>
|
||||
<if test="param.specs != null">
|
||||
AND a.specs = #{param.specs}
|
||||
</if>
|
||||
<if test="param.position != null">
|
||||
AND a.position LIKE CONCAT('%', #{param.position}, '%')
|
||||
</if>
|
||||
<if test="param.unitName != null">
|
||||
AND a.unit_name LIKE CONCAT('%', #{param.unitName}, '%')
|
||||
</if>
|
||||
<if test="param.price != null">
|
||||
AND a.price = #{param.price}
|
||||
</if>
|
||||
<if test="param.salePrice != null">
|
||||
AND a.sale_price = #{param.salePrice}
|
||||
</if>
|
||||
<if test="param.deductStockType != null">
|
||||
AND a.deduct_stock_type = #{param.deductStockType}
|
||||
</if>
|
||||
<if test="param.files != null">
|
||||
AND a.files LIKE CONCAT('%', #{param.files}, '%')
|
||||
</if>
|
||||
<if test="param.sales != null">
|
||||
AND a.sales = #{param.sales}
|
||||
</if>
|
||||
<if test="param.stock != null">
|
||||
AND a.stock = #{param.stock}
|
||||
</if>
|
||||
<if test="param.gainIntegral != null">
|
||||
AND a.gain_integral = #{param.gainIntegral}
|
||||
</if>
|
||||
<if test="param.recommend != null">
|
||||
AND a.recommend = #{param.recommend}
|
||||
</if>
|
||||
<if test="param.merchantId != null">
|
||||
AND a.merchant_id = #{param.merchantId}
|
||||
</if>
|
||||
<if test="param.isShow != null">
|
||||
AND a.is_show = #{param.isShow}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</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.CmsProduct">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsProduct">
|
||||
<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.CmsProductSpecMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM cms_product_spec a
|
||||
<where>
|
||||
<if test="param.specId != null">
|
||||
AND a.spec_id = #{param.specId}
|
||||
</if>
|
||||
<if test="param.specName != null">
|
||||
AND a.spec_name LIKE CONCAT('%', #{param.specName}, '%')
|
||||
</if>
|
||||
<if test="param.specValue != null">
|
||||
AND a.spec_value LIKE CONCAT('%', #{param.specValue}, '%')
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.updater != null">
|
||||
AND a.updater = #{param.updater}
|
||||
</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.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</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.CmsProductSpec">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsProductSpec">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,44 +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.CmsProductSpecValueMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM cms_product_spec_value a
|
||||
<where>
|
||||
<if test="param.specValueId != null">
|
||||
AND a.spec_value_id = #{param.specValueId}
|
||||
</if>
|
||||
<if test="param.specId != null">
|
||||
AND a.spec_id = #{param.specId}
|
||||
</if>
|
||||
<if test="param.specValue != null">
|
||||
AND a.spec_value LIKE CONCAT('%', #{param.specValue}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</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.CmsProductSpecValue">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsProductSpecValue">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,59 +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.CmsProductUrlMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM cms_product_url a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.productId != null">
|
||||
AND a.product_id = #{param.productId}
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type LIKE CONCAT('%', #{param.type}, '%')
|
||||
</if>
|
||||
<if test="param.domain != null">
|
||||
AND a.domain LIKE CONCAT('%', #{param.domain}, '%')
|
||||
</if>
|
||||
<if test="param.account != null">
|
||||
AND a.account LIKE CONCAT('%', #{param.account}, '%')
|
||||
</if>
|
||||
<if test="param.password != null">
|
||||
AND a.password LIKE CONCAT('%', #{param.password}, '%')
|
||||
</if>
|
||||
<if test="param.merchantId != null">
|
||||
AND a.merchant_id = #{param.merchantId}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</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.CmsProductUrl">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.CmsProductUrl">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,66 +0,0 @@
|
||||
package com.gxwebsoft.cms.param;
|
||||
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
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)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Schema(name = "CmsComponentsParam对象", description = "组件查询参数")
|
||||
public class CmsComponentsParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "组件标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "关联导航ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
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")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
package com.gxwebsoft.cms.param;
|
||||
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
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)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Schema(name = "CmsMpAdParam对象", description = "小程序广告位查询参数")
|
||||
public class CmsMpAdParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer adId;
|
||||
|
||||
@Schema(description = "页面ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
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")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
package com.gxwebsoft.cms.param;
|
||||
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
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)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Schema(name = "CmsMpFieldParam对象", description = "小程序配置查询参数")
|
||||
public class CmsMpFieldParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "自增ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "类型,0文本 1图片 2其他")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "名称")
|
||||
private String value;
|
||||
|
||||
@Schema(description = "页面ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer pageId;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
}
|
||||
@@ -1,133 +0,0 @@
|
||||
package com.gxwebsoft.cms.param;
|
||||
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
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)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Schema(name = "CmsMpMenuParam对象", description = "小程序端菜单查询参数")
|
||||
public class CmsMpMenuParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer menuId;
|
||||
|
||||
@Schema(description = "上级id, 0是顶级")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer parentId;
|
||||
|
||||
@Schema(description = "菜单名称")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "类型 0功能图标 1订单状态图标 2首页导航图标 3 商城导航图标 4管理人员功能图标")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "是否微信小程序菜单")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
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是(仅注册路由不显示在左侧菜单)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer hide;
|
||||
|
||||
@Schema(description = "位置 0不限 1顶部 2底部")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer position;
|
||||
|
||||
@Schema(description = "0 第一行 1第二行")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer rows;
|
||||
|
||||
@Schema(description = "菜单侧栏选中的path")
|
||||
private String active;
|
||||
|
||||
@Schema(description = "其它路由元信息")
|
||||
private String meta;
|
||||
|
||||
@Schema(description = "绑定的页面")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer pageId;
|
||||
|
||||
@Schema(description = "绑定的文章分类ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer articleCategoryId;
|
||||
|
||||
@Schema(description = "绑定的文章ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer articleId;
|
||||
|
||||
@Schema(description = "绑定的表单ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer formId;
|
||||
|
||||
@Schema(description = "绑定的知识库标识")
|
||||
private String bookCode;
|
||||
|
||||
@Schema(description = "绑定的商品分类ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer goodsCategoryId;
|
||||
|
||||
@Schema(description = "绑定的商品ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer goodsId;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "是否管理人员可见")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer adminShow;
|
||||
|
||||
@Schema(description = "设为首页")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer home;
|
||||
|
||||
@Schema(description = "分组名称")
|
||||
private String groupName;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
package com.gxwebsoft.cms.param;
|
||||
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
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)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Schema(name = "CmsMpPagesParam对象", description = "小程序页面查询参数")
|
||||
public class CmsMpPagesParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "上级id, 0是顶级")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer parentId;
|
||||
|
||||
@Schema(description = "页面名称")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "页面路径")
|
||||
private String path;
|
||||
|
||||
@Schema(description = "设为首页")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
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 = "排序(数字越小越靠前)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
package com.gxwebsoft.cms.param;
|
||||
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
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)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Schema(name = "CmsMpParam对象", description = "小程序信息查询参数")
|
||||
public class CmsMpParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer mpId;
|
||||
|
||||
@Schema(description = "是否主账号")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
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 = "微信认证")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
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 String expirationTime;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "介绍")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1冻结")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
}
|
||||
@@ -1,112 +0,0 @@
|
||||
package com.gxwebsoft.cms.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
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-11-25 12:14:05
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Schema(name = "CmsOrderParam对象", description = "订单查询参数")
|
||||
public class CmsOrderParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "订单号")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer orderId;
|
||||
|
||||
@Schema(description = "订单标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "模型名称")
|
||||
private String model;
|
||||
|
||||
@Schema(description = "订单编号")
|
||||
private String orderNo;
|
||||
|
||||
@Schema(description = "订单类型,0商城 1询价 2留言")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "关联文章ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer articleId;
|
||||
|
||||
@Schema(description = "关联网站ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer websiteId;
|
||||
|
||||
@Schema(description = "真实姓名")
|
||||
private String realName;
|
||||
|
||||
@Schema(description = "手机号码")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "电子邮箱")
|
||||
private String email;
|
||||
|
||||
@Schema(description = "订单内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "订单总额")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
@Schema(description = "实际付款")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal payPrice;
|
||||
|
||||
@Schema(description = "报价询价")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal price;
|
||||
|
||||
@Schema(description = "购买数量")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer totalNum;
|
||||
|
||||
@Schema(description = "二维码地址,保存订单号,支付成功后才生成")
|
||||
private String qrcode;
|
||||
|
||||
@Schema(description = "下单渠道,0网站 1小程序 2其他")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer channel;
|
||||
|
||||
@Schema(description = "过期时间")
|
||||
private String expirationTime;
|
||||
|
||||
@Schema(description = "订单是否已结算(0未结算 1已结算)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Boolean isSettled;
|
||||
|
||||
@Schema(description = "用户id")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "排序号")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "网站创建者ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer websiteUserId;
|
||||
|
||||
}
|
||||
@@ -1,123 +0,0 @@
|
||||
package com.gxwebsoft.cms.param;
|
||||
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 产品查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-27 16:03:44
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Schema(name = "CmsProductParam对象", description = "产品查询参数")
|
||||
public class CmsProductParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "自增ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer productId;
|
||||
|
||||
@Schema(description = "类型 0软件产品 1实物商品 2虚拟商品")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "产品编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "产品标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "封面图")
|
||||
private String image;
|
||||
|
||||
@Schema(description = "产品详情")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "父级分类ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer parentId;
|
||||
|
||||
@Schema(description = "产品分类ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer categoryId;
|
||||
|
||||
@Schema(description = "产品规格 0单规格 1多规格")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer specs;
|
||||
|
||||
@Schema(description = "货架")
|
||||
private String position;
|
||||
|
||||
@Schema(description = "单位名称 (个)")
|
||||
private String unitName;
|
||||
|
||||
@Schema(description = "进货价格")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal price;
|
||||
|
||||
@Schema(description = "销售价格")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal salePrice;
|
||||
|
||||
@Schema(description = "库存计算方式(10下单减库存 20付款减库存)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deductStockType;
|
||||
|
||||
@Schema(description = "轮播图")
|
||||
private String files;
|
||||
|
||||
@Schema(description = "销量")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sales;
|
||||
|
||||
@Schema(description = "库存")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer stock;
|
||||
|
||||
@Schema(description = "消费赚取积分")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal gainIntegral;
|
||||
|
||||
@Schema(description = "推荐")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer recommend;
|
||||
|
||||
@Schema(description = "商户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Long merchantId;
|
||||
|
||||
@Schema(description = "状态(0:未上架,1:上架)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Boolean isShow;
|
||||
|
||||
@Schema(description = "状态, 0上架 1待上架 2待审核 3审核不通过")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "排序号")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
package com.gxwebsoft.cms.param;
|
||||
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
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)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Schema(name = "CmsProductSpecParam对象", description = "规格查询参数")
|
||||
public class CmsProductSpecParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "规格ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer specId;
|
||||
|
||||
@Schema(description = "规格名称")
|
||||
private String specName;
|
||||
|
||||
@Schema(description = "规格值")
|
||||
private String specValue;
|
||||
|
||||
@Schema(description = "创建用户")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "更新者")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer updater;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1待修,2异常已修,3异常未修")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "排序号")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
package com.gxwebsoft.cms.param;
|
||||
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
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)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Schema(name = "CmsProductSpecValueParam对象", description = "规格值查询参数")
|
||||
public class CmsProductSpecValueParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "规格值ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer specValueId;
|
||||
|
||||
@Schema(description = "规格组ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer specId;
|
||||
|
||||
@Schema(description = "规格值")
|
||||
private String specValue;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "排序号")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
package com.gxwebsoft.cms.param;
|
||||
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
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)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Schema(name = "CmsProductUrlParam对象", description = "域名查询参数")
|
||||
public class CmsProductUrlParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "自增ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "产品ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
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")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Long merchantId;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String comments;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1待确认")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.gxwebsoft.cms.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.cms.entity.CmsComponents;
|
||||
import com.gxwebsoft.cms.param.CmsComponentsParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 组件Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsComponentsService extends IService<CmsComponents> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<CmsComponents>
|
||||
*/
|
||||
PageResult<CmsComponents> pageRel(CmsComponentsParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<CmsComponents>
|
||||
*/
|
||||
List<CmsComponents> listRel(CmsComponentsParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id ID
|
||||
* @return CmsComponents
|
||||
*/
|
||||
CmsComponents getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.gxwebsoft.cms.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.cms.entity.CmsMpAd;
|
||||
import com.gxwebsoft.cms.param.CmsMpAdParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 小程序广告位Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsMpAdService extends IService<CmsMpAd> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<CmsMpAd>
|
||||
*/
|
||||
PageResult<CmsMpAd> pageRel(CmsMpAdParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<CmsMpAd>
|
||||
*/
|
||||
List<CmsMpAd> listRel(CmsMpAdParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param adId ID
|
||||
* @return CmsMpAd
|
||||
*/
|
||||
CmsMpAd getByIdRel(Integer adId);
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.gxwebsoft.cms.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.cms.entity.CmsMpField;
|
||||
import com.gxwebsoft.cms.param.CmsMpFieldParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 小程序配置Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsMpFieldService extends IService<CmsMpField> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<CmsMpField>
|
||||
*/
|
||||
PageResult<CmsMpField> pageRel(CmsMpFieldParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<CmsMpField>
|
||||
*/
|
||||
List<CmsMpField> listRel(CmsMpFieldParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 自增ID
|
||||
* @return CmsMpField
|
||||
*/
|
||||
CmsMpField getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.gxwebsoft.cms.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.cms.entity.CmsMpMenu;
|
||||
import com.gxwebsoft.cms.param.CmsMpMenuParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 小程序端菜单Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsMpMenuService extends IService<CmsMpMenu> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<CmsMpMenu>
|
||||
*/
|
||||
PageResult<CmsMpMenu> pageRel(CmsMpMenuParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<CmsMpMenu>
|
||||
*/
|
||||
List<CmsMpMenu> listRel(CmsMpMenuParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param menuId ID
|
||||
* @return CmsMpMenu
|
||||
*/
|
||||
CmsMpMenu getByIdRel(Integer menuId);
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.gxwebsoft.cms.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.cms.entity.CmsMpPages;
|
||||
import com.gxwebsoft.cms.param.CmsMpPagesParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 小程序页面Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsMpPagesService extends IService<CmsMpPages> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<CmsMpPages>
|
||||
*/
|
||||
PageResult<CmsMpPages> pageRel(CmsMpPagesParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<CmsMpPages>
|
||||
*/
|
||||
List<CmsMpPages> listRel(CmsMpPagesParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id ID
|
||||
* @return CmsMpPages
|
||||
*/
|
||||
CmsMpPages getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.gxwebsoft.cms.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.cms.entity.CmsMp;
|
||||
import com.gxwebsoft.cms.param.CmsMpParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 小程序信息Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
public interface CmsMpService extends IService<CmsMp> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<CmsMp>
|
||||
*/
|
||||
PageResult<CmsMp> pageRel(CmsMpParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<CmsMp>
|
||||
*/
|
||||
List<CmsMp> listRel(CmsMpParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param mpId ID
|
||||
* @return CmsMp
|
||||
*/
|
||||
CmsMp getByIdRel(Integer mpId);
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.gxwebsoft.cms.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.cms.entity.CmsOrder;
|
||||
import com.gxwebsoft.cms.param.CmsOrderParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-11-25 12:14:05
|
||||
*/
|
||||
public interface CmsOrderService extends IService<CmsOrder> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<CmsOrder>
|
||||
*/
|
||||
PageResult<CmsOrder> pageRel(CmsOrderParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<CmsOrder>
|
||||
*/
|
||||
List<CmsOrder> listRel(CmsOrderParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param orderId 订单号
|
||||
* @return CmsOrder
|
||||
*/
|
||||
CmsOrder getByIdRel(Integer orderId);
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.gxwebsoft.cms.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.cms.entity.CmsProduct;
|
||||
import com.gxwebsoft.cms.param.CmsProductParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 产品Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-27 16:03:44
|
||||
*/
|
||||
public interface CmsProductService extends IService<CmsProduct> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<CmsProduct>
|
||||
*/
|
||||
PageResult<CmsProduct> pageRel(CmsProductParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<CmsProduct>
|
||||
*/
|
||||
List<CmsProduct> listRel(CmsProductParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param productId 自增ID
|
||||
* @return CmsProduct
|
||||
*/
|
||||
CmsProduct getByIdRel(Integer productId);
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.gxwebsoft.cms.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.cms.entity.CmsProductSpec;
|
||||
import com.gxwebsoft.cms.param.CmsProductSpecParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 规格Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-27 16:03:44
|
||||
*/
|
||||
public interface CmsProductSpecService extends IService<CmsProductSpec> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<CmsProductSpec>
|
||||
*/
|
||||
PageResult<CmsProductSpec> pageRel(CmsProductSpecParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<CmsProductSpec>
|
||||
*/
|
||||
List<CmsProductSpec> listRel(CmsProductSpecParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param specId 规格ID
|
||||
* @return CmsProductSpec
|
||||
*/
|
||||
CmsProductSpec getByIdRel(Integer specId);
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.gxwebsoft.cms.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.cms.entity.CmsProductSpecValue;
|
||||
import com.gxwebsoft.cms.param.CmsProductSpecValueParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 规格值Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-27 16:03:44
|
||||
*/
|
||||
public interface CmsProductSpecValueService extends IService<CmsProductSpecValue> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<CmsProductSpecValue>
|
||||
*/
|
||||
PageResult<CmsProductSpecValue> pageRel(CmsProductSpecValueParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<CmsProductSpecValue>
|
||||
*/
|
||||
List<CmsProductSpecValue> listRel(CmsProductSpecValueParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param specValueId 规格值ID
|
||||
* @return CmsProductSpecValue
|
||||
*/
|
||||
CmsProductSpecValue getByIdRel(Integer specValueId);
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.gxwebsoft.cms.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.cms.entity.CmsProductUrl;
|
||||
import com.gxwebsoft.cms.param.CmsProductUrlParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 域名Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-27 16:03:44
|
||||
*/
|
||||
public interface CmsProductUrlService extends IService<CmsProductUrl> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<CmsProductUrl>
|
||||
*/
|
||||
PageResult<CmsProductUrl> pageRel(CmsProductUrlParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<CmsProductUrl>
|
||||
*/
|
||||
List<CmsProductUrl> listRel(CmsProductUrlParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 自增ID
|
||||
* @return CmsProductUrl
|
||||
*/
|
||||
CmsProductUrl getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -17,6 +17,7 @@ import com.gxwebsoft.common.core.utils.AliYunSender;
|
||||
import com.gxwebsoft.common.core.utils.JSONUtil;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -33,12 +34,12 @@ import java.util.Map;
|
||||
@Service
|
||||
public class CmsArticleContentServiceImpl extends ServiceImpl<CmsArticleContentMapper, CmsArticleContent> implements CmsArticleContentService {
|
||||
@Resource
|
||||
@Lazy
|
||||
private CmsNavigationService cmsNavigationService;
|
||||
@Resource
|
||||
@Lazy
|
||||
private CmsArticleService cmsArticleService;
|
||||
@Resource
|
||||
private CmsArticleContentService cmsArticleContentService;
|
||||
@Resource
|
||||
private CmsLangLogService cmsLangLogService;
|
||||
@Override
|
||||
public PageResult<CmsArticleContent> pageRel(CmsArticleContentParam param) {
|
||||
@@ -139,7 +140,7 @@ public class CmsArticleContentServiceImpl extends ServiceImpl<CmsArticleContentM
|
||||
target.setContent(article.getContent());
|
||||
System.out.println("target = " + target);
|
||||
cmsArticleService.updateById(target);
|
||||
cmsArticleContentService.update(new LambdaUpdateWrapper<CmsArticleContent>().eq(CmsArticleContent::getArticleId, target.getArticleId()).set(CmsArticleContent::getContent,target.getContent()));
|
||||
this.update(new LambdaUpdateWrapper<CmsArticleContent>().eq(CmsArticleContent::getArticleId, target.getArticleId()).set(CmsArticleContent::getContent,target.getContent()));
|
||||
}
|
||||
}else {
|
||||
// 新增操作
|
||||
@@ -149,7 +150,7 @@ public class CmsArticleContentServiceImpl extends ServiceImpl<CmsArticleContentM
|
||||
content.setArticleId(article.getArticleId());
|
||||
content.setContent(article.getContent());
|
||||
content.setTenantId(article.getTenantId());
|
||||
cmsArticleContentService.save(content);
|
||||
this.save(content);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.gxwebsoft.common.core.utils.RedisUtil;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.service.UserService;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
@@ -41,12 +42,11 @@ import static com.gxwebsoft.common.core.constants.ArticleConstants.CACHE_KEY_ART
|
||||
@Service
|
||||
public class CmsArticleServiceImpl extends ServiceImpl<CmsArticleMapper, CmsArticle> implements CmsArticleService {
|
||||
@Resource
|
||||
@Lazy
|
||||
private CmsNavigationService cmsNavigationService;
|
||||
@Resource
|
||||
private CmsArticleContentService cmsArticleContentService;
|
||||
@Resource
|
||||
private CmsArticleContentService articleContentService;
|
||||
@Resource
|
||||
private UserService userService;
|
||||
@Resource
|
||||
private CmsModelService cmsModelService;
|
||||
@@ -122,7 +122,7 @@ public class CmsArticleServiceImpl extends ServiceImpl<CmsArticleMapper, CmsArti
|
||||
// article.setBanner(model.getBanner());
|
||||
// }
|
||||
// 附加文字内容
|
||||
CmsArticleContent content = articleContentService.getOne(new LambdaQueryWrapper<CmsArticleContent>().eq(CmsArticleContent::getArticleId, article.getArticleId()).last("limit 1"));
|
||||
CmsArticleContent content = cmsArticleContentService.getOne(new LambdaQueryWrapper<CmsArticleContent>().eq(CmsArticleContent::getArticleId, article.getArticleId()).last("limit 1"));
|
||||
if (content != null) {
|
||||
article.setContent(content.getContent());
|
||||
}
|
||||
@@ -172,9 +172,9 @@ public class CmsArticleServiceImpl extends ServiceImpl<CmsArticleMapper, CmsArti
|
||||
content.setArticleId(article.getArticleId());
|
||||
content.setContent(article.getContent());
|
||||
content.setTenantId(article.getTenantId());
|
||||
articleContentService.save(content);
|
||||
cmsArticleContentService.save(content);
|
||||
// 同步翻译并保存
|
||||
articleContentService.translate(article);
|
||||
cmsArticleContentService.translate(article);
|
||||
return true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -221,11 +221,11 @@ public class CmsArticleServiceImpl extends ServiceImpl<CmsArticleMapper, CmsArti
|
||||
String key = CACHE_KEY_ARTICLE + article.getArticleId();
|
||||
redisUtil.delete(key);
|
||||
// 更新内容
|
||||
final boolean update = articleContentService.update(new LambdaUpdateWrapper<CmsArticleContent>().eq(CmsArticleContent::getArticleId, article.getArticleId()).set(CmsArticleContent::getContent, article.getContent()));
|
||||
final boolean update = cmsArticleContentService.update(new LambdaUpdateWrapper<CmsArticleContent>().eq(CmsArticleContent::getArticleId, article.getArticleId()).set(CmsArticleContent::getContent, article.getContent()));
|
||||
if (update) {
|
||||
// 同步翻译并保存
|
||||
article.setIsUpdate(true);
|
||||
articleContentService.translate(article);
|
||||
cmsArticleContentService.translate(article);
|
||||
return true;
|
||||
} else {
|
||||
// 添加内容
|
||||
@@ -233,7 +233,7 @@ public class CmsArticleServiceImpl extends ServiceImpl<CmsArticleMapper, CmsArti
|
||||
content.setArticleId(article.getArticleId());
|
||||
content.setContent(article.getContent());
|
||||
content.setTenantId(article.getTenantId());
|
||||
articleContentService.save(content);
|
||||
cmsArticleContentService.save(content);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gxwebsoft.cms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.cms.mapper.CmsComponentsMapper;
|
||||
import com.gxwebsoft.cms.service.CmsComponentsService;
|
||||
import com.gxwebsoft.cms.entity.CmsComponents;
|
||||
import com.gxwebsoft.cms.param.CmsComponentsParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 组件Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Service
|
||||
public class CmsComponentsServiceImpl extends ServiceImpl<CmsComponentsMapper, CmsComponents> implements CmsComponentsService {
|
||||
|
||||
@Override
|
||||
public PageResult<CmsComponents> pageRel(CmsComponentsParam param) {
|
||||
PageParam<CmsComponents, CmsComponentsParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
List<CmsComponents> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CmsComponents> listRel(CmsComponentsParam param) {
|
||||
List<CmsComponents> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<CmsComponents, CmsComponentsParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CmsComponents getByIdRel(Integer id) {
|
||||
CmsComponentsParam param = new CmsComponentsParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -20,6 +20,7 @@ import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
@@ -39,8 +40,10 @@ public class CmsDesignServiceImpl extends ServiceImpl<CmsDesignMapper, CmsDesign
|
||||
@Resource
|
||||
private CmsLangLogService cmsLangLogService;
|
||||
@Resource
|
||||
@Lazy
|
||||
private CmsNavigationService cmsNavigationService;
|
||||
@Resource
|
||||
@Lazy
|
||||
private CmsArticleContentService cmsArticleContentService;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gxwebsoft.cms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.cms.mapper.CmsMpAdMapper;
|
||||
import com.gxwebsoft.cms.service.CmsMpAdService;
|
||||
import com.gxwebsoft.cms.entity.CmsMpAd;
|
||||
import com.gxwebsoft.cms.param.CmsMpAdParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 小程序广告位Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Service
|
||||
public class CmsMpAdServiceImpl extends ServiceImpl<CmsMpAdMapper, CmsMpAd> implements CmsMpAdService {
|
||||
|
||||
@Override
|
||||
public PageResult<CmsMpAd> pageRel(CmsMpAdParam param) {
|
||||
PageParam<CmsMpAd, CmsMpAdParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
List<CmsMpAd> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CmsMpAd> listRel(CmsMpAdParam param) {
|
||||
List<CmsMpAd> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<CmsMpAd, CmsMpAdParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CmsMpAd getByIdRel(Integer adId) {
|
||||
CmsMpAdParam param = new CmsMpAdParam();
|
||||
param.setAdId(adId);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gxwebsoft.cms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.cms.mapper.CmsMpFieldMapper;
|
||||
import com.gxwebsoft.cms.service.CmsMpFieldService;
|
||||
import com.gxwebsoft.cms.entity.CmsMpField;
|
||||
import com.gxwebsoft.cms.param.CmsMpFieldParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 小程序配置Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Service
|
||||
public class CmsMpFieldServiceImpl extends ServiceImpl<CmsMpFieldMapper, CmsMpField> implements CmsMpFieldService {
|
||||
|
||||
@Override
|
||||
public PageResult<CmsMpField> pageRel(CmsMpFieldParam param) {
|
||||
PageParam<CmsMpField, CmsMpFieldParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
List<CmsMpField> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CmsMpField> listRel(CmsMpFieldParam param) {
|
||||
List<CmsMpField> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<CmsMpField, CmsMpFieldParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CmsMpField getByIdRel(Integer id) {
|
||||
CmsMpFieldParam param = new CmsMpFieldParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gxwebsoft.cms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.cms.mapper.CmsMpMenuMapper;
|
||||
import com.gxwebsoft.cms.service.CmsMpMenuService;
|
||||
import com.gxwebsoft.cms.entity.CmsMpMenu;
|
||||
import com.gxwebsoft.cms.param.CmsMpMenuParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 小程序端菜单Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Service
|
||||
public class CmsMpMenuServiceImpl extends ServiceImpl<CmsMpMenuMapper, CmsMpMenu> implements CmsMpMenuService {
|
||||
|
||||
@Override
|
||||
public PageResult<CmsMpMenu> pageRel(CmsMpMenuParam param) {
|
||||
PageParam<CmsMpMenu, CmsMpMenuParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
List<CmsMpMenu> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CmsMpMenu> listRel(CmsMpMenuParam param) {
|
||||
List<CmsMpMenu> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<CmsMpMenu, CmsMpMenuParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CmsMpMenu getByIdRel(Integer menuId) {
|
||||
CmsMpMenuParam param = new CmsMpMenuParam();
|
||||
param.setMenuId(menuId);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gxwebsoft.cms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.cms.mapper.CmsMpPagesMapper;
|
||||
import com.gxwebsoft.cms.service.CmsMpPagesService;
|
||||
import com.gxwebsoft.cms.entity.CmsMpPages;
|
||||
import com.gxwebsoft.cms.param.CmsMpPagesParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 小程序页面Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Service
|
||||
public class CmsMpPagesServiceImpl extends ServiceImpl<CmsMpPagesMapper, CmsMpPages> implements CmsMpPagesService {
|
||||
|
||||
@Override
|
||||
public PageResult<CmsMpPages> pageRel(CmsMpPagesParam param) {
|
||||
PageParam<CmsMpPages, CmsMpPagesParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
List<CmsMpPages> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CmsMpPages> listRel(CmsMpPagesParam param) {
|
||||
List<CmsMpPages> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<CmsMpPages, CmsMpPagesParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CmsMpPages getByIdRel(Integer id) {
|
||||
CmsMpPagesParam param = new CmsMpPagesParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gxwebsoft.cms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.cms.mapper.CmsMpMapper;
|
||||
import com.gxwebsoft.cms.service.CmsMpService;
|
||||
import com.gxwebsoft.cms.entity.CmsMp;
|
||||
import com.gxwebsoft.cms.param.CmsMpParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 小程序信息Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-10 20:47:57
|
||||
*/
|
||||
@Service
|
||||
public class CmsMpServiceImpl extends ServiceImpl<CmsMpMapper, CmsMp> implements CmsMpService {
|
||||
|
||||
@Override
|
||||
public PageResult<CmsMp> pageRel(CmsMpParam param) {
|
||||
PageParam<CmsMp, CmsMpParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
List<CmsMp> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CmsMp> listRel(CmsMpParam param) {
|
||||
List<CmsMp> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<CmsMp, CmsMpParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CmsMp getByIdRel(Integer mpId) {
|
||||
CmsMpParam param = new CmsMpParam();
|
||||
param.setMpId(mpId);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,6 +16,7 @@ import com.gxwebsoft.common.core.exception.BusinessException;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.service.UserService;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -31,12 +32,11 @@ import java.util.List;
|
||||
@Service
|
||||
public class CmsNavigationServiceImpl extends ServiceImpl<CmsNavigationMapper, CmsNavigation> implements CmsNavigationService {
|
||||
@Resource
|
||||
@Lazy
|
||||
private CmsDesignService cmsDesignService;
|
||||
@Resource
|
||||
private CmsModelService cmsModelService;
|
||||
@Resource
|
||||
private CmsNavigationService cmsNavigationService;
|
||||
@Resource
|
||||
private UserService userService;
|
||||
|
||||
@Override
|
||||
@@ -67,7 +67,7 @@ public class CmsNavigationServiceImpl extends ServiceImpl<CmsNavigationMapper, C
|
||||
}
|
||||
// 父级栏目并且是page模型则读取子项目第一条
|
||||
if (navigation.getParentId().equals(0) && navigation.getModel().equals("page")) {
|
||||
final CmsNavigation parent = cmsNavigationService.getOne(new LambdaQueryWrapper<CmsNavigation>().eq(CmsNavigation::getParentId, navigation.getNavigationId()).last("limit 1"));
|
||||
final CmsNavigation parent = this.getOne(new LambdaQueryWrapper<CmsNavigation>().eq(CmsNavigation::getParentId, navigation.getNavigationId()).last("limit 1"));
|
||||
if (ObjectUtil.isNotEmpty(parent)) {
|
||||
navigation = parent;
|
||||
}
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gxwebsoft.cms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.cms.mapper.CmsOrderMapper;
|
||||
import com.gxwebsoft.cms.service.CmsOrderService;
|
||||
import com.gxwebsoft.cms.entity.CmsOrder;
|
||||
import com.gxwebsoft.cms.param.CmsOrderParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-11-25 12:14:05
|
||||
*/
|
||||
@Service
|
||||
public class CmsOrderServiceImpl extends ServiceImpl<CmsOrderMapper, CmsOrder> implements CmsOrderService {
|
||||
|
||||
@Override
|
||||
public PageResult<CmsOrder> pageRel(CmsOrderParam param) {
|
||||
PageParam<CmsOrder, CmsOrderParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<CmsOrder> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CmsOrder> listRel(CmsOrderParam param) {
|
||||
List<CmsOrder> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<CmsOrder, CmsOrderParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CmsOrder getByIdRel(Integer orderId) {
|
||||
CmsOrderParam param = new CmsOrderParam();
|
||||
param.setOrderId(orderId);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gxwebsoft.cms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.cms.mapper.CmsProductMapper;
|
||||
import com.gxwebsoft.cms.service.CmsProductService;
|
||||
import com.gxwebsoft.cms.entity.CmsProduct;
|
||||
import com.gxwebsoft.cms.param.CmsProductParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 产品Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-27 16:03:44
|
||||
*/
|
||||
@Service
|
||||
public class CmsProductServiceImpl extends ServiceImpl<CmsProductMapper, CmsProduct> implements CmsProductService {
|
||||
|
||||
@Override
|
||||
public PageResult<CmsProduct> pageRel(CmsProductParam param) {
|
||||
PageParam<CmsProduct, CmsProductParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc,create_time desc");
|
||||
List<CmsProduct> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CmsProduct> listRel(CmsProductParam param) {
|
||||
List<CmsProduct> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<CmsProduct, CmsProductParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc,create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CmsProduct getByIdRel(Integer productId) {
|
||||
CmsProductParam param = new CmsProductParam();
|
||||
param.setProductId(productId);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gxwebsoft.cms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.cms.mapper.CmsProductSpecMapper;
|
||||
import com.gxwebsoft.cms.service.CmsProductSpecService;
|
||||
import com.gxwebsoft.cms.entity.CmsProductSpec;
|
||||
import com.gxwebsoft.cms.param.CmsProductSpecParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 规格Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-27 16:03:44
|
||||
*/
|
||||
@Service
|
||||
public class CmsProductSpecServiceImpl extends ServiceImpl<CmsProductSpecMapper, CmsProductSpec> implements CmsProductSpecService {
|
||||
|
||||
@Override
|
||||
public PageResult<CmsProductSpec> pageRel(CmsProductSpecParam param) {
|
||||
PageParam<CmsProductSpec, CmsProductSpecParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
List<CmsProductSpec> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CmsProductSpec> listRel(CmsProductSpecParam param) {
|
||||
List<CmsProductSpec> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<CmsProductSpec, CmsProductSpecParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CmsProductSpec getByIdRel(Integer specId) {
|
||||
CmsProductSpecParam param = new CmsProductSpecParam();
|
||||
param.setSpecId(specId);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gxwebsoft.cms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.cms.mapper.CmsProductSpecValueMapper;
|
||||
import com.gxwebsoft.cms.service.CmsProductSpecValueService;
|
||||
import com.gxwebsoft.cms.entity.CmsProductSpecValue;
|
||||
import com.gxwebsoft.cms.param.CmsProductSpecValueParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 规格值Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-27 16:03:44
|
||||
*/
|
||||
@Service
|
||||
public class CmsProductSpecValueServiceImpl extends ServiceImpl<CmsProductSpecValueMapper, CmsProductSpecValue> implements CmsProductSpecValueService {
|
||||
|
||||
@Override
|
||||
public PageResult<CmsProductSpecValue> pageRel(CmsProductSpecValueParam param) {
|
||||
PageParam<CmsProductSpecValue, CmsProductSpecValueParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
List<CmsProductSpecValue> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CmsProductSpecValue> listRel(CmsProductSpecValueParam param) {
|
||||
List<CmsProductSpecValue> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<CmsProductSpecValue, CmsProductSpecValueParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CmsProductSpecValue getByIdRel(Integer specValueId) {
|
||||
CmsProductSpecValueParam param = new CmsProductSpecValueParam();
|
||||
param.setSpecValueId(specValueId);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gxwebsoft.cms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.cms.mapper.CmsProductUrlMapper;
|
||||
import com.gxwebsoft.cms.service.CmsProductUrlService;
|
||||
import com.gxwebsoft.cms.entity.CmsProductUrl;
|
||||
import com.gxwebsoft.cms.param.CmsProductUrlParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 域名Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-09-27 16:03:44
|
||||
*/
|
||||
@Service
|
||||
public class CmsProductUrlServiceImpl extends ServiceImpl<CmsProductUrlMapper, CmsProductUrl> implements CmsProductUrlService {
|
||||
|
||||
@Override
|
||||
public PageResult<CmsProductUrl> pageRel(CmsProductUrlParam param) {
|
||||
PageParam<CmsProductUrl, CmsProductUrlParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time asc");
|
||||
List<CmsProductUrl> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CmsProductUrl> listRel(CmsProductUrlParam param) {
|
||||
List<CmsProductUrl> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<CmsProductUrl, CmsProductUrlParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("create_time asc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CmsProductUrl getByIdRel(Integer id) {
|
||||
CmsProductUrlParam param = new CmsProductUrlParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -14,52 +14,57 @@ import org.springframework.stereotype.Component;
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "mqtt")
|
||||
public class MqttProperties {
|
||||
|
||||
|
||||
/**
|
||||
* 是否启用MQTT服务
|
||||
*/
|
||||
private boolean enabled = false;
|
||||
|
||||
/**
|
||||
* MQTT服务器地址
|
||||
*/
|
||||
private String host = "tcp://127.0.0.1:1883";
|
||||
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
private String username = "";
|
||||
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
private String password = "";
|
||||
|
||||
|
||||
/**
|
||||
* 客户端ID前缀
|
||||
*/
|
||||
private String clientIdPrefix = "mqtt_client_";
|
||||
|
||||
|
||||
/**
|
||||
* 订阅主题
|
||||
*/
|
||||
private String topic = "/SW_GPS/#";
|
||||
|
||||
|
||||
/**
|
||||
* QoS等级
|
||||
*/
|
||||
private int qos = 2;
|
||||
|
||||
|
||||
/**
|
||||
* 连接超时时间(秒)
|
||||
*/
|
||||
private int connectionTimeout = 10;
|
||||
|
||||
|
||||
/**
|
||||
* 心跳间隔(秒)
|
||||
*/
|
||||
private int keepAliveInterval = 20;
|
||||
|
||||
|
||||
/**
|
||||
* 是否自动重连
|
||||
*/
|
||||
private boolean autoReconnect = true;
|
||||
|
||||
|
||||
/**
|
||||
* 是否清除会话
|
||||
*/
|
||||
|
||||
@@ -19,6 +19,8 @@ import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Arrays;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
/**
|
||||
* MybatisPlus配置
|
||||
@@ -32,28 +34,36 @@ public class MybatisPlusConfig {
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
@Bean
|
||||
public MybatisPlusInterceptor mybatisPlusInterceptor(HttpServletRequest request) {
|
||||
public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
||||
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
||||
|
||||
// 多租户插件配置
|
||||
TenantLineHandler tenantLineHandler = new TenantLineHandler() {
|
||||
@Override
|
||||
public Expression getTenantId() {
|
||||
String tenantId;
|
||||
// 从请求头拿ID
|
||||
tenantId = request.getHeader("tenantId");
|
||||
if(tenantId != null){
|
||||
return new LongValue(tenantId);
|
||||
}
|
||||
// 从域名拿ID
|
||||
String Domain = request.getHeader("Domain");
|
||||
if (StrUtil.isNotBlank(Domain)) {
|
||||
String key = "Domain:" + Domain;
|
||||
tenantId = redisUtil.get(key);
|
||||
if(tenantId != null){
|
||||
System.out.println("从域名拿TID = " + tenantId);
|
||||
return new LongValue(tenantId);
|
||||
String tenantId = null;
|
||||
try {
|
||||
// 从Spring上下文获取当前请求
|
||||
HttpServletRequest request = getCurrentRequest();
|
||||
if (request != null) {
|
||||
// 从请求头拿ID
|
||||
tenantId = request.getHeader("tenantId");
|
||||
if(tenantId != null){
|
||||
return new LongValue(tenantId);
|
||||
}
|
||||
// 从域名拿ID
|
||||
String Domain = request.getHeader("Domain");
|
||||
if (StrUtil.isNotBlank(Domain)) {
|
||||
String key = "Domain:" + Domain;
|
||||
tenantId = redisUtil.get(key);
|
||||
if(tenantId != null){
|
||||
System.out.println("从域名拿TID = " + tenantId);
|
||||
return new LongValue(tenantId);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// 忽略异常,使用默认逻辑
|
||||
}
|
||||
return getLoginUserTenantId();
|
||||
}
|
||||
@@ -111,4 +121,16 @@ public class MybatisPlusConfig {
|
||||
return new NullValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前HTTP请求
|
||||
*/
|
||||
private HttpServletRequest getCurrentRequest() {
|
||||
try {
|
||||
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
||||
return attributes != null ? attributes.getRequest() : null;
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@ import org.springframework.http.HttpMethod;
|
||||
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
||||
import org.springframework.security.config.http.SessionCreationPolicy;
|
||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||
import org.springframework.security.web.SecurityFilterChain;
|
||||
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -22,7 +22,7 @@ import javax.annotation.Resource;
|
||||
@Configuration
|
||||
@EnableWebSecurity
|
||||
@EnableGlobalMethodSecurity(prePostEnabled = true)
|
||||
public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
public class SecurityConfig {
|
||||
@Resource
|
||||
private JwtAccessDeniedHandler jwtAccessDeniedHandler;
|
||||
@Resource
|
||||
@@ -30,9 +30,9 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
@Resource
|
||||
private JwtAuthenticationFilter jwtAuthenticationFilter;
|
||||
|
||||
@Override
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
http.authorizeRequests()
|
||||
@Bean
|
||||
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
|
||||
return http.authorizeRequests()
|
||||
.antMatchers(HttpMethod.OPTIONS, "/**")
|
||||
.permitAll()
|
||||
.antMatchers(HttpMethod.GET, "/api/file/**","/**", "/api/captcha", "/")
|
||||
@@ -48,6 +48,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
"/v2/api-docs",
|
||||
"/v3/api-docs",
|
||||
"/swagger-ui/**",
|
||||
"/doc.html",
|
||||
"/api/open/**",
|
||||
"/hxz/v1/**",
|
||||
"/api/sendSmsCaptcha",
|
||||
@@ -95,7 +96,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
.accessDeniedHandler(jwtAccessDeniedHandler)
|
||||
.authenticationEntryPoint(jwtAuthenticationEntryPoint)
|
||||
.and()
|
||||
.addFilterBefore(jwtAuthenticationFilter, UsernamePasswordAuthenticationFilter.class);
|
||||
.addFilterBefore(jwtAuthenticationFilter, UsernamePasswordAuthenticationFilter.class)
|
||||
.build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.extra.qrcode.QrCodeUtil;
|
||||
import cn.hutool.extra.qrcode.QrConfig;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.imageio.ImageIO;
|
||||
@@ -22,6 +23,9 @@ import static com.gxwebsoft.common.core.constants.QRCodeConstants.*;
|
||||
*/
|
||||
public class MyQrCodeUtil {
|
||||
|
||||
@Value("${config.upload-path}")
|
||||
private static String uploadPath;
|
||||
|
||||
private static final String logoUrl = "https://file.wsdns.cn/20230430/6fa31aca3b0d47af98a149cf2dd26a4f.jpeg";
|
||||
|
||||
/**
|
||||
@@ -60,7 +64,7 @@ public class MyQrCodeUtil {
|
||||
* @return 二维码图片地址
|
||||
*/
|
||||
public static String createQrCode(String type,Integer id, String content) throws IOException {
|
||||
String filePath = "/www/wwwroot/file.ws/file/qrcode/".concat(type).concat("/");
|
||||
String filePath = uploadPath + "/file/qrcode/".concat(type).concat("/");
|
||||
String qrcodeUrl = "https://file.websoft.top/qrcode/".concat(type).concat("/");
|
||||
// 将URL转为BufferedImage
|
||||
BufferedImage bufferedImage = ImageIO.read(new URL(logoUrl));
|
||||
|
||||
@@ -183,7 +183,7 @@ public class SignCheckUtil {
|
||||
return true;
|
||||
}
|
||||
// 服务器域名白名单列表
|
||||
whiteDomains.add("server.gxwebsoft.com");
|
||||
whiteDomains.add("server.websoft.top");
|
||||
System.out.println("whiteDomains = " + whiteDomains);
|
||||
System.out.println(">>> domainName = " + domainName);
|
||||
for(String item: whiteDomains){
|
||||
|
||||
@@ -3,12 +3,16 @@ package com.gxwebsoft.common.core.utils;
|
||||
import com.wechat.pay.java.core.Config;
|
||||
import com.wechat.pay.java.core.RSAAutoCertificateConfig;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
import com.gxwebsoft.common.core.config.ConfigProperties;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 微信支付证书自动配置工具类
|
||||
* 使用RSAAutoCertificateConfig实现证书自动管理
|
||||
*
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-07-26
|
||||
*/
|
||||
@@ -16,38 +20,44 @@ import org.springframework.stereotype.Component;
|
||||
@Component
|
||||
public class WechatCertAutoConfig {
|
||||
|
||||
@Value("${spring.profiles.active:prod}")
|
||||
private String activeProfile;
|
||||
|
||||
@Resource
|
||||
private ConfigProperties configProperties;
|
||||
|
||||
/**
|
||||
* 创建微信支付自动证书配置
|
||||
*
|
||||
*
|
||||
* @param merchantId 商户号
|
||||
* @param privateKeyPath 私钥文件路径
|
||||
* @param merchantSerialNumber 商户证书序列号
|
||||
* @param apiV3Key APIv3密钥
|
||||
* @return 微信支付配置对象
|
||||
*/
|
||||
public Config createAutoConfig(String merchantId, String privateKeyPath,
|
||||
public Config createAutoConfig(String merchantId, String privateKeyPath,
|
||||
String merchantSerialNumber, String apiV3Key) {
|
||||
try {
|
||||
log.info("创建微信支付自动证书配置...");
|
||||
log.info("商户号: {}", merchantId);
|
||||
log.info("私钥路径: {}", privateKeyPath);
|
||||
log.info("证书序列号: {}", merchantSerialNumber);
|
||||
|
||||
|
||||
Config config = new RSAAutoCertificateConfig.Builder()
|
||||
.merchantId(merchantId)
|
||||
.privateKeyFromPath(privateKeyPath)
|
||||
.merchantSerialNumber(merchantSerialNumber)
|
||||
.apiV3Key(apiV3Key)
|
||||
.build();
|
||||
|
||||
|
||||
log.info("✅ 微信支付自动证书配置创建成功");
|
||||
log.info("🔄 系统将自动管理平台证书的下载和更新");
|
||||
|
||||
|
||||
return config;
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("❌ 创建微信支付自动证书配置失败: {}", e.getMessage(), e);
|
||||
|
||||
|
||||
// 提供详细的错误诊断信息
|
||||
log.error("🔍 错误诊断:");
|
||||
log.error("1. 请检查商户平台是否已开启API安全功能");
|
||||
@@ -55,28 +65,48 @@ public class WechatCertAutoConfig {
|
||||
log.error("3. 请验证APIv3密钥和证书序列号是否正确");
|
||||
log.error("4. 请检查网络连接是否正常");
|
||||
log.error("5. 请确认私钥文件路径是否正确: {}", privateKeyPath);
|
||||
|
||||
|
||||
throw new RuntimeException("微信支付自动证书配置失败: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 使用默认开发环境配置创建自动证书配置
|
||||
*
|
||||
* 根据当前环境自动选择证书路径
|
||||
* 开发环境拼接规则:配置文件upload-path + dev/wechat/ + 租户ID
|
||||
*
|
||||
* @return 微信支付配置对象
|
||||
*/
|
||||
public Config createDefaultDevConfig() {
|
||||
String merchantId = "1723321338";
|
||||
String privateKeyPath = "src/main/resources/certs/dev/wechat/apiclient_key.pem";
|
||||
String privateKeyPath;
|
||||
String merchantSerialNumber = "2B933F7C35014A1C363642623E4A62364B34C4EB";
|
||||
String apiV3Key = "0kF5OlPr482EZwtn9zGufUcqa7ovgxRL";
|
||||
|
||||
|
||||
// 根据环境选择证书路径
|
||||
if ("dev".equals(activeProfile)) {
|
||||
// 开发环境:使用配置文件upload-path拼接证书路径
|
||||
String uploadPath = configProperties.getUploadPath(); // 配置文件路径
|
||||
String tenantId = "10550"; // 租户ID
|
||||
String certPath = uploadPath + "dev/wechat/" + tenantId + "/";
|
||||
privateKeyPath = certPath + "apiclient_key.pem";
|
||||
|
||||
log.info("开发环境:使用配置文件upload-path拼接证书路径");
|
||||
log.info("配置文件upload-path: {}", uploadPath);
|
||||
log.info("证书基础路径: {}", certPath);
|
||||
log.info("私钥文件路径: {}", privateKeyPath);
|
||||
} else {
|
||||
// 生产环境:使用相对路径,由系统动态解析
|
||||
privateKeyPath = "src/main/resources/certs/dev/wechat/apiclient_key.pem";
|
||||
log.info("生产环境:使用相对证书路径 - {}", privateKeyPath);
|
||||
}
|
||||
|
||||
return createAutoConfig(merchantId, privateKeyPath, merchantSerialNumber, apiV3Key);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 测试证书配置是否正常
|
||||
*
|
||||
*
|
||||
* @param config 微信支付配置
|
||||
* @return 是否配置成功
|
||||
*/
|
||||
@@ -84,56 +114,56 @@ public class WechatCertAutoConfig {
|
||||
try {
|
||||
// 这里可以添加一些基本的配置验证逻辑
|
||||
log.info("🧪 测试微信支付证书配置...");
|
||||
|
||||
|
||||
if (config == null) {
|
||||
log.error("配置对象为空");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
log.info("✅ 证书配置测试通过");
|
||||
return true;
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("❌ 证书配置测试失败: {}", e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取配置使用说明
|
||||
*
|
||||
*
|
||||
* @return 使用说明
|
||||
*/
|
||||
public String getUsageInstructions() {
|
||||
return """
|
||||
🚀 微信支付自动证书配置使用说明
|
||||
================================
|
||||
|
||||
|
||||
✅ 优势:
|
||||
1. 自动下载微信支付平台证书
|
||||
2. 证书过期时自动更新
|
||||
3. 无需手动管理 wechatpay_cert.pem 文件
|
||||
4. 符合微信支付官方最佳实践
|
||||
|
||||
|
||||
📝 使用方法:
|
||||
|
||||
|
||||
// 方法1: 使用默认开发环境配置
|
||||
Config config = wechatCertAutoConfig.createDefaultDevConfig();
|
||||
|
||||
|
||||
// 方法2: 自定义配置
|
||||
Config config = wechatCertAutoConfig.createAutoConfig(
|
||||
"商户号",
|
||||
"私钥路径",
|
||||
"证书序列号",
|
||||
"商户号",
|
||||
"私钥路径",
|
||||
"证书序列号",
|
||||
"APIv3密钥"
|
||||
);
|
||||
|
||||
|
||||
🔧 前置条件:
|
||||
1. 微信商户平台已开启API安全功能
|
||||
2. 已申请使用微信支付公钥
|
||||
3. 私钥文件存在且路径正确
|
||||
4. 网络连接正常
|
||||
|
||||
|
||||
📚 更多信息:
|
||||
https://pay.weixin.qq.com/doc/v3/merchant/4012153196
|
||||
""";
|
||||
|
||||
@@ -3,12 +3,13 @@ package com.gxwebsoft.common.core.utils;
|
||||
import com.gxwebsoft.common.core.config.CertificateProperties;
|
||||
import com.gxwebsoft.common.system.entity.Payment;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* 微信支付配置验证工具
|
||||
*
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-07-27
|
||||
*/
|
||||
@@ -19,6 +20,9 @@ public class WechatPayConfigValidator {
|
||||
private final CertificateProperties certConfig;
|
||||
private final CertificateLoader certificateLoader;
|
||||
|
||||
@Value("${spring.profiles.active}")
|
||||
private String activeProfile;
|
||||
|
||||
public WechatPayConfigValidator(CertificateProperties certConfig, CertificateLoader certificateLoader) {
|
||||
this.certConfig = certConfig;
|
||||
this.certificateLoader = certificateLoader;
|
||||
@@ -26,34 +30,34 @@ public class WechatPayConfigValidator {
|
||||
|
||||
/**
|
||||
* 验证微信支付配置
|
||||
*
|
||||
*
|
||||
* @param payment 支付配置
|
||||
* @param tenantId 租户ID
|
||||
* @return 验证结果
|
||||
*/
|
||||
public ValidationResult validateWechatPayConfig(Payment payment, Integer tenantId) {
|
||||
ValidationResult result = new ValidationResult();
|
||||
|
||||
|
||||
log.info("开始验证微信支付配置 - 租户ID: {}", tenantId);
|
||||
|
||||
|
||||
// 1. 验证基本配置
|
||||
if (payment == null) {
|
||||
result.addError("支付配置为空");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
if (!StringUtils.hasText(payment.getMchId())) {
|
||||
result.addError("商户号未配置");
|
||||
}
|
||||
|
||||
|
||||
if (!StringUtils.hasText(payment.getAppId())) {
|
||||
result.addError("应用ID未配置");
|
||||
}
|
||||
|
||||
|
||||
if (!StringUtils.hasText(payment.getMerchantSerialNumber())) {
|
||||
result.addError("商户证书序列号未配置");
|
||||
}
|
||||
|
||||
|
||||
// 2. 验证 APIv3 密钥
|
||||
String apiV3Key = getValidApiV3Key(payment);
|
||||
if (!StringUtils.hasText(apiV3Key)) {
|
||||
@@ -61,35 +65,35 @@ public class WechatPayConfigValidator {
|
||||
} else {
|
||||
validateApiV3Key(apiV3Key, result);
|
||||
}
|
||||
|
||||
|
||||
// 3. 验证证书文件
|
||||
validateCertificateFiles(tenantId, result);
|
||||
|
||||
|
||||
// 4. 记录验证结果
|
||||
if (result.isValid()) {
|
||||
log.info("✅ 微信支付配置验证通过 - 租户ID: {}", tenantId);
|
||||
} else {
|
||||
log.error("❌ 微信支付配置验证失败 - 租户ID: {}, 错误: {}", tenantId, result.getErrors());
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取有效的 APIv3 密钥
|
||||
* 优先使用数据库配置,如果为空则使用配置文件默认值
|
||||
*/
|
||||
public String getValidApiV3Key(Payment payment) {
|
||||
String apiV3Key = payment.getApiKey();
|
||||
|
||||
|
||||
if (!StringUtils.hasText(apiV3Key)) {
|
||||
apiV3Key = certConfig.getWechatPay().getDev().getApiV3Key();
|
||||
log.warn("数据库中APIv3密钥为空,使用配置文件默认值");
|
||||
}
|
||||
|
||||
|
||||
return apiV3Key;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 验证 APIv3 密钥格式
|
||||
*/
|
||||
@@ -97,43 +101,49 @@ public class WechatPayConfigValidator {
|
||||
if (apiV3Key.length() != 32) {
|
||||
result.addError("APIv3密钥长度错误,应为32位,实际为: " + apiV3Key.length());
|
||||
}
|
||||
|
||||
|
||||
if (!apiV3Key.matches("^[a-zA-Z0-9]+$")) {
|
||||
result.addError("APIv3密钥格式错误,应仅包含字母和数字");
|
||||
}
|
||||
|
||||
log.info("APIv3密钥验证 - 长度: {}, 格式: {}",
|
||||
apiV3Key.length(),
|
||||
|
||||
log.info("APIv3密钥验证 - 长度: {}, 格式: {}",
|
||||
apiV3Key.length(),
|
||||
apiV3Key.matches("^[a-zA-Z0-9]+$") ? "正确" : "错误");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 验证证书文件
|
||||
*/
|
||||
private void validateCertificateFiles(Integer tenantId, ValidationResult result) {
|
||||
String tenantCertPath = "dev/wechat/" + tenantId;
|
||||
String privateKeyPath = tenantCertPath + "/" + certConfig.getWechatPay().getDev().getPrivateKeyFile();
|
||||
|
||||
if (!certificateLoader.certificateExists(privateKeyPath)) {
|
||||
result.addError("证书文件不存在: " + privateKeyPath);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
String privateKey = certificateLoader.loadCertificatePath(privateKeyPath);
|
||||
log.info("✅ 证书文件验证通过: {}", privateKey);
|
||||
} catch (Exception e) {
|
||||
result.addError("证书文件加载失败: " + e.getMessage());
|
||||
if ("dev".equals(activeProfile)) {
|
||||
// 开发环境证书验证
|
||||
String tenantCertPath = "dev/wechat/" + tenantId;
|
||||
String privateKeyPath = tenantCertPath + "/" + certConfig.getWechatPay().getDev().getPrivateKeyFile();
|
||||
|
||||
if (!certificateLoader.certificateExists(privateKeyPath)) {
|
||||
result.addError("证书文件不存在: " + privateKeyPath);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
certificateLoader.loadCertificatePath(privateKeyPath);
|
||||
log.info("✅ 开发环境证书文件验证通过: {}", privateKeyPath);
|
||||
} catch (Exception e) {
|
||||
result.addError("证书文件加载失败: " + e.getMessage());
|
||||
}
|
||||
} else {
|
||||
// 生产环境证书验证 - 跳过文件存在性检查,因为证书路径来自数据库
|
||||
log.info("✅ 生产环境跳过证书文件存在性验证,使用数据库配置的证书路径");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 验证结果类
|
||||
*/
|
||||
public static class ValidationResult {
|
||||
private boolean valid = true;
|
||||
private StringBuilder errors = new StringBuilder();
|
||||
|
||||
|
||||
public void addError(String error) {
|
||||
this.valid = false;
|
||||
if (errors.length() > 0) {
|
||||
@@ -141,22 +151,22 @@ public class WechatPayConfigValidator {
|
||||
}
|
||||
errors.append(error);
|
||||
}
|
||||
|
||||
|
||||
public boolean isValid() {
|
||||
return valid;
|
||||
}
|
||||
|
||||
|
||||
public String getErrors() {
|
||||
return errors.toString();
|
||||
}
|
||||
|
||||
|
||||
public void logErrors() {
|
||||
if (!valid) {
|
||||
log.error("配置验证失败: {}", errors.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 生成配置诊断报告
|
||||
*/
|
||||
@@ -164,41 +174,50 @@ public class WechatPayConfigValidator {
|
||||
StringBuilder report = new StringBuilder();
|
||||
report.append("=== 微信支付配置诊断报告 ===\n");
|
||||
report.append("租户ID: ").append(tenantId).append("\n");
|
||||
|
||||
|
||||
if (payment != null) {
|
||||
report.append("商户号: ").append(payment.getMchId()).append("\n");
|
||||
report.append("应用ID: ").append(payment.getAppId()).append("\n");
|
||||
report.append("商户证书序列号: ").append(payment.getMerchantSerialNumber()).append("\n");
|
||||
|
||||
|
||||
String dbApiKey = payment.getApiKey();
|
||||
String configApiKey = certConfig.getWechatPay().getDev().getApiV3Key();
|
||||
|
||||
|
||||
report.append("数据库APIv3密钥: ").append(dbApiKey != null ? "已配置(" + dbApiKey.length() + "位)" : "未配置").append("\n");
|
||||
report.append("配置文件APIv3密钥: ").append(configApiKey != null ? "已配置(" + configApiKey.length() + "位)" : "未配置").append("\n");
|
||||
|
||||
|
||||
String finalApiKey = getValidApiV3Key(payment);
|
||||
report.append("最终使用APIv3密钥: ").append(finalApiKey != null ? "已配置(" + finalApiKey.length() + "位)" : "未配置").append("\n");
|
||||
|
||||
|
||||
} else {
|
||||
report.append("❌ 支付配置为空\n");
|
||||
}
|
||||
|
||||
|
||||
// 证书文件检查
|
||||
String tenantCertPath = "dev/wechat/" + tenantId;
|
||||
String privateKeyPath = tenantCertPath + "/" + certConfig.getWechatPay().getDev().getPrivateKeyFile();
|
||||
boolean certExists = certificateLoader.certificateExists(privateKeyPath);
|
||||
|
||||
report.append("证书文件路径: ").append(privateKeyPath).append("\n");
|
||||
report.append("证书文件存在: ").append(certExists ? "是" : "否").append("\n");
|
||||
|
||||
report.append("当前环境: ").append(activeProfile).append("\n");
|
||||
if ("dev".equals(activeProfile)) {
|
||||
String tenantCertPath = "dev/wechat/" + tenantId;
|
||||
String privateKeyPath = tenantCertPath + "/" + certConfig.getWechatPay().getDev().getPrivateKeyFile();
|
||||
boolean certExists = certificateLoader.certificateExists(privateKeyPath);
|
||||
|
||||
report.append("开发环境证书文件路径: ").append(privateKeyPath).append("\n");
|
||||
report.append("证书文件存在: ").append(certExists ? "是" : "否").append("\n");
|
||||
} else {
|
||||
report.append("生产环境证书路径: 从数据库配置获取\n");
|
||||
if (payment != null) {
|
||||
report.append("私钥文件: ").append(payment.getApiclientKey()).append("\n");
|
||||
report.append("证书文件: ").append(payment.getApiclientCert()).append("\n");
|
||||
}
|
||||
}
|
||||
|
||||
ValidationResult validation = validateWechatPayConfig(payment, tenantId);
|
||||
report.append("配置验证结果: ").append(validation.isValid() ? "通过" : "失败").append("\n");
|
||||
if (!validation.isValid()) {
|
||||
report.append("验证错误: ").append(validation.getErrors()).append("\n");
|
||||
}
|
||||
|
||||
|
||||
report.append("=== 诊断报告结束 ===");
|
||||
|
||||
|
||||
return report.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.gxwebsoft.common.core.utils;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
/**
|
||||
* 微信支付工具类
|
||||
* 处理微信支付API的字段限制和格式要求
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-01-11
|
||||
*/
|
||||
public class WechatPayUtils {
|
||||
|
||||
/**
|
||||
* 微信支付description字段的最大字节数限制
|
||||
*/
|
||||
public static final int DESCRIPTION_MAX_BYTES = 127;
|
||||
|
||||
/**
|
||||
* 微信支付attach字段的最大字节数限制
|
||||
*/
|
||||
public static final int ATTACH_MAX_BYTES = 127;
|
||||
|
||||
/**
|
||||
* 截断字符串以确保字节数不超过指定限制
|
||||
* 主要用于微信支付API的字段限制处理
|
||||
*
|
||||
* @param text 原始文本
|
||||
* @param maxBytes 最大字节数
|
||||
* @return 截断后的文本,确保UTF-8字符完整性
|
||||
*/
|
||||
public static String truncateToByteLimit(String text, int maxBytes) {
|
||||
if (text == null || text.isEmpty()) {
|
||||
return text;
|
||||
}
|
||||
|
||||
byte[] bytes = text.getBytes(StandardCharsets.UTF_8);
|
||||
if (bytes.length <= maxBytes) {
|
||||
return text;
|
||||
}
|
||||
|
||||
// 截断字节数组,但要确保不会截断UTF-8字符的中间
|
||||
int truncateLength = maxBytes;
|
||||
while (truncateLength > 0) {
|
||||
byte[] truncated = new byte[truncateLength];
|
||||
System.arraycopy(bytes, 0, truncated, 0, truncateLength);
|
||||
|
||||
try {
|
||||
String result = new String(truncated, StandardCharsets.UTF_8);
|
||||
// 检查是否有无效字符(被截断的UTF-8字符)
|
||||
if (!result.contains("\uFFFD")) {
|
||||
return result;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// 继续尝试更短的长度
|
||||
}
|
||||
truncateLength--;
|
||||
}
|
||||
|
||||
return ""; // 如果无法安全截断,返回空字符串
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理微信支付商品描述字段
|
||||
* 确保字节数不超过127字节
|
||||
*
|
||||
* @param description 商品描述
|
||||
* @return 处理后的描述,符合微信支付要求
|
||||
*/
|
||||
public static String processDescription(String description) {
|
||||
return truncateToByteLimit(description, DESCRIPTION_MAX_BYTES);
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理微信支付附加数据字段
|
||||
* 确保字节数不超过127字节
|
||||
*
|
||||
* @param attach 附加数据
|
||||
* @return 处理后的附加数据,符合微信支付要求
|
||||
*/
|
||||
public static String processAttach(String attach) {
|
||||
return truncateToByteLimit(attach, ATTACH_MAX_BYTES);
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证字符串是否符合微信支付字段的字节限制
|
||||
*
|
||||
* @param text 待验证的文本
|
||||
* @param maxBytes 最大字节数限制
|
||||
* @return true如果符合限制,false如果超出限制
|
||||
*/
|
||||
public static boolean isWithinByteLimit(String text, int maxBytes) {
|
||||
if (text == null) {
|
||||
return true;
|
||||
}
|
||||
return text.getBytes(StandardCharsets.UTF_8).length <= maxBytes;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字符串的UTF-8字节数
|
||||
*
|
||||
* @param text 文本
|
||||
* @return 字节数
|
||||
*/
|
||||
public static int getByteLength(String text) {
|
||||
if (text == null) {
|
||||
return 0;
|
||||
}
|
||||
return text.getBytes(StandardCharsets.UTF_8).length;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user