Browse Source

开发微信分享信息

Administrator 4 years ago
parent
commit
d19fd2261a

+ 0 - 18
.classpath

@@ -10,7 +10,6 @@
 	<classpathentry kind="src" path="src/main/resources"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
 		<attributes>
-			<attribute name="module" value="true"/>
 			<attribute name="maven.pomderived" value="true"/>
 		</attributes>
 	</classpathentry>
@@ -28,23 +27,6 @@
 			<attribute name="maven.pomderived" value="true"/>
 		</attributes>
 	</classpathentry>
-	<classpathentry kind="src" path="target/generated-sources/annotations">
-		<attributes>
-			<attribute name="ignore_optional_problems" value="true"/>
-			<attribute name="optional" value="true"/>
-			<attribute name="maven.pomderived" value="true"/>
-			<attribute name="m2e-apt" value="true"/>
-		</attributes>
-	</classpathentry>
-	<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
-		<attributes>
-			<attribute name="ignore_optional_problems" value="true"/>
-			<attribute name="test" value="true"/>
-			<attribute name="optional" value="true"/>
-			<attribute name="maven.pomderived" value="true"/>
-			<attribute name="m2e-apt" value="true"/>
-		</attributes>
-	</classpathentry>
 	<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/8080"/>
 	<classpathentry kind="output" path="target/classes"/>
 </classpath>

+ 20 - 1
.settings/org.eclipse.wst.common.component

@@ -1,13 +1,32 @@
 <?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
+            
+    
     <wb-module deploy-name="local">
         <wb-resource deploy-path="/WEB-INF/web.xml" source-path="/src/main/webapp/WEB-INF/web.xml"/>
+                        
+        
         <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
+                        
+        
         <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
+                        
+        
         <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
+                        
+        
         <wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
+                        
+        
         <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/webapp"/>
-        <wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/annotations"/>
+                        
+        
         <property name="java-output-path" value="/wechat-guessing/target/classes"/>
+                        
+        
         <property name="context-root" value="local"/>
+                    
+    
     </wb-module>
+        
+
 </project-modules>

+ 5 - 4
GeneratorConfig.xml

@@ -30,20 +30,21 @@
             <!-- 是否使用bigDecimal, false可自动转化以下类型(Long, Integer, Short, etc.) -->
             <property name="forceBigDecimals" value="false"/>
         </javaTypeResolver>
-    <javaModelGenerator targetPackage="com.kede.common.model" targetProject="kede-web-hn" >
+    <javaModelGenerator targetPackage="com.kede.common.model" targetProject="kede-officialWeb-HN" >
     		<!-- 是否让schema作为包的后缀 -->
             <property name="enableSubPackages" value="false"/>
             <!-- 从数据库返回的值去掉前后空格 -->
             <property name="trimStrings" value="true"/>
     </javaModelGenerator>
-    <sqlMapGenerator targetPackage="com.kede.common.mapper" targetProject="kede-web-hn" >
+    <sqlMapGenerator targetPackage="com.kede.common.mapper" targetProject="kede-officialWeb-HN" >
     	<property name="enableSubPackages" value="false"/>
     </sqlMapGenerator>
-    <javaClientGenerator  targetPackage="com.kede.common.dao"  type="XMLMAPPER" targetProject="kede-web-hn"  >
+    <javaClientGenerator  targetPackage="com.kede.common.dao"  type="XMLMAPPER" targetProject="kede-officialWeb-HN"  >
     <property name="enableSubPackages" value="false"/>
      <property name="nullCatalogMeansCurrent" value="true"/>
     </javaClientGenerator>
-    <table schema="aft_ow" tableName="project"   enableCountByExample="false" enableUpdateByExample="false" 
+    <!-- 选择数据库与表 -->
+    <table schema="aft_ow" tableName="wechat_share"   enableCountByExample="false" enableUpdateByExample="false" 
     	enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" 
     	enableSelectByPrimaryKey="true" enableUpdateByPrimaryKey="true" enableDeleteByPrimaryKey="true" >
          <property name="useActualColumnNames" value="false"/>

+ 104 - 96
pom.xml

@@ -1,13 +1,14 @@
-<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/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>com.anderx</groupId>
-  <artifactId>kede-web-hn</artifactId>
-  <packaging>war</packaging>
-  <version>0.0.1-SNAPSHOT</version>
-  <name>kede-web-hn</name>
-  <url>http://maven.apache.org</url>
- <properties>
+<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/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>com.anderx</groupId>
+	<artifactId>kede-web-hn</artifactId>
+	<packaging>war</packaging>
+	<version>0.0.1-SNAPSHOT</version>
+	<name>kede-web-hn</name>
+	<url>http://maven.apache.org</url>
+	<properties>
 		<java-version>1.8</java-version>
 		<org.springframework-version>4.2.5.RELEASE</org.springframework-version>
 		<org.slf4j-version>1.7.21</org.slf4j-version>
@@ -17,26 +18,26 @@
 		<org.aspectj-version>1.6.10</org.aspectj-version>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 	</properties>
-	<profiles>  
-        <profile>  
-            <id>local</id>  
-            <activation>  
-                <activeByDefault>true</activeByDefault>  
-            </activation>  
-            <properties>  
-                <profiles.activation>local</profiles.activation>  
-            </properties>  
-        </profile>  
-        <profile>  
-            <id>prod</id>  
-            <properties>  
-                <profiles.activation>prod</profiles.activation>  
-            </properties>  
-        </profile>  
-	</profiles> 
+	<profiles>
+		<profile>
+			<id>local</id>
+			<activation>
+				<activeByDefault>true</activeByDefault>
+			</activation>
+			<properties>
+				<profiles.activation>local</profiles.activation>
+			</properties>
+		</profile>
+		<profile>
+			<id>prod</id>
+			<properties>
+				<profiles.activation>prod</profiles.activation>
+			</properties>
+		</profile>
+	</profiles>
 
 	<dependencies>
-	
+
 		<!-- spring -->
 		<dependency>
 			<groupId>org.springframework</groupId>
@@ -81,28 +82,28 @@
 			<artifactId>spring-messaging</artifactId>
 			<version>${org.springframework-version}</version>
 		</dependency>
-		
+
 		<dependency>
-		    <groupId>org.springframework.data</groupId>
-		    <artifactId>spring-data-redis</artifactId>
-		    <version>1.8.3.RELEASE</version>
+			<groupId>org.springframework.data</groupId>
+			<artifactId>spring-data-redis</artifactId>
+			<version>1.8.3.RELEASE</version>
 		</dependency>
-		
+
 		<dependency>
-		    <groupId>org.thymeleaf</groupId>
-		    <artifactId>thymeleaf-spring4</artifactId>
-		    <version>3.0.5.RELEASE</version>
+			<groupId>org.thymeleaf</groupId>
+			<artifactId>thymeleaf-spring4</artifactId>
+			<version>3.0.5.RELEASE</version>
 		</dependency>
 		<dependency>
-		    <groupId>nz.net.ultraq.thymeleaf</groupId>
-		    <artifactId>thymeleaf-layout-dialect</artifactId>
-		    <version>2.2.1</version>
+			<groupId>nz.net.ultraq.thymeleaf</groupId>
+			<artifactId>thymeleaf-layout-dialect</artifactId>
+			<version>2.2.1</version>
 		</dependency>
 		<dependency>
-            <groupId>com.github.theborakompanioni</groupId>
-            <artifactId>thymeleaf-extras-shiro</artifactId>
-            <version>2.0.0</version>
-        </dependency>
+			<groupId>com.github.theborakompanioni</groupId>
+			<artifactId>thymeleaf-extras-shiro</artifactId>
+			<version>2.0.0</version>
+		</dependency>
 		<!-- spring end -->
 
 		<!-- redis begin -->
@@ -306,33 +307,33 @@
 			<artifactId>classmate</artifactId>
 			<version>1.1.0</version>
 		</dependency>
-	    <dependency>
-		    <groupId>com.googlecode.json-simple</groupId>
-		    <artifactId>json-simple</artifactId>
-		    <version>1.1.1</version>
+		<dependency>
+			<groupId>com.googlecode.json-simple</groupId>
+			<artifactId>json-simple</artifactId>
+			<version>1.1.1</version>
 		</dependency>
 		<dependency>
-		    <groupId>org.apache.poi</groupId>
-		    <artifactId>poi-ooxml</artifactId>
-		    <version>3.17</version>
+			<groupId>org.apache.poi</groupId>
+			<artifactId>poi-ooxml</artifactId>
+			<version>3.17</version>
 		</dependency>
-       <dependency>
- 		 	<groupId>com.aliyun</groupId>
-  			<artifactId>aliyun-java-sdk-dysmsapi</artifactId>
-  			<version>1.0.0</version>
+		<dependency>
+			<groupId>com.aliyun</groupId>
+			<artifactId>aliyun-java-sdk-dysmsapi</artifactId>
+			<version>1.0.0</version>
 		</dependency>
 		<dependency>
 			<groupId>com.aliyun</groupId>
 			<artifactId>aliyun-java-sdk-core</artifactId>
 			<version>3.5.0</version>
 		</dependency>
-        <dependency>
+		<dependency>
 			<groupId>org.apache.httpcomponents</groupId>
 			<artifactId>httpasyncclient</artifactId>
 			<version>4.1.3</version>
 		</dependency>
-        
-        <!-- jpush -->
+
+		<!-- jpush -->
 		<dependency>
 			<groupId>cn.jpush.api</groupId>
 			<artifactId>jiguang-common</artifactId>
@@ -351,10 +352,17 @@
 		</dependency>
 		<!-- javaMail -->
 		<dependency>
-		    <groupId>javax.mail</groupId>
-		    <artifactId>mail</artifactId>
-		    <version>1.4.7</version>
+			<groupId>javax.mail</groupId>
+			<artifactId>mail</artifactId>
+			<version>1.4.7</version>
 		</dependency>
+		<!--maven中引入 -->
+		<dependency>
+			<groupId>javax.xml.bind</groupId>
+			<artifactId>jaxb-api</artifactId>
+			<version>2.3.0</version>
+		</dependency>
+
 	</dependencies>
 	<build>
 		<resources>
@@ -390,45 +398,45 @@
 					<skip>true</skip>
 				</configuration>
 			</plugin>
-			<plugin>    
-			    <groupId>org.apache.maven.plugins</groupId>    
-			    <artifactId>maven-surefire-plugin</artifactId>    
-			    <version>2.5</version>    
-			    <configuration>    
-			        <skip>true</skip>    
-			    </configuration>    
-			</plugin> 
-			<plugin>  
-                <groupId>org.apache.maven.plugins</groupId>  
-                <artifactId>maven-war-plugin</artifactId>  
-                <version>3.1.0</version>  
-                <configuration>  
-                    <warName>${profiles.activation}</warName>  
-                    <!-- 激活spring profile -->  
-                    <webResources>  
-                        <resource>  
-                            <filtering>true</filtering>  
-                            <directory>src/main/webapp</directory>  
-                            <includes>  
-                                <include>**/**</include>  
-                            </includes>  
-                        </resource>  
-                        <resource>  
-                            <filtering>true</filtering>  
-                            <directory>src/main/resources</directory>
-                            <targetPath>WEB-INF/classes</targetPath>
-                            <includes>  
-                                <include>**/**</include>  
-                            </includes>  
-                        </resource>  
-                    </webResources>  
-                    <warSourceDirectory>src/main/webapp</warSourceDirectory>  
-                    <webXml>src/main/webapp/WEB-INF/web.xml</webXml>  
-                </configuration>  
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-surefire-plugin</artifactId>
+				<version>2.5</version>
+				<configuration>
+					<skip>true</skip>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-war-plugin</artifactId>
+				<version>3.1.0</version>
+				<configuration>
+					<warName>${profiles.activation}</warName>
+					<!-- 激活spring profile -->
+					<webResources>
+						<resource>
+							<filtering>true</filtering>
+							<directory>src/main/webapp</directory>
+							<includes>
+								<include>**/**</include>
+							</includes>
+						</resource>
+						<resource>
+							<filtering>true</filtering>
+							<directory>src/main/resources</directory>
+							<targetPath>WEB-INF/classes</targetPath>
+							<includes>
+								<include>**/**</include>
+							</includes>
+						</resource>
+					</webResources>
+					<warSourceDirectory>src/main/webapp</warSourceDirectory>
+					<webXml>src/main/webapp/WEB-INF/web.xml</webXml>
+				</configuration>
 			</plugin>
 		</plugins>
 	</build>
-	
+
 	<repositories>
 		<repository>
 			<id>aliyun-repos</id>

+ 7 - 7
src/main/java/com/kede/common/dao/ProjectMapper.java

@@ -7,43 +7,43 @@ public interface ProjectMapper {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table project
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	int deleteByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table project
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	int insert(Project record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table project
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	int insertSelective(Project record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table project
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	Project selectByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table project
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	int updateByPrimaryKeySelective(Project record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table project
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	int updateByPrimaryKeyWithBLOBs(Project record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table project
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	int updateByPrimaryKey(Project record);
 

+ 47 - 0
src/main/java/com/kede/common/dao/WechatShareMapper.java

@@ -0,0 +1,47 @@
+package com.kede.common.dao;
+
+import org.apache.ibatis.annotations.Param;
+
+import com.kede.common.model.WechatShare;
+import com.kede.wechat.bo.WechatShareBo;
+
+public interface WechatShareMapper {
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table wechat_share
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	int deleteByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table wechat_share
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	int insert(WechatShare record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table wechat_share
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	int insertSelective(WechatShare record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table wechat_share
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	WechatShare selectByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table wechat_share
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	int updateByPrimaryKeySelective(WechatShare record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table wechat_share
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	int updateByPrimaryKey(WechatShare record);
+
+	WechatShareBo selectByPid(@Param("id") Integer id,@Param("pid") Integer pid);
+}

+ 11 - 11
src/main/java/com/kede/common/mapper/ProjectMapper.xml

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Apr 15 10:11:06 CST 2021.
+      This element was generated on Mon Jun 21 09:16:38 CST 2021.
     -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="name" jdbcType="VARCHAR" property="name" />
@@ -26,7 +26,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Apr 15 10:11:06 CST 2021.
+      This element was generated on Mon Jun 21 09:16:38 CST 2021.
     -->
     <result column="content" jdbcType="LONGVARCHAR" property="content" />
     <result column="commodity_content" jdbcType="LONGVARCHAR" property="commodityContent" />
@@ -35,7 +35,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Apr 15 10:11:06 CST 2021.
+      This element was generated on Mon Jun 21 09:16:38 CST 2021.
     -->
     id, `name`, amount, thumbnail_url, `status`, sort, release_status, create_time, release_time, 
     `host`, `type`, commodity_url, commodity_type, summary
@@ -44,7 +44,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Apr 15 10:11:06 CST 2021.
+      This element was generated on Mon Jun 21 09:16:38 CST 2021.
     -->
     content, commodity_content
   </sql>
@@ -52,7 +52,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Apr 15 10:11:06 CST 2021.
+      This element was generated on Mon Jun 21 09:16:38 CST 2021.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -65,7 +65,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Apr 15 10:11:06 CST 2021.
+      This element was generated on Mon Jun 21 09:16:38 CST 2021.
     -->
     delete from project
     where id = #{id,jdbcType=INTEGER}
@@ -74,7 +74,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Apr 15 10:11:06 CST 2021.
+      This element was generated on Mon Jun 21 09:16:38 CST 2021.
     -->
     insert into project (id, `name`, amount, 
       thumbnail_url, `status`, sort, 
@@ -93,7 +93,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Apr 15 10:11:06 CST 2021.
+      This element was generated on Mon Jun 21 09:16:38 CST 2021.
     -->
     insert into project
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -201,7 +201,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Apr 15 10:11:06 CST 2021.
+      This element was generated on Mon Jun 21 09:16:38 CST 2021.
     -->
     update project
     <set>
@@ -257,7 +257,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Apr 15 10:11:06 CST 2021.
+      This element was generated on Mon Jun 21 09:16:38 CST 2021.
     -->
     update project
     set `name` = #{name,jdbcType=VARCHAR},
@@ -281,7 +281,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu Apr 15 10:11:06 CST 2021.
+      This element was generated on Mon Jun 21 09:16:38 CST 2021.
     -->
     update project
     set `name` = #{name,jdbcType=VARCHAR},

+ 198 - 0
src/main/java/com/kede/common/mapper/WechatShareMapper.xml

@@ -0,0 +1,198 @@
+<?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.kede.common.dao.WechatShareMapper">
+	<resultMap id="BaseResultMap"
+		type="com.kede.common.model.WechatShare">
+		<!-- WARNING - @mbg.generated This element is automatically generated by 
+			MyBatis Generator, do not modify. This element was generated on Mon Jun 21 
+			09:35:46 CST 2021. -->
+		<id column="id" jdbcType="INTEGER" property="id" />
+		<result column="type" jdbcType="INTEGER" property="type" />
+		<result column="pid" jdbcType="INTEGER" property="pid" />
+		<result column="title" jdbcType="VARCHAR" property="title" />
+		<result column="share_url" jdbcType="VARCHAR"
+			property="shareUrl" />
+		<result column="moments_url" jdbcType="VARCHAR"
+			property="momentsUrl" />
+		<result column="create_time" jdbcType="TIMESTAMP"
+			property="createTime" />
+	</resultMap>
+	<sql id="Base_Column_List">
+		<!-- WARNING - @mbg.generated This element is automatically generated by 
+			MyBatis Generator, do not modify. This element was generated on Mon Jun 21 
+			09:35:46 CST 2021. -->
+		id, `type`, pid, title, share_url, moments_url, create_time
+	</sql>
+	<select id="selectByPrimaryKey"
+		parameterType="java.lang.Integer" resultMap="BaseResultMap">
+		<!-- WARNING - @mbg.generated This element is automatically generated by 
+			MyBatis Generator, do not modify. This element was generated on Mon Jun 21 
+			09:35:46 CST 2021. -->
+		select
+		<include refid="Base_Column_List" />
+		from wechat_share
+		where id = #{id,jdbcType=INTEGER}
+	</select>
+
+
+	<delete id="deleteByPrimaryKey"
+		parameterType="java.lang.Integer">
+		<!-- WARNING - @mbg.generated This element is automatically generated by 
+			MyBatis Generator, do not modify. This element was generated on Mon Jun 21 
+			09:35:46 CST 2021. -->
+		delete from wechat_share
+		where id = #{id,jdbcType=INTEGER}
+	</delete>
+	<insert id="insert"
+		parameterType="com.kede.common.model.WechatShare">
+		<!-- WARNING - @mbg.generated This element is automatically generated by 
+			MyBatis Generator, do not modify. This element was generated on Mon Jun 21 
+			09:35:46 CST 2021. -->
+		insert into wechat_share (id, `type`, pid,
+		title, share_url, moments_url,
+		create_time)
+		values (#{id,jdbcType=INTEGER}, #{type,jdbcType=INTEGER},
+		#{pid,jdbcType=INTEGER},
+		#{title,jdbcType=VARCHAR}, #{shareUrl,jdbcType=VARCHAR}, #{momentsUrl,jdbcType=VARCHAR},
+		#{createTime,jdbcType=TIMESTAMP})
+	</insert>
+	<insert id="insertSelective"
+		parameterType="com.kede.common.model.WechatShare">
+		<!-- WARNING - @mbg.generated This element is automatically generated by 
+			MyBatis Generator, do not modify. This element was generated on Mon Jun 21 
+			09:35:46 CST 2021. -->
+		insert into wechat_share
+		<trim prefix="(" suffix=")" suffixOverrides=",">
+			<if test="id != null">
+				id,
+			</if>
+			<if test="type != null">
+				`type`,
+			</if>
+			<if test="pid != null">
+				pid,
+			</if>
+			<if test="title != null">
+				title,
+			</if>
+			<if test="shareUrl != null">
+				share_url,
+			</if>
+			<if test="momentsUrl != null">
+				moments_url,
+			</if>
+			<if test="createTime != null">
+				create_time,
+			</if>
+		</trim>
+		<trim prefix="values (" suffix=")" suffixOverrides=",">
+			<if test="id != null">
+				#{id,jdbcType=INTEGER},
+			</if>
+			<if test="type != null">
+				#{type,jdbcType=INTEGER},
+			</if>
+			<if test="pid != null">
+				#{pid,jdbcType=INTEGER},
+			</if>
+			<if test="title != null">
+				#{title,jdbcType=VARCHAR},
+			</if>
+			<if test="shareUrl != null">
+				#{shareUrl,jdbcType=VARCHAR},
+			</if>
+			<if test="momentsUrl != null">
+				#{momentsUrl,jdbcType=VARCHAR},
+			</if>
+			<if test="createTime != null">
+				#{createTime,jdbcType=TIMESTAMP},
+			</if>
+		</trim>
+	</insert>
+	<update id="updateByPrimaryKeySelective"
+		parameterType="com.kede.common.model.WechatShare">
+		<!-- WARNING - @mbg.generated This element is automatically generated by 
+			MyBatis Generator, do not modify. This element was generated on Mon Jun 21 
+			09:35:46 CST 2021. -->
+		update wechat_share
+		<set>
+			<if test="type != null">
+				`type` = #{type,jdbcType=INTEGER},
+			</if>
+			<if test="pid != null">
+				pid = #{pid,jdbcType=INTEGER},
+			</if>
+			<if test="title != null">
+				title = #{title,jdbcType=VARCHAR},
+			</if>
+			<if test="shareUrl != null">
+				share_url = #{shareUrl,jdbcType=VARCHAR},
+			</if>
+			<if test="momentsUrl != null">
+				moments_url = #{momentsUrl,jdbcType=VARCHAR},
+			</if>
+			<if test="createTime != null">
+				create_time = #{createTime,jdbcType=TIMESTAMP},
+			</if>
+		</set>
+		where id = #{id,jdbcType=INTEGER}
+	</update>
+	<update id="updateByPrimaryKey"
+		parameterType="com.kede.common.model.WechatShare">
+		<!-- WARNING - @mbg.generated This element is automatically generated by 
+			MyBatis Generator, do not modify. This element was generated on Mon Jun 21 
+			09:35:46 CST 2021. -->
+		update wechat_share
+		set `type` = #{type,jdbcType=INTEGER},
+		pid = #{pid,jdbcType=INTEGER},
+		title = #{title,jdbcType=VARCHAR},
+		share_url = #{shareUrl,jdbcType=VARCHAR},
+		moments_url = #{momentsUrl,jdbcType=VARCHAR},
+		create_time = #{createTime,jdbcType=TIMESTAMP}
+		where id = #{id,jdbcType=INTEGER}
+	</update>
+
+	<select id="selectByPid" parameterType="java.lang.Integer"
+		resultType="com.kede.wechat.bo.WechatShareBo">
+		select a.id,a.`type`,a.create_time createTime ,a.moments_url momentsUrl
+		,a.share_url shareurl ,a.title
+		,a.pid,b.name pname
+		from wechat_share a left join project b on a.pid =b.id
+		where 1=1
+		<if test="pid !=null">
+		and a.pid = #{pid,jdbcType=INTEGER}
+		</if>
+		<if test="id !=null">
+		and a.id = #{id,jdbcType=INTEGER}
+		</if>
+	</select>
+
+	<select id="ListWechatShare"
+		resultType="com.kede.wechat.bo.WechatShareBo">
+		select a.id,a.`type`,a.create_time createTime ,a.moments_url
+		momentsUrl ,a.share_url shareurl ,a.title
+		,a.pid,b.name pname
+		from wechat_share a left join project b on a.pid =b.id
+		where 1=1
+		<if test="name !=null">
+			and a.title like concat('%',#{name},'%')
+		</if>
+		<if test="type !=null">
+			and a.`type` = #{type}
+		</if>
+		<if test="page_sql !=null">
+			${page_sql}
+		</if>
+	</select>
+	<select id="CountWechatShare" resultType="java.lang.Integer">
+		select count(*)
+		from wechat_share a
+		where 1=1
+		<if test="name !=null">
+			and a.title like concat('%',#{name},'%')
+		</if>
+		<if test="type !=null">
+			and a.`type` = #{type}
+		</if>
+	</select>
+</mapper>

+ 50 - 50
src/main/java/com/kede/common/model/Project.java

@@ -8,94 +8,94 @@ public class Project implements Serializable {
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column project.id
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	private Integer id;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column project.name
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	private String name;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column project.amount
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	private BigDecimal amount;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column project.thumbnail_url
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	private String thumbnailUrl;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column project.status
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	private Integer status;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column project.sort
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	private Integer sort;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column project.release_status
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	private Integer releaseStatus;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column project.create_time
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	private Date createTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column project.release_time
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	private Date releaseTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column project.host
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	private Integer host;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column project.type
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	private Integer type;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column project.commodity_url
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	private String commodityUrl;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column project.commodity_type
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	private Integer commodityType;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column project.summary
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	private String summary;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column project.content
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	private String content;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column project.commodity_content
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	private String commodityContent;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table project
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	private static final long serialVersionUID = 1L;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column project.id
 	 * @return  the value of project.id
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public Integer getId() {
 		return id;
@@ -104,7 +104,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column project.id
 	 * @param id  the value for project.id
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public void setId(Integer id) {
 		this.id = id;
@@ -113,7 +113,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column project.name
 	 * @return  the value of project.name
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public String getName() {
 		return name;
@@ -122,7 +122,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column project.name
 	 * @param name  the value for project.name
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public void setName(String name) {
 		this.name = name == null ? null : name.trim();
@@ -131,7 +131,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column project.amount
 	 * @return  the value of project.amount
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public BigDecimal getAmount() {
 		return amount;
@@ -140,7 +140,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column project.amount
 	 * @param amount  the value for project.amount
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public void setAmount(BigDecimal amount) {
 		this.amount = amount;
@@ -149,7 +149,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column project.thumbnail_url
 	 * @return  the value of project.thumbnail_url
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public String getThumbnailUrl() {
 		return thumbnailUrl;
@@ -158,7 +158,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column project.thumbnail_url
 	 * @param thumbnailUrl  the value for project.thumbnail_url
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public void setThumbnailUrl(String thumbnailUrl) {
 		this.thumbnailUrl = thumbnailUrl == null ? null : thumbnailUrl.trim();
@@ -167,7 +167,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column project.status
 	 * @return  the value of project.status
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public Integer getStatus() {
 		return status;
@@ -176,7 +176,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column project.status
 	 * @param status  the value for project.status
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public void setStatus(Integer status) {
 		this.status = status;
@@ -185,7 +185,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column project.sort
 	 * @return  the value of project.sort
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public Integer getSort() {
 		return sort;
@@ -194,7 +194,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column project.sort
 	 * @param sort  the value for project.sort
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public void setSort(Integer sort) {
 		this.sort = sort;
@@ -203,7 +203,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column project.release_status
 	 * @return  the value of project.release_status
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public Integer getReleaseStatus() {
 		return releaseStatus;
@@ -212,7 +212,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column project.release_status
 	 * @param releaseStatus  the value for project.release_status
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public void setReleaseStatus(Integer releaseStatus) {
 		this.releaseStatus = releaseStatus;
@@ -221,7 +221,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column project.create_time
 	 * @return  the value of project.create_time
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public Date getCreateTime() {
 		return createTime;
@@ -230,7 +230,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column project.create_time
 	 * @param createTime  the value for project.create_time
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
@@ -239,7 +239,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column project.release_time
 	 * @return  the value of project.release_time
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public Date getReleaseTime() {
 		return releaseTime;
@@ -248,7 +248,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column project.release_time
 	 * @param releaseTime  the value for project.release_time
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public void setReleaseTime(Date releaseTime) {
 		this.releaseTime = releaseTime;
@@ -257,7 +257,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column project.host
 	 * @return  the value of project.host
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public Integer getHost() {
 		return host;
@@ -266,7 +266,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column project.host
 	 * @param host  the value for project.host
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public void setHost(Integer host) {
 		this.host = host;
@@ -275,7 +275,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column project.type
 	 * @return  the value of project.type
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public Integer getType() {
 		return type;
@@ -284,7 +284,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column project.type
 	 * @param type  the value for project.type
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public void setType(Integer type) {
 		this.type = type;
@@ -293,7 +293,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column project.commodity_url
 	 * @return  the value of project.commodity_url
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public String getCommodityUrl() {
 		return commodityUrl;
@@ -302,7 +302,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column project.commodity_url
 	 * @param commodityUrl  the value for project.commodity_url
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public void setCommodityUrl(String commodityUrl) {
 		this.commodityUrl = commodityUrl == null ? null : commodityUrl.trim();
@@ -311,7 +311,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column project.commodity_type
 	 * @return  the value of project.commodity_type
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public Integer getCommodityType() {
 		return commodityType;
@@ -320,7 +320,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column project.commodity_type
 	 * @param commodityType  the value for project.commodity_type
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public void setCommodityType(Integer commodityType) {
 		this.commodityType = commodityType;
@@ -329,7 +329,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column project.summary
 	 * @return  the value of project.summary
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public String getSummary() {
 		return summary;
@@ -338,7 +338,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column project.summary
 	 * @param summary  the value for project.summary
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public void setSummary(String summary) {
 		this.summary = summary == null ? null : summary.trim();
@@ -347,7 +347,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column project.content
 	 * @return  the value of project.content
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public String getContent() {
 		return content;
@@ -356,7 +356,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column project.content
 	 * @param content  the value for project.content
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public void setContent(String content) {
 		this.content = content == null ? null : content.trim();
@@ -365,7 +365,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column project.commodity_content
 	 * @return  the value of project.commodity_content
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public String getCommodityContent() {
 		return commodityContent;
@@ -374,7 +374,7 @@ public class Project implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column project.commodity_content
 	 * @param commodityContent  the value for project.commodity_content
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	public void setCommodityContent(String commodityContent) {
 		this.commodityContent = commodityContent == null ? null : commodityContent.trim();
@@ -382,7 +382,7 @@ public class Project implements Serializable {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table project
-	 * @mbg.generated  Thu Apr 15 10:11:06 CST 2021
+	 * @mbg.generated  Mon Jun 21 09:16:38 CST 2021
 	 */
 	@Override
 	public String toString() {

+ 196 - 0
src/main/java/com/kede/common/model/WechatShare.java

@@ -0,0 +1,196 @@
+package com.kede.common.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class WechatShare implements Serializable {
+
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column wechat_share.id
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	private Integer id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column wechat_share.type
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	private Integer type;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column wechat_share.pid
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	private Integer pid;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column wechat_share.title
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	private String title;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column wechat_share.share_url
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	private String shareUrl;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column wechat_share.moments_url
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	private String momentsUrl;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column wechat_share.create_time
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	private Date createTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table wechat_share
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column wechat_share.id
+	 * @return  the value of wechat_share.id
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	public Integer getId() {
+		return id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column wechat_share.id
+	 * @param id  the value for wechat_share.id
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column wechat_share.type
+	 * @return  the value of wechat_share.type
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	public Integer getType() {
+		return type;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column wechat_share.type
+	 * @param type  the value for wechat_share.type
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	public void setType(Integer type) {
+		this.type = type;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column wechat_share.pid
+	 * @return  the value of wechat_share.pid
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	public Integer getPid() {
+		return pid;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column wechat_share.pid
+	 * @param pid  the value for wechat_share.pid
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	public void setPid(Integer pid) {
+		this.pid = pid;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column wechat_share.title
+	 * @return  the value of wechat_share.title
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	public String getTitle() {
+		return title;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column wechat_share.title
+	 * @param title  the value for wechat_share.title
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	public void setTitle(String title) {
+		this.title = title == null ? null : title.trim();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column wechat_share.share_url
+	 * @return  the value of wechat_share.share_url
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	public String getShareUrl() {
+		return shareUrl;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column wechat_share.share_url
+	 * @param shareUrl  the value for wechat_share.share_url
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	public void setShareUrl(String shareUrl) {
+		this.shareUrl = shareUrl == null ? null : shareUrl.trim();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column wechat_share.moments_url
+	 * @return  the value of wechat_share.moments_url
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	public String getMomentsUrl() {
+		return momentsUrl;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column wechat_share.moments_url
+	 * @param momentsUrl  the value for wechat_share.moments_url
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	public void setMomentsUrl(String momentsUrl) {
+		this.momentsUrl = momentsUrl == null ? null : momentsUrl.trim();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column wechat_share.create_time
+	 * @return  the value of wechat_share.create_time
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column wechat_share.create_time
+	 * @param createTime  the value for wechat_share.create_time
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table wechat_share
+	 * @mbg.generated  Mon Jun 21 09:35:46 CST 2021
+	 */
+	@Override
+	public String toString() {
+		StringBuilder sb = new StringBuilder();
+		sb.append(getClass().getSimpleName());
+		sb.append(" [");
+		sb.append("Hash = ").append(hashCode());
+		sb.append(", id=").append(id);
+		sb.append(", type=").append(type);
+		sb.append(", pid=").append(pid);
+		sb.append(", title=").append(title);
+		sb.append(", shareUrl=").append(shareUrl);
+		sb.append(", momentsUrl=").append(momentsUrl);
+		sb.append(", createTime=").append(createTime);
+		sb.append(", serialVersionUID=").append(serialVersionUID);
+		sb.append("]");
+		return sb.toString();
+	}
+}

+ 37 - 0
src/main/java/com/kede/wechat/bo/WechatShareBo.java

@@ -0,0 +1,37 @@
+package com.kede.wechat.bo;
+
+import com.kede.common.constant.AFTConstants;
+import com.kede.common.model.WechatShare;
+import com.kede.common.utils.DateUtils;
+
+public class WechatShareBo extends WechatShare{
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	
+	private String createTimes;
+	
+	private String pname;
+
+	public String getCreateTimes() {
+		if (createTimes==null&&getCreateTime()!=null) {
+			return DateUtils.formatDate(getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
+		}
+		return createTimes;
+	}
+
+	public void setCreateTimes(String createTimes) {
+		this.createTimes = createTimes;
+	}
+
+	public String getPname() {
+		return pname;
+	}
+
+	public void setPname(String pname) {
+		this.pname = pname;
+	}
+
+}

+ 99 - 0
src/main/java/com/kede/wechat/controller/weChatShareApiController.java

@@ -0,0 +1,99 @@
+package com.kede.wechat.controller;
+
+
+import javax.annotation.Resource;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.kede.common.bo.Result;
+import com.kede.common.constant.ErrorConstants;
+import com.kede.common.controller.BaseController;
+import com.kede.common.model.WechatShare;
+import com.kede.wechat.service.WeChatShareService;
+
+@RestController
+@RequestMapping(value = "/api/admin/weChatShare")
+public class weChatShareApiController extends BaseController{
+
+	
+	@Resource
+	private WeChatShareService weChatShareService;
+	
+	
+	/**
+	 * 	新增分享信息
+	 * @param id
+	 * @return
+	 */
+	@RequestMapping(value = "/add", method = RequestMethod.POST)
+	public Result add(WechatShare in) {
+		Result res=new Result();
+		if (in.getType()==null||in.getTitle()==null) {	
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"分类或者标题","分类或者标题"));
+			return res;
+		}
+		return res.data(weChatShareService.add(in));
+	}
+	
+	/**
+	 * 	修改分享信息
+	 * @param id
+	 * @return
+	 */
+	@RequestMapping(value = "/update", method = RequestMethod.POST)
+	public Result update(WechatShare in) {
+		Result res=new Result();
+		if (in.getType()==null||in.getTitle()==null) {	
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"分类或者标题","分类或者标题"));
+			return res;
+		}
+		return res.data(weChatShareService.update(in));
+	}
+	
+	
+	/**
+	 * 	删除分享信息
+	 * @param id
+	 * @return
+	 */
+	@RequestMapping(value = "/delete", method = RequestMethod.POST)
+	public Result delete(Integer id) {
+		Result res=new Result();
+		if (id==null) {	
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"分类或者标题","分类或者标题"));
+			return res;
+		}
+		return res.data(weChatShareService.delete(id));
+	}
+	/**
+	 * 	修改分享信息
+	 * @param id
+	 * @return
+	 */
+	@RequestMapping(value = "/details", method = RequestMethod.GET)
+	public Result details(Integer id,Integer pid) {
+		Result res=new Result();
+		if (id==null&&pid==null) {	
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
+			return res;
+		}
+		return res.data(weChatShareService.details(id,pid));
+	}
+	/**
+	 * 	分享信息列表
+	 * @param id
+	 * @return
+	 */
+	@RequestMapping(value = "/pageList", method = RequestMethod.GET)
+	public Result pageList(String name,Integer type,Integer pageNo,Integer pageSize) {
+		Result res=new Result();
+		
+		return res.data(weChatShareService.pageList(name,type,pageNo,pageSize));
+	}
+	
+	
+	
+	
+}

+ 19 - 0
src/main/java/com/kede/wechat/service/WeChatShareService.java

@@ -0,0 +1,19 @@
+package com.kede.wechat.service;
+
+import com.kede.common.model.WechatShare;
+import com.kede.core.mybatis.page.Pagination;
+import com.kede.wechat.bo.WechatShareBo;
+
+public interface WeChatShareService {
+
+	int add(WechatShare in);
+
+	int update(WechatShare in);
+
+	int delete(Integer id);
+
+	Object details(Integer id, Integer pid);
+
+	Pagination<WechatShareBo> pageList(String name, Integer type, Integer pageSize, Integer pageSize2);
+
+}

+ 55 - 0
src/main/java/com/kede/wechat/service/impl/WeChatShareServiceImpl.java

@@ -0,0 +1,55 @@
+package com.kede.wechat.service.impl;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.kede.common.dao.WechatShareMapper;
+import com.kede.common.model.WechatShare;
+import com.kede.core.mybatis.BaseMybatisDao;
+import com.kede.core.mybatis.page.Pagination;
+import com.kede.wechat.bo.WechatShareBo;
+import com.kede.wechat.service.WeChatShareService;
+
+@Service
+public class WeChatShareServiceImpl extends BaseMybatisDao<WechatShareMapper> implements WeChatShareService {
+
+	@Autowired
+	private WechatShareMapper	wechatShareMapper;
+	
+	@Override
+	public int add(WechatShare in) {
+		return wechatShareMapper.insertSelective(in);
+	}
+
+	@Override
+	public int update(WechatShare in) {
+		return wechatShareMapper.updateByPrimaryKeySelective(in);
+	}
+
+	@Override
+	public int delete(Integer id) {
+		return wechatShareMapper.deleteByPrimaryKey(id);
+	}
+
+	@Override
+	public Object details(Integer id, Integer pid) {
+			return wechatShareMapper.selectByPid(id,pid);
+	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<WechatShareBo> pageList(String name, Integer type,Integer pageNo, Integer pageSize) {
+		Map<String, Object> map=new HashMap<String, Object>();
+		if (name!=null) {
+			map.put("name", name);
+		}
+		if (type!=null) {
+			map.put("type", type);
+		}
+		return (Pagination<WechatShareBo>) findPage("ListWechatShare","CountWechatShare",map,pageNo, pageSize);
+	}
+
+}