jiangping
2025-02-17 568b5575dc05f562cec8216241b942952e9723d6
jtt808初始化
已添加18个文件
已修改1个文件
1584 ■■■■■ 文件已修改
server/db/business.discount.permissions.sql 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/db/business.discount_log.permissions.sql 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/db/business.discount_member.permissions.sql 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/business/DiscountController.java 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/business/DiscountLogController.java 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/business/DiscountMemberController.java 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/DiscountLogMapper.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/DiscountMapper.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/DiscountMemberMapper.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/model/Discount.java 150 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/model/DiscountLog.java 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/model/DiscountMember.java 162 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/model/Goodsorder.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/DiscountLogService.java 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/DiscountMemberService.java 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/DiscountService.java 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/impl/DiscountLogServiceImpl.java 151 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/impl/DiscountMemberServiceImpl.java 212 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/impl/DiscountServiceImpl.java 203 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/db/business.discount.permissions.sql
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:discount:create', '新建骑行套餐信息表', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:discount:delete', '删除骑行套餐信息表', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:discount:update', '修改骑行套餐信息表', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:discount:query', '查询骑行套餐信息表', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:discount:exportExcel', '导出骑行套餐信息表(Excel)', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
server/db/business.discount_log.permissions.sql
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:discountlog:create', '新建用户套餐卡使用调整日志表', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:discountlog:delete', '删除用户套餐卡使用调整日志表', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:discountlog:update', '修改用户套餐卡使用调整日志表', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:discountlog:query', '查询用户套餐卡使用调整日志表', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:discountlog:exportExcel', '导出用户套餐卡使用调整日志表(Excel)', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
server/db/business.discount_member.permissions.sql
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:discountmember:create', '新建用户骑行套餐卡关联表', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:discountmember:delete', '删除用户骑行套餐卡关联表', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:discountmember:update', '修改用户骑行套餐卡关联表', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:discountmember:query', '查询用户骑行套餐卡关联表', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:discountmember:exportExcel', '导出用户骑行套餐卡关联表(Excel)', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
server/platform/src/main/java/com/doumee/api/business/DiscountController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,90 @@
package com.doumee.api.business;
import com.doumee.api.BaseController;
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
import com.doumee.dao.business.model.Discount;
import com.doumee.service.business.DiscountService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
/**
 * @author æ±Ÿè¹„蹄
 * @date 2025/02/17 09:43
 */
@Api(tags = "骑行套餐信息表")
@RestController
@RequestMapping("/business/discount")
public class DiscountController extends BaseController {
    @Autowired
    private DiscountService discountService;
    @PreventRepeat
    @ApiOperation("新建")
    @PostMapping("/create")
    @RequiresPermissions("business:discount:create")
    public ApiResponse create(@RequestBody Discount discount) {
        return ApiResponse.success(discountService.create(discount));
    }
    @ApiOperation("根据ID删除")
    @GetMapping("/delete/{id}")
    @RequiresPermissions("business:discount:delete")
    public ApiResponse deleteById(@PathVariable String id) {
        discountService.deleteById(id);
        return ApiResponse.success(null);
    }
    @ApiOperation("批量删除")
    @GetMapping("/delete/batch")
    @RequiresPermissions("business:discount:delete")
    public ApiResponse deleteByIdInBatch(@RequestParam String ids) {
        String [] idArray = ids.split(",");
        List<String> idList = new ArrayList<>();
        for (String id : idArray) {
            idList.add(id);
        }
        discountService.deleteByIdInBatch(idList);
        return ApiResponse.success(null);
    }
    @ApiOperation("根据ID修改")
    @PostMapping("/updateById")
    @RequiresPermissions("business:discount:update")
    public ApiResponse updateById(@RequestBody Discount discount) {
        discountService.updateById(discount);
        return ApiResponse.success(null);
    }
    @ApiOperation("分页查询")
    @PostMapping("/page")
    @RequiresPermissions("business:discount:query")
    public ApiResponse<PageData<Discount>> findPage (@RequestBody PageWrap<Discount> pageWrap) {
        return ApiResponse.success(discountService.findPage(pageWrap));
    }
    @ApiOperation("导出Excel")
    @PostMapping("/exportExcel")
    @RequiresPermissions("business:discount:exportExcel")
    public void exportExcel (@RequestBody PageWrap<Discount> pageWrap, HttpServletResponse response) {
        ExcelExporter.build(Discount.class).export(discountService.findPage(pageWrap).getRecords(), "骑行套餐信息表", response);
    }
    @ApiOperation("根据ID查询")
    @GetMapping("/{id}")
    @RequiresPermissions("business:discount:query")
    public ApiResponse findById(@PathVariable String id) {
        return ApiResponse.success(discountService.findById(id));
    }
}
server/platform/src/main/java/com/doumee/api/business/DiscountLogController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,90 @@
package com.doumee.api.business;
import com.doumee.api.BaseController;
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
import com.doumee.dao.business.model.DiscountLog;
import com.doumee.service.business.DiscountLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
/**
 * @author æ±Ÿè¹„蹄
 * @date 2025/02/17 09:43
 */
@Api(tags = "用户套餐卡使用调整日志表")
@RestController
@RequestMapping("/business/discountLog")
public class DiscountLogController extends BaseController {
    @Autowired
    private DiscountLogService discountLogService;
    @PreventRepeat
    @ApiOperation("新建")
    @PostMapping("/create")
    @RequiresPermissions("business:discountlog:create")
    public ApiResponse create(@RequestBody DiscountLog discountLog) {
        return ApiResponse.success(discountLogService.create(discountLog));
    }
    @ApiOperation("根据ID删除")
    @GetMapping("/delete/{id}")
    @RequiresPermissions("business:discountlog:delete")
    public ApiResponse deleteById(@PathVariable String id) {
        discountLogService.deleteById(id);
        return ApiResponse.success(null);
    }
    @ApiOperation("批量删除")
    @GetMapping("/delete/batch")
    @RequiresPermissions("business:discountlog:delete")
    public ApiResponse deleteByIdInBatch(@RequestParam String ids) {
        String [] idArray = ids.split(",");
        List<String> idList = new ArrayList<>();
        for (String id : idArray) {
            idList.add(id);
        }
        discountLogService.deleteByIdInBatch(idList);
        return ApiResponse.success(null);
    }
    @ApiOperation("根据ID修改")
    @PostMapping("/updateById")
    @RequiresPermissions("business:discountlog:update")
    public ApiResponse updateById(@RequestBody DiscountLog discountLog) {
        discountLogService.updateById(discountLog);
        return ApiResponse.success(null);
    }
    @ApiOperation("分页查询")
    @PostMapping("/page")
    @RequiresPermissions("business:discountlog:query")
    public ApiResponse<PageData<DiscountLog>> findPage (@RequestBody PageWrap<DiscountLog> pageWrap) {
        return ApiResponse.success(discountLogService.findPage(pageWrap));
    }
    @ApiOperation("导出Excel")
    @PostMapping("/exportExcel")
    @RequiresPermissions("business:discountlog:exportExcel")
    public void exportExcel (@RequestBody PageWrap<DiscountLog> pageWrap, HttpServletResponse response) {
        ExcelExporter.build(DiscountLog.class).export(discountLogService.findPage(pageWrap).getRecords(), "用户套餐卡使用调整日志表", response);
    }
    @ApiOperation("根据ID查询")
    @GetMapping("/{id}")
    @RequiresPermissions("business:discountlog:query")
    public ApiResponse findById(@PathVariable String id) {
        return ApiResponse.success(discountLogService.findById(id));
    }
}
server/platform/src/main/java/com/doumee/api/business/DiscountMemberController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,90 @@
package com.doumee.api.business;
import com.doumee.api.BaseController;
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
import com.doumee.dao.business.model.DiscountMember;
import com.doumee.service.business.DiscountMemberService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
/**
 * @author æ±Ÿè¹„蹄
 * @date 2025/02/17 09:43
 */
@Api(tags = "用户骑行套餐卡关联表")
@RestController
@RequestMapping("/business/discountMember")
public class DiscountMemberController extends BaseController {
    @Autowired
    private DiscountMemberService discountMemberService;
    @PreventRepeat
    @ApiOperation("新建")
    @PostMapping("/create")
    @RequiresPermissions("business:discountmember:create")
    public ApiResponse create(@RequestBody DiscountMember discountMember) {
        return ApiResponse.success(discountMemberService.create(discountMember));
    }
    @ApiOperation("根据ID删除")
    @GetMapping("/delete/{id}")
    @RequiresPermissions("business:discountmember:delete")
    public ApiResponse deleteById(@PathVariable String id) {
        discountMemberService.deleteById(id);
        return ApiResponse.success(null);
    }
    @ApiOperation("批量删除")
    @GetMapping("/delete/batch")
    @RequiresPermissions("business:discountmember:delete")
    public ApiResponse deleteByIdInBatch(@RequestParam String ids) {
        String [] idArray = ids.split(",");
        List<String> idList = new ArrayList<>();
        for (String id : idArray) {
            idList.add(id);
        }
        discountMemberService.deleteByIdInBatch(idList);
        return ApiResponse.success(null);
    }
    @ApiOperation("根据ID修改")
    @PostMapping("/updateById")
    @RequiresPermissions("business:discountmember:update")
    public ApiResponse updateById(@RequestBody DiscountMember discountMember) {
        discountMemberService.updateById(discountMember);
        return ApiResponse.success(null);
    }
    @ApiOperation("分页查询")
    @PostMapping("/page")
    @RequiresPermissions("business:discountmember:query")
    public ApiResponse<PageData<DiscountMember>> findPage (@RequestBody PageWrap<DiscountMember> pageWrap) {
        return ApiResponse.success(discountMemberService.findPage(pageWrap));
    }
    @ApiOperation("导出Excel")
    @PostMapping("/exportExcel")
    @RequiresPermissions("business:discountmember:exportExcel")
    public void exportExcel (@RequestBody PageWrap<DiscountMember> pageWrap, HttpServletResponse response) {
        ExcelExporter.build(DiscountMember.class).export(discountMemberService.findPage(pageWrap).getRecords(), "用户骑行套餐卡关联表", response);
    }
    @ApiOperation("根据ID查询")
    @GetMapping("/{id}")
    @RequiresPermissions("business:discountmember:query")
    public ApiResponse findById(@PathVariable String id) {
        return ApiResponse.success(discountMemberService.findById(id));
    }
}
server/services/src/main/java/com/doumee/dao/business/DiscountLogMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,12 @@
package com.doumee.dao.business;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.doumee.dao.business.model.DiscountLog;
/**
 * @author æ±Ÿè¹„蹄
 * @date 2025/02/17 09:43
 */
public interface DiscountLogMapper extends BaseMapper<DiscountLog> {
}
server/services/src/main/java/com/doumee/dao/business/DiscountMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,12 @@
package com.doumee.dao.business;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.doumee.dao.business.model.Discount;
/**
 * @author æ±Ÿè¹„蹄
 * @date 2025/02/17 09:43
 */
public interface DiscountMapper extends BaseMapper<Discount> {
}
server/services/src/main/java/com/doumee/dao/business/DiscountMemberMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,12 @@
package com.doumee.dao.business;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.doumee.dao.business.model.DiscountMember;
/**
 * @author æ±Ÿè¹„蹄
 * @date 2025/02/17 09:43
 */
public interface DiscountMemberMapper extends BaseMapper<DiscountMember> {
}
server/services/src/main/java/com/doumee/dao/business/model/Discount.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,150 @@
package com.doumee.dao.business.model;
import com.doumee.core.annotation.excel.ExcelColumn;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import java.math.BigDecimal;
/**
 * éª‘行套餐信息表
 * @author æ±Ÿè¹„蹄
 * @date 2025/02/17 09:43
 */
@Data
@ApiModel("骑行套餐信息表")
@TableName("\"discount\"")
public class Discount {
    @ApiModelProperty(value = "编码")
    @ExcelColumn(name="编码")
    private String id;
    @ApiModelProperty(value = "创建时间")
    @ExcelColumn(name="创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createDate;
    @ApiModelProperty(value = "创建人")
    @ExcelColumn(name="创建人")
    private String creator;
    @ApiModelProperty(value = "编辑时间")
    @ExcelColumn(name="编辑时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date editDate;
    @ApiModelProperty(value = "编辑人")
    @ExcelColumn(name="编辑人")
    private String editor;
    @ApiModelProperty(value = "是否已删除 0未删除 1已删除", example = "1")
    @ExcelColumn(name="是否已删除 0未删除 1已删除")
    private Integer isdeleted;
    @ApiModelProperty(value = "备注")
    @ExcelColumn(name="备注")
    private String info;
    @ApiModelProperty(value = "名称")
    @ExcelColumn(name="名称")
    private String name;
    @ApiModelProperty(value = "类型 0期限卡 1次卡", example = "1")
    @ExcelColumn(name="类型 0期限卡 1次卡")
    private Integer type;
    @ApiModelProperty(value = "每日骑行限制类型 0不限制 1限制", example = "1")
    @ExcelColumn(name="每日骑行限制类型 0不限制 1限制")
    private Integer limitType;
    @ApiModelProperty(value = "每日骑行限制时间(分钟)", example = "1")
    @ExcelColumn(name="每日骑行限制时间(分钟)")
    private Integer limitTime;
    @ApiModelProperty(value = "销售价(元)", example = "1")
    @ExcelColumn(name="销售价(元)")
    private BigDecimal price;
    @ApiModelProperty(value = "划线价(元)", example = "1")
    @ExcelColumn(name="划线价(元)")
    private BigDecimal linePrice;
    @ApiModelProperty(value = "销售渠道 0小程序", example = "1")
    @ExcelColumn(name="销售渠道 0小程序")
    private Integer channel;
    @ApiModelProperty(value = "套餐图片")
    @ExcelColumn(name="套餐图片")
    private String imgurl;
    @ApiModelProperty(value = "简介")
    @ExcelColumn(name="简介")
    private String descs;
    @ApiModelProperty(value = "描述")
    @ExcelColumn(name="描述")
    private String content;
    @ApiModelProperty(value = "销售开始日期")
    @ExcelColumn(name="销售开始日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date startDate;
    @ApiModelProperty(value = "销售结束日期")
    @ExcelColumn(name="销售结束日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endDate;
    @ApiModelProperty(value = "使用时间类型 0固定时间段 1购买后生效 2指定日期生效", example = "1")
    @ExcelColumn(name="使用时间类型 0固定时间段 1购买后生效 2指定日期生效")
    private Integer useType;
    @ApiModelProperty(value = "使用开始日期")
    @ExcelColumn(name="使用开始日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date useStartDate;
    @ApiModelProperty(value = "使用结束日期")
    @ExcelColumn(name="使用结束日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date useEndDate;
    @ApiModelProperty(value = "使用有效天数", example = "1")
    @ExcelColumn(name="使用有效天数")
    private Integer useDays;
    @ApiModelProperty(value = "节假日是否可以 0否 1是", example = "1")
    @ExcelColumn(name="节假日是否可以 0否 1是")
    private Integer useHoliday;
    @ApiModelProperty(value = "工作日是否可以 0否 1是", example = "1")
    @ExcelColumn(name="工作日是否可以 0否 1是")
    private Integer useWorkday;
    @ApiModelProperty(value = "销量总限额", example = "1")
    @ExcelColumn(name="销量总限额")
    private Integer saleLimit;
    @ApiModelProperty(value = "销量每天限额", example = "1")
    @ExcelColumn(name="销量每天限额")
    private Integer saleDayLimit;
    @ApiModelProperty(value = "状态 0正常 1停用", example = "1")
    @ExcelColumn(name="状态 0正常 1停用")
    private Integer status;
    @ApiModelProperty(value = "是否支持自行车订单 0不支持 1支持", example = "1")
    @ExcelColumn(name="是否支持自行车订单 0不支持 1支持")
    private Integer isbike;
    @ApiModelProperty(value = "是否支持电动车 0不支持 1支持", example = "1")
    @ExcelColumn(name="是否支持电动车 0不支持 1支持")
    private Integer iselecbike;
}
server/services/src/main/java/com/doumee/dao/business/model/DiscountLog.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,82 @@
package com.doumee.dao.business.model;
import com.doumee.core.annotation.excel.ExcelColumn;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import java.math.BigDecimal;
/**
 * ç”¨æˆ·å¥—餐卡使用调整日志表
 * @author æ±Ÿè¹„蹄
 * @date 2025/02/17 09:43
 */
@Data
@ApiModel("用户套餐卡使用调整日志表")
@TableName("\"discount_log\"")
public class DiscountLog {
    @ApiModelProperty(value = "编码")
    @ExcelColumn(name="编码")
    private String id;
    @ApiModelProperty(value = "创建时间")
    @ExcelColumn(name="创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createDate;
    @ApiModelProperty(value = "创建人")
    @ExcelColumn(name="创建人")
    private String creator;
    @ApiModelProperty(value = "编辑时间")
    @ExcelColumn(name="编辑时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date editDate;
    @ApiModelProperty(value = "编辑人")
    @ExcelColumn(name="编辑人")
    private String editor;
    @ApiModelProperty(value = "是否已删除 0未删除 1已删除", example = "1")
    @ExcelColumn(name="是否已删除 0未删除 1已删除")
    private Integer isdeleted;
    @ApiModelProperty(value = "备注")
    @ExcelColumn(name="备注")
    private String info;
    @ApiModelProperty(value = "用户套餐卡编码(关联discount_member)")
    @ExcelColumn(name="用户套餐卡编码(关联discount_member)")
    private String discountMemberId;
    @ApiModelProperty(value = "操作类型 0用户骑行使用 1平台作废 2平台调整", example = "1")
    @ExcelColumn(name="操作类型 0用户骑行使用 1平台作废 2平台调整")
    private Integer type;
    @ApiModelProperty(value = "抵扣骑行时长(分钟)", example = "1")
    @ExcelColumn(name="抵扣骑行时长(分钟)")
    private Integer rideTime;
    @ApiModelProperty(value = "抵扣金额(元)", example = "1")
    @ExcelColumn(name="抵扣金额(元)")
    private BigDecimal ridePrice;
    @ApiModelProperty(value = "调整备注")
    @ExcelColumn(name="调整备注")
    private String editInfo;
    @ApiModelProperty(value = "有效期增加天数", example = "1")
    @ExcelColumn(name="有效期增加天数")
    private Integer editDays;
    @ApiModelProperty(value = "关联订单编码(关联goodsorder)")
    @ExcelColumn(name="关联订单编码(关联goodsorder)")
    private String goodsorderId;
}
server/services/src/main/java/com/doumee/dao/business/model/DiscountMember.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,162 @@
package com.doumee.dao.business.model;
import com.doumee.core.annotation.excel.ExcelColumn;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import java.math.BigDecimal;
/**
 * ç”¨æˆ·éª‘行套餐卡关联表
 * @author æ±Ÿè¹„蹄
 * @date 2025/02/17 09:43
 */
@Data
@ApiModel("用户骑行套餐卡关联表")
@TableName("\"discount_member\"")
public class DiscountMember {
    @ApiModelProperty(value = "编码")
    @ExcelColumn(name="编码")
    private String id;
    @ApiModelProperty(value = "创建时间")
    @ExcelColumn(name="创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createDate;
    @ApiModelProperty(value = "创建人")
    @ExcelColumn(name="创建人")
    private String creator;
    @ApiModelProperty(value = "编辑时间")
    @ExcelColumn(name="编辑时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date editDate;
    @ApiModelProperty(value = "编辑人")
    @ExcelColumn(name="编辑人")
    private String editor;
    @ApiModelProperty(value = "是否已删除 0未删除 1已删除", example = "1")
    @ExcelColumn(name="是否已删除 0未删除 1已删除")
    private Integer isdeleted;
    @ApiModelProperty(value = "备注")
    @ExcelColumn(name="备注")
    private String info;
    @ApiModelProperty(value = "票号")
    @ExcelColumn(name="票号")
    private String code;
    @ApiModelProperty(value = "名称")
    @ExcelColumn(name="名称")
    private String name;
    @ApiModelProperty(value = "类型 0期限卡 1次卡", example = "1")
    @ExcelColumn(name="类型 0期限卡 1次卡")
    private Integer type;
    @ApiModelProperty(value = "每日骑行限制类型 0不限制 1限制", example = "1")
    @ExcelColumn(name="每日骑行限制类型 0不限制 1限制")
    private Integer limitType;
    @ApiModelProperty(value = "每日骑行限制时间(分钟)", example = "1")
    @ExcelColumn(name="每日骑行限制时间(分钟)")
    private Integer limitTime;
    @ApiModelProperty(value = "销售价(元)", example = "1")
    @ExcelColumn(name="销售价(元)")
    private BigDecimal price;
    @ApiModelProperty(value = "划线价(元)", example = "1")
    @ExcelColumn(name="划线价(元)")
    private BigDecimal linePrice;
    @ApiModelProperty(value = "销售渠道 0小程序", example = "1")
    @ExcelColumn(name="销售渠道 0小程序")
    private Integer channel;
    @ApiModelProperty(value = "套餐图片")
    @ExcelColumn(name="套餐图片")
    private String imgurl;
    @ApiModelProperty(value = "简介")
    @ExcelColumn(name="简介")
    private String descs;
    @ApiModelProperty(value = "描述")
    @ExcelColumn(name="描述")
    private String content;
    @ApiModelProperty(value = "销售开始日期")
    @ExcelColumn(name="销售开始日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date startDate;
    @ApiModelProperty(value = "销售结束日期")
    @ExcelColumn(name="销售结束日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endDate;
    @ApiModelProperty(value = "使用时间类型 0固定时间段 1购买后生效 2指定日期生效", example = "1")
    @ExcelColumn(name="使用时间类型 0固定时间段 1购买后生效 2指定日期生效")
    private Integer useType;
    @ApiModelProperty(value = "使用开始日期")
    @ExcelColumn(name="使用开始日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date useStartDate;
    @ApiModelProperty(value = "使用结束日期")
    @ExcelColumn(name="使用结束日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date useEndDate;
    @ApiModelProperty(value = "使用有效天数", example = "1")
    @ExcelColumn(name="使用有效天数")
    private Integer useDays;
    @ApiModelProperty(value = "节假日是否可以 0否 1是", example = "1")
    @ExcelColumn(name="节假日是否可以 0否 1是")
    private Integer useHoliday;
    @ApiModelProperty(value = "工作日是否可以 0否 1是", example = "1")
    @ExcelColumn(name="工作日是否可以 0否 1是")
    private Integer useWorkday;
    @ApiModelProperty(value = "销量总限额", example = "1")
    @ExcelColumn(name="销量总限额")
    private Integer saleLimit;
    @ApiModelProperty(value = "销量每天限额", example = "1")
    @ExcelColumn(name="销量每天限额")
    private Integer saleDayLimit;
    @ApiModelProperty(value = "状态 0正常 1作废 2过期或用完", example = "1")
    @ExcelColumn(name="状态 0正常 1作废 2过期或用完")
    private Integer status;
    @ApiModelProperty(value = "用户编码(关联member)")
    @ExcelColumn(name="用户编码(关联member)")
    private String memberId;
    @ApiModelProperty(value = "关联订单编码(关联goodsorder)")
    @ExcelColumn(name="关联订单编码(关联goodsorder)")
    private String goodsorderId;
    @ApiModelProperty(value = "是否支持自行车订单 0不支持 1支持", example = "1")
    @ExcelColumn(name="是否支持自行车订单 0不支持 1支持")
    private Integer isbike;
    @ApiModelProperty(value = "是否支持电动车 0不支持 1支持", example = "1")
    @ExcelColumn(name="是否支持电动车 0不支持 1支持")
    private Integer iselecbike;
}
server/services/src/main/java/com/doumee/dao/business/model/Goodsorder.java
@@ -54,6 +54,12 @@
    @ApiModelProperty(value = "用户编码(关联member表)")
    private String memberId;
    @ApiModelProperty(value = "关联对象编码")
    private String objId;
    @ApiModelProperty(value = "关联对象类型 0套餐卡")
    private Integer objType;
    @ApiModelProperty(value = "交易类型 0租车押金 1套餐卡购买")
    private Integer type;
    @ApiModelProperty(value = "用户编码(关联member表)")
    @TableField(exist = false)
@@ -81,9 +87,6 @@
    @ApiModelProperty(value = "支付时间")
    @ExcelColumn(name="交押金时间",index = 5,width = 10,align = HorizontalAlignment.CENTER,dateFormat = "yyyy-MM-dd HH:mm:ss" )
    private Date payDate;
    @ApiModelProperty(value = "交易类型 0租车押金")
    private Integer type;
    @ApiModelProperty(value = "结算金额(分)")
    @ExcelColumn(name="结算金额(元)",index = 7,width = 10,align = HorizontalAlignment.CENTER)
server/services/src/main/java/com/doumee/service/business/DiscountLogService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,97 @@
package com.doumee.service.business;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.DiscountLog;
import java.util.List;
/**
 * ç”¨æˆ·å¥—餐卡使用调整日志表Service定义
 * @author æ±Ÿè¹„蹄
 * @date 2025/02/17 09:43
 */
public interface DiscountLogService {
    /**
     * åˆ›å»º
     *
     * @param discountLog å®žä½“对象
     * @return String
     */
    String create(DiscountLog discountLog);
    /**
     * ä¸»é”®åˆ é™¤
     *
     * @param id ä¸»é”®
     */
    void deleteById(String id);
    /**
     * åˆ é™¤
     *
     * @param discountLog å®žä½“对象
     */
    void delete(DiscountLog discountLog);
    /**
     * æ‰¹é‡ä¸»é”®åˆ é™¤
     *
     * @param ids ä¸»é”®é›†
     */
    void deleteByIdInBatch(List<String> ids);
    /**
     * ä¸»é”®æ›´æ–°
     *
     * @param discountLog å®žä½“对象
     */
    void updateById(DiscountLog discountLog);
    /**
     * æ‰¹é‡ä¸»é”®æ›´æ–°
     *
     * @param discountLogs å®žä½“集
     */
    void updateByIdInBatch(List<DiscountLog> discountLogs);
    /**
     * ä¸»é”®æŸ¥è¯¢
     *
     * @param id ä¸»é”®
     * @return DiscountLog
     */
    DiscountLog findById(String id);
    /**
     * æ¡ä»¶æŸ¥è¯¢å•条记录
     *
     * @param discountLog å®žä½“对象
     * @return DiscountLog
     */
    DiscountLog findOne(DiscountLog discountLog);
    /**
     * æ¡ä»¶æŸ¥è¯¢
     *
     * @param discountLog å®žä½“对象
     * @return List<DiscountLog>
     */
    List<DiscountLog> findList(DiscountLog discountLog);
    /**
     * åˆ†é¡µæŸ¥è¯¢
     *
     * @param pageWrap åˆ†é¡µå¯¹è±¡
     * @return PageData<DiscountLog>
     */
    PageData<DiscountLog> findPage(PageWrap<DiscountLog> pageWrap);
    /**
     * æ¡ä»¶ç»Ÿè®¡
     *
     * @param discountLog å®žä½“对象
     * @return long
     */
    long count(DiscountLog discountLog);
}
server/services/src/main/java/com/doumee/service/business/DiscountMemberService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,97 @@
package com.doumee.service.business;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.DiscountMember;
import java.util.List;
/**
 * ç”¨æˆ·éª‘行套餐卡关联表Service定义
 * @author æ±Ÿè¹„蹄
 * @date 2025/02/17 09:43
 */
public interface DiscountMemberService {
    /**
     * åˆ›å»º
     *
     * @param discountMember å®žä½“对象
     * @return String
     */
    String create(DiscountMember discountMember);
    /**
     * ä¸»é”®åˆ é™¤
     *
     * @param id ä¸»é”®
     */
    void deleteById(String id);
    /**
     * åˆ é™¤
     *
     * @param discountMember å®žä½“对象
     */
    void delete(DiscountMember discountMember);
    /**
     * æ‰¹é‡ä¸»é”®åˆ é™¤
     *
     * @param ids ä¸»é”®é›†
     */
    void deleteByIdInBatch(List<String> ids);
    /**
     * ä¸»é”®æ›´æ–°
     *
     * @param discountMember å®žä½“对象
     */
    void updateById(DiscountMember discountMember);
    /**
     * æ‰¹é‡ä¸»é”®æ›´æ–°
     *
     * @param discountMembers å®žä½“集
     */
    void updateByIdInBatch(List<DiscountMember> discountMembers);
    /**
     * ä¸»é”®æŸ¥è¯¢
     *
     * @param id ä¸»é”®
     * @return DiscountMember
     */
    DiscountMember findById(String id);
    /**
     * æ¡ä»¶æŸ¥è¯¢å•条记录
     *
     * @param discountMember å®žä½“对象
     * @return DiscountMember
     */
    DiscountMember findOne(DiscountMember discountMember);
    /**
     * æ¡ä»¶æŸ¥è¯¢
     *
     * @param discountMember å®žä½“对象
     * @return List<DiscountMember>
     */
    List<DiscountMember> findList(DiscountMember discountMember);
    /**
     * åˆ†é¡µæŸ¥è¯¢
     *
     * @param pageWrap åˆ†é¡µå¯¹è±¡
     * @return PageData<DiscountMember>
     */
    PageData<DiscountMember> findPage(PageWrap<DiscountMember> pageWrap);
    /**
     * æ¡ä»¶ç»Ÿè®¡
     *
     * @param discountMember å®žä½“对象
     * @return long
     */
    long count(DiscountMember discountMember);
}
server/services/src/main/java/com/doumee/service/business/DiscountService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,97 @@
package com.doumee.service.business;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.Discount;
import java.util.List;
/**
 * éª‘行套餐信息表Service定义
 * @author æ±Ÿè¹„蹄
 * @date 2025/02/17 09:43
 */
public interface DiscountService {
    /**
     * åˆ›å»º
     *
     * @param discount å®žä½“对象
     * @return String
     */
    String create(Discount discount);
    /**
     * ä¸»é”®åˆ é™¤
     *
     * @param id ä¸»é”®
     */
    void deleteById(String id);
    /**
     * åˆ é™¤
     *
     * @param discount å®žä½“对象
     */
    void delete(Discount discount);
    /**
     * æ‰¹é‡ä¸»é”®åˆ é™¤
     *
     * @param ids ä¸»é”®é›†
     */
    void deleteByIdInBatch(List<String> ids);
    /**
     * ä¸»é”®æ›´æ–°
     *
     * @param discount å®žä½“对象
     */
    void updateById(Discount discount);
    /**
     * æ‰¹é‡ä¸»é”®æ›´æ–°
     *
     * @param discounts å®žä½“集
     */
    void updateByIdInBatch(List<Discount> discounts);
    /**
     * ä¸»é”®æŸ¥è¯¢
     *
     * @param id ä¸»é”®
     * @return Discount
     */
    Discount findById(String id);
    /**
     * æ¡ä»¶æŸ¥è¯¢å•条记录
     *
     * @param discount å®žä½“对象
     * @return Discount
     */
    Discount findOne(Discount discount);
    /**
     * æ¡ä»¶æŸ¥è¯¢
     *
     * @param discount å®žä½“对象
     * @return List<Discount>
     */
    List<Discount> findList(Discount discount);
    /**
     * åˆ†é¡µæŸ¥è¯¢
     *
     * @param pageWrap åˆ†é¡µå¯¹è±¡
     * @return PageData<Discount>
     */
    PageData<Discount> findPage(PageWrap<Discount> pageWrap);
    /**
     * æ¡ä»¶ç»Ÿè®¡
     *
     * @param discount å®žä½“对象
     * @return long
     */
    long count(Discount discount);
}
server/services/src/main/java/com/doumee/service/business/impl/DiscountLogServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,151 @@
package com.doumee.service.business.impl;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.core.utils.Utils;
import com.doumee.dao.business.DiscountLogMapper;
import com.doumee.dao.business.model.DiscountLog;
import com.doumee.service.business.DiscountLogService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.List;
/**
 * ç”¨æˆ·å¥—餐卡使用调整日志表Service实现
 * @author æ±Ÿè¹„蹄
 * @date 2025/02/17 09:43
 */
@Service
public class DiscountLogServiceImpl implements DiscountLogService {
    @Autowired
    private DiscountLogMapper discountLogMapper;
    @Override
    public String create(DiscountLog discountLog) {
        discountLogMapper.insert(discountLog);
        return discountLog.getId();
    }
    @Override
    public void deleteById(String id) {
        discountLogMapper.deleteById(id);
    }
    @Override
    public void delete(DiscountLog discountLog) {
        UpdateWrapper<DiscountLog> deleteWrapper = new UpdateWrapper<>(discountLog);
        discountLogMapper.delete(deleteWrapper);
    }
    @Override
    public void deleteByIdInBatch(List<String> ids) {
        if (CollectionUtils.isEmpty(ids)) {
            return;
        }
        discountLogMapper.deleteBatchIds(ids);
    }
    @Override
    public void updateById(DiscountLog discountLog) {
        discountLogMapper.updateById(discountLog);
    }
    @Override
    public void updateByIdInBatch(List<DiscountLog> discountLogs) {
        if (CollectionUtils.isEmpty(discountLogs)) {
            return;
        }
        for (DiscountLog discountLog: discountLogs) {
            this.updateById(discountLog);
        }
    }
    @Override
    public DiscountLog findById(String id) {
        return discountLogMapper.selectById(id);
    }
    @Override
    public DiscountLog findOne(DiscountLog discountLog) {
        QueryWrapper<DiscountLog> wrapper = new QueryWrapper<>(discountLog);
        return discountLogMapper.selectOne(wrapper);
    }
    @Override
    public List<DiscountLog> findList(DiscountLog discountLog) {
        QueryWrapper<DiscountLog> wrapper = new QueryWrapper<>(discountLog);
        return discountLogMapper.selectList(wrapper);
    }
    @Override
    public PageData<DiscountLog> findPage(PageWrap<DiscountLog> pageWrap) {
        IPage<DiscountLog> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity());
        QueryWrapper<DiscountLog> queryWrapper = new QueryWrapper<>();
        Utils.MP.blankToNull(pageWrap.getModel());
        if (pageWrap.getModel().getId() != null) {
            queryWrapper.lambda().eq(DiscountLog::getId, pageWrap.getModel().getId());
        }
        if (pageWrap.getModel().getCreateDate() != null) {
            queryWrapper.lambda().ge(DiscountLog::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate()));
            queryWrapper.lambda().le(DiscountLog::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate()));
        }
        if (pageWrap.getModel().getCreator() != null) {
            queryWrapper.lambda().eq(DiscountLog::getCreator, pageWrap.getModel().getCreator());
        }
        if (pageWrap.getModel().getEditDate() != null) {
            queryWrapper.lambda().ge(DiscountLog::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate()));
            queryWrapper.lambda().le(DiscountLog::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate()));
        }
        if (pageWrap.getModel().getEditor() != null) {
            queryWrapper.lambda().eq(DiscountLog::getEditor, pageWrap.getModel().getEditor());
        }
        if (pageWrap.getModel().getIsdeleted() != null) {
            queryWrapper.lambda().eq(DiscountLog::getIsdeleted, pageWrap.getModel().getIsdeleted());
        }
        if (pageWrap.getModel().getInfo() != null) {
            queryWrapper.lambda().eq(DiscountLog::getInfo, pageWrap.getModel().getInfo());
        }
        if (pageWrap.getModel().getDiscountMemberId() != null) {
            queryWrapper.lambda().eq(DiscountLog::getDiscountMemberId, pageWrap.getModel().getDiscountMemberId());
        }
        if (pageWrap.getModel().getType() != null) {
            queryWrapper.lambda().eq(DiscountLog::getType, pageWrap.getModel().getType());
        }
        if (pageWrap.getModel().getRideTime() != null) {
            queryWrapper.lambda().eq(DiscountLog::getRideTime, pageWrap.getModel().getRideTime());
        }
        if (pageWrap.getModel().getRidePrice() != null) {
            queryWrapper.lambda().eq(DiscountLog::getRidePrice, pageWrap.getModel().getRidePrice());
        }
        if (pageWrap.getModel().getEditInfo() != null) {
            queryWrapper.lambda().eq(DiscountLog::getEditInfo, pageWrap.getModel().getEditInfo());
        }
        if (pageWrap.getModel().getEditDays() != null) {
            queryWrapper.lambda().eq(DiscountLog::getEditDays, pageWrap.getModel().getEditDays());
        }
        if (pageWrap.getModel().getGoodsorderId() != null) {
            queryWrapper.lambda().eq(DiscountLog::getGoodsorderId, pageWrap.getModel().getGoodsorderId());
        }
        for(PageWrap.SortData sortData: pageWrap.getSorts()) {
            if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) {
                queryWrapper.orderByDesc(sortData.getProperty());
            } else {
                queryWrapper.orderByAsc(sortData.getProperty());
            }
        }
        return PageData.from(discountLogMapper.selectPage(page, queryWrapper));
    }
    @Override
    public long count(DiscountLog discountLog) {
        QueryWrapper<DiscountLog> wrapper = new QueryWrapper<>(discountLog);
        return discountLogMapper.selectCount(wrapper);
    }
}
server/services/src/main/java/com/doumee/service/business/impl/DiscountMemberServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,212 @@
package com.doumee.service.business.impl;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.core.utils.Utils;
import com.doumee.dao.business.DiscountMemberMapper;
import com.doumee.dao.business.model.DiscountMember;
import com.doumee.service.business.DiscountMemberService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.List;
/**
 * ç”¨æˆ·éª‘行套餐卡关联表Service实现
 * @author æ±Ÿè¹„蹄
 * @date 2025/02/17 09:43
 */
@Service
public class DiscountMemberServiceImpl implements DiscountMemberService {
    @Autowired
    private DiscountMemberMapper discountMemberMapper;
    @Override
    public String create(DiscountMember discountMember) {
        discountMemberMapper.insert(discountMember);
        return discountMember.getId();
    }
    @Override
    public void deleteById(String id) {
        discountMemberMapper.deleteById(id);
    }
    @Override
    public void delete(DiscountMember discountMember) {
        UpdateWrapper<DiscountMember> deleteWrapper = new UpdateWrapper<>(discountMember);
        discountMemberMapper.delete(deleteWrapper);
    }
    @Override
    public void deleteByIdInBatch(List<String> ids) {
        if (CollectionUtils.isEmpty(ids)) {
            return;
        }
        discountMemberMapper.deleteBatchIds(ids);
    }
    @Override
    public void updateById(DiscountMember discountMember) {
        discountMemberMapper.updateById(discountMember);
    }
    @Override
    public void updateByIdInBatch(List<DiscountMember> discountMembers) {
        if (CollectionUtils.isEmpty(discountMembers)) {
            return;
        }
        for (DiscountMember discountMember: discountMembers) {
            this.updateById(discountMember);
        }
    }
    @Override
    public DiscountMember findById(String id) {
        return discountMemberMapper.selectById(id);
    }
    @Override
    public DiscountMember findOne(DiscountMember discountMember) {
        QueryWrapper<DiscountMember> wrapper = new QueryWrapper<>(discountMember);
        return discountMemberMapper.selectOne(wrapper);
    }
    @Override
    public List<DiscountMember> findList(DiscountMember discountMember) {
        QueryWrapper<DiscountMember> wrapper = new QueryWrapper<>(discountMember);
        return discountMemberMapper.selectList(wrapper);
    }
    @Override
    public PageData<DiscountMember> findPage(PageWrap<DiscountMember> pageWrap) {
        IPage<DiscountMember> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity());
        QueryWrapper<DiscountMember> queryWrapper = new QueryWrapper<>();
        Utils.MP.blankToNull(pageWrap.getModel());
        if (pageWrap.getModel().getId() != null) {
            queryWrapper.lambda().eq(DiscountMember::getId, pageWrap.getModel().getId());
        }
        if (pageWrap.getModel().getCreateDate() != null) {
            queryWrapper.lambda().ge(DiscountMember::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate()));
            queryWrapper.lambda().le(DiscountMember::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate()));
        }
        if (pageWrap.getModel().getCreator() != null) {
            queryWrapper.lambda().eq(DiscountMember::getCreator, pageWrap.getModel().getCreator());
        }
        if (pageWrap.getModel().getEditDate() != null) {
            queryWrapper.lambda().ge(DiscountMember::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate()));
            queryWrapper.lambda().le(DiscountMember::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate()));
        }
        if (pageWrap.getModel().getEditor() != null) {
            queryWrapper.lambda().eq(DiscountMember::getEditor, pageWrap.getModel().getEditor());
        }
        if (pageWrap.getModel().getIsdeleted() != null) {
            queryWrapper.lambda().eq(DiscountMember::getIsdeleted, pageWrap.getModel().getIsdeleted());
        }
        if (pageWrap.getModel().getInfo() != null) {
            queryWrapper.lambda().eq(DiscountMember::getInfo, pageWrap.getModel().getInfo());
        }
        if (pageWrap.getModel().getCode() != null) {
            queryWrapper.lambda().eq(DiscountMember::getCode, pageWrap.getModel().getCode());
        }
        if (pageWrap.getModel().getName() != null) {
            queryWrapper.lambda().eq(DiscountMember::getName, pageWrap.getModel().getName());
        }
        if (pageWrap.getModel().getType() != null) {
            queryWrapper.lambda().eq(DiscountMember::getType, pageWrap.getModel().getType());
        }
        if (pageWrap.getModel().getLimitType() != null) {
            queryWrapper.lambda().eq(DiscountMember::getLimitType, pageWrap.getModel().getLimitType());
        }
        if (pageWrap.getModel().getLimitTime() != null) {
            queryWrapper.lambda().eq(DiscountMember::getLimitTime, pageWrap.getModel().getLimitTime());
        }
        if (pageWrap.getModel().getPrice() != null) {
            queryWrapper.lambda().eq(DiscountMember::getPrice, pageWrap.getModel().getPrice());
        }
        if (pageWrap.getModel().getLinePrice() != null) {
            queryWrapper.lambda().eq(DiscountMember::getLinePrice, pageWrap.getModel().getLinePrice());
        }
        if (pageWrap.getModel().getChannel() != null) {
            queryWrapper.lambda().eq(DiscountMember::getChannel, pageWrap.getModel().getChannel());
        }
        if (pageWrap.getModel().getImgurl() != null) {
            queryWrapper.lambda().eq(DiscountMember::getImgurl, pageWrap.getModel().getImgurl());
        }
        if (pageWrap.getModel().getDescs() != null) {
            queryWrapper.lambda().eq(DiscountMember::getDescs, pageWrap.getModel().getDescs());
        }
        if (pageWrap.getModel().getContent() != null) {
            queryWrapper.lambda().eq(DiscountMember::getContent, pageWrap.getModel().getContent());
        }
        if (pageWrap.getModel().getStartDate() != null) {
            queryWrapper.lambda().ge(DiscountMember::getStartDate, Utils.Date.getStart(pageWrap.getModel().getStartDate()));
            queryWrapper.lambda().le(DiscountMember::getStartDate, Utils.Date.getEnd(pageWrap.getModel().getStartDate()));
        }
        if (pageWrap.getModel().getEndDate() != null) {
            queryWrapper.lambda().ge(DiscountMember::getEndDate, Utils.Date.getStart(pageWrap.getModel().getEndDate()));
            queryWrapper.lambda().le(DiscountMember::getEndDate, Utils.Date.getEnd(pageWrap.getModel().getEndDate()));
        }
        if (pageWrap.getModel().getUseType() != null) {
            queryWrapper.lambda().eq(DiscountMember::getUseType, pageWrap.getModel().getUseType());
        }
        if (pageWrap.getModel().getUseStartDate() != null) {
            queryWrapper.lambda().ge(DiscountMember::getUseStartDate, Utils.Date.getStart(pageWrap.getModel().getUseStartDate()));
            queryWrapper.lambda().le(DiscountMember::getUseStartDate, Utils.Date.getEnd(pageWrap.getModel().getUseStartDate()));
        }
        if (pageWrap.getModel().getUseEndDate() != null) {
            queryWrapper.lambda().ge(DiscountMember::getUseEndDate, Utils.Date.getStart(pageWrap.getModel().getUseEndDate()));
            queryWrapper.lambda().le(DiscountMember::getUseEndDate, Utils.Date.getEnd(pageWrap.getModel().getUseEndDate()));
        }
        if (pageWrap.getModel().getUseDays() != null) {
            queryWrapper.lambda().eq(DiscountMember::getUseDays, pageWrap.getModel().getUseDays());
        }
        if (pageWrap.getModel().getUseHoliday() != null) {
            queryWrapper.lambda().eq(DiscountMember::getUseHoliday, pageWrap.getModel().getUseHoliday());
        }
        if (pageWrap.getModel().getUseWorkday() != null) {
            queryWrapper.lambda().eq(DiscountMember::getUseWorkday, pageWrap.getModel().getUseWorkday());
        }
        if (pageWrap.getModel().getSaleLimit() != null) {
            queryWrapper.lambda().eq(DiscountMember::getSaleLimit, pageWrap.getModel().getSaleLimit());
        }
        if (pageWrap.getModel().getSaleDayLimit() != null) {
            queryWrapper.lambda().eq(DiscountMember::getSaleDayLimit, pageWrap.getModel().getSaleDayLimit());
        }
        if (pageWrap.getModel().getStatus() != null) {
            queryWrapper.lambda().eq(DiscountMember::getStatus, pageWrap.getModel().getStatus());
        }
        if (pageWrap.getModel().getMemberId() != null) {
            queryWrapper.lambda().eq(DiscountMember::getMemberId, pageWrap.getModel().getMemberId());
        }
        if (pageWrap.getModel().getGoodsorderId() != null) {
            queryWrapper.lambda().eq(DiscountMember::getGoodsorderId, pageWrap.getModel().getGoodsorderId());
        }
        if (pageWrap.getModel().getIsbike() != null) {
            queryWrapper.lambda().eq(DiscountMember::getIsbike, pageWrap.getModel().getIsbike());
        }
        if (pageWrap.getModel().getIselecbike() != null) {
            queryWrapper.lambda().eq(DiscountMember::getIselecbike, pageWrap.getModel().getIselecbike());
        }
        for(PageWrap.SortData sortData: pageWrap.getSorts()) {
            if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) {
                queryWrapper.orderByDesc(sortData.getProperty());
            } else {
                queryWrapper.orderByAsc(sortData.getProperty());
            }
        }
        return PageData.from(discountMemberMapper.selectPage(page, queryWrapper));
    }
    @Override
    public long count(DiscountMember discountMember) {
        QueryWrapper<DiscountMember> wrapper = new QueryWrapper<>(discountMember);
        return discountMemberMapper.selectCount(wrapper);
    }
}
server/services/src/main/java/com/doumee/service/business/impl/DiscountServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,203 @@
package com.doumee.service.business.impl;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.core.utils.Utils;
import com.doumee.dao.business.DiscountMapper;
import com.doumee.dao.business.model.Discount;
import com.doumee.service.business.DiscountService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.List;
/**
 * éª‘行套餐信息表Service实现
 * @author æ±Ÿè¹„蹄
 * @date 2025/02/17 09:43
 */
@Service
public class DiscountServiceImpl implements DiscountService {
    @Autowired
    private DiscountMapper discountMapper;
    @Override
    public String create(Discount discount) {
        discountMapper.insert(discount);
        return discount.getId();
    }
    @Override
    public void deleteById(String id) {
        discountMapper.deleteById(id);
    }
    @Override
    public void delete(Discount discount) {
        UpdateWrapper<Discount> deleteWrapper = new UpdateWrapper<>(discount);
        discountMapper.delete(deleteWrapper);
    }
    @Override
    public void deleteByIdInBatch(List<String> ids) {
        if (CollectionUtils.isEmpty(ids)) {
            return;
        }
        discountMapper.deleteBatchIds(ids);
    }
    @Override
    public void updateById(Discount discount) {
        discountMapper.updateById(discount);
    }
    @Override
    public void updateByIdInBatch(List<Discount> discounts) {
        if (CollectionUtils.isEmpty(discounts)) {
            return;
        }
        for (Discount discount: discounts) {
            this.updateById(discount);
        }
    }
    @Override
    public Discount findById(String id) {
        return discountMapper.selectById(id);
    }
    @Override
    public Discount findOne(Discount discount) {
        QueryWrapper<Discount> wrapper = new QueryWrapper<>(discount);
        return discountMapper.selectOne(wrapper);
    }
    @Override
    public List<Discount> findList(Discount discount) {
        QueryWrapper<Discount> wrapper = new QueryWrapper<>(discount);
        return discountMapper.selectList(wrapper);
    }
    @Override
    public PageData<Discount> findPage(PageWrap<Discount> pageWrap) {
        IPage<Discount> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity());
        QueryWrapper<Discount> queryWrapper = new QueryWrapper<>();
        Utils.MP.blankToNull(pageWrap.getModel());
        if (pageWrap.getModel().getId() != null) {
            queryWrapper.lambda().eq(Discount::getId, pageWrap.getModel().getId());
        }
        if (pageWrap.getModel().getCreateDate() != null) {
            queryWrapper.lambda().ge(Discount::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate()));
            queryWrapper.lambda().le(Discount::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate()));
        }
        if (pageWrap.getModel().getCreator() != null) {
            queryWrapper.lambda().eq(Discount::getCreator, pageWrap.getModel().getCreator());
        }
        if (pageWrap.getModel().getEditDate() != null) {
            queryWrapper.lambda().ge(Discount::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate()));
            queryWrapper.lambda().le(Discount::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate()));
        }
        if (pageWrap.getModel().getEditor() != null) {
            queryWrapper.lambda().eq(Discount::getEditor, pageWrap.getModel().getEditor());
        }
        if (pageWrap.getModel().getIsdeleted() != null) {
            queryWrapper.lambda().eq(Discount::getIsdeleted, pageWrap.getModel().getIsdeleted());
        }
        if (pageWrap.getModel().getInfo() != null) {
            queryWrapper.lambda().eq(Discount::getInfo, pageWrap.getModel().getInfo());
        }
        if (pageWrap.getModel().getName() != null) {
            queryWrapper.lambda().eq(Discount::getName, pageWrap.getModel().getName());
        }
        if (pageWrap.getModel().getType() != null) {
            queryWrapper.lambda().eq(Discount::getType, pageWrap.getModel().getType());
        }
        if (pageWrap.getModel().getLimitType() != null) {
            queryWrapper.lambda().eq(Discount::getLimitType, pageWrap.getModel().getLimitType());
        }
        if (pageWrap.getModel().getLimitTime() != null) {
            queryWrapper.lambda().eq(Discount::getLimitTime, pageWrap.getModel().getLimitTime());
        }
        if (pageWrap.getModel().getPrice() != null) {
            queryWrapper.lambda().eq(Discount::getPrice, pageWrap.getModel().getPrice());
        }
        if (pageWrap.getModel().getLinePrice() != null) {
            queryWrapper.lambda().eq(Discount::getLinePrice, pageWrap.getModel().getLinePrice());
        }
        if (pageWrap.getModel().getChannel() != null) {
            queryWrapper.lambda().eq(Discount::getChannel, pageWrap.getModel().getChannel());
        }
        if (pageWrap.getModel().getImgurl() != null) {
            queryWrapper.lambda().eq(Discount::getImgurl, pageWrap.getModel().getImgurl());
        }
        if (pageWrap.getModel().getDescs() != null) {
            queryWrapper.lambda().eq(Discount::getDescs, pageWrap.getModel().getDescs());
        }
        if (pageWrap.getModel().getContent() != null) {
            queryWrapper.lambda().eq(Discount::getContent, pageWrap.getModel().getContent());
        }
        if (pageWrap.getModel().getStartDate() != null) {
            queryWrapper.lambda().ge(Discount::getStartDate, Utils.Date.getStart(pageWrap.getModel().getStartDate()));
            queryWrapper.lambda().le(Discount::getStartDate, Utils.Date.getEnd(pageWrap.getModel().getStartDate()));
        }
        if (pageWrap.getModel().getEndDate() != null) {
            queryWrapper.lambda().ge(Discount::getEndDate, Utils.Date.getStart(pageWrap.getModel().getEndDate()));
            queryWrapper.lambda().le(Discount::getEndDate, Utils.Date.getEnd(pageWrap.getModel().getEndDate()));
        }
        if (pageWrap.getModel().getUseType() != null) {
            queryWrapper.lambda().eq(Discount::getUseType, pageWrap.getModel().getUseType());
        }
        if (pageWrap.getModel().getUseStartDate() != null) {
            queryWrapper.lambda().ge(Discount::getUseStartDate, Utils.Date.getStart(pageWrap.getModel().getUseStartDate()));
            queryWrapper.lambda().le(Discount::getUseStartDate, Utils.Date.getEnd(pageWrap.getModel().getUseStartDate()));
        }
        if (pageWrap.getModel().getUseEndDate() != null) {
            queryWrapper.lambda().ge(Discount::getUseEndDate, Utils.Date.getStart(pageWrap.getModel().getUseEndDate()));
            queryWrapper.lambda().le(Discount::getUseEndDate, Utils.Date.getEnd(pageWrap.getModel().getUseEndDate()));
        }
        if (pageWrap.getModel().getUseDays() != null) {
            queryWrapper.lambda().eq(Discount::getUseDays, pageWrap.getModel().getUseDays());
        }
        if (pageWrap.getModel().getUseHoliday() != null) {
            queryWrapper.lambda().eq(Discount::getUseHoliday, pageWrap.getModel().getUseHoliday());
        }
        if (pageWrap.getModel().getUseWorkday() != null) {
            queryWrapper.lambda().eq(Discount::getUseWorkday, pageWrap.getModel().getUseWorkday());
        }
        if (pageWrap.getModel().getSaleLimit() != null) {
            queryWrapper.lambda().eq(Discount::getSaleLimit, pageWrap.getModel().getSaleLimit());
        }
        if (pageWrap.getModel().getSaleDayLimit() != null) {
            queryWrapper.lambda().eq(Discount::getSaleDayLimit, pageWrap.getModel().getSaleDayLimit());
        }
        if (pageWrap.getModel().getStatus() != null) {
            queryWrapper.lambda().eq(Discount::getStatus, pageWrap.getModel().getStatus());
        }
        if (pageWrap.getModel().getIsbike() != null) {
            queryWrapper.lambda().eq(Discount::getIsbike, pageWrap.getModel().getIsbike());
        }
        if (pageWrap.getModel().getIselecbike() != null) {
            queryWrapper.lambda().eq(Discount::getIselecbike, pageWrap.getModel().getIselecbike());
        }
        for(PageWrap.SortData sortData: pageWrap.getSorts()) {
            if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) {
                queryWrapper.orderByDesc(sortData.getProperty());
            } else {
                queryWrapper.orderByAsc(sortData.getProperty());
            }
        }
        return PageData.from(discountMapper.selectPage(page, queryWrapper));
    }
    @Override
    public long count(Discount discount) {
        QueryWrapper<Discount> wrapper = new QueryWrapper<>(discount);
        return discountMapper.selectCount(wrapper);
    }
}