From e467cee030d8e558669f2040c1adeb15d2b9320a Mon Sep 17 00:00:00 2001
From: dimengzhe <251008545@qq.com>
Date: Tue, 7 Mar 2023 09:40:56 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E4=B8=AD=E5=BF=83?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docs/databases/supervise_customer.sql | 106 ++++++++++++++++++++++++++
1 file changed, 106 insertions(+)
create mode 100644 docs/databases/supervise_customer.sql
diff --git a/docs/databases/supervise_customer.sql b/docs/databases/supervise_customer.sql
new file mode 100644
index 00000000..7b7c29d5
--- /dev/null
+++ b/docs/databases/supervise_customer.sql
@@ -0,0 +1,106 @@
+CREATE TABLE `restricted_brand`
+(
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `lockVersion` varchar(2) DEFAULT NULL COMMENT '记录版本,锁',
+ `sid` varchar(36) NOT NULL COMMENT 'sid',
+ `createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
+ `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录最后修改时间',
+ `createBySid` varchar(36) DEFAULT NULL COMMENT '创建者',
+ `updateBySid` varchar(36) DEFAULT NULL COMMENT '更新者',
+ `isEnable` varchar(2) DEFAULT NULL COMMENT '记录是否可用,1:可用,0:不可用',
+ `state` varchar(2) DEFAULT NULL COMMENT '数据状态',
+ `isDelete` varchar(2) DEFAULT NULL COMMENT '记录是否被删除,0:未删除,1:已经删除',
+ `code` varchar(20) DEFAULT NULL COMMENT '代码',
+ `name` varchar(100) DEFAULT NULL COMMENT '名称',
+ `remarks` varchar(100) DEFAULT NULL COMMENT '备注',
+ PRIMARY KEY (`id`)
+) ENGINE = InnoDB
+ AUTO_INCREMENT = 14738
+ DEFAULT CHARSET = utf8 COMMENT ='限定品牌';
+
+
+CREATE TABLE `restricted_category`
+(
+ `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
+ `sid` varchar(64) NOT NULL COMMENT 'sid',
+ `lockVersion` int(11) NOT NULL DEFAULT '0' COMMENT '版本锁',
+ `isEnable` int(11) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用',
+ `isDelete` int(11) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除',
+ `state` int(11) NOT NULL DEFAULT '1' COMMENT '记录状态值',
+ `createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
+ `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录最后修改时间',
+ `createBySid` varchar(64) DEFAULT NULL COMMENT '创建者',
+ `updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者',
+ `remarks` varchar(255) DEFAULT NULL COMMENT '备注信息',
+ `categorys` varchar(500) DEFAULT NULL COMMENT '监管的品类',
+ `categoryKey` varchar(10) DEFAULT NULL COMMENT '监管的品类Key',
+ `brands` varchar(500) DEFAULT NULL COMMENT '监管的品牌',
+ PRIMARY KEY (`id`),
+ KEY `com_dictvalue_name` (`brands`),
+ KEY `com_dictkey_name` (`categorys`),
+ KEY `com_isdelete_name` (`isDelete`),
+ KEY `sid` (`sid`)
+) ENGINE = InnoDB
+ AUTO_INCREMENT = 21129
+ DEFAULT CHARSET = utf8
+ ROW_FORMAT = DYNAMIC COMMENT ='限定品类';
+
+
+CREATE TABLE `supplier_bank_info`
+(
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `lockVersion` varchar(2) DEFAULT NULL COMMENT '记录版本,锁',
+ `sid` varchar(36) NOT NULL COMMENT 'sid',
+ `createBySid` varchar(36) DEFAULT NULL COMMENT '创建者',
+ `updateBySid` varchar(36) DEFAULT NULL COMMENT '更新者',
+ `isEnable` varchar(2) DEFAULT NULL COMMENT '记录是否可用,1:可用,0:不可用',
+ `createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
+ `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录最后修改时间',
+ `state` varchar(2) DEFAULT NULL COMMENT '数据状态',
+ `isDelete` varchar(2) DEFAULT NULL COMMENT '记录是否被删除,0:未删除,1:已经删除',
+ `remarks` varchar(100) DEFAULT NULL COMMENT '备注',
+ `name` varchar(100) DEFAULT NULL COMMENT '名称',
+ `codeUnified` varchar(20) DEFAULT NULL COMMENT '统一编码',
+ `contacts` varchar(20) DEFAULT NULL COMMENT '联系人',
+ `telephone` varchar(12) DEFAULT NULL COMMENT '电话',
+ `address` varchar(500) DEFAULT NULL COMMENT '地址',
+ `bankAccount` varchar(200) DEFAULT NULL COMMENT '银行帐户',
+ `bankAccountNumber` varchar(200) DEFAULT NULL COMMENT '帐号',
+ `bankName` varchar(200) DEFAULT NULL COMMENT '开户行名称',
+ `legalRepresentative` varchar(100) DEFAULT NULL COMMENT '法人',
+ `businessLicenseNo` varchar(100) DEFAULT NULL COMMENT '营业执照号',
+ `purchaseRequisition` int(10) DEFAULT '0' COMMENT '监管审核状态0待审核1为通过2为拒绝',
+ `purchaseRemarks` varchar(500) DEFAULT NULL COMMENT '监管审批意见',
+ `bankState` int(10) DEFAULT '0' COMMENT '银行0未审核,1审核通过,2审核不通过',
+ `bankRemarks` varchar(500) DEFAULT NULL COMMENT '银行审批意见',
+ `lockingStatus` int(11) DEFAULT '1' COMMENT '锁定状态1.锁定2.未锁定',
+ `lockingReason` varchar(500) DEFAULT NULL COMMENT '锁定原因',
+ `lockingDate` datetime DEFAULT NULL COMMENT '锁定及解锁时间',
+ PRIMARY KEY (`id`)
+) ENGINE = InnoDB
+ AUTO_INCREMENT = 2171
+ DEFAULT CHARSET = utf8 COMMENT ='供应商信息'
+
+
+CREATE TABLE `supplier_index`
+(
+ `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号',
+ `lockVersion` varchar(2) DEFAULT NULL COMMENT '记录版本,锁',
+ `sid` varchar(36) NOT NULL COMMENT 'sid',
+ `createBySid` varchar(36) DEFAULT NULL COMMENT '创建者',
+ `updateBySid` varchar(36) DEFAULT NULL COMMENT '更新者',
+ `isEnable` varchar(2) DEFAULT NULL COMMENT '记录是否可用,1:可用,0:不可用',
+ `createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
+ `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录最后修改时间',
+ `state` varchar(2) DEFAULT NULL COMMENT '数据状态',
+ `isDelete` varchar(2) DEFAULT NULL COMMENT '记录是否被删除,0:未删除,1:已经删除',
+ `remarks` varchar(100) DEFAULT NULL COMMENT '备注',
+ `code` varchar(100) DEFAULT NULL COMMENT '编码',
+ `name` varchar(100) DEFAULT NULL COMMENT '名称',
+ `codeUnified` varchar(100) DEFAULT NULL COMMENT '统一的编码',
+ `nameUnified` varchar(100) DEFAULT NULL COMMENT '统一的名称',
+ `PSid` varchar(64) DEFAULT NULL COMMENT '父类Sid',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB
+ AUTO_INCREMENT = 97
+ DEFAULT CHARSET = utf8 COMMENT ='供货商编码对应表'
\ No newline at end of file
From 7b5bb6e96d007d8c49ccc92eb7eddf000b0640ca Mon Sep 17 00:00:00 2001
From: dimengzhe <251008545@qq.com>
Date: Tue, 7 Mar 2023 09:43:07 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E4=B8=AD=E5=BF=83?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docs/databases/supervise_customer.sql | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/databases/supervise_customer.sql b/docs/databases/supervise_customer.sql
index 7b7c29d5..5104ce02 100644
--- a/docs/databases/supervise_customer.sql
+++ b/docs/databases/supervise_customer.sql
@@ -79,7 +79,7 @@ CREATE TABLE `supplier_bank_info`
PRIMARY KEY (`id`)
) ENGINE = InnoDB
AUTO_INCREMENT = 2171
- DEFAULT CHARSET = utf8 COMMENT ='供应商信息'
+ DEFAULT CHARSET = utf8 COMMENT ='供应商信息';
CREATE TABLE `supplier_index`
@@ -103,4 +103,4 @@ CREATE TABLE `supplier_index`
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
AUTO_INCREMENT = 97
- DEFAULT CHARSET = utf8 COMMENT ='供货商编码对应表'
\ No newline at end of file
+ DEFAULT CHARSET = utf8 COMMENT ='供货商编码对应表';
\ No newline at end of file
From 0825c4eb97e57077a080c9c4dfcc93fa47d25fd4 Mon Sep 17 00:00:00 2001
From: dimengzhe <251008545@qq.com>
Date: Tue, 7 Mar 2023 10:17:00 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E4=B8=AD=E5=BF=83?=
=?UTF-8?q?=E7=9B=91=E7=AE=A1=E5=93=81=E7=89=8Ccopy?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docs/databases/supervise_customer.sql | 73 +++++++-
.../api/restrictedbrand/RestrictedBrand.java | 58 ++++++
.../RestrictedBrandDetailsVo.java | 59 ++++++
.../restrictedbrand/RestrictedBrandDto.java | 59 ++++++
.../restrictedbrand/RestrictedBrandFeign.java | 76 ++++++++
.../RestrictedBrandFeignFallback.java | 70 +++++++
.../restrictedbrand/RestrictedBrandQuery.java | 57 ++++++
.../restrictedbrand/RestrictedBrandVo.java | 59 ++++++
.../RestrictedBrandMapper.java | 68 +++++++
.../restrictedbrand/RestrictedBrandMapper.xml | 13 ++
.../restrictedbrand/RestrictedBrandRest.java | 128 +++++++++++++
.../RestrictedBrandService.java | 176 ++++++++++++++++++
12 files changed, 895 insertions(+), 1 deletion(-)
create mode 100644 yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrand.java
create mode 100644 yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandDetailsVo.java
create mode 100644 yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandDto.java
create mode 100644 yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandFeign.java
create mode 100644 yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandFeignFallback.java
create mode 100644 yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandQuery.java
create mode 100644 yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandVo.java
create mode 100644 yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandMapper.java
create mode 100644 yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandMapper.xml
create mode 100644 yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandRest.java
create mode 100644 yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandService.java
diff --git a/docs/databases/supervise_customer.sql b/docs/databases/supervise_customer.sql
index 5104ce02..0e3b74c8 100644
--- a/docs/databases/supervise_customer.sql
+++ b/docs/databases/supervise_customer.sql
@@ -103,4 +103,75 @@ CREATE TABLE `supplier_index`
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
AUTO_INCREMENT = 97
- DEFAULT CHARSET = utf8 COMMENT ='供货商编码对应表';
\ No newline at end of file
+ DEFAULT CHARSET = utf8 COMMENT ='供货商编码对应表';
+
+
+CREATE TABLE `product_information`
+(
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `lockVersion` varchar(2) DEFAULT NULL COMMENT '记录版本,锁',
+ `sid` varchar(64) NOT NULL COMMENT 'sid',
+ `createBySid` varchar(36) DEFAULT NULL COMMENT '创建者',
+ `modifyBySid` varchar(36) DEFAULT NULL COMMENT '更新者',
+ `isEnable` varchar(2) DEFAULT NULL COMMENT '记录是否可用,1:可用,0:不可用',
+ `createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
+ `modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录最后修改时间',
+ `state` varchar(2) DEFAULT NULL COMMENT '数据状态',
+ `isDelete` varchar(2) DEFAULT NULL COMMENT '记录是否被删除,0:未删除,1:已经删除',
+ `remarks` varchar(100) DEFAULT NULL COMMENT '备注',
+ `code` varchar(20) DEFAULT NULL COMMENT '代码',
+ `name` varchar(100) DEFAULT NULL COMMENT '名称',
+ `content` varchar(100) DEFAULT NULL COMMENT '含量',
+ `category` varchar(100) DEFAULT NULL COMMENT '类别',
+ `categoryKey` varchar(10) DEFAULT NULL COMMENT '类别key',
+ `unit` varchar(10) DEFAULT NULL COMMENT '规格单位',
+ `manufacturer` varchar(50) DEFAULT NULL COMMENT '制造厂',
+ `manufacturerSid` varchar(36) DEFAULT NULL COMMENT '制造厂sid',
+ `brand` varchar(100) DEFAULT NULL COMMENT '品牌',
+ `brandSid` varchar(100) DEFAULT NULL COMMENT '品牌sid',
+ `placeOfOrigin` varchar(10) DEFAULT NULL COMMENT '产地',
+ `grade` varchar(10) DEFAULT NULL COMMENT '等级',
+ `gradeKey` varchar(10) DEFAULT NULL COMMENT '等级key',
+ `qualityGuaranteePeriod` varchar(10) DEFAULT NULL COMMENT '保质期',
+ `deptartment` varchar(10) DEFAULT NULL COMMENT '部门',
+ `goodsShelves` varchar(20) DEFAULT NULL COMMENT '货架',
+ `goodsShelvesCode` varchar(20) DEFAULT NULL COMMENT '货架code',
+ `secondCode` varchar(20) DEFAULT NULL COMMENT '第二代码',
+ `grossProfitMargin` varchar(20) DEFAULT NULL COMMENT '毛利率',
+ `buyer` varchar(30) DEFAULT NULL COMMENT '采购员',
+ `accountingSalesPrice` varchar(30) DEFAULT NULL COMMENT '核算售价',
+ `latestPurchasePrice` varchar(30) DEFAULT '0' COMMENT '最新进价(系统中导出的)',
+ `inventoryPrice` varchar(30) DEFAULT NULL COMMENT '库存价',
+ `contractPurchasePrice` varchar(30) DEFAULT NULL COMMENT '合同进价',
+ `membershipPrice` varchar(30) DEFAULT NULL COMMENT '会员价',
+ `inputTaxRate` varchar(30) DEFAULT NULL COMMENT '进项税率',
+ `outputTaxRate` varchar(30) DEFAULT NULL COMMENT '销项税率',
+ `position` varchar(30) DEFAULT NULL COMMENT '仓位',
+ `positionCode` varchar(30) DEFAULT NULL COMMENT '仓位code',
+ `supplier` varchar(50) DEFAULT NULL COMMENT '结算供应商',
+ `supplierSid` varchar(36) DEFAULT NULL COMMENT '结算供应商Sid',
+ `distributionMethod` varchar(39) DEFAULT NULL COMMENT '配货方式',
+ `distributionMethodKey` varchar(39) DEFAULT NULL COMMENT '配货方式Key',
+ `sourceUnit` varchar(50) DEFAULT NULL COMMENT '来源单位',
+ `managementExpirationDate` varchar(30) DEFAULT NULL COMMENT '管理到效期',
+ `rationingPrice` varchar(30) DEFAULT NULL COMMENT '配货价',
+ `lowestSellingPrice` varchar(30) DEFAULT NULL COMMENT '最低售价',
+ `defaultPurchasePrice` varchar(30) DEFAULT NULL COMMENT '缺省进价',
+ `tradePrice` varchar(30) DEFAULT NULL COMMENT '批发价',
+ `specifications` varchar(50) DEFAULT NULL COMMENT '规格说明',
+ `description` varchar(50) DEFAULT NULL COMMENT '规格长宽高',
+ `weight` varchar(50) DEFAULT NULL COMMENT '规格重量',
+ `priceAdjustmentTime` datetime DEFAULT NULL COMMENT '最后调价时间',
+ `systemCode` varchar(39) DEFAULT NULL COMMENT '对方系统代码',
+ `priceWithoutTax` varchar(39) DEFAULT NULL COMMENT '去税最新进价',
+ `taxableInventoryPrice` varchar(39) DEFAULT NULL COMMENT '去税库存价',
+ `ContractPriceExcludingTax` varchar(39) DEFAULT NULL COMMENT '去税合同进价',
+ `productStatus` varchar(39) DEFAULT NULL COMMENT '商品状态',
+ `productStatusKey` varchar(39) DEFAULT NULL COMMENT '商品状态Key',
+ `newestPurchasePrice` varchar(20) DEFAULT '0' COMMENT '最新进价(需要每次导入采购订单更新的)',
+ PRIMARY KEY (`id`),
+ KEY `code_index` (`code`),
+ KEY `sid_index` (`sid`)
+) ENGINE = InnoDB
+ AUTO_INCREMENT = 116108
+ DEFAULT CHARSET = utf8 COMMENT ='商品档案信息'
\ No newline at end of file
diff --git a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrand.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrand.java
new file mode 100644
index 00000000..151bbfc6
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrand.java
@@ -0,0 +1,58 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.api.restrictedbrand;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.yxt.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * Project: supervise-customer(客户中心)
+ * File: RestrictedBrand.java
+ * Class: com.yxt.supervise.customer.api.restrictedbrand.RestrictedBrand
+ * Description: 限定品牌.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ *
+ * @author liupopo
+ * @version 1.0
+ * @since 1.0
+ */
+@Data
+@ApiModel(value = "限定品牌", description = "限定品牌")
+@TableName("restricted_brand")
+public class RestrictedBrand extends BaseEntity {
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty("代码")
+ private String code;
+ @ApiModelProperty("名称")
+ private String name;
+
+}
diff --git a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandDetailsVo.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandDetailsVo.java
new file mode 100644
index 00000000..4e58bcd8
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandDetailsVo.java
@@ -0,0 +1,59 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.api.restrictedbrand;
+
+
+import com.yxt.common.core.vo.Vo;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * Project: supervise-customer(客户中心)
+ * File: RestrictedBrandVo.java
+ * Class: com.yxt.supervise.customer.api.restrictedbrand.RestrictedBrandVo
+ * Description: 限定品牌 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ *
+ * @author liupopo
+ * @version 1.0
+ * @since 1.0
+ */
+@Data
+@ApiModel(value = "限定品牌 视图数据详情", description = "限定品牌 视图数据详情")
+public class RestrictedBrandDetailsVo implements Vo {
+
+ private static final long serialVersionUID = 414974237796022251L;
+ private String sid;
+
+ @ApiModelProperty("代码")
+ private String code;
+ @ApiModelProperty("名称")
+ private String name;
+
+}
\ No newline at end of file
diff --git a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandDto.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandDto.java
new file mode 100644
index 00000000..33f8d819
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandDto.java
@@ -0,0 +1,59 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.api.restrictedbrand;
+
+
+import com.yxt.common.core.dto.Dto;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * Project: supervise-customer(客户中心)
+ * File: RestrictedBrandDto.java
+ * Class: com.yxt.supervise.customer.api.restrictedbrand.RestrictedBrandDto
+ * Description: 限定品牌 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ *
+ * @author liupopo
+ * @version 1.0
+ * @since 1.0
+ */
+@Data
+@ApiModel(value = "限定品牌 数据传输对象", description = "限定品牌 数据传输对象")
+public class RestrictedBrandDto implements Dto {
+
+ private static final long serialVersionUID = -4284546832808688666L;
+ private String sid;
+
+ @ApiModelProperty("代码")
+ private String code;
+ @ApiModelProperty("名称")
+ private String name;
+
+}
\ No newline at end of file
diff --git a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandFeign.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandFeign.java
new file mode 100644
index 00000000..63d03d69
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandFeign.java
@@ -0,0 +1,76 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.api.restrictedbrand;
+
+import com.yxt.common.core.query.PagerQuery;
+import com.yxt.common.core.result.ResultBean;
+import com.yxt.common.core.vo.PagerVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * Project: supervise-customer(客户中心)
+ * File: RestrictedBrandFeign.java
+ * Class: com.yxt.supervise.customer.api.restrictedbrand.RestrictedBrandFeign
+ * Description: 限定品牌.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ *
+ * @author liupopo
+ * @version 1.0
+ * @since 1.0
+ */
+@Api(tags = "限定品牌")
+@FeignClient(
+ contextId = "supervise-customer-RestrictedBrand",
+ name = "supervise-customer",
+ path = "v1/restrictedbrand",
+ fallback = RestrictedBrandFeignFallback.class)
+public interface RestrictedBrandFeign {
+
+ @ApiOperation("根据条件分页查询数据的列表")
+ @PostMapping("/listPage")
+ @ResponseBody
+ public ResultBean> listPage(@RequestBody PagerQuery pq);
+
+ @ApiOperation("新增或修改")
+ @PostMapping("/save")
+ @ResponseBody
+ public ResultBean save(@RequestBody RestrictedBrandDto dto);
+
+ @ApiOperation("根据sid删除记录")
+ @DeleteMapping("/delBySids")
+ @ResponseBody
+ public ResultBean delBySids(@RequestBody String[] sids);
+
+ @ApiOperation("根据SID获取一条记录")
+ @GetMapping("/fetchDetailsBySid/{sid}")
+ @ResponseBody
+ public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid);
+}
\ No newline at end of file
diff --git a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandFeignFallback.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandFeignFallback.java
new file mode 100644
index 00000000..f499b342
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandFeignFallback.java
@@ -0,0 +1,70 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.api.restrictedbrand;
+
+import com.yxt.common.core.query.PagerQuery;
+import com.yxt.common.core.result.ResultBean;
+import com.yxt.common.core.vo.PagerVo;
+import org.springframework.stereotype.Component;
+
+/**
+ * Project: supervise-customer(客户中心)
+ * File: RestrictedBrandFeignFallback.java
+ * Class: com.yxt.supervise.customer.api.restrictedbrand.RestrictedBrandFeignFallback
+ * Description: 限定品牌.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ *
+ * @author liupopo
+ * @version 1.0
+ * @since 1.0
+ */
+@Component
+public class RestrictedBrandFeignFallback implements RestrictedBrandFeign {
+
+ @Override
+ public ResultBean> listPage(PagerQuery pq) {
+ ResultBean rb = ResultBean.fireFail();
+ return rb.setMsg("接口yxt-supervise/restrictedbrand/listPage无法访问");
+ }
+
+ @Override
+ public ResultBean save(RestrictedBrandDto dto) {
+ return ResultBean.fireFail().setMsg("接口yxt-supervise/restrictedbrand/save无法访问");
+ }
+
+ @Override
+ public ResultBean delBySids(String[] sids) {
+ return ResultBean.fireFail().setMsg("接口yxt-supervise/restrictedbrand/delBySids无法访问");
+ }
+
+ @Override
+ public ResultBean fetchDetailsBySid(String sid) {
+ ResultBean rb = ResultBean.fireFail();
+ return rb.setMsg("接口yxt-supervise/restrictedbrand/fetchDetailsBySid无法访问");
+ }
+}
\ No newline at end of file
diff --git a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandQuery.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandQuery.java
new file mode 100644
index 00000000..0ca55902
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandQuery.java
@@ -0,0 +1,57 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.api.restrictedbrand;
+
+
+import com.yxt.common.core.query.Query;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * Project: supervise-customer(客户中心)
+ * File: RestrictedBrandQuery.java
+ * Class: com.yxt.supervise.customer.api.restrictedbrand.RestrictedBrandQuery
+ * Description: 限定品牌 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ *
+ * @author liupopo
+ * @version 1.0
+ * @since 1.0
+ */
+@Data
+@ApiModel(value = "限定品牌 查询条件", description = "限定品牌 查询条件")
+public class RestrictedBrandQuery implements Query {
+
+ private static final long serialVersionUID = 1469442912078558237L;
+ @ApiModelProperty("代码")
+ private String code;
+ @ApiModelProperty("名称")
+ private String name;
+
+}
diff --git a/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandVo.java b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandVo.java
new file mode 100644
index 00000000..3f66e241
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/restrictedbrand/RestrictedBrandVo.java
@@ -0,0 +1,59 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.api.restrictedbrand;
+
+
+import com.yxt.common.core.vo.Vo;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * Project: supervise-customer(客户中心)
+ * File: RestrictedBrandVo.java
+ * Class: com.yxt.supervise.customer.api.restrictedbrand.RestrictedBrandVo
+ * Description: 限定品牌 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ *
+ * @author liupopo
+ * @version 1.0
+ * @since 1.0
+ */
+@Data
+@ApiModel(value = "限定品牌 视图数据对象", description = "限定品牌 视图数据对象")
+public class RestrictedBrandVo implements Vo {
+
+ private static final long serialVersionUID = 4695482182172367290L;
+ private String sid;
+
+ @ApiModelProperty("代码")
+ private String code;
+ @ApiModelProperty("名称")
+ private String name;
+
+}
diff --git a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandMapper.java b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandMapper.java
new file mode 100644
index 00000000..304cd634
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandMapper.java
@@ -0,0 +1,68 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.biz.restrictedbrand;
+
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import com.yxt.supervise.customer.api.restrictedbrand.RestrictedBrand;
+import com.yxt.supervise.customer.api.restrictedbrand.RestrictedBrandVo;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
+
+/**
+ * Project: supervise-customer(客户中心)
+ * File: RestrictedBrandMapper.java
+ * Class: com.yxt.supervise.customer.biz.restrictedbrand.RestrictedBrandMapper
+ * Description: 限定品牌.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ *
+ * @author liupopo
+ * @version 1.0
+ * @since 1.0
+ */
+@Mapper
+public interface RestrictedBrandMapper extends BaseMapper {
+
+ //@Update("update restricted_brand set name=#{msg} where id=#{id}")
+ //IPage voPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw);
+
+ IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw);
+
+ List selectListAllVo(@Param(Constants.WRAPPER) Wrapper qw);
+
+ @Select("select * from restricted_brand")
+ List selectListVo();
+
+ @Select("select * from restricted_brand where code=#{brandCode}")
+ RestrictedBrand selectByBrands(@Param("brandCode") String brandCode);
+}
\ No newline at end of file
diff --git a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandMapper.xml b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandMapper.xml
new file mode 100644
index 00000000..7b802472
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandMapper.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandRest.java b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandRest.java
new file mode 100644
index 00000000..52a34361
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandRest.java
@@ -0,0 +1,128 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.biz.restrictedbrand;
+
+import com.yxt.common.core.query.PagerQuery;
+import com.yxt.common.core.result.ResultBean;
+import com.yxt.common.core.vo.PagerVo;
+import com.yxt.supervise.customer.api.restrictedbrand.*;
+import com.yxt.supervise.portal.api.restrictedbrand.*;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * Project: supervise-customer(客户中心)
+ * File: RestrictedBrandFeignFallback.java
+ * Class: com.yxt.supervise.customer.biz.restrictedbrand.RestrictedBrandRest
+ * Description: 限定品牌.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ *
+ * @author liupopo
+ * @version 1.0
+ * @since 1.0
+ */
+@Api(tags = "限定品牌")
+@RestController
+@RequestMapping("v1/restrictedbrand")
+public class RestrictedBrandRest implements RestrictedBrandFeign {
+
+ @Autowired
+ private RestrictedBrandService restrictedBrandService;
+
+ @Override
+ @ApiOperation("根据条件分页查询数据的列表")
+ @PostMapping("/listPage")
+ public ResultBean> listPage(@RequestBody PagerQuery pq) {
+ ResultBean rb = ResultBean.fireFail();
+ PagerVo pv = restrictedBrandService.listPageVo(pq);
+ return rb.success().setData(pv);
+ }
+
+ @Override
+ @ApiOperation("新增或修改")
+ @PostMapping("/save")
+ public ResultBean save(@RequestBody RestrictedBrandDto dto) {
+ ResultBean rb = ResultBean.fireFail();
+ restrictedBrandService.saveOrUpdateDto(dto);
+ return rb.success();
+ }
+
+ @Override
+ @ApiOperation("根据sid批量删除")
+ @PostMapping("/delBySids")
+ public ResultBean delBySids(@RequestBody String[] sids) {
+ ResultBean rb = ResultBean.fireFail();
+ restrictedBrandService.delBySids(sids);
+ return rb.success();
+ }
+
+ @Override
+ @ApiOperation("根据SID获取一条记录")
+ @GetMapping("/fetchDetailsBySid/{sid}")
+ public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid) {
+ ResultBean rb = ResultBean.fireFail();
+ RestrictedBrandDetailsVo vo = restrictedBrandService.fetchDetailsVoBySid(sid);
+ return rb.success().setData(vo);
+ }
+
+ @ApiOperation(" ")
+ @RequestMapping(value = "/importBrandSort", method = RequestMethod.POST)
+ public ResultBean importBrandSort(@RequestParam("filename") MultipartFile file,
+ HttpServletRequest request, HttpServletResponse response) {
+ ResultBean rb = ResultBean.fireFail();
+ String temp = request.getSession().getServletContext()
+ .getRealPath(File.separator)
+ + "temp"; // 临时目录
+ File tempFile = new File(temp);
+ if (!tempFile.exists()) {
+ tempFile.mkdirs();
+ }
+ String name = file.getOriginalFilename();// 获取上传文件名,包括路径
+ long size = file.getSize();
+ if ((name == null || name.equals("")) && size == 0)
+ return null;
+ InputStream in = null;
+ try {
+ in = file.getInputStream();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ //inventoryInformationService.readBrandPeriodSorXls1(in,"");
+ restrictedBrandService.readBrandPeriodSorXls1(in, "");
+ return rb;
+ }
+}
diff --git a/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandService.java b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandService.java
new file mode 100644
index 00000000..59a5c5ef
--- /dev/null
+++ b/yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/restrictedbrand/RestrictedBrandService.java
@@ -0,0 +1,176 @@
+/*********************************************************
+ *********************************************************
+ ******************** *******************
+ ************* ************
+ ******* _oo0oo_ *******
+ *** o8888888o ***
+ * 88" . "88 *
+ * (| -_- |) *
+ * 0\ = /0 *
+ * ___/`---'\___ *
+ * .' \\| |// '. *
+ * / \\||| : |||// \ *
+ * / _||||| -:- |||||- \ *
+ * | | \\\ - /// | | *
+ * | \_| ''\---/'' |_/ | *
+ * \ .-\__ '-' ___/-. / *
+ * ___'. .' /--.--\ `. .'___ *
+ * ."" '< `.___\_<|>_/___.' >' "". *
+ * | | : `- \`.;`\ _ /`;.`/ - ` : | | *
+ * \ \ `_. \_ __\ /__ _/ .-` / / *
+ * =====`-.____`.___ \_____/___.-`___.-'===== *
+ * `=---=' *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
+ *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
+ *********************************************************/
+package com.yxt.supervise.customer.biz.restrictedbrand;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.yxt.common.base.service.MybatisBaseService;
+import com.yxt.common.base.utils.PagerUtil;
+import com.yxt.common.core.query.PagerQuery;
+import com.yxt.common.core.vo.PagerVo;
+import com.yxt.supervise.customer.api.restrictedbrand.*;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.hssf.usermodel.HSSFCell;
+import org.apache.poi.hssf.usermodel.HSSFRow;
+import org.apache.poi.hssf.usermodel.HSSFSheet;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.CellType;
+import org.springframework.stereotype.Service;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Project: supervise-customer(客户中心)
+ * File: RestrictedBrandService.java
+ * Class: com.yxt.supervise.customer.biz.restrictedbrand.RestrictedBrandService
+ * Description: 限定品牌 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-11-22 21:47:10
+ *
+ * @author liupopo
+ * @version 1.0
+ * @since 1.0
+ */
+@Slf4j
+@Service
+public class RestrictedBrandService extends MybatisBaseService {
+ private QueryWrapper createQueryWrapper(RestrictedBrandQuery query) {
+ // todo: 这里根据具体业务调整查询条件
+ // 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
+ QueryWrapper qw = new QueryWrapper<>();
+ return qw;
+ }
+
+ public PagerVo listPageVo(PagerQuery pq) {
+ RestrictedBrandQuery query = pq.getParams();
+ QueryWrapper qw = createQueryWrapper(query);
+ IPage page = PagerUtil.queryToPage(pq);
+ IPage pagging = baseMapper.selectPageVo(page, qw);
+ PagerVo p = PagerUtil.pageToVo(pagging, null);
+ return p;
+ }
+
+ public void saveOrUpdateDto(RestrictedBrandDto dto) {
+ String dtoSid = dto.getSid();
+ if (StringUtils.isBlank(dtoSid)) {
+ this.insertByDto(dto);
+ return;
+ }
+ this.updateByDto(dto);
+ }
+
+ public void insertByDto(RestrictedBrandDto dto) {
+ RestrictedBrand entity = new RestrictedBrand();
+ BeanUtil.copyProperties(dto, entity, "id", "sid");
+ baseMapper.insert(entity);
+ }
+
+ public void updateByDto(RestrictedBrandDto dto) {
+ String dtoSid = dto.getSid();
+ if (StringUtils.isBlank(dtoSid)) {
+ return;
+ }
+ RestrictedBrand entity = fetchBySid(dtoSid);
+ BeanUtil.copyProperties(dto, entity, "id", "sid");
+ baseMapper.updateById(entity);
+ }
+
+ public RestrictedBrandDetailsVo fetchDetailsVoBySid(String sid) {
+ RestrictedBrand entity = fetchBySid(sid);
+ RestrictedBrandDetailsVo vo = new RestrictedBrandDetailsVo();
+ BeanUtil.copyProperties(entity, vo);
+ return vo;
+ }
+
+ public void readBrandPeriodSorXls1(InputStream is, String sid) {
+ HSSFWorkbook hssfWorkbook = null;
+ try {
+ hssfWorkbook = new HSSFWorkbook(is);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ List lisss = new ArrayList<>();
+ List lisss2 = new ArrayList<>();
+ HSSFSheet hssfSheet = hssfWorkbook.getSheetAt(0);
+
+ // 循环行Row
+ for (int rowNum = 1; rowNum <= hssfSheet.getLastRowNum(); rowNum++) {
+ RestrictedBrand pr = new RestrictedBrand();
+ HSSFRow hssfRow = hssfSheet.getRow(rowNum);
+ int i = 0;
+ try {
+ if (rowNum >= 1) {
+ for (; i < hssfRow.getLastCellNum(); i++) {
+ HSSFCell brandIdHSSFCell = hssfRow.getCell(i);
+ if (brandIdHSSFCell != null) {
+ if (i == 1) {//品牌编码
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ pr.setCode(value);
+ }
+ }
+ if (i == 2) {//品牌名称
+ brandIdHSSFCell.setCellType(CellType.STRING);
+ if (StringUtils.isNotBlank(brandIdHSSFCell.getStringCellValue())) {
+ String value = brandIdHSSFCell.getStringCellValue();
+ pr.setName(value);
+ }
+ }
+ } else {
+ System.err.println("rowNum=" + rowNum + ",i=" + i + ",value=null");
+ }
+ }
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.err.println("i=" + i + ",value=null");
+ }
+
+ lisss.add(rowNum + "");
+ baseMapper.insert(pr);
+ log.info("productInformation:{}", JSONObject.toJSONString(pr));
+ }
+ String x = JSON.toJSONString(lisss);
+ System.out.println(x);
+ String x1 = JSON.toJSONString(lisss2);
+ System.out.println(x1);
+ //return message;
+ }
+
+ public RestrictedBrand selectByBrands(String brandCode) {
+ return baseMapper.selectByBrands(brandCode);
+ }
+}
\ No newline at end of file