Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # src/main/java/com/gxwebsoft/shop/dto/OrderCreateRequest.java # src/main/java/com/gxwebsoft/shop/service/OrderBusinessService.java
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -133,13 +133,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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,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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.gxwebsoft.house.entity.HouseViewsLog;
|
||||
import com.gxwebsoft.house.service.HouseInfoService;
|
||||
import com.gxwebsoft.house.entity.HouseInfo;
|
||||
import com.gxwebsoft.house.param.HouseInfoParam;
|
||||
import com.gxwebsoft.house.util.SortSceneUtil;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
@@ -44,10 +45,17 @@ public class HouseInfoController extends BaseController {
|
||||
@Operation(summary = "分页查询房源信息表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<HouseInfo>> page(HouseInfoParam param) {
|
||||
// 标准化排序参数,解决URL编码问题
|
||||
if (param.getSortScene() != null) {
|
||||
String normalizedSortScene = SortSceneUtil.normalizeSortScene(param.getSortScene());
|
||||
param.setSortScene(normalizedSortScene);
|
||||
}
|
||||
|
||||
// 使用关联查询
|
||||
return success(houseInfoService.pageRel(param));
|
||||
}
|
||||
|
||||
|
||||
@PreAuthorize("hasAuthority('house:houseInfo:list')")
|
||||
@Operation(summary = "查询全部房源信息表")
|
||||
@GetMapping()
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.gxwebsoft.house.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.house.entity.HouseInfo;
|
||||
import com.gxwebsoft.house.service.HouseInfoService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 房源测试数据控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-08-07
|
||||
*/
|
||||
@Tag(name = "房源测试数据管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/house/test-data")
|
||||
public class HouseTestDataController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private HouseInfoService houseInfoService;
|
||||
|
||||
@Operation(summary = "创建测试数据")
|
||||
@PostMapping("/create")
|
||||
public ApiResult<?> createTestData() {
|
||||
try {
|
||||
// 创建5个测试房源,价格不同
|
||||
createTestHouse("碧园大厦B", "223", new BigDecimal("8920"), 10058);
|
||||
createTestHouse("碧园大厦B", "155", new BigDecimal("6200"), 10058);
|
||||
createTestHouse("碧园大厦B", "92", new BigDecimal("3680"), 10058);
|
||||
createTestHouse("龙光国际A", "99", new BigDecimal("4455"), 10058);
|
||||
createTestHouse("万达广场C", "120", new BigDecimal("5500"), 10058);
|
||||
|
||||
return success("测试数据创建成功!");
|
||||
} catch (Exception e) {
|
||||
return fail("创建测试数据失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private void createTestHouse(String title, String extent, BigDecimal monthlyRent, Integer tenantId) {
|
||||
HouseInfo house = new HouseInfo();
|
||||
house.setHouseTitle(title);
|
||||
house.setExtent(extent);
|
||||
house.setMonthlyRent(monthlyRent);
|
||||
house.setRent(monthlyRent);
|
||||
house.setTenantId(tenantId);
|
||||
house.setStatus(0); // 通过状态
|
||||
house.setDeleted(0);
|
||||
house.setRecommend(0);
|
||||
house.setUserId(1);
|
||||
house.setCreateTime(new Date());
|
||||
house.setUpdateTime(new Date());
|
||||
house.setCityByHouse("南宁");
|
||||
house.setHouseType("办公室");
|
||||
house.setLeaseMethod("整租");
|
||||
house.setFloor("10层");
|
||||
house.setRealName("测试用户");
|
||||
house.setPhone("13800138000");
|
||||
house.setProvince("广西");
|
||||
house.setCity("南宁");
|
||||
house.setRegion("青秀区");
|
||||
house.setAddress("测试地址");
|
||||
|
||||
houseInfoService.save(house);
|
||||
}
|
||||
}
|
||||
@@ -128,6 +128,14 @@
|
||||
OR a.room_number LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
<!-- 价格区间筛选 -->
|
||||
<if test="param.priceScene != null and param.priceScene.indexOf('~') > -1">
|
||||
<bind name="priceMin" value="param.priceScene.substring(0, param.priceScene.indexOf('~'))" />
|
||||
<bind name="priceMax" value="param.priceScene.substring(param.priceScene.indexOf('~') + 1)" />
|
||||
AND a.monthly_rent >= CAST(#{priceMin} AS DECIMAL(10,2))
|
||||
AND a.monthly_rent <= CAST(#{priceMax} AS DECIMAL(10,2))
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<trim prefix="ORDER BY" suffixOverrides=",">
|
||||
<if test="param.sortScene == '综合排序'">
|
||||
@@ -137,24 +145,37 @@
|
||||
a.create_time desc,
|
||||
</if>
|
||||
<if test="param.sortScene == '价格(低-高)'">
|
||||
a.monthly_rent asc,
|
||||
CAST(IFNULL(a.monthly_rent, 0) AS DECIMAL(10,2)) asc,
|
||||
</if>
|
||||
<if test="param.sortScene == '价格(高-低)'">
|
||||
a.monthly_rent desc,
|
||||
CAST(IFNULL(a.monthly_rent, 0) AS DECIMAL(10,2)) desc,
|
||||
</if>
|
||||
<if test="param.sortScene == '面积(小-大)'">
|
||||
a.extent asc,
|
||||
CASE WHEN a.extent IS NULL OR a.extent = '' THEN 1 ELSE 0 END,
|
||||
CAST(COALESCE(NULLIF(a.extent, ''), '0') AS DECIMAL(10,2)) asc,
|
||||
</if>
|
||||
<if test="param.sortScene == '面积(大-小)'">
|
||||
a.extent desc,
|
||||
CASE WHEN a.extent IS NULL OR a.extent = '' THEN 1 ELSE 0 END,
|
||||
CAST(COALESCE(NULLIF(a.extent, ''), '0') AS DECIMAL(10,2)) desc,
|
||||
</if>
|
||||
<if test="param.priceScene != null">
|
||||
ABS(a.monthly_rent - #{param.priceScene}),
|
||||
<if test="param.priceScene != null and param.priceScene.indexOf('~') == -1">
|
||||
ABS(CAST(COALESCE(a.monthly_rent, 0) AS DECIMAL(10,2)) - CAST(#{param.priceScene} AS DECIMAL(10,2))),
|
||||
</if>
|
||||
|
||||
<if test="param.extentScene != null">
|
||||
ABS(a.extent - #{param.extentScene}),
|
||||
<if test="param.extentScene != null and param.extentScene.indexOf('~') == -1">
|
||||
ABS(CAST(COALESCE(NULLIF(a.extent, ''), '0') AS DECIMAL(10,2)) - CAST(#{param.extentScene} AS DECIMAL(10,2))),
|
||||
</if>
|
||||
<!-- 默认排序:只有在没有指定排序场景时才使用 -->
|
||||
<if test="param.sortScene == null or param.sortScene == '' or param.sortScene == '综合排序'">
|
||||
a.sort_number asc, a.create_time desc
|
||||
</if>
|
||||
<if test="param.sortScene == '最新发布'">
|
||||
<!-- 最新发布已经在上面处理了 -->
|
||||
</if>
|
||||
<if test="param.sortScene != null and param.sortScene != '' and param.sortScene != '综合排序' and param.sortScene != '最新发布' and param.sortScene != '价格(低-高)' and param.sortScene != '价格(高-低)' and param.sortScene != '面积(小-大)' and param.sortScene != '面积(大-小)'">
|
||||
a.create_time desc
|
||||
</if>
|
||||
<!-- 默认排序:推荐优先,然后按创建时间倒序 -->
|
||||
a.recommend desc, a.create_time desc
|
||||
</trim>
|
||||
|
||||
</sql>
|
||||
|
||||
@@ -63,7 +63,10 @@ public class HouseInfoServiceImpl extends ServiceImpl<HouseInfoMapper, HouseInfo
|
||||
@Override
|
||||
public PageResult<HouseInfo> pageRel(HouseInfoParam param) {
|
||||
PageParam<HouseInfo, HouseInfoParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
// 只有在没有指定排序场景时才设置默认排序
|
||||
if (param.getSortScene() == null || param.getSortScene().isEmpty()) {
|
||||
page.setDefaultOrder("create_time desc");
|
||||
}
|
||||
List<HouseInfo> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
@@ -73,7 +76,10 @@ public class HouseInfoServiceImpl extends ServiceImpl<HouseInfoMapper, HouseInfo
|
||||
List<HouseInfo> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<HouseInfo, HouseInfoParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("create_time desc");
|
||||
// 只有在没有指定排序场景时才使用默认排序
|
||||
if (param.getSortScene() == null || param.getSortScene().isEmpty()) {
|
||||
page.setDefaultOrder("create_time desc");
|
||||
}
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@@ -182,7 +188,7 @@ public class HouseInfoServiceImpl extends ServiceImpl<HouseInfoMapper, HouseInfo
|
||||
combiner.combine();
|
||||
|
||||
// 创建保存目录
|
||||
String posterDir = uploadPath + "file/poster/" + houseInfo.getTenantId() + "/house";
|
||||
String posterDir = uploadPath + "/file/poster/" + houseInfo.getTenantId() + "/house";
|
||||
if (!FileUtil.exist(posterDir)) {
|
||||
FileUtil.mkdir(posterDir);
|
||||
}
|
||||
@@ -190,8 +196,8 @@ public class HouseInfoServiceImpl extends ServiceImpl<HouseInfoMapper, HouseInfo
|
||||
// 生成文件路径
|
||||
String basePath = "/poster/" + houseInfo.getTenantId() + "/house/big-" + houseInfo.getHouseId() + ".jpg";
|
||||
String smallPath = "/poster/" + houseInfo.getTenantId() + "/house/" + houseInfo.getHouseId() + ".jpg";
|
||||
String filename = uploadPath + "file" + basePath;
|
||||
String smallFileName = uploadPath + "file" + smallPath;
|
||||
String filename = uploadPath + "/file" + basePath;
|
||||
String smallFileName = uploadPath + "/file" + smallPath;
|
||||
|
||||
// 保存原图
|
||||
combiner.save(filename);
|
||||
|
||||
128
src/main/java/com/gxwebsoft/house/util/SortSceneUtil.java
Normal file
128
src/main/java/com/gxwebsoft/house/util/SortSceneUtil.java
Normal file
@@ -0,0 +1,128 @@
|
||||
package com.gxwebsoft.house.util;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
|
||||
/**
|
||||
* 排序场景工具类
|
||||
* 用于处理前端传递的排序参数,解决URL编码和字符串匹配问题
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-08-04
|
||||
*/
|
||||
public class SortSceneUtil {
|
||||
|
||||
/**
|
||||
* 标准化排序场景参数
|
||||
* @param sortScene 原始排序场景参数
|
||||
* @return 标准化后的排序场景参数
|
||||
*/
|
||||
public static String normalizeSortScene(String sortScene) {
|
||||
if (StrUtil.isBlank(sortScene)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 尝试URL解码
|
||||
String decoded = sortScene;
|
||||
try {
|
||||
// 如果包含%,尝试URL解码
|
||||
if (sortScene.contains("%")) {
|
||||
decoded = URLDecoder.decode(sortScene, "UTF-8");
|
||||
}
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
// 解码失败,使用原始值
|
||||
decoded = sortScene;
|
||||
}
|
||||
|
||||
// 去除首尾空格
|
||||
decoded = decoded.trim();
|
||||
|
||||
// 标准化常见的排序场景
|
||||
if (decoded.contains("价格") && decoded.contains("低") && decoded.contains("高")) {
|
||||
if (decoded.contains("低-高") || decoded.contains("低到高") || decoded.contains("升序")) {
|
||||
return "价格(低-高)";
|
||||
} else if (decoded.contains("高-低") || decoded.contains("高到低") || decoded.contains("降序")) {
|
||||
return "价格(高-低)";
|
||||
}
|
||||
}
|
||||
|
||||
if (decoded.contains("面积") && decoded.contains("小") && decoded.contains("大")) {
|
||||
if (decoded.contains("小-大") || decoded.contains("小到大") || decoded.contains("升序")) {
|
||||
return "面积(小-大)";
|
||||
} else if (decoded.contains("大-小") || decoded.contains("大到小") || decoded.contains("降序")) {
|
||||
return "面积(大-小)";
|
||||
}
|
||||
}
|
||||
|
||||
if (decoded.contains("最新") || decoded.contains("时间") || decoded.contains("发布")) {
|
||||
return "最新发布";
|
||||
}
|
||||
|
||||
if (decoded.contains("综合") || decoded.contains("默认")) {
|
||||
return "综合排序";
|
||||
}
|
||||
|
||||
return decoded;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否为价格升序排序
|
||||
* @param sortScene 排序场景参数
|
||||
* @return true表示价格升序
|
||||
*/
|
||||
public static boolean isPriceAsc(String sortScene) {
|
||||
String normalized = normalizeSortScene(sortScene);
|
||||
return "价格(低-高)".equals(normalized);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否为价格降序排序
|
||||
* @param sortScene 排序场景参数
|
||||
* @return true表示价格降序
|
||||
*/
|
||||
public static boolean isPriceDesc(String sortScene) {
|
||||
String normalized = normalizeSortScene(sortScene);
|
||||
return "价格(高-低)".equals(normalized);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否为面积升序排序
|
||||
* @param sortScene 排序场景参数
|
||||
* @return true表示面积升序
|
||||
*/
|
||||
public static boolean isAreaAsc(String sortScene) {
|
||||
String normalized = normalizeSortScene(sortScene);
|
||||
return "面积(小-大)".equals(normalized);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否为面积降序排序
|
||||
* @param sortScene 排序场景参数
|
||||
* @return true表示面积降序
|
||||
*/
|
||||
public static boolean isAreaDesc(String sortScene) {
|
||||
String normalized = normalizeSortScene(sortScene);
|
||||
return "面积(大-小)".equals(normalized);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否为最新发布排序
|
||||
* @param sortScene 排序场景参数
|
||||
* @return true表示最新发布排序
|
||||
*/
|
||||
public static boolean isLatest(String sortScene) {
|
||||
String normalized = normalizeSortScene(sortScene);
|
||||
return "最新发布".equals(normalized);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否为综合排序
|
||||
* @param sortScene 排序场景参数
|
||||
* @return true表示综合排序
|
||||
*/
|
||||
public static boolean isComprehensive(String sortScene) {
|
||||
String normalized = normalizeSortScene(sortScene);
|
||||
return "综合排序".equals(normalized);
|
||||
}
|
||||
}
|
||||
@@ -39,12 +39,12 @@ public class OrderConfigProperties {
|
||||
* 测试手机号列表
|
||||
*/
|
||||
private List<String> phoneNumbers;
|
||||
|
||||
|
||||
/**
|
||||
* 测试支付金额
|
||||
*/
|
||||
private BigDecimal testPayAmount = new BigDecimal("0.01");
|
||||
|
||||
|
||||
/**
|
||||
* 是否启用测试模式
|
||||
*/
|
||||
@@ -57,22 +57,22 @@ public class OrderConfigProperties {
|
||||
* 租户ID
|
||||
*/
|
||||
private Integer tenantId;
|
||||
|
||||
|
||||
/**
|
||||
* 租户名称
|
||||
*/
|
||||
private String tenantName;
|
||||
|
||||
|
||||
/**
|
||||
* 最小金额限制
|
||||
*/
|
||||
private BigDecimal minAmount;
|
||||
|
||||
|
||||
/**
|
||||
* 金额限制提示信息
|
||||
*/
|
||||
private String minAmountMessage;
|
||||
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
@@ -81,16 +81,22 @@ public class OrderConfigProperties {
|
||||
|
||||
@Data
|
||||
public static class DefaultConfig {
|
||||
|
||||
/**
|
||||
* 默认标题
|
||||
*/
|
||||
private String defaultTitle = "订单标题";
|
||||
|
||||
/**
|
||||
* 默认备注
|
||||
*/
|
||||
private String defaultComments = "暂无";
|
||||
|
||||
|
||||
/**
|
||||
* 最小订单金额
|
||||
*/
|
||||
private BigDecimal minOrderAmount = BigDecimal.ZERO;
|
||||
|
||||
|
||||
/**
|
||||
* 订单超时时间(分钟)
|
||||
*/
|
||||
@@ -101,8 +107,8 @@ public class OrderConfigProperties {
|
||||
* 检查是否为测试账号
|
||||
*/
|
||||
public boolean isTestAccount(String phone) {
|
||||
return testAccount.isEnabled() &&
|
||||
testAccount.getPhoneNumbers() != null &&
|
||||
return testAccount.isEnabled() &&
|
||||
testAccount.getPhoneNumbers() != null &&
|
||||
testAccount.getPhoneNumbers().contains(phone);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
package com.gxwebsoft.shop.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.shop.entity.ShopUserCoupon;
|
||||
import com.gxwebsoft.shop.service.CouponBusinessService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 优惠券业务控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-08-08 22:30:00
|
||||
*/
|
||||
@Tag(name = "优惠券业务管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/shop/coupon-business")
|
||||
public class CouponBusinessController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private CouponBusinessService couponBusinessService;
|
||||
|
||||
@Operation(summary = "获取订单可用优惠券")
|
||||
@PostMapping("/available-for-order")
|
||||
public ApiResult<List<ShopUserCoupon>> getAvailableCouponsForOrder(
|
||||
@RequestBody Map<String, Object> orderData) {
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser == null) {
|
||||
return fail("请先登录", null);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Map<String, Object>> goodsItems = (List<Map<String, Object>>) orderData.get("goodsItems");
|
||||
BigDecimal totalAmount = new BigDecimal(orderData.get("totalAmount").toString());
|
||||
|
||||
List<ShopUserCoupon> coupons = couponBusinessService.getAvailableCouponsForOrder(
|
||||
loginUser.getUserId(), goodsItems, totalAmount);
|
||||
|
||||
return success(coupons);
|
||||
}
|
||||
|
||||
@Operation(summary = "计算使用优惠券后的订单金额")
|
||||
@PostMapping("/calculate-order-amount")
|
||||
public ApiResult<Map<String, Object>> calculateOrderAmountWithCoupon(
|
||||
@RequestParam Long userCouponId,
|
||||
@RequestBody Map<String, Object> orderData) {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Map<String, Object>> goodsItems = (List<Map<String, Object>>) orderData.get("goodsItems");
|
||||
BigDecimal totalAmount = new BigDecimal(orderData.get("totalAmount").toString());
|
||||
|
||||
Map<String, Object> result = couponBusinessService.calculateOrderAmountWithCoupon(
|
||||
userCouponId, goodsItems, totalAmount);
|
||||
|
||||
return success(result);
|
||||
}
|
||||
|
||||
@Operation(summary = "验证优惠券是否可用于订单")
|
||||
@PostMapping("/validate-for-order")
|
||||
public ApiResult<Map<String, Object>> validateCouponForOrder(
|
||||
@RequestParam Long userCouponId,
|
||||
@RequestBody Map<String, Object> orderData) {
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser == null) {
|
||||
return fail("请先登录", null);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Map<String, Object>> goodsItems = (List<Map<String, Object>>) orderData.get("goodsItems");
|
||||
BigDecimal totalAmount = new BigDecimal(orderData.get("totalAmount").toString());
|
||||
|
||||
Map<String, Object> result = couponBusinessService.validateCouponForOrder(
|
||||
userCouponId, loginUser.getUserId(), goodsItems, totalAmount);
|
||||
|
||||
return success(result);
|
||||
}
|
||||
|
||||
@Operation(summary = "推荐最优优惠券组合")
|
||||
@PostMapping("/recommend-best-combination")
|
||||
public ApiResult<Map<String, Object>> recommendBestCouponCombination(
|
||||
@RequestBody Map<String, Object> orderData) {
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser == null) {
|
||||
return fail("请先登录", null);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Map<String, Object>> goodsItems = (List<Map<String, Object>>) orderData.get("goodsItems");
|
||||
BigDecimal totalAmount = new BigDecimal(orderData.get("totalAmount").toString());
|
||||
|
||||
Map<String, Object> result = couponBusinessService.recommendBestCouponCombination(
|
||||
loginUser.getUserId(), goodsItems, totalAmount);
|
||||
|
||||
return success(result);
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:coupon:manage')")
|
||||
@OperationLog
|
||||
@Operation(summary = "为新用户发放欢迎优惠券")
|
||||
@PostMapping("/issue-welcome/{userId}")
|
||||
public ApiResult<?> issueWelcomeCoupons(@PathVariable Integer userId) {
|
||||
int count = couponBusinessService.issueWelcomeCoupons(userId);
|
||||
return success("成功发放" + count + "张欢迎优惠券");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:coupon:manage')")
|
||||
@OperationLog
|
||||
@Operation(summary = "为用户发放生日优惠券")
|
||||
@PostMapping("/issue-birthday/{userId}")
|
||||
public ApiResult<?> issueBirthdayCoupons(@PathVariable Integer userId) {
|
||||
int count = couponBusinessService.issueBirthdayCoupons(userId);
|
||||
return success("成功发放" + count + "张生日优惠券");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:coupon:manage')")
|
||||
@OperationLog
|
||||
@Operation(summary = "根据消费金额发放优惠券")
|
||||
@PostMapping("/issue-consume/{userId}")
|
||||
public ApiResult<?> issueConsumeCoupons(@PathVariable Integer userId,
|
||||
@RequestParam BigDecimal consumeAmount) {
|
||||
int count = couponBusinessService.issueConsumeCoupons(userId, consumeAmount);
|
||||
return success("成功发放" + count + "张消费返券");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:coupon:manage')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量发放活动优惠券")
|
||||
@PostMapping("/batch-issue-activity")
|
||||
public ApiResult<Map<String, Object>> batchIssueActivityCoupons(
|
||||
@RequestParam String activityName,
|
||||
@RequestParam List<Integer> couponIds,
|
||||
@RequestParam(required = false) List<Integer> userIds) {
|
||||
|
||||
Map<String, Object> result = couponBusinessService.batchIssueActivityCoupons(
|
||||
activityName, couponIds, userIds);
|
||||
|
||||
return success(result);
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:coupon:statistics')")
|
||||
@Operation(summary = "获取优惠券使用统计")
|
||||
@GetMapping("/usage-statistics")
|
||||
public ApiResult<Map<String, Object>> getCouponUsageStatistics(
|
||||
@RequestParam(required = false) String startDate,
|
||||
@RequestParam(required = false) String endDate) {
|
||||
|
||||
Map<String, Object> statistics = couponBusinessService.getCouponUsageStatistics(startDate, endDate);
|
||||
return success(statistics);
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:coupon:manage')")
|
||||
@OperationLog
|
||||
@Operation(summary = "手动处理过期优惠券")
|
||||
@PostMapping("/process-expired")
|
||||
public ApiResult<?> processExpiredCoupons() {
|
||||
int count = couponBusinessService.autoProcessExpiredCoupons();
|
||||
return success("处理了" + count + "张过期优惠券");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:coupon:manage')")
|
||||
@OperationLog
|
||||
@Operation(summary = "发送优惠券到期提醒")
|
||||
@PostMapping("/send-expiry-reminder")
|
||||
public ApiResult<?> sendExpiryReminder(@RequestParam(defaultValue = "3") Integer days) {
|
||||
int count = couponBusinessService.sendCouponExpiryReminder(days);
|
||||
return success("向" + count + "个用户发送了到期提醒");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
package com.gxwebsoft.shop.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.shop.entity.ShopCoupon;
|
||||
import com.gxwebsoft.shop.param.ShopCouponParam;
|
||||
import com.gxwebsoft.shop.service.ShopCouponService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 优惠券控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-08-08 21:10:55
|
||||
*/
|
||||
@Tag(name = "优惠券管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/shop/shop-coupon")
|
||||
public class ShopCouponController extends BaseController {
|
||||
@Resource
|
||||
private ShopCouponService shopCouponService;
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:shopCoupon:list')")
|
||||
@Operation(summary = "批量修改优惠券")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<ShopCoupon>> page(ShopCouponParam param) {
|
||||
// 使用关联查询
|
||||
return success(shopCouponService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:shopCoupon:list')")
|
||||
@Operation(summary = "查询全部优惠券")
|
||||
@GetMapping()
|
||||
public ApiResult<List<ShopCoupon>> list(ShopCouponParam param) {
|
||||
// 使用关联查询
|
||||
return success(shopCouponService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:shopCoupon:list')")
|
||||
@Operation(summary = "根据id查询优惠券")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<ShopCoupon> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(shopCouponService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:shopCoupon:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "添加优惠券")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody ShopCoupon shopCoupon) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
shopCoupon.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (shopCouponService.save(shopCoupon)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:shopCoupon:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "修改优惠券")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody ShopCoupon shopCoupon) {
|
||||
if (shopCouponService.updateById(shopCoupon)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:shopCoupon:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "删除优惠券")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (shopCouponService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:shopCoupon:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量添加优惠券")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<ShopCoupon> list) {
|
||||
if (shopCouponService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:shopCoupon:update')")
|
||||
@Operation(summary = "批量修改优惠券")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<ShopCoupon> batchParam) {
|
||||
if (batchParam.update(shopCouponService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:shopCoupon:remove')")
|
||||
@Operation(summary = "批量删除优惠券")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (shopCouponService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -212,6 +212,12 @@ public class ShopOrderController extends BaseController {
|
||||
return fail("修复失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "统计订单总金额")
|
||||
@GetMapping("/total")
|
||||
public ApiResult<BigDecimal> total() {
|
||||
return success(shopOrderService.total());
|
||||
}
|
||||
|
||||
@Schema(description = "异步通知")
|
||||
@PostMapping("/notify/{tenantId}")
|
||||
public String wxNotify(@RequestHeader Map<String, String> header, @RequestBody String body, @PathVariable("tenantId") Integer tenantId) {
|
||||
|
||||
@@ -0,0 +1,225 @@
|
||||
package com.gxwebsoft.shop.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.shop.entity.ShopUserCoupon;
|
||||
import com.gxwebsoft.shop.param.ShopUserCouponParam;
|
||||
import com.gxwebsoft.shop.service.ShopUserCouponService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 用户优惠券控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-08-08 21:30:00
|
||||
*/
|
||||
@Tag(name = "用户优惠券管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/shop/user-coupon")
|
||||
public class ShopUserCouponController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private ShopUserCouponService shopUserCouponService;
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:userCoupon:list')")
|
||||
@Operation(summary = "分页查询用户优惠券")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<ShopUserCoupon>> page(ShopUserCouponParam param) {
|
||||
return success(shopUserCouponService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:userCoupon:list')")
|
||||
@Operation(summary = "查询用户优惠券列表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<ShopUserCoupon>> list(ShopUserCouponParam param) {
|
||||
return success(shopUserCouponService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:userCoupon:list')")
|
||||
@Operation(summary = "根据id查询用户优惠券")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<ShopUserCoupon> get(@PathVariable("id") Long id) {
|
||||
return success(shopUserCouponService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "获取当前用户的优惠券列表")
|
||||
@GetMapping("/my")
|
||||
public ApiResult<List<ShopUserCoupon>> getMyCoupons(ShopUserCouponParam param) {
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser == null) {
|
||||
return fail("请先登录",null);
|
||||
}
|
||||
param.setUserId(loginUser.getUserId());
|
||||
return success(shopUserCouponService.listRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "获取当前用户可用的优惠券")
|
||||
@GetMapping("/my/available")
|
||||
public ApiResult<List<ShopUserCoupon>> getMyAvailableCoupons(
|
||||
@RequestParam(required = false) Integer goodsId,
|
||||
@RequestParam(required = false) Integer categoryId,
|
||||
@RequestParam(required = false) BigDecimal orderAmount) {
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser == null) {
|
||||
return fail("请先登录",null);
|
||||
}
|
||||
|
||||
List<ShopUserCoupon> coupons = shopUserCouponService.getAvailableCoupons(
|
||||
loginUser.getUserId(), goodsId, categoryId, orderAmount);
|
||||
return success(coupons);
|
||||
}
|
||||
|
||||
@Operation(summary = "统计当前用户优惠券数量")
|
||||
@GetMapping("/my/count")
|
||||
public ApiResult<Map<String, Object>> getMyCount() {
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser == null) {
|
||||
return fail("请先登录",null);
|
||||
}
|
||||
|
||||
Map<String, Object> count = shopUserCouponService.countUserCoupons(loginUser.getUserId());
|
||||
return success(count);
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@Operation(summary = "领取优惠券")
|
||||
@PostMapping("/receive/{couponId}")
|
||||
public ApiResult<?> receiveCoupon(@PathVariable("couponId") Integer couponId) {
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser == null) {
|
||||
return fail("请先登录",null);
|
||||
}
|
||||
|
||||
// 检查是否可以领取
|
||||
Map<String, Object> checkResult = shopUserCouponService.checkCanReceiveCoupon(
|
||||
loginUser.getUserId(), couponId);
|
||||
|
||||
if (!(Boolean) checkResult.get("canReceive")) {
|
||||
return fail(checkResult.get("reason").toString());
|
||||
}
|
||||
|
||||
boolean success = shopUserCouponService.receiveCoupon(loginUser.getUserId(), couponId);
|
||||
if (success) {
|
||||
return success("领取成功");
|
||||
}
|
||||
return fail("领取失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:userCoupon:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "系统发放优惠券给用户")
|
||||
@PostMapping("/issue")
|
||||
public ApiResult<?> issueCoupon(@RequestParam Integer userId,
|
||||
@RequestParam Integer couponId,
|
||||
@RequestParam(required = false) String source) {
|
||||
boolean success = shopUserCouponService.issueCouponToUser(userId, couponId, source);
|
||||
if (success) {
|
||||
return success("发放成功");
|
||||
}
|
||||
return fail("发放失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:userCoupon:save')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量发放优惠券")
|
||||
@PostMapping("/batch-issue")
|
||||
public ApiResult<?> batchIssueCoupons(@RequestParam List<Integer> userIds,
|
||||
@RequestParam Integer couponId,
|
||||
@RequestParam(required = false) String source) {
|
||||
int successCount = shopUserCouponService.batchIssueCoupons(userIds, couponId, source);
|
||||
return success("成功发放" + successCount + "张优惠券");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:userCoupon:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "使用优惠券")
|
||||
@PutMapping("/use")
|
||||
public ApiResult<?> useCoupon(@RequestParam Long userCouponId,
|
||||
@RequestParam Long orderId,
|
||||
@RequestParam String orderNo) {
|
||||
boolean success = shopUserCouponService.useCoupon(userCouponId, orderId, orderNo);
|
||||
if (success) {
|
||||
return success("使用成功");
|
||||
}
|
||||
return fail("使用失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:userCoupon:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "退还优惠券")
|
||||
@PutMapping("/return/{orderId}")
|
||||
public ApiResult<?> returnCoupon(@PathVariable("orderId") Long orderId) {
|
||||
boolean success = shopUserCouponService.returnCoupon(orderId);
|
||||
if (success) {
|
||||
return success("退还成功");
|
||||
}
|
||||
return fail("退还失败");
|
||||
}
|
||||
|
||||
@Operation(summary = "计算优惠券优惠金额")
|
||||
@PostMapping("/calculate-discount")
|
||||
public ApiResult<BigDecimal> calculateDiscount(@RequestParam Long userCouponId,
|
||||
@RequestParam BigDecimal orderAmount) {
|
||||
ShopUserCoupon userCoupon = shopUserCouponService.getById(userCouponId);
|
||||
if (userCoupon == null) {
|
||||
return fail("优惠券不存在",null);
|
||||
}
|
||||
|
||||
BigDecimal discountAmount = shopUserCouponService.calculateDiscountAmount(userCoupon, orderAmount);
|
||||
return success(discountAmount);
|
||||
}
|
||||
|
||||
@Operation(summary = "验证优惠券是否可用于指定商品")
|
||||
@GetMapping("/validate")
|
||||
public ApiResult<Boolean> validateCoupon(@RequestParam Long userCouponId,
|
||||
@RequestParam(required = false) Integer goodsId,
|
||||
@RequestParam(required = false) Integer categoryId) {
|
||||
ShopUserCoupon userCoupon = shopUserCouponService.getById(userCouponId);
|
||||
if (userCoupon == null) {
|
||||
return fail("优惠券不存在",null);
|
||||
}
|
||||
|
||||
boolean valid = shopUserCouponService.validateCouponForGoods(userCoupon, goodsId, categoryId);
|
||||
return success(valid);
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:userCoupon:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "更新过期优惠券状态")
|
||||
@PutMapping("/update-expired")
|
||||
public ApiResult<?> updateExpiredCoupons() {
|
||||
int count = shopUserCouponService.updateExpiredCoupons();
|
||||
return success("更新了" + count + "张过期优惠券");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:userCoupon:list')")
|
||||
@Operation(summary = "获取即将过期的优惠券")
|
||||
@GetMapping("/expiring-soon")
|
||||
public ApiResult<List<ShopUserCoupon>> getExpiringSoonCoupons(
|
||||
@RequestParam(defaultValue = "3") Integer days) {
|
||||
List<ShopUserCoupon> coupons = shopUserCouponService.getExpiringSoonCoupons(days);
|
||||
return success(coupons);
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('shop:userCoupon:remove')")
|
||||
@OperationLog
|
||||
@Operation(summary = "删除用户优惠券")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Long id) {
|
||||
if (shopUserCouponService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,8 @@ package com.gxwebsoft.shop.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
@@ -24,6 +24,10 @@ public class OrderCreateRequest {
|
||||
@Max(value = 2, message = "订单类型值无效")
|
||||
private Integer type;
|
||||
|
||||
@Size(max = 60, message = "备注长度不能超过60个字符")
|
||||
@Schema(description = "订单标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "快递/自提")
|
||||
private Integer deliveryType;
|
||||
|
||||
@@ -45,9 +49,15 @@ public class OrderCreateRequest {
|
||||
@Schema(description = "使用的会员卡id")
|
||||
private String cardId;
|
||||
|
||||
@Schema(description = "关联收货地址")
|
||||
private Integer addressId;
|
||||
|
||||
@Schema(description = "收货地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "收货人姓名")
|
||||
private String realName;
|
||||
|
||||
@Schema(description = "地址纬度")
|
||||
private String addressLat;
|
||||
|
||||
@@ -105,18 +115,6 @@ public class OrderCreateRequest {
|
||||
@Schema(description = "来源ID,存商品ID")
|
||||
private Integer formId;
|
||||
|
||||
@Schema(description = "商品ID(兼容字段)")
|
||||
@JsonProperty("goodsId")
|
||||
private Integer goodsId;
|
||||
|
||||
@Schema(description = "购买数量(兼容字段)")
|
||||
@JsonProperty("quantity")
|
||||
private Integer quantity;
|
||||
|
||||
@Schema(description = "商品项目列表(支持多商品下单)")
|
||||
@JsonProperty("goodsItems")
|
||||
private List<GoodsItem> goodsItems;
|
||||
|
||||
@Schema(description = "支付类型,0余额支付, 1微信支付,102微信Native,2会员卡支付,3支付宝,4现金,5POS机,6VIP月卡,7VIP年卡,8VIP次卡,9IC月卡,10IC年卡,11IC次卡,12免费,13VIP充值卡,14IC充值卡,15积分支付,16VIP季卡,17IC季卡,18代付")
|
||||
private Integer payType;
|
||||
|
||||
@@ -143,54 +141,33 @@ public class OrderCreateRequest {
|
||||
@NotNull(message = "租户ID不能为空")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "订单商品列表")
|
||||
@Valid
|
||||
@NotEmpty(message = "订单商品列表不能为空")
|
||||
private List<OrderGoodsItem> goodsItems;
|
||||
|
||||
/**
|
||||
* 商品项目内部类
|
||||
* 订单商品项
|
||||
*/
|
||||
@Data
|
||||
@Schema(name = "GoodsItem", description = "商品项目")
|
||||
public static class GoodsItem {
|
||||
@Schema(description = "商品ID")
|
||||
@JsonProperty("goodsId")
|
||||
@Schema(name = "OrderGoodsItem", description = "订单商品项")
|
||||
public static class OrderGoodsItem {
|
||||
@Schema(description = "商品ID", required = true)
|
||||
@NotNull(message = "商品ID不能为空")
|
||||
private Integer goodsId;
|
||||
|
||||
@Schema(description = "购买数量")
|
||||
@JsonProperty("quantity")
|
||||
@Schema(description = "商品SKU ID")
|
||||
private Integer skuId;
|
||||
|
||||
@Schema(description = "商品数量", required = true)
|
||||
@NotNull(message = "商品数量不能为空")
|
||||
@Min(value = 1, message = "商品数量必须大于0")
|
||||
private Integer quantity;
|
||||
|
||||
@Schema(description = "商品价格")
|
||||
@JsonProperty("price")
|
||||
private BigDecimal price;
|
||||
}
|
||||
@Schema(description = "支付类型")
|
||||
private Integer payType;
|
||||
|
||||
/**
|
||||
* 获取实际的商品ID(兼容多种字段名)
|
||||
*/
|
||||
public Integer getActualFormId() {
|
||||
if (formId != null) {
|
||||
return formId;
|
||||
}
|
||||
if (goodsId != null) {
|
||||
return goodsId;
|
||||
}
|
||||
if (goodsItems != null && !goodsItems.isEmpty()) {
|
||||
return goodsItems.get(0).getGoodsId();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取实际的购买数量(兼容多种字段名)
|
||||
*/
|
||||
public Integer getActualTotalNum() {
|
||||
if (totalNum != null) {
|
||||
return totalNum;
|
||||
}
|
||||
if (quantity != null) {
|
||||
return quantity;
|
||||
}
|
||||
if (goodsItems != null && !goodsItems.isEmpty()) {
|
||||
return goodsItems.get(0).getQuantity();
|
||||
}
|
||||
return 1; // 默认数量为1
|
||||
@Schema(description = "规格信息,如:颜色:红色|尺寸:L")
|
||||
private String specInfo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,9 +35,15 @@ public class ShopCart implements Serializable {
|
||||
@Schema(description = "商品ID")
|
||||
private Long goodsId;
|
||||
|
||||
@Schema(description = "商品SKU ID")
|
||||
private Integer skuId;
|
||||
|
||||
@Schema(description = "商品规格")
|
||||
private String spec;
|
||||
|
||||
@Schema(description = "规格信息,如:颜色:红色|尺寸:L")
|
||||
private String specInfo;
|
||||
|
||||
@Schema(description = "商品价格")
|
||||
private BigDecimal price;
|
||||
|
||||
|
||||
103
src/main/java/com/gxwebsoft/shop/entity/ShopCoupon.java
Normal file
103
src/main/java/com/gxwebsoft/shop/entity/ShopCoupon.java
Normal file
@@ -0,0 +1,103 @@
|
||||
package com.gxwebsoft.shop.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 优惠券模板
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-08-08 21:10:55
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("shop_coupon")
|
||||
@Schema(name = "ShopCoupon对象", description = "优惠券模板")
|
||||
public class ShopCoupon implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "id")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "优惠券名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "优惠券描述")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "优惠券类型(10满减券 20折扣券 30免费劵)")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "满减券-减免金额")
|
||||
private BigDecimal reducePrice;
|
||||
|
||||
@Schema(description = "折扣券-折扣率(0-100)")
|
||||
private Integer discount;
|
||||
|
||||
@Schema(description = "最低消费金额")
|
||||
private BigDecimal minPrice;
|
||||
|
||||
@Schema(description = "发放总数量(-1表示无限制)")
|
||||
private Integer totalCount;
|
||||
|
||||
@Schema(description = "已发放数量")
|
||||
private Integer issuedCount;
|
||||
|
||||
@Schema(description = "每人限领数量(-1表示无限制)")
|
||||
private Integer limitPerUser;
|
||||
|
||||
@Schema(description = "到期类型(10领取后生效 20固定时间)")
|
||||
private Integer expireType;
|
||||
|
||||
@Schema(description = "领取后生效-有效天数")
|
||||
private Integer expireDay;
|
||||
|
||||
@Schema(description = "有效期开始时间")
|
||||
private LocalDate startTime;
|
||||
|
||||
@Schema(description = "有效期结束时间")
|
||||
private LocalDate endTime;
|
||||
|
||||
@Schema(description = "适用范围(10全部商品 20指定商品 30指定分类)")
|
||||
private Integer applyRange;
|
||||
|
||||
@Schema(description = "适用范围配置(json格式)")
|
||||
private String applyRangeConfig;
|
||||
|
||||
@Schema(description = "是否启用(0禁用 1启用)")
|
||||
private Integer enabled;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@Schema(description = "状态, 0正常, 1禁用")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "创建用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user