From f381f2eec85c55db7747763665579a85b7e4f00a Mon Sep 17 00:00:00 2001
From: 935090232@qq.com <ak473600000>
Date: Tue, 23 Mar 2021 22:59:01 +0800
Subject: [PATCH] 扣除用户积分
---
zq-erp/src/main/resources/templates/views/admin/shop/shopAdvertisType-list.html | 2 +-
zq-erp/src/main/resources/config/db/increment/推广员.sql | 4 ++++
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopAdvertisDao.xml | 20 ++++++++++++++++++--
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopAdvertis.java | 13 +++++++++++++
4 files changed, 36 insertions(+), 3 deletions(-)
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopAdvertis.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopAdvertis.java
index 7e42075..daec16c 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopAdvertis.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopAdvertis.java
@@ -63,12 +63,25 @@
*/
private String linkUrl;
+ /**连接的页面id */
+ private Long pageId;
+
/**
* 所属分类
*/
@Extend
private String adtName;
+
private Long companyId;
+
+ public Long getPageId() {
+ return pageId;
+ }
+
+ public void setPageId(Long pageId) {
+ this.pageId = pageId;
+ }
+
public Long getCompanyId() {
return companyId;
}
diff --git "a/zq-erp/src/main/resources/config/db/increment/\346\216\250\345\271\277\345\221\230.sql" "b/zq-erp/src/main/resources/config/db/increment/\346\216\250\345\271\277\345\221\230.sql"
index 54180a7..6976b41 100644
--- "a/zq-erp/src/main/resources/config/db/increment/\346\216\250\345\271\277\345\221\230.sql"
+++ "b/zq-erp/src/main/resources/config/db/increment/\346\216\250\345\271\277\345\221\230.sql"
@@ -209,3 +209,7 @@
ALTER TABLE `shop_order`
DROP COLUMN `score_pay`,
ADD COLUMN `score_pay` int(20) NULL COMMENT '支付积分' AFTER `company_id`;
+
+
+ALTER TABLE `shop_advertis`
+ ADD COLUMN `page_id` bigint(0) NULL COMMENT '连接页面' AFTER `company_id`;
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopAdvertisDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopAdvertisDao.xml
index e8b87b0..b0a7931 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopAdvertisDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopAdvertisDao.xml
@@ -20,6 +20,7 @@
<result property="linkType" column="link_type"/>
<result property="linkUrl" column="link_url"/>
<result property="companyId" column="company_id" />
+ <result property="pageId" column="page_id" />
</resultMap>
@@ -38,6 +39,7 @@
<result property="remarks" column="remarks" />
<result property="linkType" column="link_type"/>
<result property="linkUrl" column="link_url"/>
+ <result property="pageId" column="page_id" />
<result property="companyId" column="company_id" />
</resultMap>
@@ -56,6 +58,7 @@
remarks,
link_type,
link_url,
+page_id,
company_id
</sql>
@@ -74,6 +77,7 @@
#{item.remarks},
#{item.linkType},
#{item.linkUrl},
+ #{item.pageId},
#{item.companyId}
</sql>
@@ -101,6 +105,9 @@
</if>
<if test="(record.remarks!=null and record.remarks!='') or (record.remarks!='' and record.remarks==0) ">
and remarks = #{record.remarks}
+ </if>
+ <if test="(record.pageId!=null and record.pageId!='') or (record.pageId!='' and record.pageId==0) ">
+ and page_id = #{record.pageId}
</if>
<if test="record.companyId != null and record.companyId !='' ">
and company_id = #{record.companyId}
@@ -167,6 +174,10 @@
link_type = #{linkType},
</if>
+ <if test="_parameter.containsKey('pageId')">
+ page_id = #{pageId},
+ </if>
+
</set>
WHERE id=#{id}
@@ -206,6 +217,10 @@
company_id = #{record.companyId}
</if>
+ <if test="record.pageId != null and record.pageId !='' ">
+ page_id = #{record.pageId}
+ </if>
+
</set>
WHERE id=#{record.id}
</update>
@@ -232,8 +247,8 @@
<include refid="where_sql" ></include>
</where>
</delete>
-
-
+
+
<!-- 分页查询 -->
<select id="selectInPage" resultType="com.matrix.system.shopXcx.bean.ShopAdvertis">
@@ -249,6 +264,7 @@
ad.type_id typeId,
ad.sort,
ad.remarks,
+ ad.page_id,
IFNULL(adType.adt_name ,'无分类') adtName
from shop_advertis ad
left join shop_advertis_type adType
diff --git a/zq-erp/src/main/resources/templates/views/admin/shop/shopAdvertisType-list.html b/zq-erp/src/main/resources/templates/views/admin/shop/shopAdvertisType-list.html
index ef02fde..911708e 100644
--- a/zq-erp/src/main/resources/templates/views/admin/shop/shopAdvertisType-list.html
+++ b/zq-erp/src/main/resources/templates/views/admin/shop/shopAdvertisType-list.html
@@ -244,7 +244,7 @@
<el-table
:data="currentNode.ads"
:default-sort="{prop: '', order: 'descending'}"
- style="width: 100%" max-height="250">
+ style="width: 100%" >
<el-table-column
label="排序"
--
Gitblit v1.9.1