Commit ccb1b5ab8a019c2ac9299baa64314b0911612cef
1 parent
6d57a347
轮播图内容表初始化
Showing
5 changed files
with
194 additions
and
0 deletions
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
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> |