diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxActivityController.java b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxActivityController.java index a9a5c0e90..c7d8dc453 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxActivityController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxActivityController.java @@ -57,12 +57,11 @@ public class WxActivityController extends BaseController { wxActivity.setStatus(EnumActivityStatus.STATUS_THROW_IN.getCode()); wxActivity.updateTenantInfo(getTenantInfo()); try { - wxActivityService.saveOrUpdate(wxActivity); + return wxActivityService.saveOrUpdate(wxActivity); } catch (MallinkException e) { logger.error(e.getMessage()); return new ResultData(e.getErrorCode(), e.getMessage()); } - return new ResultData(); } @ApiOperation("根据id更新接口") diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxOpinionController.java b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxOpinionController.java new file mode 100644 index 000000000..22620acf7 --- /dev/null +++ b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxOpinionController.java @@ -0,0 +1,51 @@ +package com.iformall.controller.market; + +import com.github.pagehelper.PageInfo; +import com.iformall.annotation.SystemControllerLog; +import com.iformall.common.ResultData; +import com.iformall.controller.base.BaseController; +import com.iformall.domain.po.WxOpinion; +import com.iformall.domain.po.base.BaseEntity; +import com.iformall.service.WxOpinionService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + + +@RestController +@RequestMapping("wxOpinion") +@Api(description="投诉建议") +public class WxOpinionController extends BaseController { + + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + + @Autowired + private WxOpinionService wxOpinionService; + + @ApiOperation("分页列表接口") + @GetMapping("list") + @ApiImplicitParams({ + @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), + @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true) + }) + @SystemControllerLog(description = "投诉建议-列表") + public ResultData list(@ModelAttribute WxOpinion record, Integer pageNum, Integer pageSize) { + logger.debug("[" + getIpAddr() + "] WxOpinionController::list"); + if (null == record) { + record = new WxOpinion(); + } + record.updateTenantInfo(getTenantInfo()); + record.setSortColumns(BaseEntity.SortField.CreateDate_DESC); + final PageInfo page = wxOpinionService.listAsPage(record, pageNum, pageSize); + return new ResultData(page); + } + +} diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxQuestionOneselfController.java b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxQuestionOneselfController.java new file mode 100644 index 000000000..f0b7e11d6 --- /dev/null +++ b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxQuestionOneselfController.java @@ -0,0 +1,121 @@ +package com.iformall.controller.market; + +import com.github.pagehelper.PageInfo; +import com.iformall.annotation.SystemControllerLog; +import com.iformall.common.ErrorCode; +import com.iformall.common.Result; +import com.iformall.common.ResultData; +import com.iformall.controller.base.BaseController; +import com.iformall.domain.po.WxActivity; +import com.iformall.domain.po.WxQuestionOneself; +import com.iformall.domain.po.base.BaseEntity; +import com.iformall.enums.EnumQuestionOneselfStatus; +import com.iformall.exception.MallinkException; +import com.iformall.service.WxQuestionOneselfService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + + +@RestController +@RequestMapping("wxQuestionOneself") +@Api(description="问券调查") +public class WxQuestionOneselfController extends BaseController { + + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + + @Autowired + private WxQuestionOneselfService wxQuestionOneselfService; + + @ApiOperation("分页列表接口") + @GetMapping("list") + @ApiImplicitParams({ + @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), + @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true) + }) + @SystemControllerLog(description = "问券调查-列表") + public ResultData list(@ModelAttribute WxQuestionOneself record, Integer pageNum, Integer pageSize) { + logger.debug("[" + getIpAddr() + "] WxQuestionOneselfController::list"); + if (null == record) { + record = new WxQuestionOneself(); + } + if (record.getStatus() != null && record.getStatus() == -1) { + record.setStatus(null); + } + record.updateTenantInfo(getTenantInfo()); + record.setSortColumns(BaseEntity.SortField.CreateDate_DESC,BaseEntity.SortField.Sort_DESC); + final PageInfo page = wxQuestionOneselfService.listAsPage(record, pageNum, pageSize); + return new ResultData(page); + } + + @ApiOperation("新增接口") + @PostMapping("add") + @SystemControllerLog(description = "问券调查-新增") + public ResultData add(@RequestBody WxQuestionOneself record) { + logger.debug("[" + getIpAddr() + "] WxQuestionOneselfController::add"); + + record.setStatus(EnumQuestionOneselfStatus.STATUS_THROW_IN.getCode()); + record.updateTenantInfo(getTenantInfo()); + wxQuestionOneselfService.saveOrUpdate(record); + return new ResultData(); + } + + @ApiOperation("根据id更新接口") + @PostMapping("update") + @SystemControllerLog(description = "问券调查--更新") + public ResultData update(@RequestBody WxQuestionOneself record) { + logger.debug("[" + getIpAddr() + "] WxQuestionOneselfController::update"); + + record.setStatus(EnumQuestionOneselfStatus.STATUS_THROW_IN.getCode()); + record.updateTenantInfo(getTenantInfo()); + wxQuestionOneselfService.saveOrUpdate(record); + return new ResultData(); + } + + @ApiOperation("根据id更新接口") + @PostMapping("updateStatus") + @SystemControllerLog(description = "问券调查--更新状态") + public ResultData updateStatus(@RequestBody WxQuestionOneself record) { + logger.debug("[" + getIpAddr() + "] WxQuestionOneselfController::updateStatus"); + if(record == null || record.getStatus() == null || record.getId() == null){ + return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); + } + if(!record.getStatus().equals(EnumQuestionOneselfStatus.STATUS_TAKE_OFFF.getCode()) + || !record.getStatus().equals(EnumQuestionOneselfStatus.INJECT_ONLINE.getCode())) { + return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); + } + return wxQuestionOneselfService.updateStatus(record); + } + + @ApiOperation("根据id查询接口") + @GetMapping("/findById") + @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) + @SystemControllerLog(description = "问券调查--查询") + public ResultData findById(Long id) { + logger.debug("[" + getIpAddr() + "] WxQuestionOneselfController::findById"); + return new ResultData(wxQuestionOneselfService.getById(id)); + } + + @ApiOperation("投放到宣传页") + @GetMapping("/sendToCampaign") + @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) + @SystemControllerLog(description = "问券调查--投放到宣传页") + public ResultData sendToCampaign(Long id) { + logger.debug("[" + getIpAddr() + "] WxQuestionOneselfController::sendToCampaign"); + return wxQuestionOneselfService.sendToCampaign(id); + } + + @ApiOperation("从宣传页下线") + @PostMapping("offLineCampaign") + @SystemControllerLog(description = "问券调查--从宣传页下线") + public ResultData offLineCampaign(@RequestBody WxQuestionOneself record) { + logger.debug("[" + getIpAddr() + "] WxQuestionOneselfController::offLineCampaign"); + return wxQuestionOneselfService.offLineCampaign(record); + } + +} diff --git a/mallinkAdmin/src/main/resources/db/migration/V202103250001__for_wx_question_oneself.sql b/mallinkAdmin/src/main/resources/db/migration/V202103250001__for_wx_question_oneself.sql new file mode 100644 index 000000000..3aaff6d25 --- /dev/null +++ b/mallinkAdmin/src/main/resources/db/migration/V202103250001__for_wx_question_oneself.sql @@ -0,0 +1,154 @@ +--加问卷投诉菜单 +update mall_permission set resource_type = 0,url = null where id = 607; +INSERT INTO `mall_permission`(`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) VALUES (60701, '基础问卷', 607, 'Y', NULL, 1, NULL, NULL, 'questionsettinglist', null, 0, 60701); +INSERT INTO `mall_permission`(`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) VALUES (60702, '自建问卷', 607, 'Y', NULL, 1, NULL, NULL, 'questiononeselflist', null, 0, 60702); +INSERT INTO `mall_permission`(`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) VALUES (613, '投诉建议', 6, 'Y', NULL, 1, NULL, NULL, 'opinionlist', 'icon-tousu', 0, 613); + + +--销售类型加权限 +update mall_sale_type set menus = '[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 50, 101, 102, 103, 104, 105, 106, 107, 108, 201, 202, 203, 204, 205, 206, 209, 211, 212, 221, 222, 251, 299, 300, 301, 302, 303, 304, 305, 306, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 501, 502, 503, 504, 505, 506, 507, 508, 509, 511, 512, 513, 514, 521, 522, 523, 531, 532, 533, 591, 592, 595, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 651, 661, 662, 663, 664, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 686, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 712, 713, 901, 902, 903, 904, 905, 931, 932, 951, 952, 961, 962, 963, 965, 966, 967, 968, 1001, 1002, 1003, 1004, 60701, 60702]' where id=1; +update mall_sale_type set menus = '[1, 2, 4, 5, 6, 7, 8, 9, 10, 50, 101, 102, 103, 104, 105, 106, 107, 201, 202, 203, 204, 205, 209, 211, 212, 221, 222, 251, 409, 410, 411, 416, 418, 501, 502, 503, 504, 505, 506, 507, 508, 509, 511, 512, 513, 514, 521, 522, 523, 531, 532, 533, 591, 592, 595, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 651, 661, 662, 663, 664, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 686, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 712, 713, 901, 902, 903, 904, 905, 931, 932, 951, 961, 60701, 60702]' where id=2; +update mall_sale_type set menus = '[2, 4, 5, 6, 7, 10, 50, 201, 202, 205, 211, 212, 221, 222, 251, 409, 410, 411, 416, 418, 501, 502, 503, 504, 505, 506, 507, 508, 511, 512, 513, 514, 521, 522, 523, 531, 532, 533, 591, 592, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 621, 622, 623, 624, 625, 626, 641, 642, 643, 644, 645, 646, 651, 661, 662, 663, 664, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 686, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 712, 713, 901, 902, 903, 904, 905, 931, 932, 60701, 60702]' where id=3; +update mall_sale_type set menus = '[2, 4, 5, 6, 7, 10, 50, 201, 202, 205, 211, 212, 221, 222, 251, 409, 410, 411, 416, 418, 501, 502, 503, 504, 505, 506, 507, 508, 511, 512, 513, 514, 521, 522, 523, 531, 532, 591, 601, 602, 604, 605, 606, 607, 608, 610, 611, 612, 613, 622, 623, 624, 625, 626, 641, 642, 643, 644, 661, 662, 663, 664, 671, 672, 674, 675, 681, 682, 684, 685, 686, 691, 692, 693, 694, 695, 711, 901, 902, 904, 905, 931, 932, 60701, 60702]' where id=4; + +--所有广场管理员角色加权限 +INSERT INTO `mall_role_permission`(`id`, `tenant_id`, `parent_tenant_id`, `permission_id`, `role_id`) + select CEILING(RAND()*90000000000+10000000000) ,mui.tenant_id,mui.parent_tenant_id, 613,mur.role_id +from mall_user_info mui +left join mall_user_role mur on mui.id = mur.uid +where mui.is_admin = 1 and mur.role_id is not null GROUP BY mur.role_id; + +INSERT INTO `mall_role_permission`(`id`, `tenant_id`, `parent_tenant_id`, `permission_id`, `role_id`) + select CEILING(RAND()*90000000000+10000000000) ,mui.tenant_id,mui.parent_tenant_id, 60701,mur.role_id +from mall_user_info mui +left join mall_user_role mur on mui.id = mur.uid +where mui.is_admin = 1 and mur.role_id is not null GROUP BY mur.role_id; + +INSERT INTO `mall_role_permission`(`id`, `tenant_id`, `parent_tenant_id`, `permission_id`, `role_id`) + select CEILING(RAND()*90000000000+10000000000) ,mui.tenant_id,mui.parent_tenant_id, 60702,mur.role_id +from mall_user_info mui +left join mall_user_role mur on mui.id = mur.uid +where mui.is_admin = 1 and mur.role_id is not null GROUP BY mur.role_id; + + + + + + +/* + Navicat Premium Data Transfer + + Source Server : 101.200.130.134 + Source Server Type : MySQL + Source Server Version : 50728 + Source Host : 101.200.130.134:3306 + Source Schema : mallink + + Target Server Type : MySQL + Target Server Version : 50728 + File Encoding : 65001 + + Date: 26/03/2021 15:21:46 +*/ + +-- ---------------------------- +-- Table structure for wx_question_oneself +-- ---------------------------- +CREATE TABLE `wx_question_oneself` ( + `id` bigint(20) NOT NULL COMMENT '主键ID', + `tenant_id` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '租户ID', + `parent_tenant_id` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '父租户ID', + `logo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'logo', + `top_pic` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '头图', + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '名称', + `top_desc` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '问卷头部描述', + `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '状态(0:保存1:上线2:下线)', + `start_date` datetime(0) DEFAULT NULL COMMENT '问卷开始时间', + `end_date` datetime(0) DEFAULT NULL COMMENT '问卷结束时间', + `reward_credit` int(11) NOT NULL DEFAULT 0 COMMENT '奖励积分', + `create_date` datetime(0) NOT NULL COMMENT '创建时间', + `update_date` datetime(0) NOT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间', + `sort` int(11) NOT NULL DEFAULT 1 COMMENT '排序', + `del_status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '删除标记(0:已删除1:未删除)', + `qr_code` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '二维码', + `count_topic` int(11) NOT NULL DEFAULT 0 COMMENT '题目数量', + `count_user` int(11) NOT NULL DEFAULT 0 COMMENT '参与人数', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for wx_question_oneself_log +-- ---------------------------- +CREATE TABLE `wx_question_oneself_log` ( + `id` bigint(20) NOT NULL COMMENT '主键ID', + `tenant_id` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '租户ID', + `parent_tenant_id` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '父租户ID', + `wqou_id` bigint(20) DEFAULT NULL COMMENT 'wx_question_oneself_user_id', + `topic_id` bigint(20) NOT NULL COMMENT '问题id', + `topic_title` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '问题', + `answer` json COMMENT '答案id(目前为答案对应的标签id)', + `answer_str` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '答案', + `create_date` datetime(0) NOT NULL, + `update_date` datetime(0) NOT NULL ON UPDATE CURRENT_TIMESTAMP(0), + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for wx_question_oneself_topic +-- ---------------------------- +CREATE TABLE `wx_question_oneself_topic` ( + `id` bigint(20) NOT NULL COMMENT '主键ID', + `tenant_id` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '租户ID', + `parent_tenant_id` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '父租户ID', + `question_id` bigint(20) NOT NULL COMMENT '问卷Id', + `title` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '题目标题', + `answer` json NOT NULL, + `type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '类型(1:单选,2:多选)', + `del_status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '删除标记(0:已删除1:未删除)', + `sort` int(11) NOT NULL COMMENT '排序', + `create_date` datetime(0) NOT NULL COMMENT '创建时间', + `update_date` datetime(0) NOT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for wx_question_oneself_user +-- ---------------------------- +CREATE TABLE `wx_question_oneself_user` ( + `id` bigint(20) NOT NULL COMMENT '主键ID', + `tenant_id` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '租户ID', + `parent_tenant_id` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '父租户ID', + `user_id` bigint(20) DEFAULT NULL COMMENT '会员用户id', + `user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `user_sex` tinyint(1) DEFAULT 0 COMMENT '性别:0:保密 1.男 2女', + `user_phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `question_id` bigint(20) NOT NULL COMMENT '问卷Id', + `create_date` datetime(0) NOT NULL, + `update_date` datetime(0) NOT NULL ON UPDATE CURRENT_TIMESTAMP(0), + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; + + +-- ---------------------------- +-- Table structure for wx_opinion +-- ---------------------------- +CREATE TABLE `wx_opinion` ( + `id` bigint(20) NOT NULL COMMENT '主键', + `tenant_id` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '租户ID', + `parent_tenant_id` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '父租户ID', + `user_id` bigint(20) DEFAULT NULL COMMENT '会员用户id', + `liaison_man` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '联系人', + `liaison_sex` tinyint(1) DEFAULT 0 COMMENT '性别:0:保密 1.男 2女', + `liaison_phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '联系电话', + `liaison_email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '联系邮箱', + `pictures` json COMMENT '图片数组', + `explains` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '说明', + `remark` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '备注', + `handle_status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '处理状态1:未处理,2已处理', + `handle_id` bigint(20) DEFAULT NULL, + `create_date` datetime(0) NOT NULL COMMENT '创建时间', + `update_date` datetime(0) NOT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间', + `del_status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '删除标记0:删除1:未删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; + diff --git a/mallinkCApi/src/main/java/com/iformall/controller/WxOpinionController.java b/mallinkCApi/src/main/java/com/iformall/controller/WxOpinionController.java new file mode 100644 index 000000000..c73e859bf --- /dev/null +++ b/mallinkCApi/src/main/java/com/iformall/controller/WxOpinionController.java @@ -0,0 +1,48 @@ +package com.iformall.controller; + +import com.github.pagehelper.PageInfo; +import com.iformall.common.ResultData; +import com.iformall.domain.po.WxOpinion; +import com.iformall.domain.po.base.BaseEntity; +import com.iformall.service.WxOpinionService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + + +@RestController +@RequestMapping("wxOpinion") +@Api(description="投诉建议") +public class WxOpinionController extends BaseController { + + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + + @Autowired + private WxOpinionService wxOpinionService; + + @ApiOperation("分页列表接口") + @GetMapping("list") + @ApiImplicitParams({ + @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), + @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true) + }) + public ResultData list(@ModelAttribute WxOpinion record, Integer pageNum, Integer pageSize) { + logger.debug("[" + getIpAddr() + "] WxOpinionController::list"); + if (null == record) { + record = new WxOpinion(); + } + record.updateTenantInfo(getTenantInfo()); + record.setSortColumns(BaseEntity.SortField.CreateDate_DESC); + final PageInfo page = wxOpinionService.listAsPage(record, pageNum, pageSize); + return new ResultData(page); + } + +} diff --git a/mallinkCApi/src/main/java/com/iformall/controller/WxQuestionOneselfController.java b/mallinkCApi/src/main/java/com/iformall/controller/WxQuestionOneselfController.java new file mode 100644 index 000000000..37c48fb7d --- /dev/null +++ b/mallinkCApi/src/main/java/com/iformall/controller/WxQuestionOneselfController.java @@ -0,0 +1,52 @@ +package com.iformall.controller; + +import com.github.pagehelper.PageInfo; +import com.iformall.common.ResultData; +import com.iformall.domain.po.WxQuestionOneself; +import com.iformall.domain.po.base.BaseEntity; +import com.iformall.enums.EnumQuestionOneselfStatus; +import com.iformall.service.WxQuestionOneselfService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + + +@RestController +@RequestMapping("wxQuestionOneself") +@Api(description="问券调查") +public class WxQuestionOneselfController extends BaseController { + + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + + @Autowired + private WxQuestionOneselfService wxQuestionOneselfService; + + @ApiOperation("分页列表接口") + @GetMapping("list") + @ApiImplicitParams({ + @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), + @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true) + }) + public ResultData list(@ModelAttribute WxQuestionOneself record, Integer pageNum, Integer pageSize) { + logger.debug("[" + getIpAddr() + "] WxQuestionOneselfController::list"); + if (null == record) { + record = new WxQuestionOneself(); + } + + record.setStatus(EnumQuestionOneselfStatus.INJECT_ONLINES.getCode()); + + record.updateTenantInfo(getTenantInfo()); + record.setSortColumns(BaseEntity.SortField.CreateDate_DESC,BaseEntity.SortField.Sort_DESC); + final PageInfo page = wxQuestionOneselfService.listAsPage(record, pageNum, pageSize); + return new ResultData(page); + } + +} diff --git a/mallinkService/src/main/java/com/iformall/common/ErrorCode.java b/mallinkService/src/main/java/com/iformall/common/ErrorCode.java index 44409512e..2ffe454e5 100644 --- a/mallinkService/src/main/java/com/iformall/common/ErrorCode.java +++ b/mallinkService/src/main/java/com/iformall/common/ErrorCode.java @@ -586,6 +586,15 @@ public enum ErrorCode{ FLOATING_LAYER_FOUND(60001, "首页广告已存在,请先下线再重新投放"), + /** + * 问券调查 + */ + QUESTION_NOT_FOUND(61001, "问卷未找到"), + QUESTION_NOT_LINE(61002, "投放到宣传页失败,问卷未上线!"), + QUESTION_SENDUP_ERROR(61003, "投放到宣传页失败,宣传页显示已达七条上限!"), + QUESTION_NOT_INTO(61004, "取消投放失败,不是投放状态"), + + ; private int code; diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxOpinion.java b/mallinkService/src/main/java/com/iformall/domain/po/WxOpinion.java new file mode 100644 index 000000000..dd37a1373 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxOpinion.java @@ -0,0 +1,63 @@ +package com.iformall.domain.po; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.iformall.domain.po.base.TenantEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +@TableName(value = "wx_opinion") +@Data +@EqualsAndHashCode(callSuper = true) +public class WxOpinion extends TenantEntity { + + protected Long id; + + @TableField(exist = false) + private Date startDate; + + @TableField(exist = false) + private Date endDate; + + @io.swagger.annotations.ApiModelProperty(value="userId",name="userId") + private Long userId; + + @io.swagger.annotations.ApiModelProperty(value="",name="liaisonMan") + private String liaisonMan; + + @io.swagger.annotations.ApiModelProperty(value = "性别:0:保密 1.男 2女", name = "liaisonSex") + private Integer liaisonSex; + + @io.swagger.annotations.ApiModelProperty(value="",name="liaisonPhone") + private String liaisonPhone; + + @io.swagger.annotations.ApiModelProperty(value="",name="liaisonEmail") + private String liaisonEmail; + + @io.swagger.annotations.ApiModelProperty(value="图片数组",name="pictures") + private String pictures; + + @io.swagger.annotations.ApiModelProperty(value="说明",name="explains") + private String explains; + + @io.swagger.annotations.ApiModelProperty(value="备注",name="remark") + private String remark; + + + @io.swagger.annotations.ApiModelProperty(value = "处理状态1:未处理,2已处理", name = "handleStatus") + private Integer handleStatus; + + @io.swagger.annotations.ApiModelProperty(value="",name="handleId") + private Long handleId; + + + @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") + private Date createDate; + @io.swagger.annotations.ApiModelProperty(value="修改时间",name="updateDate") + private Date updateDate; + + + +} diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxQuestionOneself.java b/mallinkService/src/main/java/com/iformall/domain/po/WxQuestionOneself.java new file mode 100644 index 000000000..7ef059796 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxQuestionOneself.java @@ -0,0 +1,89 @@ +package com.iformall.domain.po; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.iformall.domain.po.base.TenantEntity; +import com.iformall.utils.Constant; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +@TableName(value = "wx_question_oneself") +@Data +@EqualsAndHashCode(callSuper = true) +public class WxQuestionOneself extends TenantEntity { + + protected Long id; + + @io.swagger.annotations.ApiModelProperty(value="logo",name="logo") + private String logo; + + @io.swagger.annotations.ApiModelProperty(value="头图",name="topPic") + private String topPic; + + @io.swagger.annotations.ApiModelProperty(value="名称",name="title") + private String title; + + @io.swagger.annotations.ApiModelProperty(value="描述",name="topDesc") + private String topDesc; + + @io.swagger.annotations.ApiModelProperty(value = "EnumQuestionOneselfStatus", name = "status") + private Integer status; + + @io.swagger.annotations.ApiModelProperty(value="开始时间",name="startDate") + private Date startDate; + @TableField(exist = false) + private Date startStartdate; + @TableField(exist = false) + private Date startEnddate; + @io.swagger.annotations.ApiModelProperty(value="结束时间",name="endDate") + private Date endDate; + @TableField(exist = false) + private Date endStartdate; + @TableField(exist = false) + private Date endEnddate; + + @io.swagger.annotations.ApiModelProperty(value = "奖励积分", name = "rewardCredit") + private Integer rewardCredit; + + @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") + private Date createDate; + @TableField(exist = false) + private Date createStartdate; + @TableField(exist = false) + private Date createEnddate; + + @io.swagger.annotations.ApiModelProperty(value="修改时间",name="updateDate") + private Date updateDate; + + @io.swagger.annotations.ApiModelProperty(value = "排序", name = "sort") + private Integer sort; + + @io.swagger.annotations.ApiModelProperty(value="二维码",name="qrCode") + private String qrCode; + + + @io.swagger.annotations.ApiModelProperty(value="题目数",name="countTopic") + private Integer countTopic; + @io.swagger.annotations.ApiModelProperty(value="题目总分数",name="countUser") + private Integer countUser; + + + @TableField(exist = false) + @io.swagger.annotations.ApiModelProperty(value = "小程序路径", name = "weappPath") + protected String weappPath; + + @TableField(exist = false) + @io.swagger.annotations.ApiModelProperty(value = "二维码", name = "weappSceneForJoin") + protected String weappSceneForJoin; + + public String getWeappPath() { + return Constant.mainPageUrl + "?type=wj&id=" + id; + } + + public String getWeappSceneForJoin() { + return "t:wj:" + id; + } + +} diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxQuestionOneselfLog.java b/mallinkService/src/main/java/com/iformall/domain/po/WxQuestionOneselfLog.java new file mode 100644 index 000000000..148f9cfce --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxQuestionOneselfLog.java @@ -0,0 +1,46 @@ +package com.iformall.domain.po; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.iformall.domain.po.base.TenantEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +@TableName(value = "wx_question_oneself_log") +@Data +@EqualsAndHashCode(callSuper = true) +public class WxQuestionOneselfLog extends TenantEntity { + + protected Long id; + + @TableField(exist = false) + private Date startDate; + + @TableField(exist = false) + private Date endDate; + + @io.swagger.annotations.ApiModelProperty(value="wx_question_oneself_user_id",name="wqouId") + private Long wqouId; + + @io.swagger.annotations.ApiModelProperty(value="问题Id",name="topicId") + private Long topicId; + + @io.swagger.annotations.ApiModelProperty(value="答案",name="topicTitle") + private String topicTitle; + + @io.swagger.annotations.ApiModelProperty(value="答案id(目前为答案对应的标签id)",name="answer") + private String answer; + + @io.swagger.annotations.ApiModelProperty(value="答案",name="answerStr") + private String answerStr; + + + @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") + private Date createDate; + @io.swagger.annotations.ApiModelProperty(value="修改时间",name="updateDate") + private Date updateDate; + + +} diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxQuestionOneselfTopic.java b/mallinkService/src/main/java/com/iformall/domain/po/WxQuestionOneselfTopic.java new file mode 100644 index 000000000..95ea2c6e9 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxQuestionOneselfTopic.java @@ -0,0 +1,49 @@ +package com.iformall.domain.po; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.iformall.domain.po.base.TenantEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +@TableName(value = "wx_question_oneself_topic") +@Data +@EqualsAndHashCode(callSuper = true) +public class WxQuestionOneselfTopic extends TenantEntity { + + protected Long id; + + @TableField(exist = false) + private Date startDate; + + @TableField(exist = false) + private Date endDate; + + @io.swagger.annotations.ApiModelProperty(value="问卷Id",name="questionId") + private Long questionId; + + @io.swagger.annotations.ApiModelProperty(value="名称",name="title") + private String title; + + @io.swagger.annotations.ApiModelProperty(value="答案数组",name="answer") + private String answer; + + @io.swagger.annotations.ApiModelProperty(value = "类型(1:单选,2:多选)", name = "type") + private Integer type; + + @io.swagger.annotations.ApiModelProperty(value = "分数", name = "grade") + private Integer grade; + + + @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") + private Date createDate; + @io.swagger.annotations.ApiModelProperty(value="修改时间",name="updateDate") + private Date updateDate; + + @io.swagger.annotations.ApiModelProperty(value = "排序", name = "sort") + private Integer sort; + + +} diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxQuestionOneselfUser.java b/mallinkService/src/main/java/com/iformall/domain/po/WxQuestionOneselfUser.java new file mode 100644 index 000000000..faeb49c4d --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxQuestionOneselfUser.java @@ -0,0 +1,46 @@ +package com.iformall.domain.po; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.iformall.domain.po.base.TenantEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +@TableName(value = "wx_question_oneself_user") +@Data +@EqualsAndHashCode(callSuper = true) +public class WxQuestionOneselfUser extends TenantEntity { + + protected Long id; + + @TableField(exist = false) + private Date startDate; + + @TableField(exist = false) + private Date endDate; + + @io.swagger.annotations.ApiModelProperty(value="userId",name="userId") + private Long userId; + + @io.swagger.annotations.ApiModelProperty(value="",name="userName") + private String userName; + + @io.swagger.annotations.ApiModelProperty(value = "性别:0:保密 1.男 2女", name = "userSex") + private Integer userSex; + + @io.swagger.annotations.ApiModelProperty(value="",name="userPhone") + private String userPhone; + + @io.swagger.annotations.ApiModelProperty(value="问卷Id",name="questionId") + private Long questionId; + + + @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") + private Date createDate; + @io.swagger.annotations.ApiModelProperty(value="修改时间",name="updateDate") + private Date updateDate; + + +} diff --git a/mallinkService/src/main/java/com/iformall/domain/vo/WxCouponOrderBVo.java b/mallinkService/src/main/java/com/iformall/domain/vo/WxCouponOrderBVo.java index b8535ebd9..02878354f 100644 --- a/mallinkService/src/main/java/com/iformall/domain/vo/WxCouponOrderBVo.java +++ b/mallinkService/src/main/java/com/iformall/domain/vo/WxCouponOrderBVo.java @@ -180,7 +180,7 @@ public class WxCouponOrderBVo extends WxCouponOrder { @TableField(exist = false) private Long couponId; - @Excel(name = "券类型", width = 50, orderNum = "15", replace = {"满减券_1", "代金券_2", "团购券_3", "礼品券_4", "停车券_5", "通用券_6", "砍价券_8", "团购券_9", "积分券_50", "积分停车券_51", "消费卡_100"}) + @Excel(name = "券类型", width = 50, orderNum = "15", replace = {"满减券_1", "代金券_2", "团购券_3", "礼品券_4", "停车券_5", "通用券_6", "砍价券_8", "团购券_9", "预购商品_10", "积分券_50", "积分停车券_51", "消费卡_100"}) @TableField(exist = false) private Integer couponType; diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumCampaignProductType.java b/mallinkService/src/main/java/com/iformall/enums/EnumCampaignProductType.java index 82b3e34cd..b87325032 100644 --- a/mallinkService/src/main/java/com/iformall/enums/EnumCampaignProductType.java +++ b/mallinkService/src/main/java/com/iformall/enums/EnumCampaignProductType.java @@ -6,7 +6,8 @@ package com.iformall.enums; public enum EnumCampaignProductType { COUPON(1, "券"), - ACTIVITY_JOIN(2, "活动报名"),; + ACTIVITY_JOIN(2, "活动报名"), + QUESTION_ONESEL(3, "问卷调查"),; public static EnumCampaignProductType getEnum(Integer code) { for (EnumCampaignProductType value : values()) { diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumQuestionOneselfStatus.java b/mallinkService/src/main/java/com/iformall/enums/EnumQuestionOneselfStatus.java new file mode 100644 index 000000000..3c36e8a42 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/enums/EnumQuestionOneselfStatus.java @@ -0,0 +1,39 @@ +package com.iformall.enums; + + +/** + * @author gongbiao + */ +public enum EnumQuestionOneselfStatus { + + STATUS_THROW_IN(0, "已保存"), + STATUS_TAKE_OFFF(1, "已下线"), + INJECT_CAMPAIGN(2, "已投放"), + INJECT_ONLINE(3, "已上线"), + INJECT_ONLINES(4, "上过线"),;//查询状态 + + public static EnumQuestionOneselfStatus getEnum(Integer code) { + for (EnumQuestionOneselfStatus value : values()) { + if (value.getCode().equals(code)) { + return value; + } + } + return null; + } + + private Integer code; + private String message; + + EnumQuestionOneselfStatus(Integer code, String message) { + this.code = code; + this.message = message; + } + + public Integer getCode() { + return code; + } + + public String getMessage() { + return message; + } +} diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxOpinionMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxOpinionMapper.java new file mode 100644 index 000000000..3499766c7 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/mapper/WxOpinionMapper.java @@ -0,0 +1,12 @@ +package com.iformall.mapper; + +import com.iformall.common.CommonMapper; +import com.iformall.domain.po.WxOpinion; + +import java.util.List; + +public interface WxOpinionMapper extends CommonMapper { + + List findList(WxOpinion record); + +} diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxQuestionOneselfLogMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxQuestionOneselfLogMapper.java new file mode 100644 index 000000000..e1a8c3336 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/mapper/WxQuestionOneselfLogMapper.java @@ -0,0 +1,12 @@ +package com.iformall.mapper; + +import com.iformall.common.CommonMapper; +import com.iformall.domain.po.WxQuestionOneselfLog; + +import java.util.List; + +public interface WxQuestionOneselfLogMapper extends CommonMapper { + + List findList(WxQuestionOneselfLog record); + +} diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxQuestionOneselfMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxQuestionOneselfMapper.java new file mode 100644 index 000000000..a679450e0 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/mapper/WxQuestionOneselfMapper.java @@ -0,0 +1,12 @@ +package com.iformall.mapper; + +import com.iformall.common.CommonMapper; +import com.iformall.domain.po.WxQuestionOneself; + +import java.util.List; + +public interface WxQuestionOneselfMapper extends CommonMapper { + + List findList(WxQuestionOneself record); + +} diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxQuestionOneselfTopicMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxQuestionOneselfTopicMapper.java new file mode 100644 index 000000000..f90ccf812 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/mapper/WxQuestionOneselfTopicMapper.java @@ -0,0 +1,12 @@ +package com.iformall.mapper; + +import com.iformall.common.CommonMapper; +import com.iformall.domain.po.WxQuestionOneselfTopic; + +import java.util.List; + +public interface WxQuestionOneselfTopicMapper extends CommonMapper { + + List findList(WxQuestionOneselfTopic record); + +} diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxQuestionOneselfUserMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxQuestionOneselfUserMapper.java new file mode 100644 index 000000000..3f81249de --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/mapper/WxQuestionOneselfUserMapper.java @@ -0,0 +1,12 @@ +package com.iformall.mapper; + +import com.iformall.common.CommonMapper; +import com.iformall.domain.po.WxQuestionOneselfUser; + +import java.util.List; + +public interface WxQuestionOneselfUserMapper extends CommonMapper { + + List findList(WxQuestionOneselfUser record); + +} diff --git a/mallinkService/src/main/java/com/iformall/service/WxOpinionService.java b/mallinkService/src/main/java/com/iformall/service/WxOpinionService.java new file mode 100644 index 000000000..a2e5c35f5 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/service/WxOpinionService.java @@ -0,0 +1,45 @@ +package com.iformall.service; + +import com.github.pagehelper.PageInfo; +import com.iformall.domain.po.WxOpinion; + +import java.util.List; + +public interface WxOpinionService { + + List findList(WxOpinion record); + + /** + * 根据实体查询分页列表 + * + * @param record + * @param pageIndex + * @param pageSize + * @return + */ + PageInfo listAsPage(WxOpinion record, Integer pageIndex, Integer pageSize); + + /** + * 根据Id获得实体 + * + * @param id + * @return + */ + WxOpinion getById(Long id); + + /** + * 保存或更新实体 + * + * @param record + */ + void saveOrUpdate(WxOpinion record); + + /** + * 根据Id删除实体 + * + * @param id + */ + void deleteById(Long id); + + +} diff --git a/mallinkService/src/main/java/com/iformall/service/WxQuestionOneselfLogService.java b/mallinkService/src/main/java/com/iformall/service/WxQuestionOneselfLogService.java new file mode 100644 index 000000000..4bb3fc324 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/service/WxQuestionOneselfLogService.java @@ -0,0 +1,45 @@ +package com.iformall.service; + +import com.github.pagehelper.PageInfo; +import com.iformall.domain.po.WxQuestionOneselfLog; + +import java.util.List; + +public interface WxQuestionOneselfLogService { + + List findList(WxQuestionOneselfLog record); + + /** + * 根据实体查询分页列表 + * + * @param record + * @param pageIndex + * @param pageSize + * @return + */ + PageInfo listAsPage(WxQuestionOneselfLog record, Integer pageIndex, Integer pageSize); + + /** + * 根据Id获得实体 + * + * @param id + * @return + */ + WxQuestionOneselfLog getById(Long id); + + /** + * 保存或更新实体 + * + * @param record + */ + void saveOrUpdate(WxQuestionOneselfLog record); + + /** + * 根据Id删除实体 + * + * @param id + */ + void deleteById(Long id); + + +} diff --git a/mallinkService/src/main/java/com/iformall/service/WxQuestionOneselfService.java b/mallinkService/src/main/java/com/iformall/service/WxQuestionOneselfService.java new file mode 100644 index 000000000..f1e8d450b --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/service/WxQuestionOneselfService.java @@ -0,0 +1,52 @@ +package com.iformall.service; + +import com.github.pagehelper.PageInfo; +import com.iformall.common.ResultData; +import com.iformall.domain.po.WxActivity; +import com.iformall.domain.po.WxQuestionOneself; + +import java.util.List; + +public interface WxQuestionOneselfService { + + List findList(WxQuestionOneself record); + + /** + * 根据实体查询分页列表 + * + * @param record + * @param pageIndex + * @param pageSize + * @return + */ + PageInfo listAsPage(WxQuestionOneself record, Integer pageIndex, Integer pageSize); + + /** + * 根据Id获得实体 + * + * @param id + * @return + */ + WxQuestionOneself getById(Long id); + + /** + * 保存或更新实体 + * + * @param record + */ + void saveOrUpdate(WxQuestionOneself record); + + /** + * 根据Id删除实体 + * + * @param id + */ + void deleteById(Long id); + + + ResultData updateStatus(WxQuestionOneself record); + + ResultData sendToCampaign(Long id); + + ResultData offLineCampaign(WxQuestionOneself record); +} diff --git a/mallinkService/src/main/java/com/iformall/service/WxQuestionOneselfTopicService.java b/mallinkService/src/main/java/com/iformall/service/WxQuestionOneselfTopicService.java new file mode 100644 index 000000000..d939fbecb --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/service/WxQuestionOneselfTopicService.java @@ -0,0 +1,45 @@ +package com.iformall.service; + +import com.github.pagehelper.PageInfo; +import com.iformall.domain.po.WxQuestionOneselfTopic; + +import java.util.List; + +public interface WxQuestionOneselfTopicService { + + List findList(WxQuestionOneselfTopic record); + + /** + * 根据实体查询分页列表 + * + * @param record + * @param pageIndex + * @param pageSize + * @return + */ + PageInfo listAsPage(WxQuestionOneselfTopic record, Integer pageIndex, Integer pageSize); + + /** + * 根据Id获得实体 + * + * @param id + * @return + */ + WxQuestionOneselfTopic getById(Long id); + + /** + * 保存或更新实体 + * + * @param record + */ + void saveOrUpdate(WxQuestionOneselfTopic record); + + /** + * 根据Id删除实体 + * + * @param id + */ + void deleteById(Long id); + + +} diff --git a/mallinkService/src/main/java/com/iformall/service/WxQuestionOneselfUserService.java b/mallinkService/src/main/java/com/iformall/service/WxQuestionOneselfUserService.java new file mode 100644 index 000000000..6285808ff --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/service/WxQuestionOneselfUserService.java @@ -0,0 +1,45 @@ +package com.iformall.service; + +import com.github.pagehelper.PageInfo; +import com.iformall.domain.po.WxQuestionOneselfUser; + +import java.util.List; + +public interface WxQuestionOneselfUserService { + + List findList(WxQuestionOneselfUser record); + + /** + * 根据实体查询分页列表 + * + * @param record + * @param pageIndex + * @param pageSize + * @return + */ + PageInfo listAsPage(WxQuestionOneselfUser record, Integer pageIndex, Integer pageSize); + + /** + * 根据Id获得实体 + * + * @param id + * @return + */ + WxQuestionOneselfUser getById(Long id); + + /** + * 保存或更新实体 + * + * @param record + */ + void saveOrUpdate(WxQuestionOneselfUser record); + + /** + * 根据Id删除实体 + * + * @param id + */ + void deleteById(Long id); + + +} diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxOpinionServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxOpinionServiceImpl.java new file mode 100644 index 000000000..a750060bd --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxOpinionServiceImpl.java @@ -0,0 +1,60 @@ +package com.iformall.service.impl; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.iformall.common.IdWorker; +import com.iformall.domain.po.WxOpinion; +import com.iformall.mapper.WxOpinionMapper; +import com.iformall.service.WxOpinionService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +@Service +public class WxOpinionServiceImpl implements WxOpinionService { + + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + + @Autowired + WxOpinionMapper wxOpinionMapper; + + @Override + public List findList(WxOpinion record) { + return wxOpinionMapper.findList(record); + } + + @Override + public PageInfo listAsPage(WxOpinion record, Integer pageIndex, Integer pageSize) { + return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxOpinionMapper.findList(record)); + } + + @Override + public WxOpinion getById(Long id) { + return wxOpinionMapper.selectById(id); + } + + @Override + public void saveOrUpdate(WxOpinion record) { + Date now = new Date(); + if (record.getId() == null) { + final IdWorker idWorker = IdWorker.get(); + record.setId(idWorker.nextId()); + record.setCreateDate(now); + record.setUpdateDate(now); + wxOpinionMapper.insert(record); + } else { + record.setUpdateDate(now); + wxOpinionMapper.updateById(record); + } + } + + @Override + public void deleteById(Long id) { +// wxOpinionMapper.deleteById(id); + } + +} diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxQuestionOneselfLogServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxQuestionOneselfLogServiceImpl.java new file mode 100644 index 000000000..4a40c2b0f --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxQuestionOneselfLogServiceImpl.java @@ -0,0 +1,60 @@ +package com.iformall.service.impl; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.iformall.common.IdWorker; +import com.iformall.domain.po.WxQuestionOneselfLog; +import com.iformall.mapper.WxQuestionOneselfLogMapper; +import com.iformall.service.WxQuestionOneselfLogService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +@Service +public class WxQuestionOneselfLogServiceImpl implements WxQuestionOneselfLogService { + + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + + @Autowired + WxQuestionOneselfLogMapper wxQuestionOneselfLogMapper; + + @Override + public List findList(WxQuestionOneselfLog record) { + return wxQuestionOneselfLogMapper.findList(record); + } + + @Override + public PageInfo listAsPage(WxQuestionOneselfLog record, Integer pageIndex, Integer pageSize) { + return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxQuestionOneselfLogMapper.findList(record)); + } + + @Override + public WxQuestionOneselfLog getById(Long id) { + return wxQuestionOneselfLogMapper.selectById(id); + } + + @Override + public void saveOrUpdate(WxQuestionOneselfLog record) { + Date now = new Date(); + if (record.getId() == null) { + final IdWorker idWorker = IdWorker.get(); + record.setId(idWorker.nextId()); + record.setCreateDate(now); + record.setUpdateDate(now); + wxQuestionOneselfLogMapper.insert(record); + } else { + record.setUpdateDate(now); + wxQuestionOneselfLogMapper.updateById(record); + } + } + + @Override + public void deleteById(Long id) { +// wxQuestionOneselfLogMapper.deleteById(id); + } + +} diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxQuestionOneselfServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxQuestionOneselfServiceImpl.java new file mode 100644 index 000000000..6aaa733b7 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxQuestionOneselfServiceImpl.java @@ -0,0 +1,170 @@ +package com.iformall.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.iformall.common.ErrorCode; +import com.iformall.common.IdWorker; +import com.iformall.common.Result; +import com.iformall.common.ResultData; +import com.iformall.domain.po.WxActivity; +import com.iformall.domain.po.WxCampaign; +import com.iformall.domain.po.WxQuestionOneself; +import com.iformall.enums.*; +import com.iformall.exception.MallinkException; +import com.iformall.mapper.WxCampaignMapper; +import com.iformall.mapper.WxQuestionOneselfMapper; +import com.iformall.service.WxCampaignService; +import com.iformall.service.WxQuestionOneselfService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Date; +import java.util.List; + +@Service +public class WxQuestionOneselfServiceImpl implements WxQuestionOneselfService { + + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + + @Autowired + WxQuestionOneselfMapper wxQuestionOneselfMapper; + + @Autowired + WxCampaignMapper wxCampaignMapper; + + @Autowired + WxCampaignService wxCampaignService; + + @Override + public List findList(WxQuestionOneself record) { + return wxQuestionOneselfMapper.findList(record); + } + + @Override + public PageInfo listAsPage(WxQuestionOneself record, Integer pageIndex, Integer pageSize) { + return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxQuestionOneselfMapper.findList(record)); + } + + @Override + public WxQuestionOneself getById(Long id) { + return wxQuestionOneselfMapper.selectById(id); + } + + @Override + public void saveOrUpdate(WxQuestionOneself record) { + Date now = new Date(); + if (record.getId() == null) { + final IdWorker idWorker = IdWorker.get(); + record.setId(idWorker.nextId()); + record.setCreateDate(now); + record.setUpdateDate(now); + wxQuestionOneselfMapper.insert(record); + } else { + record.setUpdateDate(now); + wxQuestionOneselfMapper.updateById(record); + } + } + + @Override + public void deleteById(Long id) { +// wxQuestionOneselfMapper.deleteById(id); + } + + @Transactional(propagation = Propagation.REQUIRED, rollbackFor = {Exception.class}) + @Override + public ResultData updateStatus(WxQuestionOneself record) { + WxQuestionOneself byId = this.getById(record.getId()); + if (byId == null) { + return new ResultData(ErrorCode.QUESTION_NOT_FOUND); + } + this.saveOrUpdate(record); + if(record.getStatus().equals(EnumQuestionOneselfStatus.STATUS_TAKE_OFFF.getCode())){ + WxCampaign campaign = new WxCampaign(); + campaign.updateTenantInfo(byId); + campaign.setProduceId(record.getId()); + WxCampaign wxCampaign = wxCampaignMapper.selectOne(new QueryWrapper(campaign)); + if(wxCampaign != null){ + wxCampaign.setStatus(EnumCampaignStatus.STATUS_TAKE_OFFF.getCode()); + wxCampaignMapper.updateById(wxCampaign); + } + } + return new ResultData(); + } + + @Transactional(propagation = Propagation.REQUIRED, rollbackFor = {Exception.class}) + @Override + public ResultData sendToCampaign(Long id) { + WxQuestionOneself byId = this.getById(id); + if (byId == null) { + return new ResultData(ErrorCode.QUESTION_NOT_FOUND); + } + //只有上线才能投放 + if(!byId.getStatus().equals(EnumQuestionOneselfStatus.INJECT_ONLINE.getCode())){ + return new ResultData(ErrorCode.QUESTION_NOT_LINE); + } + + WxCampaign campaignQuery = new WxCampaign(); + campaignQuery.updateTenantInfo(byId); + campaignQuery.setStatus(EnumCampaignStatus.STATUS_THROW_IN.getCode()); + int count = wxCampaignMapper.selectCount(new QueryWrapper(campaignQuery)); + if (count >= 7) { + return new ResultData(ErrorCode.QUESTION_SENDUP_ERROR); + } + + WxQuestionOneself record = new WxQuestionOneself(); + record.setId(id); + record.setStatus(EnumQuestionOneselfStatus.INJECT_CAMPAIGN.getCode()); + this.saveOrUpdate(record); + + campaignQuery = new WxCampaign(); + campaignQuery.updateTenantInfo(byId); + campaignQuery.setProduceId(id); + WxCampaign campaign = wxCampaignMapper.selectOne(new QueryWrapper(campaignQuery)); + if (campaign == null) { + campaign = new WxCampaign(); + } + campaign.updateTenantInfo(byId); + campaign.setProduceId(byId.getId()); + campaign.setProduceType(EnumCampaignProductType.QUESTION_ONESEL.getCode()); + campaign.setTitle(byId.getTitle()); + campaign.setCoverImg(byId.getTopPic()); + campaign.setDetail(byId.getTopDesc()); + campaign.setValidStartDate(byId.getStartDate()); + campaign.setValidEndDate(byId.getEndDate()); + campaign.setType(EnumCampaignType.PAGEPATH.getCode()); + + campaign.setPagePath(byId.getWeappPath()); + campaign.setPageScene(byId.getWeappSceneForJoin()); + return wxCampaignService.addForPath(campaign); + } + + @Override + public ResultData offLineCampaign(WxQuestionOneself record) { + WxQuestionOneself byId = this.getById(record.getId()); + if (byId == null) { + return new ResultData(ErrorCode.QUESTION_NOT_FOUND); + } + if(!record.getStatus().equals(EnumQuestionOneselfStatus.INJECT_CAMPAIGN.getCode())) { + return new ResultData(ErrorCode.QUESTION_NOT_INTO); + } + + record.setStatus(EnumQuestionOneselfStatus.INJECT_ONLINE.getCode()); + this.saveOrUpdate(record); + + WxCampaign campaign = new WxCampaign(); + campaign.updateTenantInfo(byId); + campaign.setProduceId(record.getId()); + WxCampaign wxCampaign = wxCampaignMapper.selectOne(new QueryWrapper(campaign)); + wxCampaign.setStatus(EnumCampaignStatus.STATUS_TAKE_OFFF.getCode()); + wxCampaignMapper.updateById(wxCampaign); + return new ResultData(); + } + + + +} diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxQuestionOneselfTopicServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxQuestionOneselfTopicServiceImpl.java new file mode 100644 index 000000000..65e06adff --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxQuestionOneselfTopicServiceImpl.java @@ -0,0 +1,60 @@ +package com.iformall.service.impl; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.iformall.common.IdWorker; +import com.iformall.domain.po.WxQuestionOneselfTopic; +import com.iformall.mapper.WxQuestionOneselfTopicMapper; +import com.iformall.service.WxQuestionOneselfTopicService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +@Service +public class WxQuestionOneselfTopicServiceImpl implements WxQuestionOneselfTopicService { + + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + + @Autowired + WxQuestionOneselfTopicMapper wxQuestionOneselfTopicMapper; + + @Override + public List findList(WxQuestionOneselfTopic record) { + return wxQuestionOneselfTopicMapper.findList(record); + } + + @Override + public PageInfo listAsPage(WxQuestionOneselfTopic record, Integer pageIndex, Integer pageSize) { + return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxQuestionOneselfTopicMapper.findList(record)); + } + + @Override + public WxQuestionOneselfTopic getById(Long id) { + return wxQuestionOneselfTopicMapper.selectById(id); + } + + @Override + public void saveOrUpdate(WxQuestionOneselfTopic record) { + Date now = new Date(); + if (record.getId() == null) { + final IdWorker idWorker = IdWorker.get(); + record.setId(idWorker.nextId()); + record.setCreateDate(now); + record.setUpdateDate(now); + wxQuestionOneselfTopicMapper.insert(record); + } else { + record.setUpdateDate(now); + wxQuestionOneselfTopicMapper.updateById(record); + } + } + + @Override + public void deleteById(Long id) { +// wxQuestionOneselfTopicMapper.deleteById(id); + } + +} diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxQuestionOneselfUserServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxQuestionOneselfUserServiceImpl.java new file mode 100644 index 000000000..72bd73d1a --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxQuestionOneselfUserServiceImpl.java @@ -0,0 +1,60 @@ +package com.iformall.service.impl; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.iformall.common.IdWorker; +import com.iformall.domain.po.WxQuestionOneselfUser; +import com.iformall.mapper.WxQuestionOneselfUserMapper; +import com.iformall.service.WxQuestionOneselfUserService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +@Service +public class WxQuestionOneselfUserServiceImpl implements WxQuestionOneselfUserService { + + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + + @Autowired + WxQuestionOneselfUserMapper wxQuestionOneselfUserMapper; + + @Override + public List findList(WxQuestionOneselfUser record) { + return wxQuestionOneselfUserMapper.findList(record); + } + + @Override + public PageInfo listAsPage(WxQuestionOneselfUser record, Integer pageIndex, Integer pageSize) { + return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxQuestionOneselfUserMapper.findList(record)); + } + + @Override + public WxQuestionOneselfUser getById(Long id) { + return wxQuestionOneselfUserMapper.selectById(id); + } + + @Override + public void saveOrUpdate(WxQuestionOneselfUser record) { + Date now = new Date(); + if (record.getId() == null) { + final IdWorker idWorker = IdWorker.get(); + record.setId(idWorker.nextId()); + record.setCreateDate(now); + record.setUpdateDate(now); + wxQuestionOneselfUserMapper.insert(record); + } else { + record.setUpdateDate(now); + wxQuestionOneselfUserMapper.updateById(record); + } + } + + @Override + public void deleteById(Long id) { +// wxQuestionOneselfUserMapper.deleteById(id); + } + +} diff --git a/mallinkService/src/main/java/com/iformall/sms/wiwide/WiwideUtil.java b/mallinkService/src/main/java/com/iformall/sms/wiwide/WiwideUtil.java index b472f553e..873b51b73 100644 --- a/mallinkService/src/main/java/com/iformall/sms/wiwide/WiwideUtil.java +++ b/mallinkService/src/main/java/com/iformall/sms/wiwide/WiwideUtil.java @@ -227,9 +227,9 @@ public class WiwideUtil implements SMSExcutor { public static void main(String[] args) { Map params = new HashMap<>(2); - params.put("username", "api-test1"); - params.put("password", "Wwd789"); - String res = HttpUtil.doPost("http://140.143.33.245/api/user/auth", params); + params.put("username", "lianhua"); + params.put("password", "widash1234"); + String res = HttpUtil.doPost("https://vap.vision.wiwide.com/api/user/auth", params); System.out.println(res); JSONObject result = JSONObject.parseObject(res); if (result.getInteger("result") == 0) { @@ -243,8 +243,8 @@ public class WiwideUtil implements SMSExcutor { String sign = WiwideEntry.encrypt(wiWideInfo); - byte[] s = HttpUtil.doWiwidePicGet("http://140.143.33.245" + "/api/reports/pictures/get_picture?type=pic&id=b3b30445674bb49840e64c2f8b0be347", sign); - System.out.println(s); +// byte[] s = HttpUtil.doWiwidePicGet("http://140.143.33.245" + "/api/reports/pictures/get_picture?type=pic&id=b3b30445674bb49840e64c2f8b0be347", sign); +// System.out.println(s); // Map param = new HashMap<>(); // param.put("type","pic"); @@ -255,16 +255,16 @@ public class WiwideUtil implements SMSExcutor { // String s = queryDataNew("http://140.143.33.245" + "/api/reports/pictures/get_picture", sign, param); // System.out.println(DataUtil.unicodeToUtf8(s)); -// Map param = new HashMap<>(); + Map param = new HashMap<>(); // param.put("pageStart",1); // param.put("pageSize",10); // param.put("key",0); // param.put("value",""); // param.put("placeStatus",0); -// -// -// String s = queryDataNew("http://140.143.33.245" + "/api/place/place", sign, param); -// System.out.println(DataUtil.unicodeToUtf8(s)); + + + String s = queryDataNew("https://vap.vision.wiwide.com" + "/api/place/place_list", sign, param); + System.out.println(DataUtil.unicodeToUtf8(s)); } } diff --git a/mallinkService/src/main/resources/mapper/WxOpinionMapper.xml b/mallinkService/src/main/resources/mapper/WxOpinionMapper.xml new file mode 100644 index 000000000..206b8e240 --- /dev/null +++ b/mallinkService/src/main/resources/mapper/WxOpinionMapper.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + `id`,`tenant_id`,`parent_tenant_id`, `user_id`, `liaison_man`, `liaison_sex`, `liaison_phone`, `liaison_email`, + `pictures`, `explains`, `remark`, `handle_status`, `handle_id`, `create_date`,`update_date` + + + + where `del_status` = 1 + + + and `id` = #{id} + + + + and `tenant_id` = #{tenantId} + + + and `parent_tenant_id` = #{parentTenantId} + + + + and `user_id` = #{userId} + + + + and `liaison_man` like concat('%', #{liaisonMan},'%') + + + + and `liaison_phone` like concat('%', #{liaisonPhone},'%') + + + + and `liaison_email` like concat('%', #{liaisonEmail},'%') + + + + and `liaison_sex` = #{liaisonSex} + + + + and `handle_status` = #{handleStatus} + + + + and `create_date` >= #{startDate} + + + and `create_date` <= #{endDate} + + + + and id in + + #{idItem} + + + order by ${sortColumns} + + + + + diff --git a/mallinkService/src/main/resources/mapper/WxQuestionOneselfLogMapper.xml b/mallinkService/src/main/resources/mapper/WxQuestionOneselfLogMapper.xml new file mode 100644 index 000000000..0b0dfda9f --- /dev/null +++ b/mallinkService/src/main/resources/mapper/WxQuestionOneselfLogMapper.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + `id`,`tenant_id`,`parent_tenant_id`, `wqou_id`, `topic_id`, `topic_title`, `answer`, `answer_str`, + `create_date`,`update_date` + + + + where 1 = 1 + + + and `id` = #{id} + + + + and `tenant_id` = #{tenantId} + + + and `parent_tenant_id` = #{parentTenantId} + + + + and `wqou_id` = #{wqouId} + + + + and `topic_id` = #{topicId} + + + + and `create_date` >= #{startDate} + + + and `create_date` <= #{endDate} + + + + and id in + + #{idItem} + + + order by ${sortColumns} + + + + + diff --git a/mallinkService/src/main/resources/mapper/WxQuestionOneselfMapper.xml b/mallinkService/src/main/resources/mapper/WxQuestionOneselfMapper.xml new file mode 100644 index 000000000..babbbf152 --- /dev/null +++ b/mallinkService/src/main/resources/mapper/WxQuestionOneselfMapper.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + `id`,`tenant_id`,`parent_tenant_id`, `logo`, `top_pic`, `title`, `top_desc`, `status`, `start_date`, `end_date`, + `reward_credit`,`create_date`,`update_date`,`sort`, `qr_code`, `count_topic`, `count_user` + + + + where `del_status` = 1 + + + and `id` = #{id} + + + + and `tenant_id` = #{tenantId} + + + and `parent_tenant_id` = #{parentTenantId} + + + + and `title` like concat('%', #{title},'%') + + + + and `status` = #{status} + + + + and `status` >= 2 and `status` <= 3 + + + + and `status` > 0 + + + + and `create_date` >= #{createStartdate} + + + and `create_date` <= #{createEnddate} + + + + and `start_date` >= #{startStartdate} + + + and `start_date` <= #{startEnddate} + + + + and `end_date` >= #{endStartdate} + + + and `end_date` <= #{endEnddate} + + + + and id in + + #{idItem} + + + order by ${sortColumns} + + + + + diff --git a/mallinkService/src/main/resources/mapper/WxQuestionOneselfTopicMapper.xml b/mallinkService/src/main/resources/mapper/WxQuestionOneselfTopicMapper.xml new file mode 100644 index 000000000..720385017 --- /dev/null +++ b/mallinkService/src/main/resources/mapper/WxQuestionOneselfTopicMapper.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + `id`,`tenant_id`,`parent_tenant_id`, `question_id`, `title`, `answer`, `type`, + `create_date`,`update_date`,`sort` + + + + where `del_status` = 1 + + + and `id` = #{id} + + + + and `tenant_id` = #{tenantId} + + + and `parent_tenant_id` = #{parentTenantId} + + + + and `question_id` = #{questionId} + + + + and `title` like concat('%', #{title},'%') + + + + and `type` = #{type} + + + + and `create_date` >= #{startDate} + + + and `create_date` <= #{endDate} + + + + and id in + + #{idItem} + + + order by ${sortColumns} + + + + + diff --git a/mallinkService/src/main/resources/mapper/WxQuestionOneselfUserMapper.xml b/mallinkService/src/main/resources/mapper/WxQuestionOneselfUserMapper.xml new file mode 100644 index 000000000..eabf7a752 --- /dev/null +++ b/mallinkService/src/main/resources/mapper/WxQuestionOneselfUserMapper.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + `id`,`tenant_id`,`parent_tenant_id`, `user_id`, `user_name`, `user_sex`, `user_phone`, `question_id`, + `create_date`,`update_date` + + + + where 1 = 1 + + + and `id` = #{id} + + + + and `tenant_id` = #{tenantId} + + + and `parent_tenant_id` = #{parentTenantId} + + + + and `user_id` = #{userId} + + + + and `user_name` like concat('%', #{userName},'%') + + + + and `user_phone` like concat('%', #{userPhone},'%') + + + + and `user_sex` = #{userSex} + + + + and `create_date` >= #{startDate} + + + and `create_date` <= #{endDate} + + + + and id in + + #{idItem} + + + order by ${sortColumns} + + + + +