Commit fe7320133d7970d7b7a62241a1364228a6eaa2be

Authored by fengliang
2 parents d803981b 5fb3f442

Merge remote-tracking branch 'origin/feature_v20240912' into feature_v20240912

etrade-admin/src/main/java/com/diligrp/etrade/admin/dao/BannerContentMapper.java 0 → 100644
  1 +package com.diligrp.etrade.admin.dao;
  2 +
  3 +
  4 +import com.diligrp.etrade.core.mybatis.MybatisMapperSupport;
  5 +import org.springframework.stereotype.Repository;
  6 +
  7 +/**
  8 +* @author dili
  9 +* @description 针对表【banner_content(内容管理-轮播图)】的数据库操作Mapper
  10 +* @createDate 2024-09-13 16:09:46
  11 +* @Entity com.diligrp.etrade.admin.domain.BannerContent
  12 +*/
  13 +@Repository
  14 +public interface BannerContentMapper extends MybatisMapperSupport {
  15 +}
  16 +
  17 +
  18 +
  19 +
etrade-admin/src/main/java/com/diligrp/etrade/admin/model/BannerContent.java 0 → 100644
  1 +package com.diligrp.etrade.admin.model;
  2 +
  3 +import com.diligrp.etrade.core.domain.BaseDo;
  4 +
  5 +import java.io.Serializable;
  6 +
  7 +/**
  8 + * 内容管理-轮播图
  9 + * @TableName banner_content
  10 + */
  11 +public class BannerContent extends BaseDo implements Serializable {
  12 + /**
  13 + * 自增ID
  14 + */
  15 + private Long id;
  16 +
  17 + /**
  18 + * 轮播图ID
  19 + */
  20 + private Long bannerId;
  21 +
  22 + /**
  23 + * 内容
  24 + */
  25 + private String content;
  26 +
  27 + /**
  28 + * 图片链接
  29 + */
  30 + private String picUrl;
  31 +
  32 + /**
  33 + * 市场ID
  34 + */
  35 + private Long marketId;
  36 +
  37 + /**
  38 + * 自增ID
  39 + */
  40 + public Long getId() {
  41 + return id;
  42 + }
  43 +
  44 + /**
  45 + * 自增ID
  46 + */
  47 + public void setId(Long id) {
  48 + this.id = id;
  49 + }
  50 +
  51 + /**
  52 + * 轮播图ID
  53 + */
  54 + public Long getBannerId() {
  55 + return bannerId;
  56 + }
  57 +
  58 + /**
  59 + * 轮播图ID
  60 + */
  61 + public void setBannerId(Long bannerId) {
  62 + this.bannerId = bannerId;
  63 + }
  64 +
  65 + /**
  66 + * 内容
  67 + */
  68 + public String getContent() {
  69 + return content;
  70 + }
  71 +
  72 + /**
  73 + * 内容
  74 + */
  75 + public void setContent(String content) {
  76 + this.content = content;
  77 + }
  78 +
  79 + /**
  80 + * 图片链接
  81 + */
  82 + public String getPicUrl() {
  83 + return picUrl;
  84 + }
  85 +
  86 + /**
  87 + * 图片链接
  88 + */
  89 + public void setPicUrl(String picUrl) {
  90 + this.picUrl = picUrl;
  91 + }
  92 +
  93 + /**
  94 + * 市场ID
  95 + */
  96 + public Long getMarketId() {
  97 + return marketId;
  98 + }
  99 +
  100 + /**
  101 + * 市场ID
  102 + */
  103 + public void setMarketId(Long marketId) {
  104 + this.marketId = marketId;
  105 + }
  106 + @Override
  107 + public String toString() {
  108 + StringBuilder sb = new StringBuilder();
  109 + sb.append(getClass().getSimpleName());
  110 + sb.append(" [");
  111 + sb.append("Hash = ").append(hashCode());
  112 + sb.append(", id=").append(id);
  113 + sb.append(", bannerId=").append(bannerId);
  114 + sb.append(", content=").append(content);
  115 + sb.append(", picUrl=").append(picUrl);
  116 + sb.append(", marketId=").append(marketId);
  117 + sb.append("]");
  118 + return sb.toString();
  119 + }
  120 +}
0 \ No newline at end of file 121 \ No newline at end of file
etrade-admin/src/main/java/com/diligrp/etrade/admin/service/BannerContentService.java 0 → 100644
  1 +package com.diligrp.etrade.admin.service;
  2 +
  3 +/**
  4 +* @author dili
  5 +* @description 针对表【banner_content(内容管理-轮播图)】的数据库操作Service
  6 +* @createDate 2024-09-13 16:09:46
  7 +*/
  8 +public interface BannerContentService {
  9 +
  10 +}
etrade-admin/src/main/java/com/diligrp/etrade/admin/service/impl/BannerContentServiceImpl.java 0 → 100644
  1 +package com.diligrp.etrade.admin.service.impl;
  2 +
  3 +import com.diligrp.etrade.admin.dao.BannerContentMapper;
  4 +import com.diligrp.etrade.admin.service.BannerContentService;
  5 +import org.slf4j.Logger;
  6 +import org.slf4j.LoggerFactory;
  7 +import org.springframework.beans.factory.annotation.Autowired;
  8 +import org.springframework.stereotype.Service;
  9 +
  10 +/**
  11 +* @author dili
  12 +* @description 针对表【banner_content(内容管理-轮播图)】的数据库操作Service实现
  13 +* @createDate 2024-09-13 16:09:46
  14 +*/
  15 +@Service
  16 +public class BannerContentServiceImpl implements BannerContentService{
  17 + private final Logger LOG = LoggerFactory.getLogger(BannerContentServiceImpl.class);
  18 +
  19 + @Autowired
  20 + private BannerContentMapper bannerContentMapper;
  21 +
  22 +}
  23 +
  24 +
  25 +
  26 +
etrade-admin/src/main/resources/com/diligrp/etrade/dao/mapper/BannerContentMapper.xml 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper
  3 + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4 + "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5 +<mapper namespace="com.diligrp.etrade.admin.dao.BannerContentMapper">
  6 +
  7 + <resultMap id="BaseResultMap" type="com.diligrp.etrade.admin.model.BannerContent">
  8 + <id property="id" column="id" jdbcType="BIGINT"/>
  9 + <result property="bannerId" column="banner_id" jdbcType="BIGINT"/>
  10 + <result property="content" column="content" jdbcType="VARCHAR"/>
  11 + <result property="picUrl" column="pic_url" jdbcType="VARCHAR"/>
  12 + <result property="marketId" column="market_id" jdbcType="BIGINT"/>
  13 + </resultMap>
  14 +
  15 + <sql id="Base_Column_List">
  16 + id,banner_id,content,
  17 + pic_url,market_id
  18 + </sql>
  19 +</mapper>
scripts/etrade-admin/etrade_admin.sql
@@ -13,6 +13,7 @@ CREATE TABLE `banner` ( @@ -13,6 +13,7 @@ CREATE TABLE `banner` (
13 `banner_type_id` bigint NOT NULL COMMENT '轮播图所属类型ID', 13 `banner_type_id` bigint NOT NULL COMMENT '轮播图所属类型ID',
14 `title` varchar(25) NOT NULL COMMENT '标题', 14 `title` varchar(25) NOT NULL COMMENT '标题',
15 `pic_url` varchar(255) NOT NULL COMMENT '图片链接', 15 `pic_url` varchar(255) NOT NULL COMMENT '图片链接',
  16 + `link_type` int NULL DEFAULT NULL COMMENT '链接类型(枚举)',
16 `link` varchar(255) NULL DEFAULT NULL COMMENT '链接', 17 `link` varchar(255) NULL DEFAULT NULL COMMENT '链接',
17 `remark` varchar(255) NULL DEFAULT NULL COMMENT '备注', 18 `remark` varchar(255) NULL DEFAULT NULL COMMENT '备注',
18 `state` tinyint(1) NOT NULL COMMENT '状态:禁用0,启用1', 19 `state` tinyint(1) NOT NULL COMMENT '状态:禁用0,启用1',
@@ -293,4 +294,15 @@ CREATE TABLE `dili_etrade`.`setting_shop_common` @@ -293,4 +294,15 @@ CREATE TABLE `dili_etrade`.`setting_shop_common`
293 PRIMARY KEY (`id`) USING BTREE, 294 PRIMARY KEY (`id`) USING BTREE,
294 UNIQUE KEY `unq_s_t_m` (`shop_id`, `type`, `market_id`) USING BTREE COMMENT '店铺唯一' 295 UNIQUE KEY `unq_s_t_m` (`shop_id`, `type`, `market_id`) USING BTREE COMMENT '店铺唯一'
295 ) ENGINE = InnoDB 296 ) ENGINE = InnoDB
296 - AUTO_INCREMENT = 1 COMMENT ='店铺公共设置';  
297 \ No newline at end of file 297 \ No newline at end of file
  298 + AUTO_INCREMENT = 1 COMMENT ='店铺公共设置';
  299 +
  300 +DROP TABLE IF EXISTS `dili_xtrade`.`banner_content`;
  301 +CREATE TABLE `dili_xtrade`.`banner_content` (
  302 + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  303 + `banner_id` bigint DEFAULT NULL COMMENT '轮播图ID',
  304 + `content` text COMMENT '内容',
  305 + `pic_url` varchar(255) DEFAULT NULL COMMENT '图片链接',
  306 + `market_id` bigint NOT NULL COMMENT '市场ID',
  307 + PRIMARY KEY (`id`) USING BTREE,
  308 + UNIQUE INDEX `unq_banner_id`(`banner_id`, `market_id`) USING BTREE
  309 +) ENGINE=InnoDB ROW_FORMAT=DYNAMIC COMMENT='内容管理-轮播图';
298 \ No newline at end of file 310 \ No newline at end of file
scripts/upgrade/v1.0.25/xtrade-order_v20240913.sql 0 → 100644
  1 +ALTER TABLE `dili_xtrade`.`banner`
  2 +ADD COLUMN `link_type` int NULL DEFAULT NULL COMMENT '链接类型(枚举)' AFTER `pic_url`;
  3 +
  4 +DROP TABLE IF EXISTS `dili_xtrade`.`banner_content`;
  5 +CREATE TABLE `dili_xtrade`.`banner_content` (
  6 + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  7 + `banner_id` bigint DEFAULT NULL COMMENT '轮播图ID',
  8 + `content` text COMMENT '内容',
  9 + `pic_url` varchar(255) DEFAULT NULL COMMENT '图片链接',
  10 + `market_id` bigint NOT NULL COMMENT '市场ID',
  11 + PRIMARY KEY (`id`) USING BTREE,
  12 + UNIQUE INDEX `unq_banner_id`(`banner_id`, `market_id`) USING BTREE
  13 +) ENGINE=InnoDB ROW_FORMAT=DYNAMIC COMMENT='内容管理-轮播图';
0 \ No newline at end of file 14 \ No newline at end of file