增加本地生活模块,创建球杆回收基本配置

This commit is contained in:
杨旭 2025-04-11 01:29:33 +08:00
parent f350827684
commit 1d6d8d00b5
47 changed files with 1729 additions and 48 deletions

View File

@ -24,6 +24,7 @@
<module>tmerclub-seckill</module>
<module>tmerclub-flow</module>
<module>tmerclub-im</module>
<module>tmerclub-local</module>
<!-- <module>system-test</module>-->
</modules>
<packaging>pom</packaging>

View File

@ -25,9 +25,9 @@ logging:
# dubbo端口默认为服务端口+2000
dubbo:
registry:
group: yang
protocol:
port: ${TMERCLUB_DUBBO_PORT:11101}
consumer:
loadbalance: dev
registry:
group: dubbo-default

View File

@ -106,6 +106,10 @@
<groupId>cn.hutool</groupId>
<artifactId>hutool-extra</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -1,6 +1,8 @@
package com.tmerclub.cloud.common.model;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
@ -12,6 +14,7 @@ import java.util.Date;
*
* @author tmerclub
*/
@Data
public class BaseModel implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@ -24,26 +27,4 @@ public class BaseModel implements Serializable {
* 更新时间
*/
protected Date updateTime;
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
@Override
public String toString() {
return "BaseModel{" + "createTime=" + createTime + ", updateTime=" + updateTime + '}';
}
}
}

View File

@ -2,7 +2,7 @@
package com.tmerclub.cloud.common.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
@ -14,6 +14,7 @@ import java.util.Date;
*
* @author tmerclub
*/
@Data
public class BaseVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@ -28,26 +29,4 @@ public class BaseVO implements Serializable {
*/
@Schema(description = "更新时间")
protected Date updateTime;
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
@Override
public String toString() {
return "BaseDTO{" + "createTime=" + createTime + ", updateTime=" + updateTime + '}';
}
}

109
tmerclub-local/pom.xml Normal file
View File

@ -0,0 +1,109 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>tmerclub</artifactId>
<groupId>com.moyuer.cloud</groupId>
<version>0.0.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>tmerclub-local</artifactId>
<description>本地生活服务</description>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>com.moyuer.cloud</groupId>
<artifactId>tmerclub-common-database</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.moyuer.cloud</groupId>
<artifactId>tmerclub-common-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.moyuer.cloud</groupId>
<artifactId>tmerclub-common-security</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.moyuer.cloud</groupId>
<artifactId>tmerclub-common-leaf</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.moyuer.cloud</groupId>
<artifactId>tmerclub-common-rocketmq</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.moyuer.cloud</groupId>
<artifactId>tmerclub-api-marketing</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.moyuer.cloud</groupId>
<artifactId>tmerclub-api-order</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.moyuer.cloud</groupId>
<artifactId>tmerclub-api-search</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-miniapp</artifactId>
</dependency>
<dependency>
<groupId>com.moyuer.cloud</groupId>
<artifactId>tmerclub-api-admin</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.xuxueli</groupId>
<artifactId>xxl-job-core</artifactId>
</dependency>
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-mp</artifactId>
</dependency>
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-pay</artifactId>
</dependency>
<dependency>
<groupId>com.moyuer.cloud</groupId>
<artifactId>tmerclub-api-biz</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.moyuer.cloud</groupId>
<artifactId>tmerclub-common-mongodb</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-live</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,30 @@
package com.tmerclub.cloud;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.ConfigurableApplicationContext;
/**
* 本地生活启动类
*
* @author: frank
* @create: 2025-04-10
**/
@SpringBootApplication(scanBasePackages = "com.tmerclub.cloud", exclude = UserDetailsServiceAutoConfiguration.class)
@EnableDubbo(scanBasePackages = "com.tmerclub.cloud.**.feign")
public class LocalApplication extends SpringBootServletInitializer {
public static void main(String[] args) {
ConfigurableApplicationContext applicationContext = SpringApplication.run(LocalApplication.class, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(LocalApplication.class);
}
}

View File

@ -0,0 +1,18 @@
package com.tmerclub.cloud.config;
import com.tmerclub.cloud.api.auth.feign.TokenFeignClient;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.context.annotation.Configuration;
/**
* Dubbo配置
*
* @author: frank
* @create: 2025-04-10
**/
@Configuration
public class DubboBeanConfig {
@DubboReference
private TokenFeignClient tokenFeignClient;
}

View File

@ -0,0 +1,17 @@
package com.tmerclub.cloud.cuerecycle.controller.admin;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 球杆品牌
*
* @author: frank
* @create: 2025-04-10
**/
@Tag(name = "后管-球杆品牌")
@RestController("adminCueBrandController")
@RequestMapping("/admin/cueBrand")
public class CueBrandController {
}

View File

@ -0,0 +1,17 @@
package com.tmerclub.cloud.cuerecycle.controller.admin;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 球杆商品
*
* @author: frank
* @create: 2025-04-10
**/
@Tag(name = "后管-球杆商品")
@RestController("adminCueProductController")
@RequestMapping("/admin/cueProduct")
public class CueProductController {
}

View File

@ -0,0 +1,17 @@
package com.tmerclub.cloud.cuerecycle.controller.admin;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 球杆系列
*
* @author: frank
* @create: 2025-04-10
**/
@Tag(name = "后管-球杆系列")
@RestController("adminCueSeriesController")
@RequestMapping("/admin/cueSeries")
public class CueSeriesController {
}

View File

@ -0,0 +1,37 @@
package com.tmerclub.cloud.cuerecycle.controller.admin;
import com.tmerclub.cloud.common.response.ServerResponseEntity;
import com.tmerclub.cloud.cuerecycle.model.dto.CueTypeDTO;
import com.tmerclub.cloud.cuerecycle.service.CueTypeService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 球杆类型
*
* @author: frank
* @create: 2025-04-10
**/
@Tag(name = "后管-球杆类型")
@RestController("adminCueTypeController")
@RequestMapping("/admin/cueType")
public class CueTypeController {
@Resource
CueTypeService cueTypeService;
@PostMapping
@Operation(summary = "保存球杆类型", description = "保存球杆类型")
public ServerResponseEntity<Void> save(@Valid @RequestBody CueTypeDTO couponDTO) {
int insert = cueTypeService.insert(couponDTO);
if (insert <= 0) {
return ServerResponseEntity.showFailMsg("保存球杆类型失败");
}
return ServerResponseEntity.success();
}
}

View File

@ -0,0 +1,17 @@
package com.tmerclub.cloud.cuerecycle.controller.app;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 球杆品牌
*
* @author: frank
* @create: 2025-04-10
**/
@Tag(name = "App-球杆品牌")
@RestController("appCueBrandController")
@RequestMapping("/app/cueBrand")
public class CueBrandController {
}

View File

@ -0,0 +1,17 @@
package com.tmerclub.cloud.cuerecycle.controller.app;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 球杆商品
*
* @author: frank
* @create: 2025-04-10
**/
@Tag(name = "App-球杆商品")
@RestController("appCueProductController")
@RequestMapping("/app/cueProduct")
public class CueProductController {
}

View File

@ -0,0 +1,17 @@
package com.tmerclub.cloud.cuerecycle.controller.app;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 球杆系列
*
* @author: frank
* @create: 2025-04-10
**/
@Tag(name = "App-球杆系列")
@RestController("appCueSeriesController")
@RequestMapping("/app/cueSeries")
public class CueSeriesController {
}

View File

@ -0,0 +1,17 @@
package com.tmerclub.cloud.cuerecycle.controller.app;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 球杆类型
*
* @author: frank
* @create: 2025-04-10
**/
@Tag(name = "App-球杆类型")
@RestController("appCueTypeController")
@RequestMapping("/app/cueType")
public class CueTypeController {
}

View File

@ -0,0 +1,65 @@
package com.tmerclub.cloud.cuerecycle.mapper;
import com.tmerclub.cloud.cuerecycle.model.CueBrand;
import com.tmerclub.cloud.cuerecycle.model.dto.CueBrandDTO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 球杆品牌Mapper接口
*
* @author: frank
* @create: 2025-04-10
**/
public interface CueBrandMapper {
/**
* 根据主键查询
*
* @param id 主键
* @return 球杆品牌
*/
CueBrand selectById(Long id);
/**
* 根据类型查询
*
* @param typeId 类型
* @return 球杆品牌
*/
List<CueBrand> listByType(Long typeId);
/**
* 根据条件查询
*
* @param query 查询条件
* @return 球杆品牌
*/
List<CueBrand> list(CueBrandDTO query);
/**
* 新增
*
* @param brand 球杆品牌
* @return 影响行数
*/
int insert(CueBrand brand);
/**
* 修改
*
* @param brand 球杆品牌
* @return 影响行数
*/
int update(CueBrand brand);
/**
* 修改状态
*
* @param id 主键
* @param status 状态
* @return 影响行数
*/
int updateStatus(@Param("id") Long id, @Param("status") Integer status);
}

View File

@ -0,0 +1,64 @@
package com.tmerclub.cloud.cuerecycle.mapper;
import com.tmerclub.cloud.cuerecycle.model.CueProduct;
import com.tmerclub.cloud.cuerecycle.model.dto.CueProductDTO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 球杆商品Mapper接口
*
* @author: frank
* @create: 2025-04-10
**/
public interface CueProductMapper {
/**
* 根据主键id查询
*
* @param id 主键id
* @return 球杆商品
*/
CueProduct selectById(Long id);
/**
* 根据系列id查询列表
*
* @param seriesId 系列id
* @return 球杆商品列表
*/
List<CueProduct> listBySeries(Long seriesId);
/**
* 查询列表
*
* @param query 查询条件
* @return 球杆商品列表
*/
List<CueProduct> list(CueProductDTO query);
/**
* 新增
*
* @param product 球杆商品
* @return 影响行数
*/
int insert(CueProduct product);
/**
* 修改
*
* @param product 球杆商品
* @return 影响行数
*/
int update(CueProduct product);
/**
* 修改状态
*
* @param id 主键id
* @param status 状态
* @return 影响行数
*/
int updateStatus(@Param("id") Long id, @Param("status") Integer status);
}

View File

@ -0,0 +1,64 @@
package com.tmerclub.cloud.cuerecycle.mapper;
import com.tmerclub.cloud.cuerecycle.model.CueSeries;
import com.tmerclub.cloud.cuerecycle.model.dto.CueSeriesDTO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 球杆系列Mapper接口
*
* @author: frank
* @create: 2025-04-10
**/
public interface CueSeriesMapper {
/**
* 根据id查询球杆系列
*
* @param id 主键id
* @return 对象
*/
CueSeries selectById(Long id);
/**
* 根据品牌id查询球杆系列
*
* @param brandId 品牌id
* @return 对象集合
*/
List<CueSeries> listByBrand(Long brandId);
/**
* 根据条件查询球杆系列
*
* @param query 查询条件
* @return 对象集合
*/
List<CueSeries> list(CueSeriesDTO query);
/**
* 新增球杆系列
*
* @param series 球杆系列
* @return 影响行数
*/
int insert(CueSeries series);
/**
* 更新球杆系列
*
* @param series 球杆系列
* @return 影响行数
*/
int update(CueSeries series);
/**
* 修改状态
*
* @param id 主键id
* @param status 状态
* @return 影响行数
*/
int updateStatus(@Param("id") Long id, @Param("status") Integer status);
}

View File

@ -0,0 +1,63 @@
package com.tmerclub.cloud.cuerecycle.mapper;
import com.tmerclub.cloud.cuerecycle.model.CueType;
import com.tmerclub.cloud.cuerecycle.model.dto.CueTypeDTO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 球杆类型Mapper接口
*
* @author: frank
* @create: 2025-04-10
**/
public interface CueTypeMapper {
/**
* 根据id查询
*
* @param id 主键id
* @return 对象
*/
CueType selectById(Long id);
/**
* 查询所有启用状态的数据
*
* @return 对象集合
*/
List<CueType> listEnabled();
/**
* 根据条件查询
*
* @param query 查询条件
* @return 对象集合
*/
List<CueType> list(CueTypeDTO query);
/**
* 新增
*
* @param cueType 对象
* @return 影响行数
*/
int insert(CueType cueType);
/**
* 修改
*
* @param cueType 对象
* @return 影响行数
*/
int update(CueType cueType);
/**
* 修改状态
*
* @param id 主键id
* @param status 状态
* @return 影响行数
*/
int updateStatus(@Param("id") Long id, @Param("status") Integer status);
}

View File

@ -0,0 +1,46 @@
package com.tmerclub.cloud.cuerecycle.model;
import com.tmerclub.cloud.common.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.io.Serializable;
/**
* 球杆品牌对象
*
* @author: frank
* @create: 2025-04-10
**/
@Data
@EqualsAndHashCode(callSuper = true)
public class CueBrand extends BaseModel implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Long id;
/**
* 球杆类型id
*/
private Long typeId;
/**
* 球杆品牌名称
*/
private String name;
/**
* 球杆品牌logo
*/
private String logo;
/**
* 排序
*/
private Integer sort;
/**
* 状态
*/
private Integer status;
}

View File

@ -0,0 +1,55 @@
package com.tmerclub.cloud.cuerecycle.model;
import com.tmerclub.cloud.common.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 球杆商品对象
*
* @author: frank
* @create: 2025-04-10
**/
@Data
@EqualsAndHashCode(callSuper = true)
public class CueProduct extends BaseModel implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Long id;
/**
* 系列id
*/
private Long seriesId;
/**
* 商品名称
*/
private String name;
/**
* 商品描述
*/
private String description;
/**
* 商品图片
*/
private String images;
/**
* 商品价格
*/
private BigDecimal price;
/**
* 排序
*/
private Integer sort;
/**
* 状态
*/
private Integer status;
}

View File

@ -0,0 +1,42 @@
package com.tmerclub.cloud.cuerecycle.model;
import com.tmerclub.cloud.common.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.io.Serializable;
/**
* 球杆系列对象
*
* @author: frank
* @create: 2025-04-10
**/
@Data
@EqualsAndHashCode(callSuper = true)
public class CueSeries extends BaseModel implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Long id;
/**
* 品牌id
*/
private Long brandId;
/**
* 系列名称
*/
private String name;
/**
* 排序
*/
private Integer sort;
/**
* 状态
*/
private Integer status;
}

View File

@ -0,0 +1,42 @@
package com.tmerclub.cloud.cuerecycle.model;
import com.tmerclub.cloud.common.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.io.Serializable;
/**
* 球杆类型对象
*
* @author: frank
* @create: 2025-04-10
**/
@Data
@EqualsAndHashCode(callSuper = true)
public class CueType extends BaseModel implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 球杆类型id
*/
private Long id;
/**
* 球杆类型名称
*/
private String name;
/**
* 球杆类型图片
*/
private String image;
/**
* 排序
*/
private Integer sort;
/**
* 状态
*/
private Integer status;
}

View File

@ -0,0 +1,43 @@
package com.tmerclub.cloud.cuerecycle.model.dto;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
/**
* 球杆品牌业务对象
*
* @author: frank
* @create: 2025-04-10
**/
@Data
public class CueBrandDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Long id;
/**
* 球杆类型id
*/
private Long typeId;
/**
* 球杆品牌名称
*/
private String name;
/**
* 球杆品牌logo
*/
private String logo;
/**
* 排序
*/
private Integer sort;
/**
* 状态
*/
private Integer status;
}

View File

@ -0,0 +1,52 @@
package com.tmerclub.cloud.cuerecycle.model.dto;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 球杆商品业务对象
*
* @author: frank
* @create: 2025-04-10
**/
@Data
public class CueProductDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Long id;
/**
* 系列id
*/
private Long seriesId;
/**
* 商品名称
*/
private String name;
/**
* 商品描述
*/
private String description;
/**
* 商品图片
*/
private String images;
/**
* 商品价格
*/
private BigDecimal price;
/**
* 排序
*/
private Integer sort;
/**
* 状态
*/
private Integer status;
}

View File

@ -0,0 +1,39 @@
package com.tmerclub.cloud.cuerecycle.model.dto;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
/**
* 球杆系列业务对象
*
* @author: frank
* @create: 2025-04-10
**/
@Data
public class CueSeriesDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Long id;
/**
* 品牌id
*/
private Long brandId;
/**
* 系列名称
*/
private String name;
/**
* 排序
*/
private Integer sort;
/**
* 状态
*/
private Integer status;
}

View File

@ -0,0 +1,38 @@
package com.tmerclub.cloud.cuerecycle.model.dto;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
/**
* 球杆类型业务对象
*
* @author: frank
* @create: 2025-04-10
**/
@Data
public class CueTypeDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 球杆类型id
*/
private Long id;
/**
* 球杆类型名称
*/
private String name;
/**
* 球杆类型图片
*/
private String image;
/**
* 排序
*/
private Integer sort;
/**
* 状态
*/
private Integer status;
}

View File

@ -0,0 +1,39 @@
package com.tmerclub.cloud.cuerecycle.model.vo;
import com.tmerclub.cloud.common.model.BaseModel;
import com.tmerclub.cloud.common.vo.BaseVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.io.Serializable;
/**
* 球杆品牌视图对象
*
* @author: frank
* @create: 2025-04-10
**/
@Data
@EqualsAndHashCode(callSuper = true)
public class CueBrandVO extends BaseVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@Schema(description = "主键")
private Long id;
/**
* 球杆品牌名称
*/
@Schema(description = "球杆品牌名称")
private String name;
/**
* 球杆品牌logo
*/
@Schema(description = "球杆品牌logo")
private String logo;
}

View File

@ -0,0 +1,59 @@
package com.tmerclub.cloud.cuerecycle.model.vo;
import com.tmerclub.cloud.common.vo.BaseVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 球杆商品视图对象
*
* @author: frank
* @create: 2025-04-10
**/
@Data
@EqualsAndHashCode(callSuper = true)
public class CueProductVO extends BaseVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@Schema(description = "主键")
private Long id;
/**
* 商品名称
*/
@Schema(description = "商品名称")
private String name;
/**
* 商品描述
*/
@Schema(description = "商品描述")
private String description;
/**
* 商品图片
*/
@Schema(description = "商品图片")
private String images;
/**
* 商品价格
*/
@Schema(description = "商品价格")
private BigDecimal price;
/**
* 品牌名称
*/
@Schema(description = "品牌名称")
private String brandName;
/**
* 品牌logo
*/
@Schema(description = "品牌logo")
private String brandLogo;
}

View File

@ -0,0 +1,33 @@
package com.tmerclub.cloud.cuerecycle.model.vo;
import com.tmerclub.cloud.common.vo.BaseVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.io.Serializable;
/**
* 球杆系列视图对象
*
* @author: frank
* @create: 2025-04-10
**/
@Data
@EqualsAndHashCode(callSuper = true)
public class CueSeriesVO extends BaseVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@Schema(description = "主键")
private Long id;
/**
* 系列名称
*/
@Schema(description = "系列名称")
private String name;
}

View File

@ -0,0 +1,38 @@
package com.tmerclub.cloud.cuerecycle.model.vo;
import com.tmerclub.cloud.common.vo.BaseVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.io.Serializable;
/**
* 球杆类型视图对象
*
* @author: frank
* @create: 2025-04-10
**/
@Data
@EqualsAndHashCode(callSuper = true)
public class CueTypeVO extends BaseVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 球杆类型id
*/
@Schema(description = "球杆类型id")
private Long id;
/**
* 球杆类型名称
*/
@Schema(description = "球杆类型名称")
private String name;
/**
* 球杆类型图片
*/
@Schema(description = "球杆类型图片")
private String image;
}

View File

@ -0,0 +1,10 @@
package com.tmerclub.cloud.cuerecycle.service;
/**
* 球杆品牌Service接口
*
* @author: frank
* @create: 2025-04-11
**/
public interface CueBrandService {
}

View File

@ -0,0 +1,10 @@
package com.tmerclub.cloud.cuerecycle.service;
/**
* 球杆商品Service接口
*
* @author: frank
* @create: 2025-04-11
**/
public interface CueProductService {
}

View File

@ -0,0 +1,10 @@
package com.tmerclub.cloud.cuerecycle.service;
/**
* 球杆系列Service接口
*
* @author: frank
* @create: 2025-04-11
**/
public interface CueSeriesService {
}

View File

@ -0,0 +1,39 @@
package com.tmerclub.cloud.cuerecycle.service;
import com.tmerclub.cloud.cuerecycle.model.CueType;
import com.tmerclub.cloud.cuerecycle.model.dto.CueTypeDTO;
/**
* 球杆类型Service接口
*
* @author: frank
* @create: 2025-04-11
**/
public interface CueTypeService {
/**
* 新增
*
* @param couponDTO 对象
* @return 影响行数
*/
int insert(CueTypeDTO couponDTO);
/**
* 修改
*
* @param cueType 对象
* @return 影响行数
*/
int update(CueType cueType);
/**
* 修改状态
*
* @param id 主键id
* @param status 状态
* @return 影响行数
*/
int updateStatus(Long id, Integer status);
}

View File

@ -0,0 +1,18 @@
package com.tmerclub.cloud.cuerecycle.service.impl;
import com.tmerclub.cloud.cuerecycle.mapper.CueBrandMapper;
import com.tmerclub.cloud.cuerecycle.service.CueBrandService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
/**
* 球杆品牌Service接口
*
* @author: frank
* @create: 2025-04-11
**/
@Service
public class CueBrandServiceImpl implements CueBrandService {
@Resource
CueBrandMapper cueBrandMapper;
}

View File

@ -0,0 +1,14 @@
package com.tmerclub.cloud.cuerecycle.service.impl;
import com.tmerclub.cloud.cuerecycle.service.CueProductService;
import org.springframework.stereotype.Service;
/**
* 球杆商品Service接口
*
* @author: frank
* @create: 2025-04-11
**/
@Service
public class CueProductServiceImpl implements CueProductService {
}

View File

@ -0,0 +1,14 @@
package com.tmerclub.cloud.cuerecycle.service.impl;
import com.tmerclub.cloud.cuerecycle.service.CueSeriesService;
import org.springframework.stereotype.Service;
/**
* 球杆系列Service接口
*
* @author: frank
* @create: 2025-04-11
**/
@Service
public class CueSeriesServiceImpl implements CueSeriesService {
}

View File

@ -0,0 +1,41 @@
package com.tmerclub.cloud.cuerecycle.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import com.tmerclub.cloud.cuerecycle.mapper.CueTypeMapper;
import com.tmerclub.cloud.cuerecycle.model.CueType;
import com.tmerclub.cloud.cuerecycle.model.dto.CueTypeDTO;
import com.tmerclub.cloud.cuerecycle.service.CueTypeService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
/**
* 球杆类型Service接口
*
* @author: frank
* @create: 2025-04-11
**/
@Service
public class CueTypeServiceImpl implements CueTypeService {
@Resource
CueTypeMapper cueTypeMapper;
@Override
public int insert(CueTypeDTO couponDTO) {
CueType cueType = BeanUtil.toBean(couponDTO, CueType.class);
cueType.setCreateTime(DateUtil.date());
return cueTypeMapper.insert(cueType);
}
@Override
public int update(CueType cueType) {
cueType.setUpdateTime(DateUtil.date());
return cueTypeMapper.update(cueType);
}
@Override
public int updateStatus(Long id, Integer status) {
return cueTypeMapper.updateStatus(id, status);
}
}

View File

@ -0,0 +1,8 @@
_________ _______ _______ _______ _______ _ ______ _ _______ _______ _______ _
\__ __/( )( ____ \( ____ )( ____ \( \ |\ /|( ___ \ ( \ ( ___ )( ____ \( ___ )( \
) ( | () () || ( \/| ( )|| ( \/| ( | ) ( || ( ) ) | ( | ( ) || ( \/| ( ) || (
| | | || || || (__ | (____)|| | | | | | | || (__/ / _____ | | | | | || | | (___) || |
| | | |(_)| || __) | __)| | | | | | | || __ ( (_____) | | | | | || | | ___ || |
| | | | | || ( | (\ ( | | | | | | | || ( \ \ | | | | | || | | ( ) || |
| | | ) ( || (____/\| ) \ \__| (____/\| (____/\| (___) || )___) ) | (____/\| (___) || (____/\| ) ( || (____/\
)_( |/ \|(_______/|/ \__/(_______/(_______/(_______)|/ \___/ (_______/(_______)(_______/|/ \|(_______/

View File

@ -0,0 +1,33 @@
server:
port: ${TMERCLUB_MARKETING_PORT:9110}
spring:
application:
name: @artifactId@
cloud:
nacos:
discovery:
server-addr: ${NACOS_HOST:101.37.204.35}:${NACOS_PORT:8848}
username: ${NACOS_USERNAME:nacos}
password: ${NACOS_PASSWORD:BYzL!Z3C}
namespace: ${NACOS_NAMESPACE:}
ip: ${HOSTIP:}
config:
server-addr: ${spring.cloud.nacos.discovery.server-addr}
file-extension: yml
shared-configs:
- application.${spring.cloud.nacos.config.file-extension}
username: ${spring.cloud.nacos.discovery.username}
password: ${spring.cloud.nacos.discovery.password}
namespace: ${spring.cloud.nacos.discovery.namespace}
logging:
tracer:
pattern: '%5p [${spring.application.name:},%X{X-B3-Parent-SpanName},%X{X-B3-TraceId},%X{X-B3-SpanId}]'
# dubbo端口默认为服务端口+2000
dubbo:
protocol:
port: ${tmerclub_DUBBO_PORT:11109}
consumer:
loadbalance: dev
registry:
group: dubbo-yang

View File

@ -0,0 +1,45 @@
<configuration scan="true" scanPeriod="60 seconds" debug="false">
<property name="PROJECT_PATH" value="/data/app/java/logs"/>
<property name="APPLICATION_NAME" value="marketing"/>
<property name="LOG_FILE_MAX_HISTORY" value="30"/>
<property name="LOG_FILE_MAX_SIZE" value="50MB"/>
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
<!-- 异步输出 -->
<appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender">
<appender-ref ref="DefaultFile" />
</appender>
<appender name="DefaultFile"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<append>true</append>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${FILE_LOG_PATTERN}</pattern>
<charset>UTF-8</charset>
</encoder>
<file>${PROJECT_PATH}/marketing/marketing.log</file>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>${logging.level}</level>
</filter>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${PROJECT_PATH}/${APPLICATION_NAME}/%d{yyyy-MM}/marketing-%d{yyyy-MM-dd}-%i.log.gz</fileNamePattern>
<maxFileSize>${LOG_FILE_MAX_SIZE}</maxFileSize>
<maxHistory>${LOG_FILE_MAX_HISTORY}</maxHistory>
</rollingPolicy>
</appender>
<root level="info">
<appender-ref ref="CONSOLE"/>
<appender-ref ref="ASYNC"/>
</root>
<logger name="com.tmerclub.cloud" level="debug"/>
<logger name="org.springframework.web.filter.CommonsRequestLoggingFilter" level="debug"/>
<logger name="springfox.documentation.swagger.readers.operation.OperationImplicitParameterReader" level="off"/>
<logger name="org.reflections.Reflections" level="off"/>
</configuration>

View File

@ -0,0 +1,101 @@
<?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.tmerclub.cloud.cuerecycle.mapper.CueBrandMapper">
<resultMap id="BaseResultMap" type="com.tmerclub.cloud.cuerecycle.model.CueBrand">
<id column="id" property="id"/>
<result column="type_id" property="typeId"/>
<result column="name" property="name"/>
<result column="logo" property="logo"/>
<result column="sort" property="sort"/>
<result column="status" property="status"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
</resultMap>
<sql id="Base_Column_List">
id, type_id, name, logo, image, sort, status, create_time, update_time
</sql>
<select id="selectById" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM
cue_brand
WHERE
id = #{id}
</select>
<select id="listByType" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM
cue_brand
WHERE
type_id = #{typeId}
AND status = 1
ORDER BY
sort ASC,
id DESC
</select>
<select id="list" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM
cue_brand
<where>
<if test="typeId != null">
AND type_id = #{typeId}
</if>
<if test="name != null and name != ''">
AND name LIKE CONCAT('%', #{name}, '%')
</if>
<if test="status != null">
AND status = #{status}
</if>
</where>
ORDER BY sort ASC, id DESC
</select>
<insert id="insert" useGeneratedKeys="true" keyProperty="id">
INSERT INTO cue_brand
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="typeId != null">type_id,</if>
<if test="name != null">name,</if>
<if test="logo != null">logo,</if>
<if test="sort != null">sort,</if>
<if test="status != null">status,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="typeId != null">#{typeId},</if>
<if test="name != null">#{name},</if>
<if test="logo != null">#{logo},</if>
<if test="sort != null">#{sort},</if>
<if test="status != null">#{status},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="update">
UPDATE cue_brand
<set>
<if test="typeId != null">type_id = #{typeId},</if>
<if test="name != null">name = #{name},</if>
<if test="logo != null">logo = #{logo},</if>
<if test="sort != null">sort = #{sort},</if>
<if test="status != null">status = #{status},</if>
</set>
WHERE id = #{id}
</update>
<update id="updateStatus">
UPDATE
cue_brand
SET
status = #{status}
WHERE
id = #{id}
</update>
</mapper>

View File

@ -0,0 +1,80 @@
<?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.tmerclub.cloud.cuerecycle.mapper.CueProductMapper">
<resultMap id="BaseResultMap" type="com.tmerclub.cloud.cuerecycle.model.CueProduct">
<id column="id" property="id"/>
<result column="series_id" property="seriesId"/>
<result column="name" property="name"/>
<result column="description" property="description"/>
<result column="images" property="images"/>
<result column="price" property="price"/>
<result column="sort" property="sort"/>
<result column="status" property="status"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
</resultMap>
<sql id="Base_Column_List">
id, series_id, name, description, images, price, sort, status, create_time, update_time
</sql>
<select id="selectById" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"/>
FROM cue_product
WHERE id = #{id}
</select>
<select id="listBySeries" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"/>
FROM cue_product
WHERE series_id = #{seriesId}
AND status = 1
ORDER BY sort ASC, id DESC
</select>
<select id="list" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"/>
FROM cue_product
<where>
<if test="seriesId != null">
AND series_id = #{seriesId}
</if>
<if test="name != null and name != ''">
AND name LIKE CONCAT('%', #{name}, '%')
</if>
<if test="status != null">
AND status = #{status}
</if>
</where>
ORDER BY sort ASC, id DESC
</select>
<insert id="insert" useGeneratedKeys="true" keyProperty="id">
INSERT INTO cue_product (series_id, name, description, images, price, sort, status)
VALUES (#{seriesId}, #{name}, #{description}, #{images}, #{price}, #{sort}, #{status})
</insert>
<update id="update">
UPDATE cue_product
<set>
<if test="seriesId != null">series_id = #{seriesId},</if>
<if test="name != null">name = #{name},</if>
<if test="description != null">description = #{description},</if>
<if test="images != null">images = #{images},</if>
<if test="price != null">price = #{price},</if>
<if test="sort != null">sort = #{sort},</if>
<if test="status != null">status = #{status},</if>
</set>
WHERE id = #{id}
</update>
<update id="updateStatus">
UPDATE
cue_product
SET
status = #{status}
WHERE
id = #{id}
</update>
</mapper>

View File

@ -0,0 +1,101 @@
<?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.tmerclub.cloud.cuerecycle.mapper.CueSeriesMapper">
<resultMap id="BaseResultMap" type="com.tmerclub.cloud.cuerecycle.model.CueSeries">
<id column="id" property="id"/>
<result column="brand_id" property="brandId"/>
<result column="name" property="name"/>
<result column="sort" property="sort"/>
<result column="status" property="status"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
</resultMap>
<sql id="Base_Column_List">
id, brand_id, name, sort, status, create_time, update_time
</sql>
<select id="selectById" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM
cue_series
WHERE
id = #{id}
</select>
<select id="listByBrand" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM
cue_series
WHERE
brand_id = #{brandId}
AND status = 1
ORDER BY
sort ASC,
id DESC
</select>
<select id="list" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM
cue_series
<where>
<if test="brandId != null">
AND brand_id =
#{brandId}
</if>
<if test="name != null and name != ''">
AND name LIKE CONCAT('%',#{name},'%')
</if>
<if test="status != null">
AND status = #{status}
</if>
</where>
ORDER BY
sort ASC,
id DESC
</select>
<insert id="insert" useGeneratedKeys="true" keyProperty="id">
INSERT INTO cue_series
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="brandId != null">brand_id,</if>
<if test="name != null">name,</if>
<if test="sort != null">sort,</if>
<if test="status != null">status,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="brandId != null">#{brandId},</if>
<if test="name != null">#{name},</if>
<if test="sort != null">#{sort},</if>
<if test="status != null">#{status},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="update">
UPDATE cue_series
<set>
<if test="brandId != null">brand_id = #{brandId},</if>
<if test="name != null">name = #{name},</if>
<if test="sort != null">sort = #{sort},</if>
<if test="status != null">status = #{status},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</set>
WHERE id = #{id}
</update>
<update id="updateStatus">
UPDATE
cue_series
SET
status = #{status}
WHERE
id = #{id}
</update>
</mapper>

View File

@ -0,0 +1,97 @@
<?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.tmerclub.cloud.cuerecycle.mapper.CueTypeMapper">
<resultMap id="BaseResultMap" type="com.tmerclub.cloud.cuerecycle.model.CueType">
<id column="id" property="id"/>
<result column="name" property="name"/>
<result column="image" property="image"/>
<result column="sort" property="sort"/>
<result column="status" property="status"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
</resultMap>
<sql id="Base_Column_List">
id, name, image, sort, status, create_time, update_time
</sql>
<select id="selectById" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM
cue_type
WHERE
id = #{id}
</select>
<select id="listEnabled" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM
cue_type
WHERE
status = 1
ORDER BY
sort ASC,
id DESC
</select>
<select id="list" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM
cue_type
<where>
<if test="name != null and name != ''">
AND name LIKE CONCAT('%', #{name}, '%')
</if>
<if test="status != null">
AND status = #{status}
</if>
</where>
ORDER BY
sort ASC,
id DESC
</select>
<insert id="insert" useGeneratedKeys="true" keyProperty="id">
INSERT INTO cue_type
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">name,</if>
<if test="image != null">image,</if>
<if test="sort != null">sort,</if>
<if test="status != null">status,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
<if test="image != null">#{image},</if>
<if test="sort != null">#{sort},</if>
<if test="status != null">#{status},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="update">
UPDATE cue_type
<set>
<if test="name != null">name = #{name},</if>
<if test="image != null">image = #{image},</if>
<if test="sort != null">sort = #{sort},</if>
<if test="status != null">status = #{status},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</set>
WHERE id = #{id}
</update>
<update id="updateStatus">
UPDATE
cue_type
SET
status = #{status}
WHERE
id = #{id}
</update>
</mapper>