Quellcode durchsuchen

java模版导入

lichunlei vor 6 Monaten
Ursprung
Commit
9481336db3

+ 316 - 0
Template/Java/KxsMachine.java

@@ -0,0 +1,316 @@
+package com.kxs.product.api.model;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 客小爽机具表(KxsMachine)表实体类
+ *
+ * @author 系统
+ * @since 2023-12-20 10:09:35
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class KxsMachine extends Model<KxsMachine> implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    
+    
+    /**
+     * 主键ID
+     */
+    @Schema(description = "主键ID")
+    @TableId(type = IdType.AUTO)
+    private Integer id;
+
+
+    /**
+     * 新增时间
+     */
+    @TableField(fill = FieldFill.INSERT)
+    @Schema(description = "新增时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime createTime;
+
+
+    /**
+     * 更新时间
+     */
+    @TableField(fill = FieldFill.UPDATE)
+    @Schema(description = "更新时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime updateTime;
+
+
+    /**
+     * 删除标记,0未删除,1已删除
+     */
+    @Schema(description = "删除标记,0未删除,1已删除")
+    private String delFlag;
+
+
+    /**
+     * 版本
+     */
+    @Schema(description = "版本")
+    private Integer version;
+
+
+    /**
+     * 机具码
+     */
+    @Schema(description = "机具码")
+    private String posSn;
+
+
+    /**
+     * 仓库ID
+     */
+    @Schema(description = "仓库ID")
+    private Integer warehouseId;
+
+    /**
+     * 仓库名称
+     */
+    @Schema(description = "仓库名称")
+    private String warehouseName;
+
+
+    /**
+     * 所属创客ID
+     */
+    @Schema(description = "所属创客ID")
+    private Integer userId;
+
+
+    /**
+     * 商户ID
+     */
+    @Schema(description = "商户ID")
+    private Integer merchantId;
+
+
+    /**
+     * 品牌ID
+     */
+    @Schema(description = "品牌ID")
+    private Integer brandId;
+
+
+    /**
+     * 循环状态 0不可循环 1可循环
+     */
+    @Schema(description = "循环状态 0不可循环 1可循环")
+    private Integer recycleStatus;
+
+
+    /**
+     * 循环结束时间
+     */
+    @Schema(description = "循环结束时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime recycleEndTime;
+
+
+    /**
+     * 机具类型 0兑换机 1循环机
+     */
+    @Schema(description = "机具类型 0兑换机 1循环机")
+    private Integer machineType;
+
+
+    /**
+     * 机具押金
+     */
+    @Schema(description = "机具押金")
+    private BigDecimal cashPledge;
+
+
+    /**
+     * 厂家押金
+     */
+    @Schema(description = "厂家押金")
+    private BigDecimal sourcePledge;
+
+
+    /**
+     * 机具轨迹路径
+     */
+    @Schema(description = "机具轨迹路径")
+    private String allotPath;
+
+
+    /**
+     * 绑定时间
+     */
+    @Schema(description = "绑定时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime bindTime;
+
+
+    /**
+     * 激活时间
+     */
+    @Schema(description = "激活时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime actTime;
+
+
+    /**
+     * 出库时间
+     */
+    @Schema(description = "出库时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime deliveryTime;
+
+
+    /**
+     * 箱码
+     */
+    @Schema(description = "箱码")
+    private String boxSn;
+
+
+    /**
+     * 机具费率
+     */
+    @Schema(description = "机具费率")
+    private BigDecimal machineRatio;
+
+
+    /**
+     * 是否激活 0未激活 1已激活
+     */
+    @Schema(description = "是否激活 0未激活 1已激活")
+    private Integer isAct;
+
+
+    /**
+     * 绑定状态 0未绑定 1已绑定 2已解绑
+     */
+    @Schema(description = "绑定状态 0未绑定 1已绑定 2已解绑")
+    private Integer bindStatus;
+
+
+    /**
+     * 状态 -1坏机 0在库 1出库
+     */
+    @Schema(description = "状态 -1坏机 0在库 1出库")
+    private Integer status;
+
+    /**
+     * 回收状态 0正常 1可回收
+     */
+    @Schema(description = "回收状态 0正常 1可回收 ")
+    private Integer returnStatus;
+
+
+    /**
+     * 是否首台 0否 1是
+     */
+    @Schema(description = "是否首台 0否 1是")
+    private Integer isFirst;
+
+
+    /**
+     * 费率调升标记
+     */
+    @Schema(description = "费率调升标记 0未调 1已调整")
+    private Integer upFeeFlag;
+
+    /**
+     * 费率调降标记
+     */
+    @Schema(description = "费率调升标记 0未调 1已调整")
+    private Integer downFeeFlag;
+
+
+    /**
+     * 盟主用户ID
+     */
+    @Schema(description = "盟主用户ID")
+    private Integer leaderId;
+
+    /**
+     * 合伙人用户ID
+     */
+    @Schema(description = "合伙人用户ID")
+    private Integer partnerId;
+
+    /**
+     * 预发到用户的ID
+     */
+    @Schema(description = "预发到用户的ID")
+    private Integer preUserId;
+
+
+    /**
+     * 补录标识 0未补录 1已补录
+     */
+    @Schema(description = "补录标识 0未补录 1已补录")
+    private Integer isSupply;
+
+    /**
+     * 补激活奖标记 0未补录 1已补录
+     */
+    @Schema(description = "补录标识 0未补录 1已补录")
+    private Integer isOpAct;
+
+    /**
+     * 业务批次号
+     */
+    @Schema(description = "业务批次号")
+    private String batchNo;
+
+    /**
+     * 贷记卡交易额
+     */
+    @Schema(description = "贷记卡交易额")
+    private BigDecimal creditTrade;
+
+    /**
+     * 借记卡交易额
+     */
+    @Schema(description = "借记卡交易额")
+    private BigDecimal debitCardTrade;
+
+    /**
+     * 扫码交易额
+     */
+    @Schema(description = "扫码交易额")
+    private BigDecimal scanQrTrade;
+
+    /**
+     * 溯源机具和兑换券
+     */
+    @Schema(description = "溯源机具和兑换券")
+    private String sourcePosSn;
+
+    /**
+     * 机具地址
+     */
+    @Schema(description = "机具地址")
+    private String devLocation;
+
+    /**
+     * 秒到费
+     */
+    @Schema(description = "秒到费")
+    private BigDecimal secondFee;
+
+
+}

+ 43 - 0
Template/Java/controller.java

@@ -0,0 +1,43 @@
+package ${PackageName}$.biz.controller.${ClientType}$;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.kxs.common.core.util.R;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.kxs.common.security.annotation.Inner;
+import com.kxs.common.log.annotation.SysLog;
+import org.springdoc.core.annotations.ParameterObject;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.tags.Tag;
+${ImportList}$
+import org.springframework.web.bind.annotation.*;
+import org.springframework.http.HttpHeaders;
+import org.springframework.security.access.prepost.PreAuthorize;
+
+import java.util.List;
+import lombok.RequiredArgsConstructor;
+
+/**
+ * ${TabName}$(${ClassName}$)控制层
+ *
+ * @author 系统
+ * @since ${Now}$
+ */
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("${ClassNameLower}$")
+@Tag(description = "${ClassNameLower}$", name = "${ClassName}$")
+@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
+public class ${ClassName}$Controller {
+
+    /**
+     * 服务对象
+     */
+${ServiceList}$
+
+
+${MethodList}$
+
+
+}
+

+ 19 - 0
Template/Java/dto.java

@@ -0,0 +1,19 @@
+package ${PackageName}$.api.dto.${ClientType}$${Path}$;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+${ImportSub}$
+
+
+/**
+ * ${ApiTitle}$-dto
+ *
+ * @author 系统
+ * @date ${Now}$
+ */
+@Data
+public class ${MethodName}$DTO {
+
+${Fields}$
+
+}

+ 17 - 0
Template/Java/mapper.java

@@ -0,0 +1,17 @@
+package ${PackageName}$.biz.mapper;
+
+import org.apache.ibatis.annotations.Mapper;
+import com.github.yulichang.base.MPJBaseMapper;
+${ImportList}$
+
+/**
+ * ${TableName}$(${TableEnName}$)表数据库访问层
+ *
+ * @author 系统
+ * @since ${Now}$
+ */
+@Mapper
+public interface ${TableEnName}$Mapper extends MPJBaseMapper<${TableEnName}$> {
+${MethodList}$
+}
+

+ 10 - 0
Template/Java/mapper.xml

@@ -0,0 +1,10 @@
+<?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="${PackageName}$.biz.mapper.${TableEnName}$Mapper">
+
+    <resultMap type="${PackageName}$.api.model.${TableEnName}$" id="${TableEnName}$Map">
+${Fields}$
+    </resultMap>
+${leftJoinXml}$
+
+</mapper>

+ 15 - 0
Template/Java/service.java

@@ -0,0 +1,15 @@
+package ${PackageName}$.biz.service;
+
+import com.github.yulichang.base.MPJBaseService;
+${ImportList}$
+
+/**
+ * ${TableName}$(${TableEnName}$)表服务接口
+ *
+ * @author 系统
+ * @since ${Now}$
+ */
+public interface ${TableEnName}$Service extends MPJBaseService<${TableEnName}$> {
+${MethodList}$
+}
+

+ 25 - 0
Template/Java/serviceImpl.java

@@ -0,0 +1,25 @@
+package ${PackageName}$.biz.service.impl;
+
+import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.github.yulichang.toolkit.JoinWrappers;
+import com.github.yulichang.wrapper.MPJLambdaWrapper;
+import ${PackageName}$.biz.mapper.${TableEnName}$Mapper;
+import ${PackageName}$.biz.service.${TableEnName}$Service;
+import org.springframework.stereotype.Service;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+${ImportList}$
+
+/**
+ * ${TableName}$(${TableEnName}$)表服务实现类
+ *
+ * @author 系统
+ * @since ${Now}$
+ */
+@Service("${TableEnNameFirstLower}$Service")
+@RequiredArgsConstructor
+@Slf4j
+public class ${TableEnName}$ServiceImpl extends MPJBaseServiceImpl<${TableEnName}$Mapper, ${TableEnName}$> implements ${TableEnName}$Service {
+${MethodList}$
+}
+

+ 29 - 0
Template/Java/vo.java

@@ -0,0 +1,29 @@
+package ${PackageName}$.api.vo.${ClientType}$${Path}$;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+${ImportSub}$
+
+/**
+ * ${ApiTitle}$vo
+ *
+ * @author 系统
+ * @date ${Now}$
+ */
+@Data
+@Schema(description = "${ApiTitle}$返回实体")
+public class ${MethodName}$VO implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+
+${Fields}$
+
+
+	
+
+}