diff --git a/1 b/1
index 579bf2448e5853c68304b007110e3b2a24f0394f..773dffc8493fa51c88bd9549c1cc4ebec05c6244 100644
--- a/1
+++ b/1
@@ -61,20 +61,41 @@ send_timeout 45;
}
+server {
+ listen 80;
+ server_name www.yjlive.cn;
+
+ error_page 500 502 503 504 /50x.html;
+ location = /50x.html {
+ root html;
+ }
+ location / {
+ alias /root/jm/h5/;
+ index index.html;
+ }
+
+ location /h5 {
+ alias /root/jm/mall/;
+ try_files $uri $uri/ @router;
+ index index.html;
+ }
+ location /api {
+ rewrite ^/api/(.*)$ /$1 break;
+ include uwsgi_params;
+ proxy_pass http://39.106.212.32:8081 ;
+ }
+ location @router {
+ rewrite ^.*$ /index.html last;
+ }
+ }
server {
listen 8082;
server_name _;
root /root/jm/h5;
index index.html;
}
-server {
- listen 8083;
- server_name _;
- root /root/jm/mall;
- index index.html;
-try_files $uri $uri/ /index.html;
-}
+
server {
listen 8084;
server_name _;
@@ -83,13 +104,7 @@ server {
try_files $uri $uri/ /index.html;
}
-server {
- listen 8087;
- server_name _;
- root /root/jm/jsshop;
- index index.html;
-try_files $uri $uri/ /index.html;
-}
+
server {
listen 8088;
server_name _;
diff --git a/3 b/3
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..da921e40e28b795286a12d3d9ad3a9b5617fed26 100644
--- a/3
+++ b/3
@@ -0,0 +1,10 @@
+ location /mall {
+ alias /root/jm/mall/;
+ try_files $uri $uri/ @router;
+ index index.html;
+ }
+ location /jsshop {
+ alias /root/jm/jsshop/;
+ try_files $uri $uri/ @router;
+ index index.html;
+ }
diff --git a/h b/h
index d2fa5299e5565f0590d5772cda4a84d858532956..9745ce93dea809b504065bef223a1ffe871e6179 100644
--- a/h
+++ b/h
@@ -1,124 +1,126 @@
-CREATE TABLE `sms_bargain_config` (
- `id` bigint(11) unsigned NOT NULL COMMENT 'id',
- `plug_ins_id` bigint(11) NOT NULL DEFAULT '0' COMMENT '插件id',
- `can_num` int(11) DEFAULT NULL COMMENT '能砍的次数',
- `help_num` int(11) DEFAULT NULL COMMENT '每天最多帮别人砍的次数',
- `parameter` char(11) DEFAULT NULL COMMENT '每次砍价的参数',
- `invalid_time` int(11) DEFAULT NULL COMMENT '逾期失效时间',
- `add_time` datetime NULL DEFAULT NULL COMMENT '修改时间'
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='砍价免单设置表';
-
-CREATE TABLE `sms_bargain_record` (
- `id` bigint(11) unsigned NOT NULL COMMENT 'id',
- `s_id` bigint(11) NOT NULL DEFAULT '0' COMMENT '属性id',
- `user_id` bigint(15) NOT NULL COMMENT '用户ID',
- `money` decimal(12,2) NOT NULL DEFAULT '0.00' COMMENT '金额',
- `add_time` datetime NULL DEFAULT NULL COMMENT '添加时间',
- `event` varchar(200) DEFAULT NULL COMMENT '事件',
- `name` varchar(15) NOT NULL COMMENT '收货人',
- `tel` char(15) NOT NULL COMMENT '联系方式',
- `sheng` int(11) NOT NULL DEFAULT '0' COMMENT '省',
- `city` int(11) NOT NULL DEFAULT '0' COMMENT '市',
- `quyu` int(11) NOT NULL DEFAULT '0' COMMENT '县',
- `address` varchar(255) NOT NULL COMMENT '收货地址(不加省市区)',
- `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态 0:砍价中 1:砍价成功 2:逾期失效 3:生成订单',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='砍价免单记录表';
-
-CREATE TABLE `sms_draw_user` (
- `id` bigint(11) NOT NULL COMMENT 'ID',
- `draw_id` bigint(11) DEFAULT NULL COMMENT '拼团ID',
- `user_id` bigint(30) DEFAULT NULL COMMENT '用户ID',
- `time` datetime NULL DEFAULT NULL COMMENT '用户参团时间',
- `role` varchar(30) DEFAULT '0' COMMENT '用户角色(默认 0:团长 userid:该用户分享进来的用户)',
- `lottery_status` int(11) DEFAULT '0' COMMENT '抽奖状态(0.参团中 1.待抽奖 2.参团失败 3.抽奖失败 4.抽奖成功)'
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='抽奖与用户关联表';
-
-CREATE TABLE `sms_experience` (
- `id` bigint(11) unsigned NOT NULL COMMENT 'id',
- `user_id` bigint(15) NOT NULL DEFAULT '' COMMENT '用户id',
- `seller_id` bigint(15) NOT NULL DEFAULT '' COMMENT '商家id',
- `name` varchar(20) NOT NULL DEFAULT '' COMMENT '姓名',
- `mobile` varchar(20) DEFAULT NULL COMMENT '手机',
- `address` varchar(300) DEFAULT NULL COMMENT '地址',
- `num` int(11) NOT NULL DEFAULT '0' COMMENT '数量',
- `content` text NOT NULL COMMENT '内容',
- `add_date` timestamp NULL DEFAULT NULL COMMENT '添加时间',
- `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '类型 0:申请预约 1:已预约 2:取消预约 3:完成'
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='预约表';
-
-
-CREATE TABLE `sms_detailed_commission` (
- `id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
- `userid` bigint(50) DEFAULT NULL,
- `sNo` varchar(255) DEFAULT NULL COMMENT '订单号',
- `money` float(10,2) DEFAULT '0.00' COMMENT '应发佣金',
- `s_money` float(10,2) DEFAULT '0.00' COMMENT '实发佣金',
- `status` int(2) DEFAULT '1' COMMENT '1.未发放,2.已发放',
- `addtime` datetime DEFAULT NULL COMMENT '添加时间',
- `type` int(2) DEFAULT NULL COMMENT '类型',
- `Referee` varchar(50) DEFAULT NULL COMMENT '上级',
- `recycle` int(2) DEFAULT '0' COMMENT '0 不回收 1.回收',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='分销佣金明细表';
-
-
-CREATE TABLE `sms_sign_activity` (
- `id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
- `image` char(30) NOT NULL DEFAULT '' COMMENT '图片',
- `starttime` char(20) NOT NULL DEFAULT '' COMMENT '签到活动开始时间',
- `endtime` char(20) NOT NULL DEFAULT '' COMMENT '签到活动结束时间',
- `detail` text COMMENT '签到活动详情',
- `add_time` timestamp NULL DEFAULT NULL COMMENT '修改时间',
- `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态 0:未启用 1:启用 2:已结束',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='签到活动';
-
-CREATE TABLE `sms_share` (
- `id` bigint(11) unsigned NOT NULL COMMENT 'id',
- `user_id` char(15) DEFAULT NULL COMMENT '用户id',
- `wx_id` varchar(50) DEFAULT NULL COMMENT '微信id',
- `wx_name` varchar(150) DEFAULT NULL COMMENT '微信昵称',
- `sex` int(11) DEFAULT NULL COMMENT '性别 0:未知 1:男 2:女',
- `type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '类别 0:新闻 1:文章',
- `Article_id` bigint(11) NOT NULL DEFAULT '0' COMMENT '新闻id',
- `share_add` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '分享时间',
- `coupon` decimal(12,2) NOT NULL DEFAULT '0.00' COMMENT '礼券',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='分享列表';
-
-CREATE TABLE `sms_sign_config` (
- `id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
- `plug_ins_id` bigint(11) NOT NULL DEFAULT '0' COMMENT '插件id',
- `imgurl` varchar(200) NOT NULL COMMENT '图片',
- `min_score` int(11) NOT NULL DEFAULT '0' COMMENT '领取的最少积分',
- `max_score` int(11) NOT NULL DEFAULT '0' COMMENT '领取的最大积分',
- `continuity_three` int(11) NOT NULL DEFAULT '0' COMMENT '连续签到7天',
- `continuity_twenty` int(11) NOT NULL DEFAULT '0' COMMENT '连续签到20天',
- `continuity_thirty` int(11) NOT NULL DEFAULT '0' COMMENT '连续签到30天',
- `activity_overdue` int(11) NOT NULL DEFAULT '0' COMMENT '活动过期删除时间',
- `modify_date` timestamp NULL DEFAULT NULL COMMENT '修改时间',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='签到配置表';
-
-CREATE TABLE `sms_sign_record` (
- `bigint` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
- `user_id` bigint(15) NOT NULL COMMENT '用户ID',
- `sign_score` int(11) NOT NULL DEFAULT '0' COMMENT '签到积分',
- `record` char(20) DEFAULT NULL COMMENT '事件',
- `sign_time` timestamp NULL DEFAULT NULL COMMENT '签到时间',
- `type` int(4) NOT NULL DEFAULT '0' COMMENT '类型: 0:签到 1:消费 2:首次关注得积分 3:转积分给好友 4:好友转积分 5:系统扣除 6:系统充值 7:抽奖',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='签到记录';
-
-CREATE TABLE `sms_system_message` (
- `id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
- `senderid` bigint(30) NOT NULL COMMENT '发送人ID',
- `recipientid` bigint(30) NOT NULL COMMENT '接收人ID',
- `title` text COMMENT '标题',
- `content` text COMMENT '内容',
- `time` datetime DEFAULT NULL COMMENT '时间',
- `type` int(2) NOT NULL DEFAULT '1' COMMENT '1未读 2 已读',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='系统消息表';
+#user nobody;
+worker_processes 1;
+
+#error_log logs/error.log;
+#error_log logs/error.log notice;
+#error_log logs/error.log info;
+
+#pid logs/nginx.pid;
+
+
+events {
+ worker_connections 1024;
+}
+
+
+http {
+ include mime.types;
+ default_type application/octet-stream;
+
+ #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
+ # '$status $body_bytes_sent "$http_referer" '
+ # '"$http_user_agent" "$http_x_forwarded_for"';
+
+ #access_log logs/access.log main;
+
+ sendfile on;
+ #tcp_nopush on;
+
+ #keepalive_timeout 0;
+ keepalive_timeout 165;
+client_header_timeout 45;
+
+client_body_timeout 45;
+
+send_timeout 45;
+
+ #gzip on;
+
+ server {
+ listen 8090;
+ server_name 39.106.212.32;
+ client_max_body_size 10M;
+ #charset koi8-r;
+
+ #access_log logs/host.access.log main;
+ location / {
+ root /root/jm/dist;
+ index index.html;
+}
+
+
+ #error_page 404 /404.html;
+
+ # redirect server error pages to the static page /50x.html
+ #
+ error_page 500 502 503 504 /50x.html;
+ location = /50x.html {
+ root html;
+ }
+
+
+ }
+server {
+ listen 80;
+ server_name www.yjlive.cn;
+
+ error_page 500 502 503 504 /50x.html;
+ location = /50x.html {
+ root html;
+ }
+
+ location / {
+ alias /root/jm/h5/;
+ index index.html;
+ }
+
+ location /h5 {
+ alias /root/jm/mall/;
+ try_files $uri $uri/ @router;
+ index index.html;
+ }
+ location /cms {
+ alias /root/jm/cms/;
+ try_files $uri $uri/ @router;
+ index index.html;
+ }
+ location /pc {
+ alias /root/jm/pc/;
+ try_files $uri $uri/ @router;
+ index index.html;
+ }
+ location /pcbak {
+ alias /root/jm/pcbak/;
+ try_files $uri $uri/ @router;
+ index index.html;
+ }
+ location /h5bak {
+ alias /root/jm/h5bak/;
+ try_files $uri $uri/ @router;
+ index index.html;
+ }
+
+ location /mei {
+ alias /root/jm/mei/;
+ try_files $uri $uri/ @router;
+ index index.html;
+ }
+ location /mei1 {
+ alias /root/jm/mei1/;
+ try_files $uri $uri/ @router;
+ index index.html;
+ }
+ location /api {
+ rewrite ^/api/(.*)$ /$1 break;
+ include uwsgi_params;
+ proxy_pass http://39.106.212.32:8081 ;
+ }
+ location @router {
+ rewrite ^.*$ /index.html last;
+ }
+ }
+
+
+
+ }
diff --git a/mallplus-admin/pom.xml b/mallplus-admin/pom.xml
index 0e57bd5627410bd27ea25e987b7a0e80375afd33..37a48bd8fcd82011e5dc2ce769a70b6ab20d78c0 100644
--- a/mallplus-admin/pom.xml
+++ b/mallplus-admin/pom.xml
@@ -77,6 +77,11 @@
mallplus-mbg
1.0-SNAPSHOT
+
+ com.zscat.mallplus
+ mallplus-wechat
+ 1.0-SNAPSHOT
+
org.springframework.boot
spring-boot-starter-web
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/ApiContext.java b/mallplus-admin/src/main/java/com/zscat/mallplus/ApiContext.java
deleted file mode 100644
index f8af47296e3b9fe21e885192c7d7d2554bcd01e0..0000000000000000000000000000000000000000
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/ApiContext.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.zscat.mallplus;
-
-import org.springframework.stereotype.Component;
-
-@Component
-public class ApiContext {
-
-
-
-}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/CommandLineRunnerImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/CommandLineRunnerImpl.java
index fefff8bbd16a504e1d393d76fb8c4ee51bbd013d..86e445dc15f0a3327e4f33c04e8861ab933ac640 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/CommandLineRunnerImpl.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/CommandLineRunnerImpl.java
@@ -14,6 +14,9 @@ public class CommandLineRunnerImpl implements CommandLineRunner {
@Autowired
GeneratorMapper generatorMapper;
+ public static void main(String[] args) {
+ System.out.println("http://localhost:8080/cms/CmsSubjectCategory/list".replace("//", "a").indexOf("/") + 1);
+ }
@Override
public void run(String... args) throws Exception {
@@ -30,8 +33,4 @@ public class CommandLineRunnerImpl implements CommandLineRunner {
}*/
}
-
- public static void main(String[] args) {
- System.out.println( "http://localhost:8080/cms/CmsSubjectCategory/list".replace("//","a").indexOf("/") + 1);
- }
-}
\ No newline at end of file
+}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/ExportSubject.java b/mallplus-admin/src/main/java/com/zscat/mallplus/ExportSubject.java
index 716799cce15a277b3a8fd84b7735ee7ddf416802..05059184f8116ecf7f91cda7949cc17ef3fc7800 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/ExportSubject.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/ExportSubject.java
@@ -17,8 +17,5 @@ public class ExportSubject {
private String content;
-
-
-
}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/ExportUser.java b/mallplus-admin/src/main/java/com/zscat/mallplus/ExportUser.java
index a68861a8217b958f4264904535c2a5c3ce4ca150..81d73a6de3cb23dfc931635013b09f95fea8e2fa 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/ExportUser.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/ExportUser.java
@@ -1,12 +1,10 @@
package com.zscat.mallplus;
import cn.afterturn.easypoi.excel.annotation.Excel;
-import com.aliyun.oss.common.utils.DateUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
-import java.text.SimpleDateFormat;
import java.util.Date;
@Data
@@ -20,6 +18,5 @@ public class ExportUser {
private Date createTime;
-
}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/bill/controller/BillAftersalesController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/bill/controller/BillAftersalesController.java
index e1db08a6c58514bd9360c2668df2705b7ce0fee0..b4bafe088f9f939d1c38ac024dfc5b08ad26bba1 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/bill/controller/BillAftersalesController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/bill/controller/BillAftersalesController.java
@@ -48,6 +48,5 @@ public class BillAftersalesController {
}
-
}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/bo/ColumnInfo.java b/mallplus-admin/src/main/java/com/zscat/mallplus/bo/ColumnInfo.java
index 9e4ab2a8aec4d9b5032835f4dc76e8f6a39428b5..186d25e170839621a8165e00d1251d0170c17b41 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/bo/ColumnInfo.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/bo/ColumnInfo.java
@@ -6,6 +6,7 @@ import lombok.NoArgsConstructor;
/**
* 列的数据信息
+ *
* @author mallplus
* @date 2019-01-02
*/
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/bo/SysLogAspect.java b/mallplus-admin/src/main/java/com/zscat/mallplus/bo/SysLogAspect.java
index b1289642f527d2ed7b42079109f40979d6dac6a5..61bb1b75210a8f3164d04cb12d23019f977218a4 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/bo/SysLogAspect.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/bo/SysLogAspect.java
@@ -145,7 +145,7 @@ public class SysLogAspect {
logger.info(getString(sysLog));
//保存系统日志
- // fopSystemOperationLogService.save(sysLog);
+ // fopSystemOperationLogService.save(sysLog);
} catch (Exception ex) {
logger.error("保存系统日志失败");
}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/bo/TableInfo.java b/mallplus-admin/src/main/java/com/zscat/mallplus/bo/TableInfo.java
index 610d69120441e563eeb521d29522be6e0b162e99..2f19cd2784969531907746002251f2c2210dc784 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/bo/TableInfo.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/bo/TableInfo.java
@@ -6,6 +6,7 @@ import lombok.NoArgsConstructor;
/**
* 表的数据信息
+ *
* @author mallplus
* @date 2019-01-02
*/
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildApplyRoomController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildApplyRoomController.java
index 964486a758aa165a9b3047b592cedb3bc785ae14..cd4892df06e007dc47f2de3415be47f05cb281a0 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildApplyRoomController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildApplyRoomController.java
@@ -1,13 +1,12 @@
package com.zscat.mallplus.build.controller;
-import org.springframework.web.bind.annotation.RequestMapping;
-
import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
/**
*
- * 前端控制器
+ * 前端控制器
*
*
* @author zscat
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildGroupController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildGroupController.java
index a7ca7cd5868ef4ff733ab16c860a13613a3c0a13..5f198fcc82d849f88243835643c704d45e92723f 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildGroupController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildGroupController.java
@@ -21,7 +21,7 @@ import java.util.List;
/**
*
- * 前端控制器
+ * 前端控制器
*
*
* @author zscat
@@ -40,8 +40,8 @@ public class BuildGroupController {
@GetMapping(value = "/list")
@PreAuthorize("hasAuthority('build:group:read')")
public Object getBuildGroupByPage(BuildGroup entity,
- @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
- @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
+ @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
) {
try {
return new CommonResult().success(IBuildGroupService.page(new Page(pageNum, pageSize), new QueryWrapper<>(entity)));
@@ -133,6 +133,7 @@ public class BuildGroupController {
return new CommonResult().failed();
}
}
+
@GetMapping("/exportExcel")
public void export(HttpServletResponse response, BuildGroup entity) {
// 模拟从数据库获取需要导出的数据
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildGroupMemberController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildGroupMemberController.java
index 8971f1f1d66f293ef01783f01c805ad3963c5ef3..f144c4cab8ffed0f88b7a133250d41d5aa4ffb00 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildGroupMemberController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildGroupMemberController.java
@@ -21,7 +21,7 @@ import java.util.List;
/**
*
- * 前端控制器
+ * 前端控制器
*
*
* @author zscat
@@ -41,8 +41,8 @@ public class BuildGroupMemberController {
@GetMapping(value = "/list")
@PreAuthorize("hasAuthority('build:groupMember:read')")
public Object getBuildGroupMemberByPage(BuildGroupMember entity,
- @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
- @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
+ @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
) {
try {
return new CommonResult().success(IBuildGroupMemberService.page(new Page(pageNum, pageSize), new QueryWrapper<>(entity)));
@@ -134,6 +134,7 @@ public class BuildGroupMemberController {
return new CommonResult().failed();
}
}
+
@GetMapping("/exportExcel")
public void export(HttpServletResponse response, BuildGroupMember entity) {
// 模拟从数据库获取需要导出的数据
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildNoticeController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildNoticeController.java
index 724df82713da20c07af3e2389d32fee77e038813..ac8089634cf31c6b67112a53be56a7cd50b4e1af 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildNoticeController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildNoticeController.java
@@ -42,8 +42,8 @@ public class BuildNoticeController {
@GetMapping(value = "/list")
@PreAuthorize("hasAuthority('build:notice:read')")
public Object getBuildNoticeByPage(BuildNotice entity,
- @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
- @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
+ @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
) {
try {
return new CommonResult().success(IBuildNoticeService.page(new Page(pageNum, pageSize), new QueryWrapper<>(entity)));
@@ -135,6 +135,7 @@ public class BuildNoticeController {
return new CommonResult().failed();
}
}
+
@GetMapping("/exportExcel")
public void export(HttpServletResponse response, BuildNotice entity) {
// 模拟从数据库获取需要导出的数据
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildRepairController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildRepairController.java
index 13300b6a246aa1e46d2d624feec808efa7bbb89f..ad6c091410716ee90c043a02033687c5a2096f25 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildRepairController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildRepairController.java
@@ -21,7 +21,7 @@ import java.util.List;
/**
*
- * 前端控制器
+ * 前端控制器
*
*
* @author zscat
@@ -132,6 +132,7 @@ public class BuildRepairController {
return new CommonResult().failed();
}
}
+
@GetMapping("/exportExcel")
public void export(HttpServletResponse response, BuildRepair entity) {
// 模拟从数据库获取需要导出的数据
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildTypePriceController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildTypePriceController.java
index 093c43bdc25307d76ce81f7b922950b80b42e7d0..b9c6a4fe26edb17e39da757ec38a5cc38ccea92a 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildTypePriceController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildTypePriceController.java
@@ -22,7 +22,7 @@ import java.util.List;
/**
*
- * 前端控制器
+ * 前端控制器
*
*
* @author zscat
@@ -41,8 +41,8 @@ public class BuildTypePriceController {
@GetMapping(value = "/list")
@PreAuthorize("hasAuthority('build:typePrice:read')")
public Object getBuildTypePriceByPage(BuildTypePrice entity,
- @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
- @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
+ @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
) {
try {
return new CommonResult().success(IBuildTypePriceService.page(new Page(pageNum, pageSize), new QueryWrapper<>(entity)));
@@ -134,6 +134,7 @@ public class BuildTypePriceController {
return new CommonResult().failed();
}
}
+
@GetMapping("/exportExcel")
public void export(HttpServletResponse response, BuildTypePrice entity) {
// 模拟从数据库获取需要导出的数据
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildWuyeCompanyController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildWuyeCompanyController.java
index 239ac74564102fa866d319d4eb2d0abb70e1ad7e..46898c10fc7c15e039c53c4fbb3f7c1648993d9b 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildWuyeCompanyController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildWuyeCompanyController.java
@@ -21,7 +21,7 @@ import java.util.List;
/**
*
- * 前端控制器
+ * 前端控制器
*
*
* @author zscat
@@ -40,8 +40,8 @@ public class BuildWuyeCompanyController {
@GetMapping(value = "/list")
@PreAuthorize("hasAuthority('build:wuyeCompany:read')")
public Object getBuildWuyeCompanyByPage(BuildWuyeCompany entity,
- @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
- @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
+ @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
) {
try {
return new CommonResult().success(IBuildWuyeCompanyService.page(new Page(pageNum, pageSize), new QueryWrapper<>(entity)));
@@ -133,6 +133,7 @@ public class BuildWuyeCompanyController {
return new CommonResult().failed();
}
}
+
@GetMapping("/exportExcel")
public void export(HttpServletResponse response, BuildWuyeCompany entity) {
// 模拟从数据库获取需要导出的数据
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildWuyePriceController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildWuyePriceController.java
index c06fdbefb82200d44710eedd61b7006c79c2e396..ab8405b594d0e5db3a153db1ef8a4eded2734442 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildWuyePriceController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildWuyePriceController.java
@@ -23,7 +23,7 @@ import java.util.List;
/**
*
- * 前端控制器
+ * 前端控制器
*
*
* @author zscat
@@ -44,8 +44,8 @@ public class BuildWuyePriceController {
@GetMapping(value = "/list")
@PreAuthorize("hasAuthority('build:wuyePrice:read')")
public Object getBuildWuyePriceByPage(BuildWuyePrice entity,
- @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
- @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
+ @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
) {
try {
return new CommonResult().success(IBuildWuyePriceService.page(new Page(pageNum, pageSize), new QueryWrapper<>(entity)));
@@ -61,11 +61,11 @@ public class BuildWuyePriceController {
@PreAuthorize("hasAuthority('build:wuyePrice:create')")
public Object saveBuildWuyePrice(@RequestBody BuildWuyePrice entity) {
try {
- if (ValidatorUtils.empty(entity.getAmount())||ValidatorUtils.empty(entity.getPrice())){
+ if (ValidatorUtils.empty(entity.getAmount()) || ValidatorUtils.empty(entity.getPrice())) {
return new CommonResult().failed("请输入价格");
}
- BuildingRoom room =IBuildingRoomService.getById(entity.getRoomId());
- if (room!=null && room.getRoomDesc()!=null){
+ BuildingRoom room = IBuildingRoomService.getById(entity.getRoomId());
+ if (room != null && room.getRoomDesc() != null) {
entity.setRoomDesc(room.getRoomDesc());
}
entity.setCreateDate(new Date());
@@ -145,6 +145,7 @@ public class BuildWuyePriceController {
return new CommonResult().failed();
}
}
+
@GetMapping("/exportExcel")
public void export(HttpServletResponse response, BuildWuyePrice entity) {
// 模拟从数据库获取需要导出的数据
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildingCommunityController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildingCommunityController.java
index de26224f9640dcfaf6f64e98b051144401699ea0..4b4a3246f004e989a299819da272219fd735dad5 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildingCommunityController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildingCommunityController.java
@@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zscat.mallplus.annotation.SysLog;
import com.zscat.mallplus.build.entity.BuildingCommunity;
import com.zscat.mallplus.util.EasyPoiUtils;
-import com.zscat.mallplus.util.UserUtils;
import com.zscat.mallplus.utils.CommonResult;
import com.zscat.mallplus.utils.ValidatorUtils;
import io.swagger.annotations.ApiOperation;
@@ -61,10 +60,10 @@ public class BuildingCommunityController {
try {
entity.setCreateTime(new Date());
entity.setStatus(3);
- if (ValidatorUtils.empty(entity.getCompanyId())){
- entity.setCompanyId(UserUtils.getCurrentMember().getStoreId());
+ if (ValidatorUtils.empty(entity.getCompanyId())) {
+ // entity.setCompanyId(UserUtils.getCurrentMember().getStoreId());
}
- if (ValidatorUtils.empty(entity.getCompanyId())){
+ if (ValidatorUtils.empty(entity.getCompanyId())) {
return new CommonResult().failed("请选择物业攻啊");
}
if (IBuildingCommunityService.saveCommunity(entity)) {
@@ -142,8 +141,9 @@ public class BuildingCommunityController {
return new CommonResult().failed();
}
}
+
@GetMapping("/exportExcel")
- public void export(HttpServletResponse response,BuildingCommunity entity) {
+ public void export(HttpServletResponse response, BuildingCommunity entity) {
// 模拟从数据库获取需要导出的数据
List personList = IBuildingCommunityService.list(new QueryWrapper<>(entity));
// 导出操作
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildingFloorController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildingFloorController.java
index 684afebc7823ba0abe95fe23db82263f29889c1e..7709a2d15f7197e7ab5a552fad8dadc2b9bd21f5 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildingFloorController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildingFloorController.java
@@ -23,7 +23,7 @@ import java.util.List;
/**
*
- * 前端控制器
+ * 前端控制器
*
*
* @author zscat
@@ -59,7 +59,7 @@ public class BuildingFloorController {
public Object saveBuildingFloor(@RequestBody BuildingFloor entity) {
try {
- if (ValidatorUtils.empty(entity.getCommunityId())){
+ if (ValidatorUtils.empty(entity.getCommunityId())) {
return new CommonResult().failed("请选择小区");
}
entity.setCreateTime(new Date());
@@ -138,6 +138,7 @@ public class BuildingFloorController {
return new CommonResult().failed();
}
}
+
@GetMapping("/exportExcel")
public void export(HttpServletResponse response, BuildingFloor entity) {
// 模拟从数据库获取需要导出的数据
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildingOwnerController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildingOwnerController.java
index dfa0129577e9dfb3d03e123081173ee315f378da..734e3f1a1203f3ad94e560c8112e00c5471359ee 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildingOwnerController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildingOwnerController.java
@@ -59,15 +59,15 @@ public class BuildingOwnerController {
public Object saveBuildingOwner(@RequestBody BuildingOwner entity) {
try {
- if (ValidatorUtils.empty(entity.getRoomId())){
+ if (ValidatorUtils.empty(entity.getRoomId())) {
return new CommonResult().failed("请选择房屋");
}
entity.setCreateTime(new Date());
- if (entity.getType()==2 || entity.getType()==3){
- List list = IBuildingOwnerService.list(new QueryWrapper().eq("room_id",entity.getRoomId()).eq("type",1).orderByAsc("id"));
- if (list!=null && list.size()>0){
+ if (entity.getType() == 2 || entity.getType() == 3) {
+ List list = IBuildingOwnerService.list(new QueryWrapper().eq("room_id", entity.getRoomId()).eq("type", 1).orderByAsc("id"));
+ if (list != null && list.size() > 0) {
entity.setOwnerId(list.get(0).getId());
- }else {
+ } else {
return new CommonResult().failed("请先添加一个业主");
}
}
@@ -146,6 +146,7 @@ public class BuildingOwnerController {
return new CommonResult().failed();
}
}
+
@GetMapping("/exportExcel")
public void export(HttpServletResponse response, BuildingOwner entity) {
// 模拟从数据库获取需要导出的数据
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildingRoomController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildingRoomController.java
index a739dc7c3aab846ee8e8507cb3d29f05e6c32273..930b35e09109be759a5cdde0920030c4baa12597 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildingRoomController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildingRoomController.java
@@ -49,6 +49,7 @@ public class BuildingRoomController {
private IBuildingFloorService floorService;
@Resource
private IBuildingCommunityService communityService;
+
@SysLog(MODULE = "build", REMARK = "根据条件查询所有房间表列表")
@ApiOperation("根据条件查询所有房间表列表")
@GetMapping(value = "/list")
@@ -71,8 +72,8 @@ public class BuildingRoomController {
public Object withChilds(BuildingFloor entity) {
try {
List floors = floorService.list(new QueryWrapper<>(entity));
- for (BuildingFloor floor : floors){
- List list = IBuildingRoomService.list(new QueryWrapper().eq("floor_id",floor.getId()));
+ for (BuildingFloor floor : floors) {
+ List list = IBuildingRoomService.list(new QueryWrapper().eq("floor_id", floor.getId()));
floor.setChildren(list);
}
return new CommonResult().success(floors);
@@ -81,21 +82,23 @@ public class BuildingRoomController {
}
return new CommonResult().failed();
}
+
@SysLog(MODULE = "build", REMARK = "保存房间表")
@ApiOperation("保存房间表")
@PostMapping(value = "/create")
public Object saveBuildingRoom(@RequestBody BuildingRoom entity) {
try {
- if (ValidatorUtils.empty(entity.getUnitId())){
+ if (ValidatorUtils.empty(entity.getUnitId())) {
return new CommonResult().failed("请选择单元");
}
entity.setCreateTime(new Date());
BuildingUnit unit = unitService.getById(entity.getUnitId());
BuildingFloor floor = floorService.getById(unit.getFloorId());
- entity.setFloorId(floor.getId());entity.setCommunityId(floor.getCommunityId());
+ entity.setFloorId(floor.getId());
+ entity.setCommunityId(floor.getCommunityId());
BuildingCommunity community = communityService.getById(floor.getCommunityId());
- entity.setRoomDesc(community.getName()+"-"+floor.getName()+"-"+unit.getUnitNum()+"-"+entity.getRoomNum());
+ entity.setRoomDesc(community.getName() + "-" + floor.getName() + "-" + unit.getUnitNum() + "-" + entity.getRoomNum());
entity.setLayer(floor.getLayerCount());
entity.setId(IdWorker.getId());
if (IBuildingRoomService.save(entity)) {
@@ -173,6 +176,7 @@ public class BuildingRoomController {
return new CommonResult().failed();
}
}
+
@GetMapping("/exportExcel")
public void export(HttpServletResponse response, BuildingRoom entity) {
// 模拟从数据库获取需要导出的数据
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildingUnitController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildingUnitController.java
index ace829faad88cab139e56c08a368d4ab82a028f4..1a65c3432e3b7adba785cd63a1479111070729eb 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildingUnitController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/controller/BuildingUnitController.java
@@ -23,7 +23,7 @@ import java.util.List;
/**
*
- * 前端控制器
+ * 前端控制器
*
*
* @author zscat
@@ -59,7 +59,7 @@ public class BuildingUnitController {
public Object saveBuildingUnit(@RequestBody BuildingUnit entity) {
try {
- if (ValidatorUtils.empty(entity.getFloorId())){
+ if (ValidatorUtils.empty(entity.getFloorId())) {
return new CommonResult().failed("请选择楼");
}
entity.setCreateTime(new Date());
@@ -138,6 +138,7 @@ public class BuildingUnitController {
return new CommonResult().failed();
}
}
+
@GetMapping("/exportExcel")
public void export(HttpServletResponse response, BuildingUnit entity) {
// 模拟从数据库获取需要导出的数据
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildAdvService.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildAdvService.java
index 2f6f2a50490f444b575f47fd1518c7fa504d4c75..167910e23f045e9f75cbf1b5aef99a6bbfd105b1 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildAdvService.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildAdvService.java
@@ -1,7 +1,7 @@
package com.zscat.mallplus.build.service;
-import com.zscat.mallplus.build.entity.BuildAdv;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.zscat.mallplus.build.entity.BuildAdv;
/**
*
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildApplyRoomService.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildApplyRoomService.java
index cd00b22db3fce87d26630fc7cd31456b4c74c670..a55ed632b25b0029c2614dd6638938d5129246c2 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildApplyRoomService.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildApplyRoomService.java
@@ -1,11 +1,11 @@
package com.zscat.mallplus.build.service;
-import com.zscat.mallplus.build.entity.BuildApplyRoom;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.zscat.mallplus.build.entity.BuildApplyRoom;
/**
*
- * 服务类
+ * 服务类
*
*
* @author zscat
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildGroupMemberService.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildGroupMemberService.java
index 675391493d11750fa36984303993860407ddfaf6..69eb6f1a5242e26ec539c15a69ec21a0ca970a00 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildGroupMemberService.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildGroupMemberService.java
@@ -1,11 +1,11 @@
package com.zscat.mallplus.build.service;
-import com.zscat.mallplus.build.entity.BuildGroupMember;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.zscat.mallplus.build.entity.BuildGroupMember;
/**
*
- * 服务类
+ * 服务类
*
*
* @author zscat
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildGroupService.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildGroupService.java
index 5ec0a1ad8e195a975914489432498d0ca3c7f0a8..c4cef379cd7121b0beb31b7135cb1ebbe3417032 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildGroupService.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildGroupService.java
@@ -1,11 +1,11 @@
package com.zscat.mallplus.build.service;
-import com.zscat.mallplus.build.entity.BuildGroup;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.zscat.mallplus.build.entity.BuildGroup;
/**
*
- * 服务类
+ * 服务类
*
*
* @author zscat
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildNoticeService.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildNoticeService.java
index 937e7deaa19f4ab1cef15a855cc2fd7b313a06bd..67a11f5f0aba583fbd104b03a3a476c9116a9ca1 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildNoticeService.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildNoticeService.java
@@ -1,7 +1,7 @@
package com.zscat.mallplus.build.service;
-import com.zscat.mallplus.build.entity.BuildNotice;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.zscat.mallplus.build.entity.BuildNotice;
/**
*
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildRepairService.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildRepairService.java
index 767d86e9ed42e95073ee52c09c56bbe747d8b563..51a390af2e77ae2790085eb267428db87840588f 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildRepairService.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildRepairService.java
@@ -1,11 +1,11 @@
package com.zscat.mallplus.build.service;
-import com.zscat.mallplus.build.entity.BuildRepair;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.zscat.mallplus.build.entity.BuildRepair;
/**
*
- * 服务类
+ * 服务类
*
*
* @author zscat
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildTypePriceService.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildTypePriceService.java
index 2185d26ffd965a69753f2e70a75488240f83850b..630b03ae9f973106d6f30c3d192b41a7e6ed9b4d 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildTypePriceService.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildTypePriceService.java
@@ -1,11 +1,11 @@
package com.zscat.mallplus.build.service;
-import com.zscat.mallplus.build.entity.BuildTypePrice;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.zscat.mallplus.build.entity.BuildTypePrice;
/**
*
- * 服务类
+ * 服务类
*
*
* @author zscat
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildWuyeCompanyService.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildWuyeCompanyService.java
index d2cd3e5c22b9223c4f3c3c26a07288a0c3172f1c..2ca750ffec390acbf93a6e212f364e0f2c60eb88 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildWuyeCompanyService.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildWuyeCompanyService.java
@@ -1,11 +1,11 @@
package com.zscat.mallplus.build.service;
-import com.zscat.mallplus.build.entity.BuildWuyeCompany;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.zscat.mallplus.build.entity.BuildWuyeCompany;
/**
*
- * 服务类
+ * 服务类
*
*
* @author zscat
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildWuyePriceService.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildWuyePriceService.java
index dd2532bda708e9cc5b4958de18a1f99d8b56a525..dfc979d129dc1eed2660aebaf67e9811cba80c90 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildWuyePriceService.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildWuyePriceService.java
@@ -1,11 +1,11 @@
package com.zscat.mallplus.build.service;
-import com.zscat.mallplus.build.entity.BuildWuyePrice;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.zscat.mallplus.build.entity.BuildWuyePrice;
/**
*
- * 服务类
+ * 服务类
*
*
* @author zscat
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildingCommunityService.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildingCommunityService.java
index 74ddb20057935ef73ac68714f9e7bd50662bda9d..c7ef9058778324793d514d29c65d2e7fbee3c856 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildingCommunityService.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildingCommunityService.java
@@ -1,7 +1,7 @@
package com.zscat.mallplus.build.service;
-import com.zscat.mallplus.build.entity.BuildingCommunity;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.zscat.mallplus.build.entity.BuildingCommunity;
/**
*
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildingFloorService.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildingFloorService.java
index eb896f7e012357bb02679917212d40a53038fe64..338f1a382b960b99b8e7891b6cd55537fed8b0c7 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildingFloorService.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildingFloorService.java
@@ -1,11 +1,11 @@
package com.zscat.mallplus.build.service;
-import com.zscat.mallplus.build.entity.BuildingFloor;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.zscat.mallplus.build.entity.BuildingFloor;
/**
*
- * 服务类
+ * 服务类
*
*
* @author zscat
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildingOwnerService.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildingOwnerService.java
index 025ce26c7ba6c61c2b54142074d845fc60a220ff..e135411246191535212be1ddca14c2249c68bdf3 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildingOwnerService.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildingOwnerService.java
@@ -1,7 +1,7 @@
package com.zscat.mallplus.build.service;
-import com.zscat.mallplus.build.entity.BuildingOwner;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.zscat.mallplus.build.entity.BuildingOwner;
/**
*
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildingRoomService.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildingRoomService.java
index 370a45e1f3a9c87a5c2c69d74665c269129a2e03..e4e15dd841eb31bdcb541334aebb8aa0fc25ef4c 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildingRoomService.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildingRoomService.java
@@ -1,7 +1,7 @@
package com.zscat.mallplus.build.service;
-import com.zscat.mallplus.build.entity.BuildingRoom;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.zscat.mallplus.build.entity.BuildingRoom;
/**
*
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildingUnitService.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildingUnitService.java
index a24b9c4d7f8c80a61f0591c7de630a325984fdfc..25386c8dcbdecf078a4f722135e54c76b2aa0dcd 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildingUnitService.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/IBuildingUnitService.java
@@ -1,11 +1,11 @@
package com.zscat.mallplus.build.service;
-import com.zscat.mallplus.build.entity.BuildingUnit;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.zscat.mallplus.build.entity.BuildingUnit;
/**
*
- * 服务类
+ * 服务类
*
*
* @author zscat
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildAdvServiceImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildAdvServiceImpl.java
index b4f11fd7eb2425f87a606ea4344ad13892c64df9..e683338db475e63ba3a1416f59359309ec7cadd0 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildAdvServiceImpl.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildAdvServiceImpl.java
@@ -1,9 +1,9 @@
package com.zscat.mallplus.build.service.impl;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zscat.mallplus.build.entity.BuildAdv;
import com.zscat.mallplus.build.mapper.BuildAdvMapper;
import com.zscat.mallplus.build.service.IBuildAdvService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildApplyRoomServiceImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildApplyRoomServiceImpl.java
index 6471df4ff7404c8b6013d3a9ecd7427fe716c539..4d40fa8bb6573150e7d5b6c009908fc8e9c7382e 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildApplyRoomServiceImpl.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildApplyRoomServiceImpl.java
@@ -1,14 +1,14 @@
package com.zscat.mallplus.build.service.impl;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zscat.mallplus.build.entity.BuildApplyRoom;
import com.zscat.mallplus.build.mapper.BuildApplyRoomMapper;
import com.zscat.mallplus.build.service.IBuildApplyRoomService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
*
- * 服务实现类
+ * 服务实现类
*
*
* @author zscat
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildGroupMemberServiceImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildGroupMemberServiceImpl.java
index 5dd5f882da08b56a553875341189acd1fe8bc95a..593aae53085f443ca4988b9873f6d5b1b6a28c51 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildGroupMemberServiceImpl.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildGroupMemberServiceImpl.java
@@ -1,14 +1,14 @@
package com.zscat.mallplus.build.service.impl;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zscat.mallplus.build.entity.BuildGroupMember;
import com.zscat.mallplus.build.mapper.BuildGroupMemberMapper;
import com.zscat.mallplus.build.service.IBuildGroupMemberService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
*
- * 服务实现类
+ * 服务实现类
*
*
* @author zscat
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildGroupServiceImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildGroupServiceImpl.java
index f83b98431ac430c96d4beb133cb634dcabc990af..44a95869aba584402ba2062bc569a828215275ce 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildGroupServiceImpl.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildGroupServiceImpl.java
@@ -1,14 +1,14 @@
package com.zscat.mallplus.build.service.impl;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zscat.mallplus.build.entity.BuildGroup;
import com.zscat.mallplus.build.mapper.BuildGroupMapper;
import com.zscat.mallplus.build.service.IBuildGroupService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
*
- * 服务实现类
+ * 服务实现类
*
*
* @author zscat
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildNoticeServiceImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildNoticeServiceImpl.java
index 185ff6aed7b1513f7c1d77dc8a1f3839397de35c..3ae3720b625534f267def05c809944e332c8cde9 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildNoticeServiceImpl.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildNoticeServiceImpl.java
@@ -1,9 +1,9 @@
package com.zscat.mallplus.build.service.impl;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zscat.mallplus.build.entity.BuildNotice;
import com.zscat.mallplus.build.mapper.BuildNoticeMapper;
import com.zscat.mallplus.build.service.IBuildNoticeService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildRepairServiceImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildRepairServiceImpl.java
index ac5b825f4b5462bb2a2e2356bf91327fe640ad12..c6808e6884098d69ee8996381513ad4e93b23677 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildRepairServiceImpl.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildRepairServiceImpl.java
@@ -1,14 +1,14 @@
package com.zscat.mallplus.build.service.impl;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zscat.mallplus.build.entity.BuildRepair;
import com.zscat.mallplus.build.mapper.BuildRepairMapper;
import com.zscat.mallplus.build.service.IBuildRepairService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
*
- * 服务实现类
+ * 服务实现类
*
*
* @author zscat
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildTypePriceServiceImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildTypePriceServiceImpl.java
index cbc46e8be444ae6a378ecbf2cdbbc802f6c17fce..52dd1a35d0baf08c05fd9d647d1af6019d2a0536 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildTypePriceServiceImpl.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildTypePriceServiceImpl.java
@@ -1,14 +1,14 @@
package com.zscat.mallplus.build.service.impl;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zscat.mallplus.build.entity.BuildTypePrice;
import com.zscat.mallplus.build.mapper.BuildTypePriceMapper;
import com.zscat.mallplus.build.service.IBuildTypePriceService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
*
- * 服务实现类
+ * 服务实现类
*
*
* @author zscat
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildWuyeCompanyServiceImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildWuyeCompanyServiceImpl.java
index b039bd6fcbd66a8a2e2ce36798f5ebf0db34ab30..25a5a956391a42d2d28631d3a47031e42617ff7c 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildWuyeCompanyServiceImpl.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildWuyeCompanyServiceImpl.java
@@ -18,7 +18,7 @@ import java.util.Date;
/**
*
- * 服务实现类
+ * 服务实现类
*
*
* @author zscat
@@ -35,33 +35,35 @@ public class BuildWuyeCompanyServiceImpl extends ServiceImpl
- * 服务实现类
+ * 服务实现类
*
*
* @author zscat
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildingCommunityServiceImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildingCommunityServiceImpl.java
index 9548b3b61e387558241945b7dce0bd4689f9854d..c420b793619e422b7f81f208d2b1925864b4ef20 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildingCommunityServiceImpl.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildingCommunityServiceImpl.java
@@ -1,9 +1,9 @@
package com.zscat.mallplus.build.service.impl;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zscat.mallplus.build.entity.BuildingCommunity;
import com.zscat.mallplus.build.mapper.BuildingCommunityMapper;
import com.zscat.mallplus.build.service.IBuildingCommunityService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zscat.mallplus.exception.ApiMallPlusException;
import com.zscat.mallplus.sys.entity.SysUser;
import com.zscat.mallplus.sys.entity.SysUserRole;
@@ -44,21 +44,22 @@ public class BuildingCommunityServiceImpl extends ServiceImpl
- * 服务实现类
+ * 服务实现类
*
*
* @author zscat
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildingOwnerServiceImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildingOwnerServiceImpl.java
index c94c1c36ccb1b38b5b2dea901ec76b6eade182db..c3cef35171897a71937db704a273f505c282dd59 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildingOwnerServiceImpl.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildingOwnerServiceImpl.java
@@ -1,9 +1,9 @@
package com.zscat.mallplus.build.service.impl;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zscat.mallplus.build.entity.BuildingOwner;
import com.zscat.mallplus.build.mapper.BuildingOwnerMapper;
import com.zscat.mallplus.build.service.IBuildingOwnerService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildingRoomServiceImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildingRoomServiceImpl.java
index f8d1af2cd35ef98afefbefd6ade21cf826f4bb5c..a675348209d19d7920d93e56c2781f67ae4cf7c1 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildingRoomServiceImpl.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildingRoomServiceImpl.java
@@ -1,9 +1,9 @@
package com.zscat.mallplus.build.service.impl;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zscat.mallplus.build.entity.BuildingRoom;
import com.zscat.mallplus.build.mapper.BuildingRoomMapper;
import com.zscat.mallplus.build.service.IBuildingRoomService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildingUnitServiceImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildingUnitServiceImpl.java
index 38ee8edfe21a83a1ceb85fd7ed8a4a7c7d53663d..df6c1e10051c5726e0bb25c18e4f49a3d961100c 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildingUnitServiceImpl.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/build/service/impl/BuildingUnitServiceImpl.java
@@ -1,14 +1,14 @@
package com.zscat.mallplus.build.service.impl;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zscat.mallplus.build.entity.BuildingUnit;
import com.zscat.mallplus.build.mapper.BuildingUnitMapper;
import com.zscat.mallplus.build.service.IBuildingUnitService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
*
- * 服务实现类
+ * 服务实现类
*
*
* @author zscat
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/component/JwtAuthenticationTokenFilter.java b/mallplus-admin/src/main/java/com/zscat/mallplus/component/JwtAuthenticationTokenFilter.java
index cbc24cb5710205da870598a4d735da2828595e22..2cf9779e7a25857ac3fdeef9c1f89beaaa5ca395 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/component/JwtAuthenticationTokenFilter.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/component/JwtAuthenticationTokenFilter.java
@@ -1,6 +1,7 @@
package com.zscat.mallplus.component;
+import com.zscat.mallplus.ApiContext;
import com.zscat.mallplus.sys.entity.SysAdminLog;
import com.zscat.mallplus.sys.service.ISysAdminLogService;
import com.zscat.mallplus.util.IpAddressUtil;
@@ -36,6 +37,8 @@ import java.util.Map;
*/
public class JwtAuthenticationTokenFilter extends OncePerRequestFilter {
private static final Logger LOGGER = LoggerFactory.getLogger(JwtAuthenticationTokenFilter.class);
+ @Resource
+ public ISysAdminLogService fopSystemOperationLogService;
@Autowired
private UserDetailsService userDetailsService;
@Autowired
@@ -44,9 +47,8 @@ public class JwtAuthenticationTokenFilter extends OncePerRequestFilter {
private String tokenHeader;
@Value("${jwt.tokenHead}")
private String tokenHead;
-
- @Resource
- public ISysAdminLogService fopSystemOperationLogService;
+ @Autowired
+ private ApiContext apiContext;
@Override
protected void doFilterInternal(HttpServletRequest request,
@@ -83,15 +85,15 @@ public class JwtAuthenticationTokenFilter extends OncePerRequestFilter {
String authToken = authHeader.substring(this.tokenHead.length());
username = jwtTokenUtil.getUserNameFromToken(authToken);
LOGGER.info("checking username:{}", username);
- if (fullUrl.contains("logout") || fullUrl.contains("login")){
+ if (fullUrl.contains("logout") || fullUrl.contains("login")) {
- }else{
+ } else {
if (username != null && SecurityContextHolder.getContext().getAuthentication() == null) {
UserDetails userDetails = this.userDetailsService.loadUserByUsername(username);
if (jwtTokenUtil.validateToken(authToken, userDetails)) {
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(userDetails, null, userDetails.getAuthorities());
authentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));
- LOGGER.info("authenticated user:{}", username);
+ LOGGER.info("checking username:{},storeId:{}", username,apiContext.getCurrentProviderId());
SecurityContextHolder.getContext().setAuthentication(authentication);
}
}
@@ -107,7 +109,7 @@ public class JwtAuthenticationTokenFilter extends OncePerRequestFilter {
IpAddressUtil.getIpAddr((HttpServletRequest) request), sbParams.toString(), authHeader)
+ ",\"cost\":\"" + (endTime - startTime) + "ms\"");
int startIntercept = fullUrl.replace("//", "a").indexOf("/") + 1;
- String interfaceName = fullUrl.substring(startIntercept,fullUrl.length());
+ String interfaceName = fullUrl.substring(startIntercept, fullUrl.length());
sysLog.setCreateTime(new Date());
sysLog.setIp(IpAddressUtil.getIpAddr(request));
sysLog.setMethod(interfaceName);
@@ -118,7 +120,7 @@ public class JwtAuthenticationTokenFilter extends OncePerRequestFilter {
sysLog.setTimeMin((endTime - startTime));
if (!"OPTIONS".equals(requestType) && !interfaceName.contains("webjars")
&& !interfaceName.contains("api-docs")) {
- // fopSystemOperationLogService.save(sysLog);
+ fopSystemOperationLogService.save(sysLog);
}
}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/component/OssAliyunConfig.java b/mallplus-admin/src/main/java/com/zscat/mallplus/component/OssAliyunConfig.java
index 9784b97a2af76170e7464deda6cee7825caa3c02..35288c1b0ae162234c037e8c50eaa679d1747ba4 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/component/OssAliyunConfig.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/component/OssAliyunConfig.java
@@ -7,19 +7,20 @@ import org.springframework.context.annotation.Configuration;
/**
* 阿里云配置类
+ *
* @author: Peter
* @date: 2018-4-11
*/
@Configuration
public class OssAliyunConfig {
- @Bean(value="defaultOssAliyunField")
+ @Bean(value = "defaultOssAliyunField")
@ConfigurationProperties("oss.aliyun.defalut")
public OssAliyunField defaultOssAliyunField() {
return new OssAliyunField();
}
- @Bean(value="firstOssAliyuField")
+ @Bean(value = "firstOssAliyuField")
@ConfigurationProperties("oss.aliyun.first")
public OssAliyunField firstOssAliyuField() {
return new OssAliyunField();
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/component/OssAliyunUtil.java b/mallplus-admin/src/main/java/com/zscat/mallplus/component/OssAliyunUtil.java
index 20f42d1864e8b3ff918bec466196ef5d4232ef36..53eb05c3641980706868449150fc5b8ec6c29633 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/component/OssAliyunUtil.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/component/OssAliyunUtil.java
@@ -27,8 +27,9 @@ import java.util.UUID;
@Component
public class OssAliyunUtil {
- @Resource(name="defaultOssAliyunField")
+ @Resource(name = "defaultOssAliyunField")
private OssAliyunField defaultOssAliyunField;
+
/**
* 上传文件(选择默认的OSS配置)
*
@@ -48,6 +49,7 @@ public class OssAliyunUtil {
/**
* 上传文件
+ *
* @param suffix
* @param inputStream
* @return
@@ -55,6 +57,7 @@ public class OssAliyunUtil {
public String upload(String suffix, InputStream inputStream) {
return upload(defaultOssAliyunField, getKey(defaultOssAliyunField.getPrefix(), suffix), inputStream);
}
+
/**
* 上传文件
*
@@ -142,7 +145,7 @@ public class OssAliyunUtil {
* @param key 文件名
*/
public void delete(final String accessKeyId, final String accessKeySecret, final String bucketName,
- final String endpoint, final String key) {
+ final String endpoint, final String key) {
// 创建OSSClient实例
OSSClient ossClient = new OSSClient(endpoint, accessKeyId, accessKeySecret);
// 删除Object
@@ -172,7 +175,7 @@ public class OssAliyunUtil {
* @param keys 多个文件名的集合
*/
public void delete(final String accessKeyId, final String accessKeySecret, final String bucketName,
- final String endpoint, final List keys) {
+ final String endpoint, final List keys) {
// 创建OSSClient实例
OSSClient ossClient = new OSSClient(endpoint, accessKeyId, accessKeySecret);
// 删除Objects
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/config/MybatisPlusConfig.java b/mallplus-admin/src/main/java/com/zscat/mallplus/config/MybatisPlusConfig.java
index 173045915590b856f9dc7c044eba2486808197fe..dbf1a0e466c2f8e59c18ae16edbd9053c37ed368 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/config/MybatisPlusConfig.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/config/MybatisPlusConfig.java
@@ -1,16 +1,26 @@
package com.zscat.mallplus.config;
+import com.baomidou.mybatisplus.core.parser.ISqlParser;
+import com.baomidou.mybatisplus.core.parser.ISqlParserFilter;
+import com.baomidou.mybatisplus.core.parser.SqlParserHelper;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.baomidou.mybatisplus.extension.plugins.PerformanceInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.tenant.TenantHandler;
+import com.baomidou.mybatisplus.extension.plugins.tenant.TenantSqlParser;
import com.zscat.mallplus.ApiContext;
import com.zscat.mallplus.enums.ConstansValue;
+import net.sf.jsqlparser.expression.Expression;
+import net.sf.jsqlparser.expression.LongValue;
+import org.apache.ibatis.mapping.MappedStatement;
+import org.apache.ibatis.reflection.MetaObject;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;
+import java.util.ArrayList;
import java.util.List;
//Spring boot方式
@@ -31,7 +41,54 @@ public class MybatisPlusConfig {
PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
paginationInterceptor.setDialectType("mysql");
+ /*
+ * 【测试多租户】 SQL 解析处理拦截器
+ * 这里固定写成住户 1 实际情况你可以从cookie读取,因此数据看不到 【 麻花藤 】 这条记录( 注意观察 SQL )
+ */
+ List sqlParserList = new ArrayList<>();
+ TenantSqlParser tenantSqlParser = new TenantSqlParser();
+ tenantSqlParser.setTenantHandler(new TenantHandler() {
+ @Override
+ public Expression getTenantId() {
+ // 从当前系统上下文中取出当前请求的服务商ID,通过解析器注入到SQL中。
+ Long currentProviderId = apiContext.getCurrentProviderId();
+ if (null == currentProviderId) {
+ currentProviderId = 1l;
+ System.out.println("#1129 getCurrentProviderId error.");
+ // throw new RuntimeException("#1129 getCurrentProviderId error.");
+ }
+ return new LongValue(currentProviderId);
+ }
+
+ @Override
+ public String getTenantIdColumn() {
+ return "store_id";
+ }
+
+ @Override
+ public boolean doTableFilter(String tableName) {
+ if (tableName.startsWith("admin_") || tableName.startsWith("QRTZ_")) {
+ return true;
+ }
+ return IGNORE_TENANT_TABLES.stream().anyMatch((e) -> e.equalsIgnoreCase(tableName));
+
+ }
+ });
+
+ sqlParserList.add(tenantSqlParser);
+ paginationInterceptor.setSqlParserList(sqlParserList);
+ paginationInterceptor.setSqlParserFilter(new ISqlParserFilter() {
+ @Override
+ public boolean doFilter(MetaObject metaObject) {
+ MappedStatement ms = SqlParserHelper.getMappedStatement(metaObject);
+ // 过滤自定义查询此时无租户信息约束【 麻花藤 】出现
+ if ("com.zscat.mallplus.sys.mapper.SysUserMapper.selectByUserName".equals(ms.getId())) {
+ return true;
+ }
+ return false;
+ }
+ });
return paginationInterceptor;
}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/config/SecurityConfig.java b/mallplus-admin/src/main/java/com/zscat/mallplus/config/SecurityConfig.java
index 25b23f9532c15e5b507d497ab711f4e7b470b50f..ad8dc4a3db38cca5ba39eef83f3d7a31197e3d85 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/config/SecurityConfig.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/config/SecurityConfig.java
@@ -1,5 +1,6 @@
package com.zscat.mallplus.config;
+import com.zscat.mallplus.ApiContext;
import com.zscat.mallplus.bo.AdminUserDetails;
import com.zscat.mallplus.component.JwtAuthenticationTokenFilter;
import com.zscat.mallplus.component.RestAuthenticationEntryPoint;
@@ -8,7 +9,6 @@ import com.zscat.mallplus.sys.entity.SysPermission;
import com.zscat.mallplus.sys.entity.SysUserVo;
import com.zscat.mallplus.sys.mapper.SysUserMapper;
import com.zscat.mallplus.sys.service.ISysUserService;
-import com.zscat.mallplus.ApiContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
@@ -52,6 +52,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Autowired
private ApiContext apiContext;
+
@Override
protected void configure(HttpSecurity httpSecurity) throws Exception {
httpSecurity.csrf()// 由于使用的是JWT,我们这里不需要csrf
@@ -106,9 +107,9 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
//获取登录用户信息
return username -> {
SysUserVo admin = userMapper.selectByUserName(username);
- // apiContext.setCurrentProviderId(admin.getStoreId());
+ // apiContext.setCurrentProviderId(admin.getStoreId());
if (admin != null) {
- if (admin.getSupplyId()!=null && admin.getSupplyId() == 1L) {
+ if (admin.getSupplyId() != null && admin.getSupplyId() == 1L) {
List permissionList = sysUserService.listPerms();
return new AdminUserDetails(admin, permissionList);
}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsCartItemController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsCartItemController.java
index 0d5c67c3e50f507bbdf6d488d797b3b7cca229a8..d15104d1b6199bc73a2096021a895d74521987a8 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsCartItemController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsCartItemController.java
@@ -27,7 +27,7 @@ import java.util.List;
*/
@Slf4j
@RestController
-@Api(tags = "OmsCartItemController", description = "购物车表管理")
+@Api(tags = "oms", description = "购物车表管理")
@RequestMapping("/oms/OmsCartItem")
public class OmsCartItemController {
@Resource
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsCompanyAddressController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsCompanyAddressController.java
index 9c6afbb3518ec1e591f5c18c42e4f329743e9cd7..9f0b49ba39c7b156e527845b6adccb1e8eef73b2 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsCompanyAddressController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsCompanyAddressController.java
@@ -1,10 +1,12 @@
package com.zscat.mallplus.oms.controller;
+
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zscat.mallplus.annotation.SysLog;
import com.zscat.mallplus.oms.entity.OmsCompanyAddress;
import com.zscat.mallplus.oms.service.IOmsCompanyAddressService;
+import com.zscat.mallplus.util.EasyPoiUtils;
import com.zscat.mallplus.utils.CommonResult;
import com.zscat.mallplus.utils.ValidatorUtils;
import io.swagger.annotations.Api;
@@ -13,114 +15,118 @@ import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
- *
- * 公司收发货地址表
- *
- *
- * @author zscat
- * @since 2019-04-19
+ * @author mallplus
+ * @date 2019-12-07
+ * 发货地址
*/
@Slf4j
+@Api(tags = "oms", description = "发货地址列表")
@RestController
-@Api(tags = "OmsCompanyAddressController", description = "公司收发货地址表管理")
-@RequestMapping("/oms/OmsCompanyAddress")
+@RequestMapping("/oms/omsCompanyAddress")
public class OmsCompanyAddressController {
+
@Resource
private IOmsCompanyAddressService IOmsCompanyAddressService;
- @SysLog(MODULE = "oms", REMARK = "根据条件查询所有公司收发货地址表列表")
- @ApiOperation("根据条件查询所有公司收发货地址表列表")
+ @SysLog(MODULE = "oms", REMARK = "根据条件查询所有发货地址列表")
+ @ApiOperation("根据条件查询所有发货地址列表")
@GetMapping(value = "/list")
public Object getOmsCompanyAddressByPage(OmsCompanyAddress entity,
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
) {
try {
+ if (ValidatorUtils.notEmpty(entity.getName())){
+ return new CommonResult().success(IOmsCompanyAddressService.page(new Page(pageNum, pageSize), new QueryWrapper(new OmsCompanyAddress()).like("name",entity.getName())));
+ }
return new CommonResult().success(IOmsCompanyAddressService.page(new Page(pageNum, pageSize), new QueryWrapper<>(entity)));
} catch (Exception e) {
- log.error("根据条件查询所有公司收发货地址表列表:%s", e.getMessage(), e);
+ log.error("根据条件查询所有发货地址列表:%s", e.getMessage(), e);
}
return new CommonResult().failed();
}
- @SysLog(MODULE = "oms", REMARK = "保存公司收发货地址表")
- @ApiOperation("保存公司收发货地址表")
+ @SysLog(MODULE = "oms", REMARK = "保存发货地址")
+ @ApiOperation("保存发货地址")
@PostMapping(value = "/create")
+ @PreAuthorize("hasAuthority('oms:omsCompanyAddress:create')")
public Object saveOmsCompanyAddress(@RequestBody OmsCompanyAddress entity) {
try {
+
if (IOmsCompanyAddressService.save(entity)) {
return new CommonResult().success();
}
} catch (Exception e) {
- log.error("保存公司收发货地址表:%s", e.getMessage(), e);
- return new CommonResult().failed();
+ log.error("保存发货地址:%s", e.getMessage(), e);
+ return new CommonResult().failed(e.getMessage());
}
return new CommonResult().failed();
}
- @SysLog(MODULE = "oms", REMARK = "更新公司收发货地址表")
- @ApiOperation("更新公司收发货地址表")
+ @SysLog(MODULE = "oms", REMARK = "更新发货地址")
+ @ApiOperation("更新发货地址")
@PostMapping(value = "/update/{id}")
- @PreAuthorize("hasAuthority('oms:OmsCompanyAddress:update')")
+ @PreAuthorize("hasAuthority('oms:omsCompanyAddress:update')")
public Object updateOmsCompanyAddress(@RequestBody OmsCompanyAddress entity) {
try {
if (IOmsCompanyAddressService.updateById(entity)) {
return new CommonResult().success();
}
} catch (Exception e) {
- log.error("更新公司收发货地址表:%s", e.getMessage(), e);
- return new CommonResult().failed();
+ log.error("更新发货地址:%s", e.getMessage(), e);
+ return new CommonResult().failed(e.getMessage());
}
return new CommonResult().failed();
}
- @SysLog(MODULE = "oms", REMARK = "删除公司收发货地址表")
- @ApiOperation("删除公司收发货地址表")
+ @SysLog(MODULE = "oms", REMARK = "删除发货地址")
+ @ApiOperation("删除发货地址")
@GetMapping(value = "/delete/{id}")
- @PreAuthorize("hasAuthority('oms:OmsCompanyAddress:delete')")
- public Object deleteOmsCompanyAddress(@ApiParam("公司收发货地址表id") @PathVariable Long id) {
+ @PreAuthorize("hasAuthority('oms:omsCompanyAddress:delete')")
+ public Object deleteOmsCompanyAddress(@ApiParam("发货地址id") @PathVariable Long id) {
try {
if (ValidatorUtils.empty(id)) {
- return new CommonResult().paramFailed("公司收发货地址表id");
+ return new CommonResult().paramFailed("发货地址id");
}
if (IOmsCompanyAddressService.removeById(id)) {
return new CommonResult().success();
}
} catch (Exception e) {
- log.error("删除公司收发货地址表:%s", e.getMessage(), e);
- return new CommonResult().failed();
+ log.error("删除发货地址:%s", e.getMessage(), e);
+ return new CommonResult().failed(e.getMessage());
}
return new CommonResult().failed();
}
- @SysLog(MODULE = "oms", REMARK = "给公司收发货地址表分配公司收发货地址表")
- @ApiOperation("查询公司收发货地址表明细")
+ @SysLog(MODULE = "oms", REMARK = "给发货地址分配发货地址")
+ @ApiOperation("查询发货地址明细")
@GetMapping(value = "/{id}")
- @PreAuthorize("hasAuthority('oms:OmsCompanyAddress:read')")
- public Object getOmsCompanyAddressById(@ApiParam("公司收发货地址表id") @PathVariable Long id) {
+ @PreAuthorize("hasAuthority('oms:omsCompanyAddress:read')")
+ public Object getOmsCompanyAddressById(@ApiParam("发货地址id") @PathVariable Long id) {
try {
if (ValidatorUtils.empty(id)) {
- return new CommonResult().paramFailed("公司收发货地址表id");
+ return new CommonResult().paramFailed("发货地址id");
}
OmsCompanyAddress coupon = IOmsCompanyAddressService.getById(id);
return new CommonResult().success(coupon);
} catch (Exception e) {
- log.error("查询公司收发货地址表明细:%s", e.getMessage(), e);
+ log.error("查询发货地址明细:%s", e.getMessage(), e);
return new CommonResult().failed();
}
}
- @ApiOperation(value = "批量删除公司收发货地址表")
+ @ApiOperation(value = "批量删除发货地址")
@RequestMapping(value = "/delete/batch", method = RequestMethod.GET)
- @ResponseBody
- @SysLog(MODULE = "pms", REMARK = "批量删除公司收发货地址表")
- @PreAuthorize("hasAuthority('oms:OmsCompanyAddress:delete')")
+ @SysLog(MODULE = "oms", REMARK = "批量删除发货地址")
+ @PreAuthorize("hasAuthority('oms:omsCompanyAddress:delete')")
public Object deleteBatch(@RequestParam("ids") List ids) {
boolean count = IOmsCompanyAddressService.removeByIds(ids);
if (count) {
@@ -130,4 +136,23 @@ public class OmsCompanyAddressController {
}
}
+
+ @SysLog(MODULE = "oms", REMARK = "导出社区数据")
+ @GetMapping("/exportExcel")
+ public void export(HttpServletResponse response, OmsCompanyAddress entity) {
+ // 模拟从数据库获取需要导出的数据
+ List personList = IOmsCompanyAddressService.list(new QueryWrapper<>(entity));
+ // 导出操作
+ EasyPoiUtils.exportExcel(personList, "导出社区数据", "社区数据", OmsCompanyAddress.class, "导出社区数据.xls", response);
+
+ }
+
+ @SysLog(MODULE = "oms", REMARK = "导入社区数据")
+ @PostMapping("/importExcel")
+ public void importUsers(@RequestParam MultipartFile file) {
+ List personList = EasyPoiUtils.importExcel(file, OmsCompanyAddress.class);
+ IOmsCompanyAddressService.saveBatch(personList);
+ }
}
+
+
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsOrderController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsOrderController.java
index 7190ac3274c16e8172b2bd658365849a484bfb22..ac73ba103b04764c0ac6e35738a7c1876dafb53b 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsOrderController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsOrderController.java
@@ -37,7 +37,7 @@ import java.util.List;
*/
@Slf4j
@RestController
-@Api(tags = "OmsOrderController", description = "订单表管理")
+@Api(tags = "oms", description = "订单表管理")
@RequestMapping("/oms/OmsOrder")
public class OmsOrderController {
@Resource
@@ -46,7 +46,8 @@ public class OmsOrderController {
private IOmsOrderItemService orderItemService;
@Resource
- private OmsOrderOperateHistoryMapper omsOrderOperateHistoryMapper;
+ private OmsOrderOperateHistoryMapper omsOrderOperateHistoryMapper;
+
@SysLog(MODULE = "oms", REMARK = "根据条件查询所有订单表列表")
@ApiOperation("根据条件查询所有订单表列表")
@GetMapping(value = "/list")
@@ -64,7 +65,6 @@ public class OmsOrderController {
}
-
@SysLog(MODULE = "oms", REMARK = "删除订单表")
@ApiOperation("删除订单表")
@GetMapping(value = "/delete/{id}")
@@ -93,8 +93,8 @@ public class OmsOrderController {
return new CommonResult().paramFailed("订单表id");
}
OmsOrder coupon = IOmsOrderService.getById(id);
- coupon.setOrderItemList(orderItemService.list(new QueryWrapper().eq("order_id",coupon.getId())));
- coupon.setHistoryList(omsOrderOperateHistoryMapper.selectList(new QueryWrapper().eq("order_id",coupon.getId())));
+ coupon.setOrderItemList(orderItemService.list(new QueryWrapper().eq("order_id", coupon.getId())));
+ coupon.setHistoryList(omsOrderOperateHistoryMapper.selectList(new QueryWrapper().eq("order_id", coupon.getId())));
return new CommonResult().success(coupon);
} catch (Exception e) {
log.error("查询订单表明细:%s", e.getMessage(), e);
@@ -128,6 +128,7 @@ public class OmsOrderController {
}
return new CommonResult().failed();
}
+
@SysLog(MODULE = "oms", REMARK = "批量发货")
@ApiOperation("批量发货")
@RequestMapping(value = "/delivery", method = RequestMethod.POST)
@@ -197,14 +198,14 @@ public class OmsOrderController {
@RequestParam(value = "pageNum", required = false, defaultValue = "1") Integer pageNum) {
IPage page = null;
- if (order.getStatus()!=null && order.getStatus()==0){
- page = IOmsOrderService.page(new Page(pageNum, pageSize), new QueryWrapper().orderByDesc("create_time").select(ConstansValue.sampleOrderList)) ;
- }else {
- page = IOmsOrderService.page(new Page(pageNum, pageSize), new QueryWrapper<>(order).orderByDesc("create_time").select(ConstansValue.sampleOrderList)) ;
+ if (order.getStatus() != null && order.getStatus() == 0) {
+ page = IOmsOrderService.page(new Page(pageNum, pageSize), new QueryWrapper().orderByDesc("create_time").select(ConstansValue.sampleOrderList));
+ } else {
+ page = IOmsOrderService.page(new Page(pageNum, pageSize), new QueryWrapper<>(order).orderByDesc("create_time").select(ConstansValue.sampleOrderList));
}
- for (OmsOrder omsOrder : page.getRecords()){
- List itemList = orderItemService.list(new QueryWrapper().eq("order_id",omsOrder.getId()).eq("type", AllEnum.OrderItemType.GOODS.code()));
+ for (OmsOrder omsOrder : page.getRecords()) {
+ List itemList = orderItemService.list(new QueryWrapper().eq("order_id", omsOrder.getId()).eq("type", AllEnum.OrderItemType.GOODS.code()));
omsOrder.setOrderItemList(itemList);
}
return new CommonResult().success(page);
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsOrderItemController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsOrderItemController.java
index 54e90e066b1255445c329687d172b8c65d9cd3c7..120259b03df26edb13cad002a6b61ce78d538998 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsOrderItemController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsOrderItemController.java
@@ -27,7 +27,7 @@ import java.util.List;
*/
@Slf4j
@RestController
-@Api(tags = "OmsOrderItemController", description = "订单中所包含的商品管理")
+@Api(tags = "oms", description = "订单中所包含的商品管理")
@RequestMapping("/oms/OmsOrderItem")
public class OmsOrderItemController {
@Resource
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsOrderOperateHistoryController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsOrderOperateHistoryController.java
index c0e99e6532bc48cb06075317a5449cc5b0749072..a4d18ade476f2d0d8c4c8e870528abe51ee661ee 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsOrderOperateHistoryController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsOrderOperateHistoryController.java
@@ -27,7 +27,7 @@ import java.util.List;
*/
@Slf4j
@RestController
-@Api(tags = "OmsOrderOperateHistoryController", description = "订单操作历史记录管理")
+@Api(tags = "oms", description = "订单操作历史记录管理")
@RequestMapping("/oms/OmsOrderOperateHistory")
public class OmsOrderOperateHistoryController {
@Resource
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsOrderReturnApplyController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsOrderReturnApplyController.java
index b18ed477ab45c193a7146d6416aeea7e096a8f1b..0b87a085a685df2725a34565fd24c4e1dda893f1 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsOrderReturnApplyController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsOrderReturnApplyController.java
@@ -28,7 +28,7 @@ import java.util.List;
*/
@Slf4j
@RestController
-@Api(tags = "OmsOrderReturnApplyController", description = "订单退货申请管理")
+@Api(tags = "oms", description = "订单退货申请管理")
@RequestMapping("/oms/OmsOrderReturnApply")
public class OmsOrderReturnApplyController {
@Resource
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsOrderReturnReasonController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsOrderReturnReasonController.java
index 1843116ed3d0d71a7a19ea9514a2fb9479941fac..e64cf2bccf95626efd7c1e7067c4bf5914fe3d85 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsOrderReturnReasonController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsOrderReturnReasonController.java
@@ -27,7 +27,7 @@ import java.util.List;
*/
@Slf4j
@RestController
-@Api(tags = "OmsOrderReturnReasonController", description = "退货原因表管理")
+@Api(tags = "oms", description = "退货原因表管理")
@RequestMapping("/oms/OmsOrderReturnReason")
public class OmsOrderReturnReasonController {
@Resource
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsOrderSettingController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsOrderSettingController.java
index 7774d2c1f79187afaacc3ea2550dff3da875d0d7..a6a43c3494709e54a65365bf65051ed3dcb97c7d 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsOrderSettingController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsOrderSettingController.java
@@ -27,7 +27,7 @@ import java.util.List;
*/
@Slf4j
@RestController
-@Api(tags = "OmsOrderSettingController", description = "订单设置表管理")
+@Api(tags = "oms", description = "订单设置表管理")
@RequestMapping("/oms/OmsOrderSetting")
public class OmsOrderSettingController {
@Resource
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsPaymentsController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsPaymentsController.java
new file mode 100644
index 0000000000000000000000000000000000000000..54f0147ef47743c6eea919cd9ed56d7624b9efd4
--- /dev/null
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/controller/OmsPaymentsController.java
@@ -0,0 +1,156 @@
+package com.zscat.mallplus.oms.controller;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.zscat.mallplus.annotation.SysLog;
+import com.zscat.mallplus.oms.entity.OmsPayments;
+import com.zscat.mallplus.oms.service.IOmsPaymentsService;
+import com.zscat.mallplus.util.EasyPoiUtils;
+import com.zscat.mallplus.utils.CommonResult;
+import com.zscat.mallplus.utils.ValidatorUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * @author mallplus
+ * @date 2019-12-07
+ * 支付配置
+ */
+@Slf4j
+@Api(tags = "oms", description = "支付配置")
+@RestController
+@RequestMapping("/oms/omsPayments")
+public class OmsPaymentsController {
+
+ @Resource
+ private IOmsPaymentsService IOmsPaymentsService;
+
+ @SysLog(MODULE = "oms", REMARK = "根据条件查询所有支付配置列表")
+ @ApiOperation("根据条件查询所有支付配置列表")
+ @GetMapping(value = "/list")
+ @PreAuthorize("hasAuthority('oms:omsPayments:read')")
+ public Object getOmsPaymentsByPage(OmsPayments entity,
+ @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
+ ) {
+ try {
+ return new CommonResult().success(IOmsPaymentsService.page(new Page(pageNum, pageSize), new QueryWrapper<>(entity)));
+ } catch (Exception e) {
+ log.error("根据条件查询所有支付配置列表:%s", e.getMessage(), e);
+ }
+ return new CommonResult().failed();
+ }
+
+ @SysLog(MODULE = "oms", REMARK = "保存支付配置")
+ @ApiOperation("保存支付配置")
+ @PostMapping(value = "/create")
+ @PreAuthorize("hasAuthority('oms:omsPayments:create')")
+ public Object saveOmsPayments(@RequestBody OmsPayments entity) {
+ try {
+
+ if (IOmsPaymentsService.save(entity)) {
+ return new CommonResult().success();
+ }
+ } catch (Exception e) {
+ log.error("保存支付配置:%s", e.getMessage(), e);
+ return new CommonResult().failed(e.getMessage());
+ }
+ return new CommonResult().failed();
+ }
+
+ @SysLog(MODULE = "oms", REMARK = "更新支付配置")
+ @ApiOperation("更新支付配置")
+ @PostMapping(value = "/update/{id}")
+ @PreAuthorize("hasAuthority('oms:omsPayments:update')")
+ public Object updateOmsPayments(@RequestBody OmsPayments entity) {
+ try {
+ if (IOmsPaymentsService.updateById(entity)) {
+ return new CommonResult().success();
+ }
+ } catch (Exception e) {
+ log.error("更新支付配置:%s", e.getMessage(), e);
+ return new CommonResult().failed(e.getMessage());
+ }
+ return new CommonResult().failed();
+ }
+
+ @SysLog(MODULE = "oms", REMARK = "删除支付配置")
+ @ApiOperation("删除支付配置")
+ @GetMapping(value = "/delete/{id}")
+ @PreAuthorize("hasAuthority('oms:omsPayments:delete')")
+ public Object deleteOmsPayments(@ApiParam("支付配置id") @PathVariable Long id) {
+ try {
+ if (ValidatorUtils.empty(id)) {
+ return new CommonResult().paramFailed("支付配置id");
+ }
+ if (IOmsPaymentsService.removeById(id)) {
+ return new CommonResult().success();
+ }
+ } catch (Exception e) {
+ log.error("删除支付配置:%s", e.getMessage(), e);
+ return new CommonResult().failed(e.getMessage());
+ }
+ return new CommonResult().failed();
+ }
+
+ @SysLog(MODULE = "oms", REMARK = "给支付配置分配支付配置")
+ @ApiOperation("查询支付配置明细")
+ @GetMapping(value = "/{id}")
+ @PreAuthorize("hasAuthority('oms:omsPayments:read')")
+ public Object getOmsPaymentsById(@ApiParam("支付配置id") @PathVariable Long id) {
+ try {
+ if (ValidatorUtils.empty(id)) {
+ return new CommonResult().paramFailed("支付配置id");
+ }
+ OmsPayments coupon = IOmsPaymentsService.getById(id);
+ return new CommonResult().success(coupon);
+ } catch (Exception e) {
+ log.error("查询支付配置明细:%s", e.getMessage(), e);
+ return new CommonResult().failed();
+ }
+
+ }
+
+ @ApiOperation(value = "批量删除支付配置")
+ @RequestMapping(value = "/delete/batch", method = RequestMethod.GET)
+ @SysLog(MODULE = "oms", REMARK = "批量删除支付配置")
+ @PreAuthorize("hasAuthority('oms:omsPayments:delete')")
+ public Object deleteBatch(@RequestParam("ids") List ids) {
+ boolean count = IOmsPaymentsService.removeByIds(ids);
+ if (count) {
+ return new CommonResult().success(count);
+ } else {
+ return new CommonResult().failed();
+ }
+ }
+
+
+ @SysLog(MODULE = "oms", REMARK = "导出社区数据")
+ @GetMapping("/exportExcel")
+ public void export(HttpServletResponse response, OmsPayments entity) {
+ // 模拟从数据库获取需要导出的数据
+ List personList = IOmsPaymentsService.list(new QueryWrapper<>(entity));
+ // 导出操作
+ EasyPoiUtils.exportExcel(personList, "导出社区数据", "社区数据", OmsPayments.class, "导出社区数据.xls", response);
+
+ }
+
+ @SysLog(MODULE = "oms", REMARK = "导入社区数据")
+ @PostMapping("/importExcel")
+ public void importUsers(@RequestParam MultipartFile file) {
+ List personList = EasyPoiUtils.importExcel(file, OmsPayments.class);
+ IOmsPaymentsService.saveBatch(personList);
+ }
+}
+
+
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/oms/service/IOmsCompanyAddressService.java b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/service/IOmsCompanyAddressService.java
index 788f3ff31f1dc5706c1ddd21107f59c1c236626a..fad957714d12138d19d345e6b03d37f755675fe3 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/oms/service/IOmsCompanyAddressService.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/service/IOmsCompanyAddressService.java
@@ -4,13 +4,10 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.zscat.mallplus.oms.entity.OmsCompanyAddress;
/**
- *
- * 公司收发货地址表 服务类
- *
- *
- * @author zscat
- * @since 2019-04-17
+ * @author mallplus
+ * @date 2019-12-07
*/
+
public interface IOmsCompanyAddressService extends IService {
}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/oms/service/IOmsOrderService.java b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/service/IOmsOrderService.java
index 6bc82a24b5161c490225157d9647565b4a4d5995..5b91185946812c3a88122d533d4f3338b506c552 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/oms/service/IOmsOrderService.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/service/IOmsOrderService.java
@@ -49,21 +49,25 @@ public interface IOmsOrderService extends IService {
*/
@Transactional
int close(List ids, String note);
+
@Transactional
int singleDelivery(OmsOrderDeliveryParam deliveryParamList);
/**
* 订单日统计
+ *
* @param date
* @return
*/
Map orderDayStatic(String date);
+
/**
* 订单月统计
+ *
* @param date
* @return
*/
Map orderMonthStatic(String date);
- Object dayStatic(String date,Integer type);
+ Object dayStatic(String date, Integer type);
}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/oms/service/IOmsPaymentsService.java b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/service/IOmsPaymentsService.java
new file mode 100644
index 0000000000000000000000000000000000000000..1a76e934c1ef9fd326238e3df6d0459711d38b7d
--- /dev/null
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/service/IOmsPaymentsService.java
@@ -0,0 +1,13 @@
+package com.zscat.mallplus.oms.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.zscat.mallplus.oms.entity.OmsPayments;
+
+/**
+ * @author mallplus
+ * @date 2019-12-07
+ */
+
+public interface IOmsPaymentsService extends IService {
+
+}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/oms/service/impl/OmsCompanyAddressServiceImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/service/impl/OmsCompanyAddressServiceImpl.java
index 62b4dcbdf6249dd5fd372dbba17e3ec7afcc9be8..554017e2dfde5f3f4f316b4a79e42d4d914f8f1f 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/oms/service/impl/OmsCompanyAddressServiceImpl.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/service/impl/OmsCompanyAddressServiceImpl.java
@@ -6,15 +6,17 @@ import com.zscat.mallplus.oms.mapper.OmsCompanyAddressMapper;
import com.zscat.mallplus.oms.service.IOmsCompanyAddressService;
import org.springframework.stereotype.Service;
+import javax.annotation.Resource;
+
/**
- *
- * 公司收发货地址表 服务实现类
- *
- *
- * @author zscat
- * @since 2019-04-17
+ * @author mallplus
+ * @date 2019-12-07
*/
@Service
public class OmsCompanyAddressServiceImpl extends ServiceImpl implements IOmsCompanyAddressService {
+ @Resource
+ private OmsCompanyAddressMapper omsCompanyAddressMapper;
+
+
}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/oms/service/impl/OmsOrderServiceImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/service/impl/OmsOrderServiceImpl.java
index 67ce6c281b1d7bc63c011bd95cc744840c01da25..239b2c0ab6600b2cd86e207c678ed1a5aefebb1f 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/oms/service/impl/OmsOrderServiceImpl.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/service/impl/OmsOrderServiceImpl.java
@@ -109,10 +109,10 @@ public class OmsOrderServiceImpl extends ServiceImpl i
}
@Override
- public Object dayStatic(String date,Integer type) {
- List orders = orderMapper.listByDate(date,type);
- List members = memberMapper.listByDate(date,type);
- List products = productMapper.listByDate(date,type);
+ public Object dayStatic(String date, Integer type) {
+ List orders = orderMapper.listByDate(date, type);
+ List members = memberMapper.listByDate(date, type);
+ List products = productMapper.listByDate(date, type);
int nowOrderCount = 0; // 今日订单
BigDecimal nowOrderPay = new BigDecimal(0); //今日销售总额
for (OmsOrder order : orders) {
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/oms/service/impl/OmsPaymentsServiceImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/service/impl/OmsPaymentsServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..aad195ad309265e1619e1782331095ba1c472f83
--- /dev/null
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/oms/service/impl/OmsPaymentsServiceImpl.java
@@ -0,0 +1,22 @@
+package com.zscat.mallplus.oms.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zscat.mallplus.oms.entity.OmsPayments;
+import com.zscat.mallplus.oms.mapper.OmsPaymentsMapper;
+import com.zscat.mallplus.oms.service.IOmsPaymentsService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @author mallplus
+ * @date 2019-12-07
+ */
+@Service
+public class OmsPaymentsServiceImpl extends ServiceImpl implements IOmsPaymentsService {
+
+ @Resource
+ private OmsPaymentsMapper omsPaymentsMapper;
+
+
+}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/pms/controller/PmsBrandController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/pms/controller/PmsBrandController.java
index 737a80fe9eadb1143dd23bc85a19d8535d785a87..ec536d68538f90ebe831d9fdbc61460d5c726b5c 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/pms/controller/PmsBrandController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/pms/controller/PmsBrandController.java
@@ -36,11 +36,14 @@ public class PmsBrandController {
@SysLog(MODULE = "pms", REMARK = "根据条件查询所有品牌表列表")
@ApiOperation("根据条件查询所有品牌表列表")
@GetMapping(value = "/list")
- public Object getPmsBrandByPage(PmsBrand entity,
+ public Object getPmsBrandByPage( PmsBrand entity,
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
) {
try {
+ if (ValidatorUtils.notEmpty(entity.getName())){
+ return new CommonResult().success(IPmsBrandService.page(new Page(pageNum, pageSize), new QueryWrapper(new PmsBrand()).like("name",entity.getName())));
+ }
return new CommonResult().success(IPmsBrandService.page(new Page(pageNum, pageSize), new QueryWrapper<>(entity)));
} catch (Exception e) {
log.error("根据条件查询所有品牌表列表:%s", e.getMessage(), e);
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/pms/controller/PmsGiftsController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/pms/controller/PmsGiftsController.java
index e0c0a4362f6be96462bbc14eb35b3bc9558914ab..fd58cfe500f512334093bdc852d0ffc8f00de918 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/pms/controller/PmsGiftsController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/pms/controller/PmsGiftsController.java
@@ -42,7 +42,11 @@ public class PmsGiftsController {
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
) {
try {
+ if (ValidatorUtils.notEmpty(entity.getTitle())){
+ return new CommonResult().success(IPmsGiftsService.page(new Page(pageNum, pageSize), new QueryWrapper(new PmsGifts()).like("title",entity.getTitle())));
+ }
return new CommonResult().success(IPmsGiftsService.page(new Page(pageNum, pageSize), new QueryWrapper<>(entity)));
+
} catch (Exception e) {
log.error("根据条件查询所有帮助表列表:%s", e.getMessage(), e);
}
@@ -131,5 +135,20 @@ public class PmsGiftsController {
return new CommonResult().failed();
}
}
+ @ApiOperation(value = "批量更新显示状态")
+ @RequestMapping(value = "/update/showStatus", method = RequestMethod.POST)
+ @ResponseBody
+ @SysLog(MODULE = "pms", REMARK = "批量更新显示状态")
+ public Object updateShowStatus(@RequestParam("ids") Long ids,
+ @RequestParam("showStatus") Integer showStatus) {
+ PmsGifts g = new PmsGifts();
+ g.setId(ids);
+ g.setShowStatus(showStatus);
+ if (IPmsGiftsService.updateById(g)) {
+ return new CommonResult().success();
+ } else {
+ return new CommonResult().failed();
+ }
+ }
}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/pms/controller/PmsProductAttributeController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/pms/controller/PmsProductAttributeController.java
index 7586daae5a95a32a859fae5c0c0e8509a6fcc0e3..777702c709a1f49feaf0da2b77d37a8c712ef8e1 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/pms/controller/PmsProductAttributeController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/pms/controller/PmsProductAttributeController.java
@@ -73,7 +73,7 @@ public class PmsProductAttributeController {
@PreAuthorize("hasAuthority('pms:PmsProductAttribute:create')")
public Object savePmsProductAttribute(@RequestBody PmsProductAttribute entity) {
try {
- if (entity.getType().equals(null)){
+ if (entity.getType().equals(null)) {
entity.setType(0);
}
if (IPmsProductAttributeService.saveAndUpdate(entity)) {
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/pms/controller/PmsProductConsultController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/pms/controller/PmsProductConsultController.java
index 814515117a9100338a340f2b475d144d545df2a1..38e424679ef9069863acab48b781ad20ffe1a423 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/pms/controller/PmsProductConsultController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/pms/controller/PmsProductConsultController.java
@@ -50,7 +50,6 @@ public class PmsProductConsultController {
}
-
@SysLog(MODULE = "pms", REMARK = "删除产品咨询表")
@ApiOperation("删除产品咨询表")
@GetMapping(value = "/delete/{id}")
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/pms/controller/PmsProductController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/pms/controller/PmsProductController.java
index ecce6b4b2eec1f3534718a8813844efac9dfe54c..5b4ad6fb9db428d6e983eeef3a473202921b5c36 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/pms/controller/PmsProductController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/pms/controller/PmsProductController.java
@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zscat.mallplus.annotation.SysLog;
import com.zscat.mallplus.enums.ConstansValue;
-import com.zscat.mallplus.oms.entity.OmsOrder;
import com.zscat.mallplus.pms.entity.PmsProduct;
import com.zscat.mallplus.pms.entity.PmsProductVertifyRecord;
import com.zscat.mallplus.pms.service.IPmsProductService;
@@ -51,10 +50,10 @@ public class PmsProductController {
) {
try {
IPage page = null;
- if (ValidatorUtils.notEmpty(entity.getKeyword())){
- page = IPmsProductService.page(new Page(pageNum, pageSize), new QueryWrapper().eq("name",entity.getKeyword()).orderByDesc("create_time").select(ConstansValue.sampleGoodsList)) ;
- }else {
- page = IPmsProductService.page(new Page(pageNum, pageSize), new QueryWrapper<>(entity).orderByDesc("create_time").select(ConstansValue.sampleGoodsList)) ;
+ if (ValidatorUtils.notEmpty(entity.getKeyword())) {
+ page = IPmsProductService.page(new Page(pageNum, pageSize), new QueryWrapper().eq("name", entity.getKeyword()).orderByDesc("create_time").select(ConstansValue.sampleGoodsList));
+ } else {
+ page = IPmsProductService.page(new Page(pageNum, pageSize), new QueryWrapper<>(entity).orderByDesc("create_time").select(ConstansValue.sampleGoodsList));
}
return new CommonResult().success(page);
@@ -63,6 +62,7 @@ public class PmsProductController {
}
return new CommonResult().failed();
}
+
@ApiOperation("根据商品名称或货号模糊查询")
@RequestMapping(value = "/simpleList", method = RequestMethod.GET)
@ResponseBody
@@ -70,6 +70,7 @@ public class PmsProductController {
List productList = IPmsProductService.list(keyword);
return new CommonResult().success(productList);
}
+
@SysLog(MODULE = "pms", REMARK = "保存商品信息")
@ApiOperation("保存商品信息")
@PostMapping(value = "/create")
@@ -215,14 +216,16 @@ public class PmsProductController {
@SysLog(MODULE = "pms", REMARK = "批量上下架")
public Object updatePublishStatu(@RequestBody IdStatus ids, BindingResult result) {
PmsProduct product = new PmsProduct();
- product.setId(ids.getId());product.setPublishStatus(ids.getStatus());
+ product.setId(ids.getId());
+ product.setPublishStatus(ids.getStatus());
Boolean count = IPmsProductService.updateById(product);
- if (count ) {
+ if (count) {
return new CommonResult().success(count);
} else {
return new CommonResult().failed();
}
}
+
@ApiOperation("批量推荐商品")
@RequestMapping(value = "/update/recommendStatus", method = RequestMethod.POST)
@ResponseBody
@@ -270,16 +273,18 @@ public class PmsProductController {
@GetMapping(value = "/goods/list")
public Object getPmsProductListByPage(PmsProduct entity,
- @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
- @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
+ @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
) {
try {
- if(entity.getType()==1){
- return new CommonResult().success(IPmsProductService.page(new Page(pageNum, pageSize), new QueryWrapper().eq("publish_status",1).gt("stock",0).select(ConstansValue.sampleGoodsList).orderByDesc("create_time")));
- }if(entity.getType()==2){
- return new CommonResult().success(IPmsProductService.page(new Page(pageNum, pageSize), new QueryWrapper().eq("publish_status",0).gt("stock",0).select(ConstansValue.sampleGoodsList).orderByDesc("create_time")));
- }if(entity.getType()==3){
- return new CommonResult().success(IPmsProductService.page(new Page(pageNum, pageSize), new QueryWrapper().lt("stock",1).select(ConstansValue.sampleGoodsList).orderByDesc("create_time")));
+ if (entity.getType() == 1) {
+ return new CommonResult().success(IPmsProductService.page(new Page(pageNum, pageSize), new QueryWrapper().eq("publish_status", 1).gt("stock", 0).select(ConstansValue.sampleGoodsList).orderByDesc("create_time")));
+ }
+ if (entity.getType() == 2) {
+ return new CommonResult().success(IPmsProductService.page(new Page(pageNum, pageSize), new QueryWrapper().eq("publish_status", 0).gt("stock", 0).select(ConstansValue.sampleGoodsList).orderByDesc("create_time")));
+ }
+ if (entity.getType() == 3) {
+ return new CommonResult().success(IPmsProductService.page(new Page(pageNum, pageSize), new QueryWrapper().lt("stock", 1).select(ConstansValue.sampleGoodsList).orderByDesc("create_time")));
}
return new CommonResult().success(IPmsProductService.page(new Page(pageNum, pageSize), new QueryWrapper().select(ConstansValue.sampleGoodsList)));
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/pms/controller/PmsSkuStockController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/pms/controller/PmsSkuStockController.java
index 8d9897b3b85ff88666f0ef64b60e75459823ba6f..62345ae340b14c92acc6827059fadce4620e768d 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/pms/controller/PmsSkuStockController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/pms/controller/PmsSkuStockController.java
@@ -104,13 +104,12 @@ public class PmsSkuStockController {
@ApiOperation("查询sku的库存明细")
@GetMapping(value = "select/{id}")
@PreAuthorize("hasAuthority('pms:PmsSkuStock:read')")
- public Object getPmsSkuStockById(@ApiParam("sku的库存id") @PathVariable Long id) {
+ public Object getPmsSkuStockById(@ApiParam("sku的库存id") @PathVariable Long id, @RequestParam(value = "keyword", required = false) String keyword) {
try {
if (ValidatorUtils.empty(id)) {
return new CommonResult().paramFailed("sku的库存id");
}
- PmsSkuStock coupon = IPmsSkuStockService.getById(id);
- return new CommonResult().success(coupon);
+ return new CommonResult().success(IPmsSkuStockService.getList(id, keyword));
} catch (Exception e) {
log.error("查询sku的库存明细:%s", e.getMessage(), e);
return new CommonResult().failed();
@@ -143,7 +142,7 @@ public class PmsSkuStockController {
@SysLog(MODULE = "pms", REMARK = "批量更新库存信息")
@ApiOperation("批量更新库存信息")
- @RequestMapping(value = "/update/{pid}", method = RequestMethod.POST)
+ @RequestMapping(value = "/updatePid/{pid}", method = RequestMethod.POST)
@ResponseBody
public Object update(@PathVariable Long pid, @RequestBody List skuStockList) {
int count = IPmsSkuStockService.update(pid, skuStockList);
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/pms/service/impl/PmsProductAttributeServiceImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/pms/service/impl/PmsProductAttributeServiceImpl.java
index 99636a86911f17c3fecb752cc097a52b362cb4d5..69870028b2999b5f09e611d2ad0838ea0b4cbc63 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/pms/service/impl/PmsProductAttributeServiceImpl.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/pms/service/impl/PmsProductAttributeServiceImpl.java
@@ -39,8 +39,8 @@ public class PmsProductAttributeServiceImpl extends ServiceImpl().eq("product_attribute_category_id",entity.getProductAttributeCategoryId()).eq("type",entity.getType()));
- if (count>=3){
+ int count = productAttributeMapper.selectCount(new QueryWrapper().eq("product_attribute_category_id", entity.getProductAttributeCategoryId()).eq("type", entity.getType()));
+ if (count >= 3) {
throw new BusinessMallException("规格或者属性数量不能超过3个");
}
productAttributeMapper.insert(entity);
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/pms/service/impl/PmsProductServiceImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/pms/service/impl/PmsProductServiceImpl.java
index 7eeb0184683014e225392053d0514443d4086dbb..90566de7bd496035f4947b1ffe06fe1386b509b4 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/pms/service/impl/PmsProductServiceImpl.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/pms/service/impl/PmsProductServiceImpl.java
@@ -2,6 +2,7 @@ package com.zscat.mallplus.pms.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zscat.mallplus.ApiContext;
import com.zscat.mallplus.cms.service.ICmsPrefrenceAreaProductRelationService;
import com.zscat.mallplus.cms.service.ICmsSubjectProductRelationService;
import com.zscat.mallplus.pms.entity.*;
@@ -15,7 +16,6 @@ import com.zscat.mallplus.util.JsonUtil;
import com.zscat.mallplus.util.UserUtils;
import com.zscat.mallplus.utils.IdWorker;
import com.zscat.mallplus.utils.ValidatorUtils;
-import com.zscat.mallplus.ApiContext;
import com.zscat.mallplus.vo.Rediskey;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@@ -90,20 +90,22 @@ public class PmsProductServiceImpl extends ServiceImpl skuStockList, PmsProduct product) {
- if (CollectionUtils.isEmpty(skuStockList)) return ;
- int stock = 0 ;
+ private void handleSkuStockCode(List skuStockList, PmsProduct product) {
+ if (CollectionUtils.isEmpty(skuStockList)) return;
+ int stock = 0;
for (int i = 0; i < skuStockList.size(); i++) {
PmsSkuStock skuStock = skuStockList.get(i);
skuStock.setProductName(product.getName());
@@ -139,7 +141,7 @@ public class PmsProductServiceImpl extends ServiceImpl(new PmsMemberPrice()).eq("product_id", id));
- // relateAndInsertList(memberPriceDao, productParam.getMemberPriceList(), id);
+ // memberPriceMapper.delete(new QueryWrapper<>(new PmsMemberPrice()).eq("product_id", id));
+ // relateAndInsertList(memberPriceDao, productParam.getMemberPriceList(), id);
//阶梯价格
productLadderMapper.delete(new QueryWrapper<>(new PmsProductLadder()).eq("product_id", id));
@@ -221,11 +223,13 @@ public class PmsProductServiceImpl extends ServiceImpl().in("id", ids));
}
+
public void clerGoodsRedis(List ids) {
- for (Long id : ids){
+ for (Long id : ids) {
redisService.remove(String.format(Rediskey.GOODSDETAIL, id));
}
}
+
@Override
public int updateRecommendStatus(List ids, Integer recommendStatus) {
PmsProduct record = new PmsProduct();
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsBasicMarkingController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsBasicMarkingController.java
index c7e6c7a5a9de9ce007468edb7a6b89a18bfdbcf0..7df5cb4eafc0fb71e9b44cd5f08190bc61e3b1b1 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsBasicMarkingController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsBasicMarkingController.java
@@ -75,39 +75,39 @@ public class SmsBasicMarkingController {
private void validateParam(@RequestBody SmsBasicMarking entity) {
// 活动商品 1 按类别 2 部分商品
- if (ValidatorUtils.empty(entity.getActiviGoods())){
+ if (ValidatorUtils.empty(entity.getActiviGoods())) {
entity.setActiviGoods(3);
}
- if (ValidatorUtils.empty(entity.getActiviUser())){
+ if (ValidatorUtils.empty(entity.getActiviUser())) {
entity.setActiviUser(1);
}
- if (ValidatorUtils.empty(entity.getSmallType())){
+ if (ValidatorUtils.empty(entity.getSmallType())) {
entity.setSmallType(1);
}
- if (entity.getActiviGoods()==1){
- if (ValidatorUtils.notEmpty(entity.getProductCategoryRelationList())){
+ if (entity.getActiviGoods() == 1) {
+ if (ValidatorUtils.notEmpty(entity.getProductCategoryRelationList())) {
entity.setGoodsDs(JsonUtil.objectToJson(entity.getProductCategoryRelationList()));
}
- }else if (entity.getActiviGoods()==2){
- if (ValidatorUtils.notEmpty(entity.getProductRelationList())){
+ } else if (entity.getActiviGoods() == 2) {
+ if (ValidatorUtils.notEmpty(entity.getProductRelationList())) {
entity.setGoodsDs(JsonUtil.objectToJson(entity.getProductRelationList()));
}
- }else {
+ } else {
entity.setGoodsDs(null);
}
- if (entity.getActiviUser()==2){
- if (ValidatorUtils.notEmpty(entity.getMemberLevelList())){
+ if (entity.getActiviUser() == 2) {
+ if (ValidatorUtils.notEmpty(entity.getMemberLevelList())) {
entity.setUserLevel(JsonUtil.objectToJson(entity.getMemberLevelList()));
}
- }else {
+ } else {
entity.setUserLevel(null);
}
- if (entity.getSmallType()==1) {
+ if (entity.getSmallType() == 1) {
if (ValidatorUtils.notEmpty(entity.getActrule())) {
entity.setRules(JsonUtil.objectToJson(entity.getActrule()));
}
- }else {
+ } else {
if (ValidatorUtils.notEmpty(entity.getActrule1())) {
entity.setRules(JsonUtil.objectToJson(entity.getActrule1()));
}
@@ -161,30 +161,30 @@ public class SmsBasicMarkingController {
}
SmsBasicMarking entity = ISmsBasicMarkingService.getById(id);
// 活动商品 1 按类别 2 部分商品
- if (entity.getActiviGoods()==1){
- if (ValidatorUtils.notEmpty(entity.getGoodsDs())){
+ if (entity.getActiviGoods() == 1) {
+ if (ValidatorUtils.notEmpty(entity.getGoodsDs())) {
entity.setProductCategoryRelationList(JsonUtil.jsonToList(entity.getGoodsDs(), BeanKv.class));
}
}
- if (entity.getActiviGoods()==2){
- if (ValidatorUtils.notEmpty(entity.getGoodsDs())){
+ if (entity.getActiviGoods() == 2) {
+ if (ValidatorUtils.notEmpty(entity.getGoodsDs())) {
entity.setProductRelationList(JsonUtil.jsonToList(entity.getGoodsDs(), BeanKv.class));
}
}
- if (entity.getActiviUser()==2){
- if (ValidatorUtils.notEmpty(entity.getUserLevel())){
+ if (entity.getActiviUser() == 2) {
+ if (ValidatorUtils.notEmpty(entity.getUserLevel())) {
entity.setMemberLevelList(JsonUtil.jsonToList(entity.getUserLevel(), BeanKv.class));
}
}
- if (entity.getSmallType()==1) {
+ if (entity.getSmallType() == 1) {
if (ValidatorUtils.notEmpty(entity.getRules())) {
- entity.setActrule(JsonUtil.jsonToList(entity.getRules(),BasicRuls.class));
+ entity.setActrule(JsonUtil.jsonToList(entity.getRules(), BasicRuls.class));
}
}
- if (entity.getSmallType()==2) {
+ if (entity.getSmallType() == 2) {
if (ValidatorUtils.notEmpty(entity.getRules())) {
- entity.setActrule1(JsonUtil.jsonToList(entity.getRules(),BasicRuls.class));
+ entity.setActrule1(JsonUtil.jsonToList(entity.getRules(), BasicRuls.class));
}
}
return new CommonResult().success(entity);
@@ -208,14 +208,15 @@ public class SmsBasicMarkingController {
return new CommonResult().failed();
}
}
+
@ApiOperation("批量上下架")
@RequestMapping(value = "/publishStatus", method = RequestMethod.POST)
@ResponseBody
@SysLog(MODULE = "pms", REMARK = "批量上下架")
- public Object updatePublishStatus(@RequestParam("id") Long id,
+ public Object updatePublishStatus(@RequestParam("id") Long id,
@RequestParam("status") Integer status,
@RequestParam("bigType") Integer bigType) {
- int count = ISmsBasicMarkingService.updateStatus(id, status,bigType);
+ int count = ISmsBasicMarkingService.updateStatus(id, status, bigType);
return new CommonResult().success(count);
}
}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsContentController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsContentController.java
new file mode 100644
index 0000000000000000000000000000000000000000..48e1dbbf12bd35b8ef18912f0fef79d7471bcb91
--- /dev/null
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsContentController.java
@@ -0,0 +1,155 @@
+package com.zscat.mallplus.sms.controller;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.zscat.mallplus.annotation.SysLog;
+import com.zscat.mallplus.sms.entity.SmsContent;
+import com.zscat.mallplus.sms.service.ISmsContentService;
+import com.zscat.mallplus.util.EasyPoiUtils;
+import com.zscat.mallplus.utils.CommonResult;
+import com.zscat.mallplus.utils.ValidatorUtils;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author mallplus
+ * @date 2019-12-07
+ * 短信模版
+ */
+@Slf4j
+@RestController
+@RequestMapping("/sms/smsContent")
+public class SmsContentController {
+
+ @Resource
+ private ISmsContentService ISmsContentService;
+
+ @SysLog(MODULE = "ms", REMARK = "根据条件查询所有短信模版列表")
+ @ApiOperation("根据条件查询所有短信模版列表")
+ @GetMapping(value = "/list")
+ @PreAuthorize("hasAuthority('sms:smsContent:read')")
+ public Object getSmsContentByPage(SmsContent entity,
+ @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
+ ) {
+ try {
+ return new CommonResult().success(ISmsContentService.page(new Page(pageNum, pageSize), new QueryWrapper<>(entity)));
+ } catch (Exception e) {
+ log.error("根据条件查询所有短信模版列表:%s", e.getMessage(), e);
+ }
+ return new CommonResult().failed();
+ }
+
+ @SysLog(MODULE = "ms", REMARK = "保存短信模版")
+ @ApiOperation("保存短信模版")
+ @PostMapping(value = "/create")
+ @PreAuthorize("hasAuthority('sms:smsContent:create')")
+ public Object saveSmsContent(@RequestBody SmsContent entity) {
+ try {
+ entity.setCreateTime(new Date());
+ if (ISmsContentService.save(entity)) {
+ return new CommonResult().success();
+ }
+ } catch (Exception e) {
+ log.error("保存短信模版:%s", e.getMessage(), e);
+ return new CommonResult().failed(e.getMessage());
+ }
+ return new CommonResult().failed();
+ }
+
+ @SysLog(MODULE = "ms", REMARK = "更新短信模版")
+ @ApiOperation("更新短信模版")
+ @PostMapping(value = "/update/{id}")
+ @PreAuthorize("hasAuthority('sms:smsContent:update')")
+ public Object updateSmsContent(@RequestBody SmsContent entity) {
+ try {
+ if (ISmsContentService.updateById(entity)) {
+ return new CommonResult().success();
+ }
+ } catch (Exception e) {
+ log.error("更新短信模版:%s", e.getMessage(), e);
+ return new CommonResult().failed(e.getMessage());
+ }
+ return new CommonResult().failed();
+ }
+
+ @SysLog(MODULE = "ms", REMARK = "删除短信模版")
+ @ApiOperation("删除短信模版")
+ @GetMapping(value = "/delete/{id}")
+ @PreAuthorize("hasAuthority('sms:smsContent:delete')")
+ public Object deleteSmsContent(@ApiParam("短信模版id") @PathVariable Long id) {
+ try {
+ if (ValidatorUtils.empty(id)) {
+ return new CommonResult().paramFailed("短信模版id");
+ }
+ if (ISmsContentService.removeById(id)) {
+ return new CommonResult().success();
+ }
+ } catch (Exception e) {
+ log.error("删除短信模版:%s", e.getMessage(), e);
+ return new CommonResult().failed(e.getMessage());
+ }
+ return new CommonResult().failed();
+ }
+
+ @SysLog(MODULE = "ms", REMARK = "给短信模版分配短信模版")
+ @ApiOperation("查询短信模版明细")
+ @GetMapping(value = "/{id}")
+ @PreAuthorize("hasAuthority('sms:smsContent:read')")
+ public Object getSmsContentById(@ApiParam("短信模版id") @PathVariable Long id) {
+ try {
+ if (ValidatorUtils.empty(id)) {
+ return new CommonResult().paramFailed("短信模版id");
+ }
+ SmsContent coupon = ISmsContentService.getById(id);
+ return new CommonResult().success(coupon);
+ } catch (Exception e) {
+ log.error("查询短信模版明细:%s", e.getMessage(), e);
+ return new CommonResult().failed();
+ }
+
+ }
+
+ @ApiOperation(value = "批量删除短信模版")
+ @RequestMapping(value = "/delete/batch", method = RequestMethod.GET)
+ @SysLog(MODULE = "ms", REMARK = "批量删除短信模版")
+ @PreAuthorize("hasAuthority('sms:smsContent:delete')")
+ public Object deleteBatch(@RequestParam("ids") List ids) {
+ boolean count = ISmsContentService.removeByIds(ids);
+ if (count) {
+ return new CommonResult().success(count);
+ } else {
+ return new CommonResult().failed();
+ }
+ }
+
+
+ @SysLog(MODULE = "ms", REMARK = "导出社区数据")
+ @GetMapping("/exportExcel")
+ public void export(HttpServletResponse response, SmsContent entity) {
+ // 模拟从数据库获取需要导出的数据
+ List personList = ISmsContentService.list(new QueryWrapper<>(entity));
+ // 导出操作
+ EasyPoiUtils.exportExcel(personList, "导出社区数据", "社区数据", SmsContent.class, "导出社区数据.xls", response);
+
+ }
+
+ @SysLog(MODULE = "ms", REMARK = "导入社区数据")
+ @PostMapping("/importExcel")
+ public void importUsers(@RequestParam MultipartFile file) {
+ List personList = EasyPoiUtils.importExcel(file, SmsContent.class);
+ ISmsContentService.saveBatch(personList);
+ }
+}
+
+
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsDiyPageController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsDiyPageController.java
index 57f16c09182b3bc40ab54031297c307fdf152713..c6f9fe230a0747742e8845ff7d76e39bbdf0051b 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsDiyPageController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsDiyPageController.java
@@ -48,8 +48,8 @@ public class SmsDiyPageController {
@ApiOperation("根据条件查询所有页面配置列表")
@GetMapping(value = "/list")
public Object getSmsDiyPageByPage(SmsDiyPage entity,
- @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
- @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
+ @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
) {
try {
return new CommonResult().success(ISmsDiyPageService.page(new Page(pageNum, pageSize), new QueryWrapper<>(entity)));
@@ -58,6 +58,7 @@ public class SmsDiyPageController {
}
return new CommonResult().failed();
}
+
@SysLog(MODULE = "自定义页面配置", REMARK = "添加自定义页面配置")
@ApiOperation("添加自定义页面配置")
@PostMapping(value = "/create")
@@ -77,7 +78,7 @@ public class SmsDiyPageController {
entity.setCreateTime(sdf.parse(da));
ISmsDiyPageService.save(entity);
if (entity.getType() == 2 && entity.getStatus() == 1) {
- redisRepository.set(String.format(Rediskey.EsShopDiypage, 12), JsonUtil.objectToJson(entity));
+ redisRepository.set(String.format(Rediskey.EsShopDiypage, 12), JsonUtil.objectToJson(entity));
}
return new CommonResult().success("success");
} catch (Exception e) {
@@ -121,6 +122,7 @@ public class SmsDiyPageController {
return new CommonResult().failed();
}
}
+
@SysLog(MODULE = "sms", REMARK = "给优惠卷表分配优惠卷表")
@ApiOperation("查询优惠卷表明细")
@GetMapping(value = "/{id}")
@@ -137,6 +139,7 @@ public class SmsDiyPageController {
}
}
+
@SysLog(MODULE = "自定义页面配置", REMARK = "更改自定义页面配置信息")
@ApiOperation("更改自定义页面配置信息")
@PostMapping(value = "/update")
@@ -174,8 +177,8 @@ public class SmsDiyPageController {
@ApiOperation("查询页面")
@GetMapping("/selDiyPage")
public Object selDiyPage(SmsDiyPage entity,
- @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
- @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
+ @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
) {
try {
return new CommonResult().success(ISmsDiyPageService.page(new Page(pageNum, pageSize), new QueryWrapper<>(entity)));
@@ -192,7 +195,7 @@ public class SmsDiyPageController {
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
try {
- return new CommonResult().success(ISmsDiyPageService.page(new Page(pageNum, pageSize), new QueryWrapper<>(entity).like("name",entity.getName())));
+ return new CommonResult().success(ISmsDiyPageService.page(new Page(pageNum, pageSize), new QueryWrapper<>(entity).like("name", entity.getName())));
} catch (Exception e) {
return new CommonResult().failed();
}
@@ -272,6 +275,7 @@ public class SmsDiyPageController {
}
}
+
@ApiOperation("修改展示状态")
@RequestMapping(value = "/update/updateShowStatus")
@ResponseBody
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsDiypageTemplateCategoryController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsDiypageTemplateCategoryController.java
index a454e6119afef4846edeb4b2607811b2efec8a8d..65b2ec58c8cf48d24145ac11ac364e760105b376 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsDiypageTemplateCategoryController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsDiypageTemplateCategoryController.java
@@ -21,32 +21,32 @@ import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
-* @author mallplus
-* @date 2019-12-04
-* 页面模版
-*/
+ * @author mallplus
+ * @date 2019-12-04
+ * 页面模版
+ */
@Slf4j
@RestController
@RequestMapping("/sms/smsDiypageTemplateCategory")
public class SmsDiypageTemplateCategoryController {
-@Resource
-private ISmsDiypageTemplateCategoryService ISmsDiypageTemplateCategoryService;
-
-@SysLog(MODULE = "sms", REMARK = "根据条件查询所有页面模版列表")
-@ApiOperation("根据条件查询所有页面模版列表")
-@GetMapping(value = "/list")
-@PreAuthorize("hasAuthority('sms:smsDiypageTemplateCategory:read')")
-public Object getSmsDiypageTemplateCategoryByPage(SmsDiypageTemplateCategory entity,
-@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
-@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
-) {
-try {
-return new CommonResult().success(ISmsDiypageTemplateCategoryService.page(new Page(pageNum, pageSize), new QueryWrapper<>(entity)));
- } catch (Exception e) {
- log.error("根据条件查询所有页面模版列表:%s", e.getMessage(), e);
- }
- return new CommonResult().failed();
+ @Resource
+ private ISmsDiypageTemplateCategoryService ISmsDiypageTemplateCategoryService;
+
+ @SysLog(MODULE = "sms", REMARK = "根据条件查询所有页面模版列表")
+ @ApiOperation("根据条件查询所有页面模版列表")
+ @GetMapping(value = "/list")
+ @PreAuthorize("hasAuthority('sms:smsDiypageTemplateCategory:read')")
+ public Object getSmsDiypageTemplateCategoryByPage(SmsDiypageTemplateCategory entity,
+ @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
+ ) {
+ try {
+ return new CommonResult().success(ISmsDiypageTemplateCategoryService.page(new Page(pageNum, pageSize), new QueryWrapper<>(entity)));
+ } catch (Exception e) {
+ log.error("根据条件查询所有页面模版列表:%s", e.getMessage(), e);
+ }
+ return new CommonResult().failed();
}
@SysLog(MODULE = "sms", REMARK = "保存页面模版")
@@ -54,16 +54,16 @@ return new CommonResult().success(ISmsDiypageTemplateCategoryService.page(new Pa
@PostMapping(value = "/create")
@PreAuthorize("hasAuthority('sms:smsDiypageTemplateCategory:create')")
public Object saveSmsDiypageTemplateCategory(@RequestBody SmsDiypageTemplateCategory entity) {
- try {
+ try {
- if (ISmsDiypageTemplateCategoryService.save(entity)) {
- return new CommonResult().success();
- }
- } catch (Exception e) {
- log.error("保存页面模版:%s", e.getMessage(), e);
- return new CommonResult().failed(e.getMessage());
- }
- return new CommonResult().failed();
+ if (ISmsDiypageTemplateCategoryService.save(entity)) {
+ return new CommonResult().success();
+ }
+ } catch (Exception e) {
+ log.error("保存页面模版:%s", e.getMessage(), e);
+ return new CommonResult().failed(e.getMessage());
+ }
+ return new CommonResult().failed();
}
@SysLog(MODULE = "sms", REMARK = "更新页面模版")
@@ -71,15 +71,15 @@ return new CommonResult().success(ISmsDiypageTemplateCategoryService.page(new Pa
@PostMapping(value = "/update/{id}")
@PreAuthorize("hasAuthority('sms:smsDiypageTemplateCategory:update')")
public Object updateSmsDiypageTemplateCategory(@RequestBody SmsDiypageTemplateCategory entity) {
- try {
- if (ISmsDiypageTemplateCategoryService.updateById(entity)) {
- return new CommonResult().success();
- }
- } catch (Exception e) {
- log.error("更新页面模版:%s", e.getMessage(), e);
- return new CommonResult().failed(e.getMessage());
- }
- return new CommonResult().failed();
+ try {
+ if (ISmsDiypageTemplateCategoryService.updateById(entity)) {
+ return new CommonResult().success();
+ }
+ } catch (Exception e) {
+ log.error("更新页面模版:%s", e.getMessage(), e);
+ return new CommonResult().failed(e.getMessage());
+ }
+ return new CommonResult().failed();
}
@SysLog(MODULE = "sms", REMARK = "删除页面模版")
@@ -87,18 +87,18 @@ return new CommonResult().success(ISmsDiypageTemplateCategoryService.page(new Pa
@GetMapping(value = "/delete/{id}")
@PreAuthorize("hasAuthority('sms:smsDiypageTemplateCategory:delete')")
public Object deleteSmsDiypageTemplateCategory(@ApiParam("页面模版id") @PathVariable Long id) {
- try {
- if (ValidatorUtils.empty(id)) {
- return new CommonResult().paramFailed("页面模版id");
- }
- if (ISmsDiypageTemplateCategoryService.removeById(id)) {
- return new CommonResult().success();
- }
- } catch (Exception e) {
- log.error("删除页面模版:%s", e.getMessage(), e);
- return new CommonResult().failed(e.getMessage());
- }
- return new CommonResult().failed();
+ try {
+ if (ValidatorUtils.empty(id)) {
+ return new CommonResult().paramFailed("页面模版id");
+ }
+ if (ISmsDiypageTemplateCategoryService.removeById(id)) {
+ return new CommonResult().success();
+ }
+ } catch (Exception e) {
+ log.error("删除页面模版:%s", e.getMessage(), e);
+ return new CommonResult().failed(e.getMessage());
+ }
+ return new CommonResult().failed();
}
@SysLog(MODULE = "sms", REMARK = "给页面模版分配页面模版")
@@ -106,16 +106,16 @@ return new CommonResult().success(ISmsDiypageTemplateCategoryService.page(new Pa
@GetMapping(value = "/{id}")
@PreAuthorize("hasAuthority('sms:smsDiypageTemplateCategory:read')")
public Object getSmsDiypageTemplateCategoryById(@ApiParam("页面模版id") @PathVariable Long id) {
- try {
- if (ValidatorUtils.empty(id)) {
- return new CommonResult().paramFailed("页面模版id");
- }
- SmsDiypageTemplateCategory coupon = ISmsDiypageTemplateCategoryService.getById(id);
- return new CommonResult().success(coupon);
- } catch (Exception e) {
- log.error("查询页面模版明细:%s", e.getMessage(), e);
- return new CommonResult().failed();
- }
+ try {
+ if (ValidatorUtils.empty(id)) {
+ return new CommonResult().paramFailed("页面模版id");
+ }
+ SmsDiypageTemplateCategory coupon = ISmsDiypageTemplateCategoryService.getById(id);
+ return new CommonResult().success(coupon);
+ } catch (Exception e) {
+ log.error("查询页面模版明细:%s", e.getMessage(), e);
+ return new CommonResult().failed();
+ }
}
@@ -126,30 +126,29 @@ return new CommonResult().success(ISmsDiypageTemplateCategoryService.page(new Pa
public Object deleteBatch(@RequestParam("ids") List ids) {
boolean count = ISmsDiypageTemplateCategoryService.removeByIds(ids);
if (count) {
- return new CommonResult().success(count);
+ return new CommonResult().success(count);
} else {
- return new CommonResult().failed();
+ return new CommonResult().failed();
}
- }
-
+ }
- @SysLog(MODULE = "sms", REMARK = "导出社区数据")
- @GetMapping("/exportExcel")
- public void export(HttpServletResponse response, SmsDiypageTemplateCategory entity) {
+ @SysLog(MODULE = "sms", REMARK = "导出社区数据")
+ @GetMapping("/exportExcel")
+ public void export(HttpServletResponse response, SmsDiypageTemplateCategory entity) {
// 模拟从数据库获取需要导出的数据
List personList = ISmsDiypageTemplateCategoryService.list(new QueryWrapper<>(entity));
- // 导出操作
- EasyPoiUtils.exportExcel(personList, "导出社区数据", "社区数据", SmsDiypageTemplateCategory.class, "导出社区数据.xls", response);
+ // 导出操作
+ EasyPoiUtils.exportExcel(personList, "导出社区数据", "社区数据", SmsDiypageTemplateCategory.class, "导出社区数据.xls", response);
- }
+ }
- @SysLog(MODULE = "sms", REMARK = "导入社区数据")
- @PostMapping("/importExcel")
- public void importUsers(@RequestParam MultipartFile file) {
- List personList = EasyPoiUtils.importExcel(file, SmsDiypageTemplateCategory.class);
- ISmsDiypageTemplateCategoryService.saveBatch(personList);
- }
- }
+ @SysLog(MODULE = "sms", REMARK = "导入社区数据")
+ @PostMapping("/importExcel")
+ public void importUsers(@RequestParam MultipartFile file) {
+ List personList = EasyPoiUtils.importExcel(file, SmsDiypageTemplateCategory.class);
+ ISmsDiypageTemplateCategoryService.saveBatch(personList);
+ }
+}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsGroupActivityController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsGroupActivityController.java
index a6f07ede70757b7b1301551f367f271861d34feb..d192432839f0769c2c9fc5982601e66317035208 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsGroupActivityController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsGroupActivityController.java
@@ -20,7 +20,7 @@ import java.util.List;
/**
*
- * 前端控制器
+ * 前端控制器
*
*
* @author zscat
@@ -38,8 +38,8 @@ public class SmsGroupActivityController {
@ApiOperation("根据条件查询所有团购活动表列表")
@GetMapping(value = "/list")
public Object getSmsGroupActivityByPage(SmsGroupActivity entity,
- @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
- @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
+ @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
) {
try {
return new CommonResult().success(smsGroupActivityService.page(new Page(pageNum, pageSize), new QueryWrapper<>(entity)));
@@ -56,13 +56,13 @@ public class SmsGroupActivityController {
try {
List list = entity.getProductList();
String goodsIs = "";
- BigDecimal originPrice= BigDecimal.ZERO;
- for (PmsProduct p: list){
- originPrice=originPrice.add(p.getPrice());
- goodsIs=goodsIs+p.getId()+",";
+ BigDecimal originPrice = BigDecimal.ZERO;
+ for (PmsProduct p : list) {
+ originPrice = originPrice.add(p.getPrice());
+ goodsIs = goodsIs + p.getId() + ",";
}
entity.setOriginprice(originPrice);
- entity.setGoodsIds(goodsIs.substring(0,goodsIs.length()-1));
+ entity.setGoodsIds(goodsIs.substring(0, goodsIs.length() - 1));
if (smsGroupActivityService.save(entity)) {
return new CommonResult().success();
}
@@ -80,13 +80,13 @@ public class SmsGroupActivityController {
try {
List list = entity.getProductList();
String goodsIs = "";
- BigDecimal originPrice= BigDecimal.ZERO;
- for (PmsProduct p: list){
- originPrice=originPrice.add(p.getPrice());
- goodsIs=goodsIs+p.getId()+",";
+ BigDecimal originPrice = BigDecimal.ZERO;
+ for (PmsProduct p : list) {
+ originPrice = originPrice.add(p.getPrice());
+ goodsIs = goodsIs + p.getId() + ",";
}
entity.setOriginprice(originPrice);
- entity.setGoodsIds(goodsIs.substring(0,goodsIs.length()-1));
+ entity.setGoodsIds(goodsIs.substring(0, goodsIs.length() - 1));
if (smsGroupActivityService.updateById(entity)) {
return new CommonResult().success();
}
@@ -144,6 +144,7 @@ public class SmsGroupActivityController {
return new CommonResult().failed();
}
}
+
@ApiOperation("修改展示状态")
@RequestMapping(value = "/update/updateShowStatus")
@ResponseBody
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsGroupController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsGroupController.java
index cc081a3451eddc5b62b4f5afe35b4e673201972f..81f655c771e8c6b6810457fc5f5f14368c69f226 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsGroupController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsGroupController.java
@@ -5,9 +5,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zscat.mallplus.annotation.SysLog;
import com.zscat.mallplus.sms.entity.SmsGroup;
import com.zscat.mallplus.sms.entity.SmsGroupMember;
+import com.zscat.mallplus.sms.entity.SmsGroupRecord;
import com.zscat.mallplus.sms.mapper.SmsGroupMemberMapper;
+import com.zscat.mallplus.sms.mapper.SmsGroupRecordMapper;
import com.zscat.mallplus.sms.service.ISmsGroupService;
-import com.zscat.mallplus.ums.entity.UmsMember;
import com.zscat.mallplus.ums.service.IUmsMemberService;
import com.zscat.mallplus.utils.CommonResult;
import com.zscat.mallplus.utils.ValidatorUtils;
@@ -19,8 +20,6 @@ import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
-import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Date;
import java.util.List;
@@ -37,8 +36,14 @@ import java.util.List;
@Api(tags = "SmsGroupController", description = "管理")
@RequestMapping("/sms/SmsGroup")
public class SmsGroupController {
+ @Resource
+ private SmsGroupRecordMapper groupRecordMapper;
@Resource
private ISmsGroupService ISmsGroupService;
+ @Resource
+ private IUmsMemberService memberService;
+ @Resource
+ private SmsGroupMemberMapper groupMemberMapper;
@SysLog(MODULE = "sms", REMARK = "根据条件查询所有列表")
@ApiOperation("根据条件查询所有列表")
@@ -56,29 +61,21 @@ public class SmsGroupController {
}
return new CommonResult().failed();
}
- @Resource
- private IUmsMemberService memberService;
- @Resource
- private SmsGroupMemberMapper groupMemberMapper;
+
@SysLog(MODULE = "sms", REMARK = "根据条件查询所有列表")
@ApiOperation("根据条件查询所有列表")
@GetMapping(value = "/listGroupMember")
- public Object listGroupMember(SmsGroupMember entity,
- @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
- @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
+ public Object listGroupMember(SmsGroupRecord entity,
+ @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
) {
try {
- List list = new ArrayList<>();
- List groupMembers = groupMemberMapper.selectList(new QueryWrapper().eq("group_id",entity.getGroupId()));
- for (SmsGroupMember groupMember : groupMembers){
- if (ValidatorUtils.notEmpty(groupMember.getMemberId()) ){
- List ids = Arrays.asList(groupMember.getMemberId().split(","));
- groupMember.setList((List) memberService.listByIds(ids));
- list.add(groupMember);
-
- }
+ List groupRecords = groupRecordMapper.selectList(new QueryWrapper().eq("group_id", entity.getId()));
+ for (SmsGroupRecord groupRecord : groupRecords) {
+ List groupMembers = groupMemberMapper.selectList(new QueryWrapper().eq("group_record_id", groupRecord.getId()).eq("status", 2));
+ groupRecord.setList(groupMembers);
}
- return new CommonResult().success(list);
+ return new CommonResult().success(groupRecords);
} catch (Exception e) {
log.error("根据条件查询所有列表:%s", e.getMessage(), e);
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsHomeNewProductController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsHomeNewProductController.java
index a44c9941181909dee0a0c8bba5d0d8ebbc39cd3f..f4efe4717b06b062480ab48869107c7057f8e97f 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsHomeNewProductController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsHomeNewProductController.java
@@ -144,7 +144,6 @@ public class SmsHomeNewProductController {
}
-
@ApiOperation("批量修改推荐状态")
@RequestMapping(value = "/update/recommendStatus", method = RequestMethod.POST)
@ResponseBody
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsHomeRecommendProductController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsHomeRecommendProductController.java
index cdf277ad90a337e11dd0c2e67068f1ca9e849c3b..64e86f5166d62500eca35ba80ec9552c879844cc 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsHomeRecommendProductController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsHomeRecommendProductController.java
@@ -48,6 +48,7 @@ public class SmsHomeRecommendProductController {
}
return new CommonResult().failed();
}
+
@ApiOperation("添加首页推荐")
@RequestMapping(value = "/create", method = RequestMethod.POST)
@ResponseBody
@@ -58,6 +59,7 @@ public class SmsHomeRecommendProductController {
}
return new CommonResult().failed();
}
+
@SysLog(MODULE = "sms", REMARK = "保存人气推荐商品表")
@ApiOperation("保存人气推荐商品表")
@PostMapping(value = "/creates")
@@ -142,7 +144,6 @@ public class SmsHomeRecommendProductController {
}
-
@ApiOperation("修改推荐排序")
@RequestMapping(value = "/update/sort/{id}", method = RequestMethod.POST)
@ResponseBody
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsHomeRecommendSubjectController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsHomeRecommendSubjectController.java
index 692c97cb56728f7e6cbd180ff98e201800445e8d..409a8a978d1924a41e05c2d814db91240021296b 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsHomeRecommendSubjectController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsHomeRecommendSubjectController.java
@@ -144,7 +144,6 @@ public class SmsHomeRecommendSubjectController {
}
-
@ApiOperation("修改推荐排序")
@RequestMapping(value = "/update/sort/{id}", method = RequestMethod.POST)
@ResponseBody
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsPaimaiController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsPaimaiController.java
index 4ff6ff641de7f1400bf80493a28bf4312c5cefc5..1a5213bf103e02914adcb50f0d0521db6d39747c 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsPaimaiController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsPaimaiController.java
@@ -50,12 +50,13 @@ public class SmsPaimaiController {
}
return new CommonResult().failed();
}
+
@SysLog(MODULE = "sms", REMARK = "根据条件查询所有竞拍表列表")
@ApiOperation("根据条件查询所有竞拍表列表")
@GetMapping(value = "/fetchPaiMaiLog")
public Object fetchPaiMaiLog(SmsPaimaiLog entity,
- @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
- @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
+ @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
) {
try {
return new CommonResult().success(smsPaimaiLogService.page(new Page(pageNum, pageSize), new QueryWrapper<>(entity).orderByDesc("create_time")));
@@ -64,6 +65,7 @@ public class SmsPaimaiController {
}
return new CommonResult().failed();
}
+
@SysLog(MODULE = "sms", REMARK = "保存竞拍表")
@ApiOperation("保存竞拍表")
@PostMapping(value = "/create")
@@ -130,6 +132,7 @@ public class SmsPaimaiController {
}
}
+
@ApiOperation("修改展示状态")
@RequestMapping(value = "/update/updateShowStatus")
@ResponseBody
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsShareController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsShareController.java
index 855b2232d99f0c8771415492fef7873df9a6b50b..d43088cc2392e8409204d0184fdfee081bbbb414 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsShareController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/controller/SmsShareController.java
@@ -47,6 +47,5 @@ public class SmsShareController {
}
-
}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/ISmsBasicGiftsService.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/ISmsBasicGiftsService.java
index a82ccd86b883e9ca77bd5b8bbb2a423cce78fed8..2fed5e6debc20229d7d34dae79adeb0f9da8416d 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/ISmsBasicGiftsService.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/ISmsBasicGiftsService.java
@@ -5,7 +5,7 @@ import com.zscat.mallplus.sms.entity.SmsBasicGifts;
/**
*
- * 服务类
+ * 服务类
*
*
* @author zscat
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/ISmsBasicMarkingService.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/ISmsBasicMarkingService.java
index e62fac4991de9e798c0da3086611509ea6aa3805..0ffaf3e73d6dd18303953468d17d698f97f130ac 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/ISmsBasicMarkingService.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/ISmsBasicMarkingService.java
@@ -5,7 +5,7 @@ import com.zscat.mallplus.sms.entity.SmsBasicMarking;
/**
*
- * 服务类
+ * 服务类
*
*
* @author zscat
@@ -13,5 +13,5 @@ import com.zscat.mallplus.sms.entity.SmsBasicMarking;
*/
public interface ISmsBasicMarkingService extends IService {
- int updateStatus(Long id, Integer status,Integer bigType);
+ int updateStatus(Long id, Integer status, Integer bigType);
}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/ISmsContentService.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/ISmsContentService.java
new file mode 100644
index 0000000000000000000000000000000000000000..0837946a48e570041bd1d09a750be04baa9e36e9
--- /dev/null
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/ISmsContentService.java
@@ -0,0 +1,13 @@
+package com.zscat.mallplus.sms.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.zscat.mallplus.sms.entity.SmsContent;
+
+/**
+ * @author mallplus
+ * @date 2019-12-07
+ */
+
+public interface ISmsContentService extends IService {
+
+}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/ISmsDiyPageService.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/ISmsDiyPageService.java
index d37ebbaa32dbdaeb7a5915a46b32392dbf7c6d2a..854e56256e3d2380898925b8f71946e877585994 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/ISmsDiyPageService.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/ISmsDiyPageService.java
@@ -1,11 +1,11 @@
package com.zscat.mallplus.sms.service;
-import com.zscat.mallplus.sms.entity.SmsDiyPage;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.zscat.mallplus.sms.entity.SmsDiyPage;
/**
*
- * 服务类
+ * 服务类
*
*
* @author zscat
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/ISmsDiypageTemplateCategoryService.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/ISmsDiypageTemplateCategoryService.java
index 0a9d0cc7718f226a3003329a4c0e1b83f06eb48d..bc090a90ea1d7faa71913e5217954054479cd6df 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/ISmsDiypageTemplateCategoryService.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/ISmsDiypageTemplateCategoryService.java
@@ -1,12 +1,12 @@
package com.zscat.mallplus.sms.service;
-import com.zscat.mallplus.sms.entity.SmsDiypageTemplateCategory;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.zscat.mallplus.sms.entity.SmsDiypageTemplateCategory;
/**
-* @author mallplus
-* @date 2019-12-04
-*/
+ * @author mallplus
+ * @date 2019-12-04
+ */
public interface ISmsDiypageTemplateCategoryService extends IService {
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/ISmsGroupActivityService.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/ISmsGroupActivityService.java
index 9945993ae559f86f7ffc57814c381be82e574220..37c65e28bf4c49aa8e57c38d36f844f1f66fe80e 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/ISmsGroupActivityService.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/ISmsGroupActivityService.java
@@ -5,7 +5,7 @@ import com.zscat.mallplus.sms.entity.SmsGroupActivity;
/**
*
- * 服务类
+ * 服务类
*
*
* @author zscat
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/ISmsPaimaiLogService.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/ISmsPaimaiLogService.java
index 7a61ec02ac69361ab4189fa81849bbf65fbce5ba..f26afda321ef7b8c557ce0e28942a43647caf09c 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/ISmsPaimaiLogService.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/ISmsPaimaiLogService.java
@@ -5,7 +5,7 @@ import com.zscat.mallplus.sms.entity.SmsPaimaiLog;
/**
*
- * 服务类
+ * 服务类
*
*
* @author zscat
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsBasicGiftsServiceImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsBasicGiftsServiceImpl.java
index a2f2e4b2b11e2da6384d4383b544994fd3ff38ab..c0f0794a332440338ec5782dbf64d1086f0e1324 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsBasicGiftsServiceImpl.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsBasicGiftsServiceImpl.java
@@ -10,7 +10,7 @@ import javax.annotation.Resource;
/**
*
- * 服务实现类
+ * 服务实现类
*
*
* @author zscat
@@ -20,7 +20,8 @@ import javax.annotation.Resource;
public class SmsBasicGiftsServiceImpl extends ServiceImpl implements ISmsBasicGiftsService {
@Resource
- private SmsBasicGiftsMapper giftsMapper;
+ private SmsBasicGiftsMapper giftsMapper;
+
@Override
public int updateStatus(Long id, Integer status) {
SmsBasicGifts gifts = new SmsBasicGifts();
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsBasicMarkingServiceImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsBasicMarkingServiceImpl.java
index a6f2c908037728fd200f8456387a94c038fbe514..0c76a448cc9fa64bd59e55966d4f67fa1b63cf35 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsBasicMarkingServiceImpl.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsBasicMarkingServiceImpl.java
@@ -12,7 +12,7 @@ import javax.annotation.Resource;
/**
*
- * 服务实现类
+ * 服务实现类
*
*
* @author zscat
@@ -23,23 +23,25 @@ public class SmsBasicMarkingServiceImpl extends ServiceImpl().eq("big_type",bigType));
+ markingMapper.update(marking, new QueryWrapper().eq("big_type", bigType));
marking.setId(id);
marking.setStatus(0);
markingMapper.updateById(marking);
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsContentServiceImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsContentServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..eaff2f0d809c1005ab825883e6dc850748abf6c8
--- /dev/null
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsContentServiceImpl.java
@@ -0,0 +1,22 @@
+package com.zscat.mallplus.sms.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zscat.mallplus.sms.entity.SmsContent;
+import com.zscat.mallplus.sms.mapper.SmsContentMapper;
+import com.zscat.mallplus.sms.service.ISmsContentService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @author mallplus
+ * @date 2019-12-07
+ */
+@Service
+public class SmsContentServiceImpl extends ServiceImpl implements ISmsContentService {
+
+ @Resource
+ private SmsContentMapper smsContentMapper;
+
+
+}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsDiyPageServiceImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsDiyPageServiceImpl.java
index 4f39074d77f3a35beec6d6220264cc112c9b6305..e462109188cb8fb1656b2a31b9de49e523309293 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsDiyPageServiceImpl.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsDiyPageServiceImpl.java
@@ -1,17 +1,17 @@
package com.zscat.mallplus.sms.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zscat.mallplus.sms.entity.SmsDiyPage;
import com.zscat.mallplus.sms.mapper.SmsDiyPageMapper;
import com.zscat.mallplus.sms.service.ISmsDiyPageService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
*
- * 服务实现类
+ * 服务实现类
*
*
* @author zscat
@@ -22,9 +22,10 @@ public class SmsDiyPageServiceImpl extends ServiceImpl().eq("status",1).eq("type",typeId).ne("id",id));
+ return diyPageMapper.selectCount(new QueryWrapper().eq("status", 1).eq("type", typeId).ne("id", id));
}
@Override
@@ -34,6 +35,6 @@ public class SmsDiyPageServiceImpl extends ServiceImpl().eq("name",name).ne("id",id));
+ return diyPageMapper.selectCount(new QueryWrapper().eq("name", name).ne("id", id));
}
}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsDiypageTemplateCategoryServiceImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsDiypageTemplateCategoryServiceImpl.java
index 196b5fcb00da3cd41270a93796df7bdb95b16295..75973244e69197ecb9fab6ec72b4411f1f902561 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsDiypageTemplateCategoryServiceImpl.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsDiypageTemplateCategoryServiceImpl.java
@@ -1,21 +1,23 @@
package com.zscat.mallplus.sms.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zscat.mallplus.sms.entity.SmsDiypageTemplateCategory;
import com.zscat.mallplus.sms.mapper.SmsDiypageTemplateCategoryMapper;
import com.zscat.mallplus.sms.service.ISmsDiypageTemplateCategoryService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
+
import javax.annotation.Resource;
+
/**
-* @author mallplus
-* @date 2019-12-04
-*/
+ * @author mallplus
+ * @date 2019-12-04
+ */
@Service
public class SmsDiypageTemplateCategoryServiceImpl extends ServiceImpl implements ISmsDiypageTemplateCategoryService {
@Resource
- private SmsDiypageTemplateCategoryMapper smsDiypageTemplateCategoryMapper;
+ private SmsDiypageTemplateCategoryMapper smsDiypageTemplateCategoryMapper;
@Override
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsGroupActivityServiceImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsGroupActivityServiceImpl.java
index 26df4543cf7a6bdec8ed60b99df432e3ffa68ea7..3d1f00b4a91d6434a12d1fb0f64a96ef211d7c41 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsGroupActivityServiceImpl.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsGroupActivityServiceImpl.java
@@ -11,7 +11,7 @@ import javax.annotation.Resource;
/**
*
- * 服务实现类
+ * 服务实现类
*
*
* @author zscat
@@ -22,6 +22,7 @@ public class SmsGroupActivityServiceImpl extends ServiceImpl().in("id", ids));
}
+
@Override
public int create(List homeBrandList) {
for (SmsHomeBrand smsHomeBrand : homeBrandList) {
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsHomeNewProductServiceImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsHomeNewProductServiceImpl.java
index 248431ca982f3007feaabc1b547cbe29852a1d6a..5f812db840cce1078ca683161cb5cd2bb46dbfb7 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsHomeNewProductServiceImpl.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsHomeNewProductServiceImpl.java
@@ -37,6 +37,7 @@ public class SmsHomeNewProductServiceImpl extends ServiceImpl homeNewProductList) {
for (SmsHomeNewProduct SmsHomeNewProduct : homeNewProductList) {
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsHomeRecommendProductServiceImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsHomeRecommendProductServiceImpl.java
index f5381eff9cb422787da6235b14333eead9afa240..d9a84733f9fb80fa4ffb8bfac235b4851d78bfe4 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsHomeRecommendProductServiceImpl.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsHomeRecommendProductServiceImpl.java
@@ -37,6 +37,7 @@ public class SmsHomeRecommendProductServiceImpl extends ServiceImpl().in("id", ids));
}
+
@Override
public int create(List homeRecommendProductList) {
for (SmsHomeRecommendProduct recommendProduct : homeRecommendProductList) {
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsHomeRecommendSubjectServiceImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsHomeRecommendSubjectServiceImpl.java
index b2d152ae1011e6c4f9d64619251ba782ae2dad9c..f03a988419c0d230dc54dd093c5071076c013c92 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsHomeRecommendSubjectServiceImpl.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsHomeRecommendSubjectServiceImpl.java
@@ -38,6 +38,7 @@ public class SmsHomeRecommendSubjectServiceImpl extends ServiceImpl().in("id", ids));
}
+
@Override
public int create(List recommendSubjectList) {
for (SmsHomeRecommendSubject recommendProduct : recommendSubjectList) {
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsPaimaiLogServiceImpl.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsPaimaiLogServiceImpl.java
index 8feaee433f8703bec456b16f8c841527f801e79f..d035a78590fc40c534d76b2b8a44033a67598545 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsPaimaiLogServiceImpl.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sms/service/impl/SmsPaimaiLogServiceImpl.java
@@ -8,7 +8,7 @@ import org.springframework.stereotype.Service;
/**
*
- * 服务实现类
+ * 服务实现类
*
*
* @author zscat
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/AdminSysJobController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/AdminSysJobController.java
index f7f6b81ad782ebc030054fc9a0573c9e3a299cb1..45e0b2731dda9cfaa2023fb519695d5318d6f66c 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/AdminSysJobController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/AdminSysJobController.java
@@ -54,11 +54,11 @@ public class AdminSysJobController {
public Object saveAdminSysJob(@RequestBody AdminSysJob entity) {
try {
- if (!adminSysJobService.checkCronExpressionIsValid(entity.getCronExpression())){
+ if (!adminSysJobService.checkCronExpressionIsValid(entity.getCronExpression())) {
return new CommonResult().failed("表达式错误");
}
adminSysJobService.insertJob(entity);
- return new CommonResult().success();
+ return new CommonResult().success();
} catch (Exception e) {
log.error("保存定时器日志表:%s", e.getMessage(), e);
@@ -73,11 +73,11 @@ public class AdminSysJobController {
public Object updateAdminSysJob(@RequestBody AdminSysJob entity) {
try {
- if (!adminSysJobService.checkCronExpressionIsValid(entity.getCronExpression())){
+ if (!adminSysJobService.checkCronExpressionIsValid(entity.getCronExpression())) {
return new CommonResult().failed("表达式错误");
}
- adminSysJobService.updateJob(entity) ;
- return new CommonResult().success();
+ adminSysJobService.updateJob(entity);
+ return new CommonResult().success();
} catch (Exception e) {
log.error("更新定时器日志表:%s", e.getMessage(), e);
@@ -149,12 +149,13 @@ public class AdminSysJobController {
return new CommonResult().failed();
}
}
+
@ApiOperation("修改展示状态")
@RequestMapping(value = "/run")
@ResponseBody
@SysLog(MODULE = "cms", REMARK = "修改展示状态")
public Object run(@RequestBody AdminSysJob entity) {
- adminSysJobService.run(entity);
+ adminSysJobService.run(entity);
return new CommonResult().success();
}
@@ -164,8 +165,7 @@ public class AdminSysJobController {
*/
@PostMapping("/checkCronExpressionIsValid")
@ResponseBody
- public Object checkCronExpressionIsValid(@RequestBody AdminSysJob job)
- {
+ public Object checkCronExpressionIsValid(@RequestBody AdminSysJob job) {
adminSysJobService.checkCronExpressionIsValid(job.getCronExpression());
return new CommonResult().success();
}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/AdminSysJobLogController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/AdminSysJobLogController.java
index c4c0735e99f4b7515e80b570445bd2860f48a575..c6186af1e4ee046f1820148529035f48193f59ae 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/AdminSysJobLogController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/AdminSysJobLogController.java
@@ -37,8 +37,8 @@ public class AdminSysJobLogController {
@GetMapping(value = "/list")
public Object getAdminSysJobLogByPage(AdminSysJobLog entity,
- @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
- @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
+ @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
) {
try {
return new CommonResult().success(adminSysJobService.page(new Page(pageNum, pageSize), new QueryWrapper<>(entity).orderByDesc("create_time")));
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/AliPayController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/AliPayController.java
index 747cb8fdf21f849134562807ce493aedcede7607..099d533b6da1b8bd5cf450a6760938c4a6149385 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/AliPayController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/AliPayController.java
@@ -33,21 +33,21 @@ import java.util.Map;
public class AliPayController {
@Resource
- private AlipayUtils alipayUtils;
+ private AlipayUtils alipayUtils;
@Resource
- private ISysAlipayConfigService alipayService;
+ private ISysAlipayConfigService alipayService;
@GetMapping(value = "/{id}")
- public Object get(){
+ public Object get() {
return new CommonResult().success(alipayService.getOne(new QueryWrapper<>()));
}
@ApiOperation("配置支付宝")
@PostMapping(value = "/update")
- public Object payConfig(@Validated @RequestBody SysAlipayConfig alipayConfig){
+ public Object payConfig(@Validated @RequestBody SysAlipayConfig alipayConfig) {
alipayService.updateById(alipayConfig);
return new CommonResult().success();
@@ -56,43 +56,43 @@ public class AliPayController {
@ApiOperation("PC网页支付")
@PostMapping(value = "/toPayAsPC")
- public Object toPayAsPC(@Validated @RequestBody TradeVo trade) throws Exception{
+ public Object toPayAsPC(@Validated @RequestBody TradeVo trade) throws Exception {
log.info("toPayAsPC");
SysAlipayConfig alipay = alipayService.getOne(new QueryWrapper<>());
trade.setOutTradeNo(alipayUtils.getOrderCode());
- String payUrl = alipayService.toPayAsPC(alipay,trade);
+ String payUrl = alipayService.toPayAsPC(alipay, trade);
return new CommonResult().success(payUrl);
}
@ApiOperation("手机网页支付")
@PostMapping(value = "/toPayAsWeb")
- public Object toPayAsWeb(@Validated @RequestBody TradeVo trade) throws Exception{
+ public Object toPayAsWeb(@Validated @RequestBody TradeVo trade) throws Exception {
log.info("toPayAsWeb");
SysAlipayConfig alipay = alipayService.getOne(new QueryWrapper<>());
trade.setOutTradeNo(alipayUtils.getOrderCode());
- String payUrl = alipayService.toPayAsWeb(alipay,trade);
+ String payUrl = alipayService.toPayAsWeb(alipay, trade);
return new CommonResult().success(payUrl);
}
@ApiIgnore
@GetMapping("/return")
@ApiOperation("支付之后跳转的链接")
- public Object returnPage(HttpServletRequest request, HttpServletResponse response){
+ public Object returnPage(HttpServletRequest request, HttpServletResponse response) {
log.info("returnPage");
SysAlipayConfig alipay = alipayService.getOne(new QueryWrapper<>());
response.setContentType("text/html;charset=" + alipay.getCharset());
//内容验签,防止黑客篡改参数
- if(alipayUtils.rsaCheck(request,alipay)){
+ if (alipayUtils.rsaCheck(request, alipay)) {
//商户订单号
String outTradeNo = new String(request.getParameter("out_trade_no").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);
//支付宝交易号
String tradeNo = new String(request.getParameter("trade_no").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);
- System.out.println("商户订单号"+outTradeNo+" "+"第三方交易号"+tradeNo);
+ System.out.println("商户订单号" + outTradeNo + " " + "第三方交易号" + tradeNo);
// 根据业务需要返回数据,这里统一返回OK
return new CommonResult().success("payment successful", HttpStatus.OK);
- }else{
+ } else {
// 根据业务需要返回数据
return new CommonResult().success(HttpStatus.BAD_REQUEST);
}
@@ -101,12 +101,12 @@ public class AliPayController {
@ApiIgnore
@RequestMapping("/notify")
@ApiOperation("支付异步通知(要公网访问),接收异步通知,检查通知内容app_id、out_trade_no、total_amount是否与请求中的一致,根据trade_status进行后续业务处理")
- public Object notify(HttpServletRequest request){
+ public Object notify(HttpServletRequest request) {
log.info("notify");
SysAlipayConfig alipay = alipayService.getOne(new QueryWrapper<>());
Map parameterMap = request.getParameterMap();
//内容验签,防止黑客篡改参数
- if (alipayUtils.rsaCheck(request,alipay)) {
+ if (alipayUtils.rsaCheck(request, alipay)) {
//交易状态
String tradeStatus = new String(request.getParameter("trade_status").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);
// 商户订单号
@@ -116,8 +116,8 @@ public class AliPayController {
//付款金额
String totalAmount = new String(request.getParameter("total_amount").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);
//验证
- if(tradeStatus.equals(AliPayStatusEnum.SUCCESS.getValue())||tradeStatus.equals(AliPayStatusEnum.FINISHED.getValue())){
- // 验证通过后应该根据业务需要处理订单
+ if (tradeStatus.equals(AliPayStatusEnum.SUCCESS.getValue()) || tradeStatus.equals(AliPayStatusEnum.FINISHED.getValue())) {
+ // 验证通过后应该根据业务需要处理订单
}
return new CommonResult().success(HttpStatus.OK);
}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/GeneratorController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/GeneratorController.java
index a01815bac9248c87ca157b609a829f1055718162..59b1c0789a69c9adfc1c8a182c0230a90368c245 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/GeneratorController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/GeneratorController.java
@@ -23,41 +23,41 @@ public class GeneratorController {
@Resource
- private GeneratorConfigMapper generatorConfigMapper;
+ private GeneratorConfigMapper generatorConfigMapper;
@ApiOperation("查询数据库元数据")
@GetMapping(value = "/tables")
public Object getTables(@RequestParam(defaultValue = "") String name,
- @RequestParam(defaultValue = "0")Integer page,
- @RequestParam(defaultValue = "10")Integer size){
- int[] startEnd = PageUtil.transToStartEnd(page+1, size);
- return new CommonResult().success(generatorService.getTables(name,startEnd));
+ @RequestParam(defaultValue = "0") Integer page,
+ @RequestParam(defaultValue = "10") Integer size) {
+ int[] startEnd = PageUtil.transToStartEnd(page + 1, size);
+ return new CommonResult().success(generatorService.getTables(name, startEnd));
}
@ApiOperation("查询表内元数据")
@GetMapping(value = "/columns")
- public Object getTables(@RequestParam String tableName){
+ public Object getTables(@RequestParam String tableName) {
return new CommonResult().success(generatorService.getColumns(tableName));
}
@ApiOperation("生成代码")
@PostMapping
- public Object generator(@RequestBody List columnInfos, @RequestParam String tableName){
+ public Object generator(@RequestBody List columnInfos, @RequestParam String tableName) {
- generatorService.generator(columnInfos,generatorConfigMapper.selectById(1),tableName);
+ generatorService.generator(columnInfos, generatorConfigMapper.selectById(1), tableName);
return new CommonResult().success();
}
@ApiOperation("查询")
@GetMapping(value = "/get")
- public Object get(){
+ public Object get() {
return new CommonResult().success(generatorConfigMapper.selectById(1));
}
@ApiOperation("修改")
@PostMapping(value = "/update")
- public Object emailConfig(@Validated @RequestBody GenConfig genConfig){
+ public Object emailConfig(@Validated @RequestBody GenConfig genConfig) {
genConfig.setId(1L);
return new CommonResult().success(generatorConfigMapper.updateById(genConfig));
}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/HomeController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/HomeController.java
index 74b6a3085fab166a7e4836ab9a30842904195c4f..2074575eeef19b0241d3ac23ee128af257103f0e 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/HomeController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/HomeController.java
@@ -49,6 +49,14 @@ import java.util.*;
@RequestMapping("/home")
public class HomeController extends BaseController {
+ @Resource
+ CmsSubjectCategoryMapper categoryMapper;
+ @Resource
+ CmsSubjectMapper subjectMapper;
+ @Resource
+ SysSchoolMapper schoolMapper;
+ @Resource
+ SysAreaMapper sysAreaMapper;
@Resource
private IOmsOrderService orderService;
@Resource
@@ -56,20 +64,19 @@ public class HomeController extends BaseController {
@Resource
private IUmsMemberService memberService;
-
@ApiOperation("按时间统计订单 会员和商品")
@SysLog(MODULE = "home", REMARK = "首页订单日统计")
@RequestMapping(value = "/dayStatic", method = RequestMethod.GET)
- public Object dayStatic(@RequestParam String date,@RequestParam Integer type) throws Exception {
- return new CommonResult().success(orderService.dayStatic(date,type));
+ public Object dayStatic(@RequestParam String date, @RequestParam Integer type) throws Exception {
+ return new CommonResult().success(orderService.dayStatic(date, type));
}
@ApiOperation("首页订单日统计")
@SysLog(MODULE = "home", REMARK = "首页订单日统计")
@RequestMapping(value = "/orderDayStatic", method = RequestMethod.GET)
public Object orderDayStatic(@RequestParam String date) throws Exception {
- if (date.startsWith("--")){
- date=DateUtils.currentDay();
+ if (date.startsWith("--")) {
+ date = DateUtils.currentDay();
}
return new CommonResult().success(orderService.orderDayStatic(date));
}
@@ -78,8 +85,8 @@ public class HomeController extends BaseController {
@SysLog(MODULE = "home", REMARK = "首页订单月统计")
@RequestMapping(value = "/orderMonthStatic", method = RequestMethod.GET)
public Object orderMonthStatic(@RequestParam String date) throws Exception {
- if (date.startsWith("--")){
- date=DateUtils.currentDay();
+ if (date.startsWith("--")) {
+ date = DateUtils.currentDay();
}
return new CommonResult().success(orderService.orderMonthStatic(date));
}
@@ -121,27 +128,27 @@ public class HomeController extends BaseController {
for (OmsOrder order : orderList) {
if (DateUtils.format(order.getCreateTime()).equals(DateUtils.format(new Date()))
- && (order.getStatus() <9 )) {
+ && (order.getStatus() < 9)) {
nowOrderCount++;
nowOrderPay = nowOrderPay.add(order.getPayAmount());
}
if (DateUtils.format(order.getCreateTime()).equals(DateUtils.addDay(new Date(), -1))
- && (order.getStatus() <9 )) {
+ && (order.getStatus() < 9)) {
yesOrderCount++;
yesOrderPay = yesOrderPay.add(order.getPayAmount());
}
if (DateUtils.calculateDaysNew(order.getCreateTime(), new Date()) >= 7
- && (order.getStatus() <9 )) {
+ && (order.getStatus() < 9)) {
qiOrderCount++;
qiOrderPay = qiOrderPay.add(order.getPayAmount());
}
if (order.getCreateTime().getTime() >= DateUtils.geFirstDayDateByMonth().getTime()
- && (order.getStatus() <9 )) {
+ && (order.getStatus() < 9)) {
monthOrderCount++;
monthOrderPay = monthOrderPay.add(order.getPayAmount());
}
if (order.getCreateTime().getTime() >= DateUtils.getFirstDayOfWeek().getTime()
- && (order.getStatus() <9 )) {
+ && (order.getStatus() < 9)) {
weekOrderCount++;
weekOrderPay = weekOrderPay.add(order.getPayAmount());
}
@@ -196,7 +203,7 @@ public class HomeController extends BaseController {
public Object goodsStatic() throws Exception {
StopWatch stopWatch = new StopWatch("首页商品统计");
stopWatch.start("首页商品列表2");
- List goodsList = productService.list(new QueryWrapper<>(new PmsProduct()).select("publish_status","create_time"));
+ List goodsList = productService.list(new QueryWrapper<>(new PmsProduct()).select("publish_status", "create_time"));
stopWatch.stop();
stopWatch.start("首页商品");
@@ -255,9 +262,9 @@ public class HomeController extends BaseController {
if (DateUtils.format(member.getCreateTime()).equals(DateUtils.format(new Date()))) {
nowCount++;
}
- if (member.getGender()==null || member.getGender()==1){
+ if (member.getGender() == null || member.getGender() == 1) {
mallCount++;
- }else {
+ } else {
femallount++;
}
}
@@ -271,11 +278,11 @@ public class HomeController extends BaseController {
return new CommonResult().success(map);
}
-
/**
* 导出:http://localhost:8080/home/export/users
- 导入:http://localhost:8080/demo/import/users (用postman或者curl测试吧)
- http://localhost:8080/home/import/goods
+ * 导入:http://localhost:8080/demo/import/users (用postman或者curl测试吧)
+ * http://localhost:8080/home/import/goods
+ *
* @param response
*/
@RequestMapping(value = "/export/users", method = RequestMethod.GET)
@@ -283,36 +290,30 @@ public class HomeController extends BaseController {
List userList = getUserList();
EasyPoiUtils.exportExcel(getUserList(), "用户列表", "用户报表", ExportUser.class, "用户明细报表.xls", response);
}
+
@RequestMapping("/import/users")
@ResponseBody
public List importUsers(@RequestParam MultipartFile file) {
List d = EasyPoiUtils.importExcel(file, ExportUser.class);
return EasyPoiUtils.importExcel(file, ExportUser.class);
}
+
@RequestMapping("/import/goods")
@ResponseBody
public void importgoods(@RequestParam MultipartFile file) {
List list = EasyPoiUtils.importExcel(file, ExportGoods.class);
- for (ExportGoods gg : list){
+ for (ExportGoods gg : list) {
createG(gg);
}
}
- @Resource
- CmsSubjectCategoryMapper categoryMapper;
- @Resource
- CmsSubjectMapper subjectMapper;
- @Resource
- SysSchoolMapper schoolMapper;
- @Resource
- SysAreaMapper sysAreaMapper;
@RequestMapping("/import/subject")
@ResponseBody
public void importSubject(@RequestParam MultipartFile file) {
List areas = sysAreaMapper.selectList(new QueryWrapper<>());
List schools = schoolMapper.selectList(new QueryWrapper<>());
List list = EasyPoiUtils.importExcel(file, ExportSubject.class);
- for (ExportSubject subject1 : list){
+ for (ExportSubject subject1 : list) {
try {
CmsSubject subject = new CmsSubject();
subject.setTitle(subject1.getTitle());
@@ -321,50 +322,52 @@ public class HomeController extends BaseController {
subject.setAlbumPics(subject1.getPic());
- Random r = new Random(); Integer a = r.nextInt(100);
+ Random r = new Random();
+ Integer a = r.nextInt(100);
Integer c = r.nextInt(3);
Integer d = r.nextInt(5);
subject.setCollectCount(r.nextInt(100));
subject.setReadCount(r.nextInt(100));
subject.setForwardCount(r.nextInt(100));
- subject.setCategoryName("游戏专题");
- subject.setCategoryId(2L);
+ subject.setCategoryName("游戏专题");
+ subject.setCategoryId(2L);
subject.setType(c);
Integer b = r.nextInt(100);
- SysSchool school = schools.get(a);
- if (school!=null){
+ SysSchool school = schools.get(a);
+ if (school != null) {
subject.setSchoolId(school.getId());
subject.setSchoolName(school.getName());
- }else{
- SysSchool school1 = schools.get(b);
- if (school1!=null){
+ } else {
+ SysSchool school1 = schools.get(b);
+ if (school1 != null) {
subject.setSchoolId(school1.getId());
subject.setSchoolName(school1.getName());
}
}
- SysArea area = areas.get(b);
- if (area!=null){
+ SysArea area = areas.get(b);
+ if (area != null) {
subject.setAreaId(area.getId());
subject.setAreaName(area.getName());
- }else{
- SysArea area1 = areas.get(a);
- if (area1!=null){
+ } else {
+ SysArea area1 = areas.get(a);
+ if (area1 != null) {
subject.setAreaId(area1.getId());
subject.setAreaName(area1.getName());
}
}
subjectMapper.insert(subject);
- }catch (Exception e){
+ } catch (Exception e) {
System.out.println(e.getMessage());
}
}
}
- void createG(ExportGoods gg){
+
+ void createG(ExportGoods gg) {
PmsProduct g = new PmsProduct();
g.setName(gg.getUsername());
g.setSubTitle(gg.getUsername());
@@ -376,10 +379,10 @@ public class HomeController extends BaseController {
g.setPic(gg.getImg());
g.setAlbumPics(gg.getImg());
- if (ValidatorUtils.notEmpty(gg.getPrice())){
+ if (ValidatorUtils.notEmpty(gg.getPrice())) {
g.setPrice(new BigDecimal(gg.getPrice().substring(1)));
}
- if (ValidatorUtils.notEmpty(gg.getOriginprice())){
+ if (ValidatorUtils.notEmpty(gg.getOriginprice())) {
g.setOriginalPrice(new BigDecimal(gg.getOriginprice().substring(1)));
}
@@ -392,7 +395,7 @@ public class HomeController extends BaseController {
g.setPublishStatus(1);
g.setPromotionType(0);
g.setVerifyStatus(1);
- g.setProductSn("X"+System.currentTimeMillis());
+ g.setProductSn("X" + System.currentTimeMillis());
g.setQsType(1);
g.setNewStatus(1);
g.setCreateTime(new Date());
@@ -404,6 +407,7 @@ public class HomeController extends BaseController {
g.setProductAttributeCategoryId(11L);
productService.save(g);
}
+
private List getUserList() {
List userList = new ArrayList<>();
userList.add(new ExportUser("tom", new Date()));
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/OssController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/OssController.java
index b9fd5135e70772eecfb61c2b91a5e81dc145f201..e8b58dbbd97e1e5c1d30843b1ec2b87e83bc9421 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/OssController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/OssController.java
@@ -35,8 +35,23 @@ import java.util.Random;
@Api(tags = "OssController", description = "Oss管理")
@RequestMapping("/aliyun/oss")
public class OssController {
+ @Autowired
+ OssAliyunUtil aliyunOSSUtil;
@Autowired
private OssServiceImpl ossService;
+ @Resource
+ private PmsAlbumPicMapper albumPicMapper;
+
+ private static ByteArrayInputStream getRandomDataStream(int length) {
+ return new ByteArrayInputStream(getRandomBuffer(length));
+ }
+
+ private static byte[] getRandomBuffer(int length) {
+ final Random randGenerator = new Random();
+ final byte[] buff = new byte[length];
+ randGenerator.nextBytes(buff);
+ return buff;
+ }
@ApiOperation(value = "oss上传签名生成")
@RequestMapping(value = "/policy", method = RequestMethod.GET)
@@ -54,13 +69,6 @@ public class OssController {
return new CommonResult().success(ossCallbackResult);
}
-
- @Autowired
- OssAliyunUtil aliyunOSSUtil;
- @Resource
- private PmsAlbumPicMapper albumPicMapper;
-
-
@SysLog(MODULE = "图片上传管理", REMARK = "上传")
@ApiOperation("上传")
@RequestMapping(value = "upload", method = RequestMethod.POST)
@@ -68,7 +76,7 @@ public class OssController {
List list = new ArrayList<>();
String name = aliyunOSSUtil.upload(multipartFile);
- insertPic(groupId, multipartFile, name,"image");
+ insertPic(groupId, multipartFile, name, "image");
BlobUpload blobUploadEntity = new BlobUpload();
blobUploadEntity.setFileName(multipartFile.getOriginalFilename());
blobUploadEntity.setFileUrl(name);
@@ -87,7 +95,7 @@ public class OssController {
if (multipartFile != null && multipartFile.length > 0) {
for (int i = 0; i < multipartFile.length; i++) {
String name = aliyunOSSUtil.upload(multipartFile[i]);
- insertPic(groupId, multipartFile[i], name,"image");
+ insertPic(groupId, multipartFile[i], name, "image");
BlobUpload blobUploadEntity = new BlobUpload();
blobUploadEntity.setFileName(multipartFile[i].getOriginalFilename());
blobUploadEntity.setFileUrl(name);
@@ -120,13 +128,13 @@ public class OssController {
}
String name = aliyunOSSUtil.upload(multipartFile);
- return new CommonResult().success(insertPic(groupId, multipartFile, name,fileType));
+ return new CommonResult().success(insertPic(groupId, multipartFile, name, fileType));
}
return new CommonResult().success(list);
}
- private PmsAlbumPic insertPic(Long groupId, @RequestPart("file") MultipartFile multipartFile, String name,String type) {
+ private PmsAlbumPic insertPic(Long groupId, @RequestPart("file") MultipartFile multipartFile, String name, String type) {
PmsAlbumPic attachment = new PmsAlbumPic();
if (ValidatorUtils.notEmpty(UserUtils.getCurrentMember())) {
attachment.setUserId(UserUtils.getCurrentMember().getId());
@@ -134,14 +142,13 @@ public class OssController {
attachment.setAlbumId(groupId);
attachment.setCreateTime(new Date());
attachment.setName(multipartFile.getOriginalFilename());
- attachment.setStoreId(Long.parseLong("1"));
+ // attachment.setStoreId(Long.parseLong("1"));
attachment.setType(type);
attachment.setPic(name);
albumPicMapper.insert(attachment);
return attachment;
}
-
@IgnoreAuth
@PostMapping("/upload1")
@ApiOperation("上传文件")
@@ -162,17 +169,6 @@ public class OssController {
return new CommonResult().success(stringBuffer);
}
- private static ByteArrayInputStream getRandomDataStream(int length) {
- return new ByteArrayInputStream(getRandomBuffer(length));
- }
-
- private static byte[] getRandomBuffer(int length) {
- final Random randGenerator = new Random();
- final byte[] buff = new byte[length];
- randGenerator.nextBytes(buff);
- return buff;
- }
-
private String getFileExtension(String fileName) {
int position = fileName.indexOf('.');
if (position > 0) {
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/SysEmailConfigController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/SysEmailConfigController.java
index 1b296752e39b4756289c800c9c0ab2f70d4bfce3..ae94ea43bf3dd41982eeca6d99a1e4bb93c16cc1 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/SysEmailConfigController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/SysEmailConfigController.java
@@ -14,7 +14,7 @@ import javax.annotation.Resource;
/**
*
- * 前端控制器
+ * 前端控制器
*
*
* @author zscat
@@ -29,14 +29,14 @@ public class SysEmailConfigController {
@GetMapping(value = "/{id}")
- public Object get(){
+ public Object get() {
return new CommonResult().success(emailService.getOne(new QueryWrapper<>()));
}
@PostMapping(value = "/update")
@ApiOperation("配置邮件")
- public Object emailConfig(@Validated @RequestBody SysEmailConfig emailConfig){
+ public Object emailConfig(@Validated @RequestBody SysEmailConfig emailConfig) {
emailService.updateById(emailConfig);
return new CommonResult().success();
}
@@ -45,7 +45,7 @@ public class SysEmailConfigController {
@PostMapping(value = "/send")
@ApiOperation("发送邮件")
public Object send(@Validated @RequestBody EmailVo emailVo) throws Exception {
- emailService.send(emailVo,emailService.getOne(new QueryWrapper<>()));
+ emailService.send(emailVo, emailService.getOne(new QueryWrapper<>()));
return new CommonResult().success();
}
}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/SysPermissionController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/SysPermissionController.java
index c478b1ad9ba55cae852726df13d7295f26169bd5..9131c8abf1625bd1222082f69da0a7abc6025ff1 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/SysPermissionController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/SysPermissionController.java
@@ -47,8 +47,10 @@ public class SysPermissionController extends BaseController {
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
) {
try {
- Object data = ISysPermissionService.list(new QueryWrapper<>(entity));
- return new CommonResult().success(data);
+ if (ValidatorUtils.notEmpty(entity.getName())){
+ return new CommonResult().success(ISysPermissionService.list(new QueryWrapper(new SysPermission()).like("name",entity.getName()).orderByAsc("sort")));
+ }
+ return new CommonResult().success(ISysPermissionService.list(new QueryWrapper<>(entity).orderByAsc("sort")));
} catch (Exception e) {
log.error("根据条件查询所有后台用户权限表列表:%s", e.getMessage(), e);
}
@@ -166,7 +168,7 @@ public class SysPermissionController extends BaseController {
@ResponseBody
public Object findPermissions() {
Long userId = getCurrentUser().getId();
- if (getCurrentUser().getSupplyId()!=null && getCurrentUser().getSupplyId() == 1L) {
+ if (getCurrentUser().getSupplyId() != null && getCurrentUser().getSupplyId() == 1L) {
return new CommonResult().success(ISysPermissionService.getAllPermission());
}
return new CommonResult().success(ISysPermissionService.getPermissionsByUserId(userId));
@@ -182,6 +184,4 @@ public class SysPermissionController extends BaseController {
}
-
-
}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/SysQiniuConfigController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/SysQiniuConfigController.java
index 185b2ce585e943b4cc85a0f0276b6960659d8324..041d5c2f1d271491e91353c5d414fa14aac8df3f 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/SysQiniuConfigController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/SysQiniuConfigController.java
@@ -24,7 +24,7 @@ import java.util.Map;
/**
*
- * 前端控制器
+ * 前端控制器
*
*
* @author zscat
@@ -40,16 +40,16 @@ public class SysQiniuConfigController {
private ISysQiniuContentService qiniuContentService;
@GetMapping(value = "/config")
- public Object get(){
+ public Object get() {
return new CommonResult().success(qiNiuService.getOne(new QueryWrapper<>()));
}
@ApiOperation("配置七牛云存储")
@PutMapping(value = "/config")
- public Object emailConfig(@Validated @RequestBody SysQiniuConfig qiniuConfig){
+ public Object emailConfig(@Validated @RequestBody SysQiniuConfig qiniuConfig) {
qiNiuService.updateById(qiniuConfig);
- // qiNiuService.update(qiniuConfig.getType());
+ // qiNiuService.update(qiniuConfig.getType());
return new ResponseEntity(HttpStatus.OK);
}
@@ -65,7 +65,7 @@ public class SysQiniuConfigController {
@GetMapping
public Object getRoles(SysQiniuConfig entity,
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
- @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize){
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
try {
return new CommonResult().success(qiNiuService.page(new Page(pageNum, pageSize), new QueryWrapper<>(entity)));
} catch (Exception e) {
@@ -77,19 +77,19 @@ public class SysQiniuConfigController {
@ApiOperation("上传文件")
@PostMapping
- public Object upload(@RequestParam MultipartFile file){
- SysQiniuContent qiniuContent = qiNiuService.upload(file,qiNiuService.getOne(new QueryWrapper<>()));
- Map map = new HashMap<>(3);
- map.put("id",qiniuContent.getId());
- map.put("errno",0);
- map.put("data",new String[]{qiniuContent.getUrl()});
- return new ResponseEntity<>(map,HttpStatus.OK);
+ public Object upload(@RequestParam MultipartFile file) {
+ SysQiniuContent qiniuContent = qiNiuService.upload(file, qiNiuService.getOne(new QueryWrapper<>()));
+ Map map = new HashMap<>(3);
+ map.put("id", qiniuContent.getId());
+ map.put("errno", 0);
+ map.put("data", new String[]{qiniuContent.getUrl()});
+ return new ResponseEntity<>(map, HttpStatus.OK);
}
@ApiOperation("同步七牛云数据")
@PostMapping(value = "/synchronize")
- public Object synchronize(){
+ public Object synchronize() {
qiNiuService.synchronize(qiNiuService.getOne(new QueryWrapper<>()));
return new ResponseEntity(HttpStatus.OK);
}
@@ -97,17 +97,17 @@ public class SysQiniuConfigController {
@ApiOperation("下载文件")
@GetMapping(value = "/download/{id}")
- public Object download(@PathVariable Long id){
- Map map = new HashMap<>(1);
- map.put("url", qiNiuService.download(qiNiuService.findByContentId(id),qiNiuService.getOne(new QueryWrapper<>())));
- return new ResponseEntity<>(map,HttpStatus.OK);
+ public Object download(@PathVariable Long id) {
+ Map map = new HashMap<>(1);
+ map.put("url", qiNiuService.download(qiNiuService.findByContentId(id), qiNiuService.getOne(new QueryWrapper<>())));
+ return new ResponseEntity<>(map, HttpStatus.OK);
}
@ApiOperation("删除文件")
@DeleteMapping(value = "/{id}")
- public Object delete(@PathVariable Long id){
- qiNiuService.delete(qiNiuService.findByContentId(id),qiNiuService.getOne(new QueryWrapper<>()));
+ public Object delete(@PathVariable Long id) {
+ qiNiuService.delete(qiNiuService.findByContentId(id), qiNiuService.getOne(new QueryWrapper<>()));
return new ResponseEntity(HttpStatus.OK);
}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/SysQiniuContentController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/SysQiniuContentController.java
index df5becbd5ccd957b2900547308e380e00227faaa..51ab5d556ef943dba17bf7f2daff9c0cbde61cad 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/SysQiniuContentController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/SysQiniuContentController.java
@@ -6,7 +6,7 @@ import org.springframework.web.bind.annotation.RestController;
/**
*
- * 前端控制器
+ * 前端控制器
*
*
* @author zscat
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/SysRoleController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/SysRoleController.java
index 36d31d9f6fbaa742c46389bf6c8c30979580f652..d8f09e25ebf348389509a26f27c1b4f54bf53c6c 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/SysRoleController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/SysRoleController.java
@@ -153,6 +153,7 @@ public class SysRoleController extends ApiController {
List rolePermission = sysRoleService.getRolePermission(roleId);
return new CommonResult().success(rolePermission);
}
+
@ApiOperation("修改展示状态")
@RequestMapping(value = "/update/updateShowStatus")
@ResponseBody
@@ -164,7 +165,7 @@ public class SysRoleController extends ApiController {
role.setStatus(showStatus);
sysRoleService.updates(role);
- return new CommonResult().success();
+ return new CommonResult().success();
}
}
diff --git a/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/SysStoreController.java b/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/SysStoreController.java
index 13c52d81c82d03ecdc485cb755fb054ac333b587..f91ea0c550bc6c867047c23767852de08280dd4f 100644
--- a/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/SysStoreController.java
+++ b/mallplus-admin/src/main/java/com/zscat/mallplus/sys/controller/SysStoreController.java
@@ -3,6 +3,7 @@ package com.zscat.mallplus.sys.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.zscat.mallplus.ApiContext;
import com.zscat.mallplus.annotation.SysLog;
import com.zscat.mallplus.bill.entity.BakCategory;
import com.zscat.mallplus.bill.mapper.BakCategoryMapper;
@@ -16,7 +17,6 @@ import com.zscat.mallplus.sys.service.ISysStoreService;
import com.zscat.mallplus.sys.service.impl.RedisUtil;
import com.zscat.mallplus.utils.CommonResult;
import com.zscat.mallplus.utils.ValidatorUtils;
-import com.zscat.mallplus.ApiContext;
import com.zscat.mallplus.vo.Rediskey;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -55,13 +55,15 @@ public class SysStoreController {
private PmsProductAttributeCategoryMapper productAttributeCategoryMapper;
@Autowired
private ApiContext apiContext;
+ @Resource
+ private BakCategoryMapper bakCategoryMapper;
@SysLog(MODULE = "sys", REMARK = "根据条件查询所有列表")
@ApiOperation("根据条件查询所有列表")
@GetMapping(value = "/setStoreId/{id}")
public Object setStoreId(@ApiParam("id") @PathVariable Integer id) {
try {
- // apiContext.setCurrentProviderId(id);
+ // apiContext.setCurrentProviderId(id);
return new CommonResult().success();
} catch (Exception e) {
log.error("根据条件查询所有列表:%s", e.getMessage(), e);
@@ -69,7 +71,6 @@ public class SysStoreController {
}
}
-
@SysLog(MODULE = "sys", REMARK = "根据条件查询所有列表")
@ApiOperation("根据条件查询所有列表")
@GetMapping(value = "/list")
@@ -163,18 +164,15 @@ public class SysStoreController {
}
}
- @Resource
- private BakCategoryMapper bakCategoryMapper;
-
@SysLog(MODULE = "sys", REMARK = "根据条件查询所有列表")
@ApiOperation("根据条件查询所有列表")
@GetMapping(value = "/listBakCate")
public Object listCate(BakCategory entity,
- @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
- @RequestParam(value = "pageSize", defaultValue = "30") Integer pageSize
+ @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+ @RequestParam(value = "pageSize", defaultValue = "30") Integer pageSize
) {
try {
- return new CommonResult().success(bakCategoryMapper.selectList(new QueryWrapper().eq("pid",0)));
+ return new CommonResult().success(bakCategoryMapper.selectList(new QueryWrapper().eq("pid", 0)));
} catch (Exception e) {
log.error("根据条件查询所有列表:%s", e.getMessage(), e);
}
@@ -186,36 +184,36 @@ public class SysStoreController {
@ResponseBody
public Object storeDetail() {
SysStore store = ISysStoreService.getById(1);
- List list = productAttributeCategoryMapper.selectList(new QueryWrapper().eq("store_id",store.getId()));
+ List list = productAttributeCategoryMapper.selectList(new QueryWrapper().eq("store_id", store.getId()));
for (PmsProductAttributeCategory gt : list) {
PmsProduct productQueryParam = new PmsProduct();
productQueryParam.setProductAttributeCategoryId(gt.getId());
productQueryParam.setPublishStatus(1);
productQueryParam.setVerifyStatus(1);
- IPage goodsList = pmsProductService.page(new Page(0, 8),new QueryWrapper<>(productQueryParam).select(ConstansValue.sampleGoodsList));
- if (goodsList!=null&& goodsList.getRecords()!=null && goodsList.getRecords().size()>0){
+ IPage goodsList = pmsProductService.page(new Page(0, 8), new QueryWrapper<>(productQueryParam).select(ConstansValue.sampleGoodsList));
+ if (goodsList != null && goodsList.getRecords() != null && goodsList.getRecords().size() > 0) {
gt.setGoodsList(goodsList.getRecords());
- }else{
+ } else {
gt.setGoodsList(new ArrayList<>());
}
}
store.setList(list);
- store.setGoodsCount(pmsProductService.count(new QueryWrapper().eq("store_id",store.getId())));
+ store.setGoodsCount(pmsProductService.count(new QueryWrapper().eq("store_id", store.getId())));
//记录浏览量到redis,然后定时更新到数据库
- String key= Rediskey.STORE_VIEWCOUNT_CODE+store.getId();
+ String key = Rediskey.STORE_VIEWCOUNT_CODE + store.getId();
//找到redis中该篇文章的点赞数,如果不存在则向redis中添加一条
- Map