| @@ -61,6 +61,7 @@ | |||||
| <artifactId>spring-boot-maven-plugin</artifactId> | <artifactId>spring-boot-maven-plugin</artifactId> | ||||
| <configuration> | <configuration> | ||||
| <executable>true</executable> | <executable>true</executable> | ||||
| <!-- | |||||
| <layout>ZIP</layout> | <layout>ZIP</layout> | ||||
| <excludeGroupIds> | <excludeGroupIds> | ||||
| antlr, | antlr, | ||||
| @@ -184,6 +185,7 @@ | |||||
| xmlpull, | xmlpull, | ||||
| xpp3 | xpp3 | ||||
| </excludeGroupIds> | </excludeGroupIds> | ||||
| --> | |||||
| </configuration> | </configuration> | ||||
| </plugin> | </plugin> | ||||
| </plugins> | </plugins> | ||||
| @@ -0,0 +1,85 @@ | |||||
| package com.iformall.controller.invest; | |||||
| import java.util.Arrays; | |||||
| import java.util.List; | |||||
| import com.iformall.annotation.SystemControllerLog; | |||||
| import com.iformall.common.ResultData; | |||||
| import com.iformall.domain.po.InvestCustomerEntity; | |||||
| import com.iformall.service.invest.InvestCustomerService; | |||||
| import io.swagger.annotations.Api; | |||||
| import io.swagger.annotations.ApiOperation; | |||||
| import lombok.extern.slf4j.Slf4j; | |||||
| import org.springframework.web.bind.annotation.*; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| /** | |||||
| * 客户管理 | |||||
| * | |||||
| * @author | |||||
| * @date 2019-09-23 18:40:43 | |||||
| */ | |||||
| @Slf4j | |||||
| @RestController | |||||
| @RequestMapping("invest/customer") | |||||
| @Api(tags = "客户管理") | |||||
| public class InvestCustomerController { | |||||
| @Autowired | |||||
| private InvestCustomerService investCustomerService; | |||||
| /** | |||||
| * 客户列表 | |||||
| */ | |||||
| @ApiOperation("客户列表") | |||||
| @SystemControllerLog(description = "客户列表") | |||||
| @PostMapping("/list") | |||||
| public ResultData list(@RequestBody InvestCustomerEntity params) { | |||||
| List page = investCustomerService.queryPage(params); | |||||
| return new ResultData(page); | |||||
| } | |||||
| /** | |||||
| * 客户详细信息 | |||||
| */ | |||||
| @SystemControllerLog(description = "客户详细信息") | |||||
| @GetMapping("/info/{id}") | |||||
| public ResultData info(@PathVariable("id") Long id) { | |||||
| InvestCustomerEntity investCustomer = investCustomerService.getById(id); | |||||
| return new ResultData(investCustomer); | |||||
| } | |||||
| /** | |||||
| * 保存客户 | |||||
| */ | |||||
| @SystemControllerLog(description = "保存客户") | |||||
| @PostMapping("/save") | |||||
| public ResultData save(@RequestBody InvestCustomerEntity investCustomer) { | |||||
| investCustomerService.save(investCustomer); | |||||
| return new ResultData(); | |||||
| } | |||||
| /** | |||||
| * 修改客户信息 | |||||
| */ | |||||
| @SystemControllerLog(description = "修改客户信息") | |||||
| @PostMapping("/update") | |||||
| public ResultData update(@RequestBody InvestCustomerEntity investCustomer) { | |||||
| investCustomerService.updateById(investCustomer); | |||||
| return new ResultData(); | |||||
| } | |||||
| /** | |||||
| * 删除客户信息 | |||||
| */ | |||||
| @SystemControllerLog(description = "删除客户信息") | |||||
| @GetMapping("/delete") | |||||
| public ResultData delete(@RequestBody Long[] ids) { | |||||
| investCustomerService.removeByIds(Arrays.asList(ids)); | |||||
| return new ResultData(); | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,86 @@ | |||||
| package com.iformall.controller.invest; | |||||
| import java.util.Arrays; | |||||
| import java.util.List; | |||||
| import java.util.Map; | |||||
| import com.iformall.common.ResultData; | |||||
| import com.iformall.domain.po.InvestDemandEntity; | |||||
| import com.iformall.service.invest.InvestDemandService; | |||||
| import lombok.extern.slf4j.Slf4j; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.web.bind.annotation.*; | |||||
| import io.swagger.annotations.Api; | |||||
| import io.swagger.annotations.ApiImplicitParam; | |||||
| import io.swagger.annotations.ApiImplicitParams; | |||||
| import io.swagger.annotations.ApiOperation; | |||||
| /** | |||||
| * 需求管理 | |||||
| * | |||||
| * @author | |||||
| * @date 2019-09-23 18:40:42 | |||||
| */ | |||||
| @Slf4j | |||||
| @RestController | |||||
| @RequestMapping("invest/demand") | |||||
| @Api(tags = "需求管理") | |||||
| public class InvestDemandController { | |||||
| @Autowired | |||||
| private InvestDemandService investDemandService; | |||||
| /** | |||||
| * 分页列表 | |||||
| */ | |||||
| @ApiOperation("分页列表接口") | |||||
| @PostMapping("/list") | |||||
| public ResultData list(@RequestBody InvestDemandEntity params){ | |||||
| List page = investDemandService.queryPage(params); | |||||
| return new ResultData(page); | |||||
| } | |||||
| /** | |||||
| * 信息 | |||||
| */ | |||||
| @GetMapping("/info/{id}") | |||||
| public ResultData info(@PathVariable("id") Long id){ | |||||
| InvestDemandEntity investDemand = investDemandService.getById(id); | |||||
| return new ResultData(investDemand); | |||||
| } | |||||
| /** | |||||
| * 保存 | |||||
| */ | |||||
| @PostMapping("/save") | |||||
| public ResultData save(@RequestBody InvestDemandEntity investDemand){ | |||||
| investDemandService.save(investDemand); | |||||
| return new ResultData(); | |||||
| } | |||||
| /** | |||||
| * 修改 | |||||
| */ | |||||
| @PostMapping("/update") | |||||
| public ResultData update(@RequestBody InvestDemandEntity investDemand){ | |||||
| investDemandService.updateById(investDemand); | |||||
| return new ResultData(); | |||||
| } | |||||
| /** | |||||
| * 删除 | |||||
| */ | |||||
| @GetMapping("/delete") | |||||
| public ResultData delete(@RequestBody Long[] ids){ | |||||
| investDemandService.removeByIds(Arrays.asList(ids)); | |||||
| return new ResultData(); | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,86 @@ | |||||
| package com.iformall.controller.invest; | |||||
| import java.util.Arrays; | |||||
| import java.util.List; | |||||
| import java.util.Map; | |||||
| import com.iformall.common.ResultData; | |||||
| import com.iformall.domain.po.InvestFollowRecordEntity; | |||||
| import com.iformall.service.invest.InvestFollowRecordService; | |||||
| import lombok.extern.slf4j.Slf4j; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.web.bind.annotation.*; | |||||
| import io.swagger.annotations.Api; | |||||
| import io.swagger.annotations.ApiImplicitParam; | |||||
| import io.swagger.annotations.ApiImplicitParams; | |||||
| import io.swagger.annotations.ApiOperation; | |||||
| /** | |||||
| * 跟踪管理 | |||||
| * | |||||
| * @author | |||||
| * @date 2019-09-23 18:40:43 | |||||
| */ | |||||
| @Slf4j | |||||
| @RestController | |||||
| @RequestMapping("invest/followrecord") | |||||
| @Api(tags = "跟踪管理") | |||||
| public class InvestFollowRecordController { | |||||
| @Autowired | |||||
| private InvestFollowRecordService investFollowRecordService; | |||||
| /** | |||||
| * 分页列表 | |||||
| */ | |||||
| @ApiOperation("分页列表接口") | |||||
| @PostMapping("/list") | |||||
| public ResultData list(@RequestBody InvestFollowRecordEntity params){ | |||||
| List page = investFollowRecordService.queryPage(params); | |||||
| return new ResultData(page); | |||||
| } | |||||
| /** | |||||
| * 信息 | |||||
| */ | |||||
| @GetMapping("/info/{id}") | |||||
| public ResultData info(@PathVariable("id") Long id){ | |||||
| InvestFollowRecordEntity investFollowRecord = investFollowRecordService.getById(id); | |||||
| return new ResultData(investFollowRecord); | |||||
| } | |||||
| /** | |||||
| * 保存 | |||||
| */ | |||||
| @PostMapping("/save") | |||||
| public ResultData save(@RequestBody InvestFollowRecordEntity investFollowRecord){ | |||||
| investFollowRecordService.save(investFollowRecord); | |||||
| return new ResultData(); | |||||
| } | |||||
| /** | |||||
| * 修改 | |||||
| */ | |||||
| @PostMapping("/update") | |||||
| public ResultData update(@RequestBody InvestFollowRecordEntity investFollowRecord){ | |||||
| investFollowRecordService.updateById(investFollowRecord); | |||||
| return new ResultData(); | |||||
| } | |||||
| /** | |||||
| * 删除 | |||||
| */ | |||||
| @GetMapping("/delete") | |||||
| public ResultData delete(@RequestBody Long[] ids){ | |||||
| investFollowRecordService.removeByIds(Arrays.asList(ids)); | |||||
| return new ResultData(); | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,87 @@ | |||||
| package com.iformall.controller.invest; | |||||
| import java.util.Arrays; | |||||
| import java.util.List; | |||||
| import java.util.Map; | |||||
| import com.iformall.common.ResultData; | |||||
| import com.iformall.domain.po.InvestOperateRecordEntity; | |||||
| import com.iformall.service.invest.InvestOperateRecordService; | |||||
| import lombok.extern.slf4j.Slf4j; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.web.bind.annotation.*; | |||||
| import io.swagger.annotations.Api; | |||||
| import io.swagger.annotations.ApiImplicitParam; | |||||
| import io.swagger.annotations.ApiImplicitParams; | |||||
| import io.swagger.annotations.ApiOperation; | |||||
| /** | |||||
| * 操作记录 | |||||
| * | |||||
| * @author | |||||
| * @date 2019-09-23 18:40:43 | |||||
| */ | |||||
| @Slf4j | |||||
| @RestController | |||||
| @RequestMapping("invest/operaterecord") | |||||
| @Api(tags = "操作记录") | |||||
| public class InvestOperateRecordController { | |||||
| @Autowired | |||||
| private InvestOperateRecordService investOperateRecordService; | |||||
| /** | |||||
| * 分页列表 | |||||
| */ | |||||
| @ApiOperation("分页列表接口") | |||||
| @PostMapping("/list") | |||||
| public ResultData list(@RequestBody InvestOperateRecordEntity params){ | |||||
| List page = investOperateRecordService.queryPage(params); | |||||
| return new ResultData(page); | |||||
| } | |||||
| /** | |||||
| * 信息 | |||||
| */ | |||||
| @GetMapping("/info/{id}") | |||||
| public ResultData info(@PathVariable("id") Long id){ | |||||
| InvestOperateRecordEntity investOperateRecord = investOperateRecordService.getById(id); | |||||
| return new ResultData(investOperateRecord); | |||||
| } | |||||
| /** | |||||
| * 保存 | |||||
| */ | |||||
| @PostMapping("/save") | |||||
| public ResultData save(@RequestBody InvestOperateRecordEntity investOperateRecord){ | |||||
| investOperateRecordService.save(investOperateRecord); | |||||
| return new ResultData(); | |||||
| } | |||||
| /** | |||||
| * 修改 | |||||
| */ | |||||
| @PostMapping("/update") | |||||
| public ResultData update(@RequestBody InvestOperateRecordEntity investOperateRecord){ | |||||
| investOperateRecordService.updateById(investOperateRecord); | |||||
| return new ResultData(); | |||||
| } | |||||
| /** | |||||
| * 删除 | |||||
| */ | |||||
| @GetMapping("/delete") | |||||
| public ResultData delete(@RequestBody Long[] ids){ | |||||
| investOperateRecordService.removeByIds(Arrays.asList(ids)); | |||||
| return new ResultData(); | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,88 @@ | |||||
| package com.iformall.controller.invest; | |||||
| import java.util.Arrays; | |||||
| import java.util.List; | |||||
| import java.util.Map; | |||||
| import com.iformall.common.ResultData; | |||||
| import com.iformall.domain.po.InvestRemindEntity; | |||||
| import com.iformall.service.invest.InvestRemindService; | |||||
| import lombok.extern.slf4j.Slf4j; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.web.bind.annotation.*; | |||||
| import io.swagger.annotations.Api; | |||||
| import io.swagger.annotations.ApiImplicitParam; | |||||
| import io.swagger.annotations.ApiImplicitParams; | |||||
| import io.swagger.annotations.ApiOperation; | |||||
| /** | |||||
| * 招商提醒 | |||||
| * | |||||
| * @author | |||||
| * @date 2019-09-23 18:40:43 | |||||
| */ | |||||
| @Slf4j | |||||
| @RestController | |||||
| @RequestMapping("invest/remind") | |||||
| @Api(tags = "招商提醒") | |||||
| public class InvestRemindController { | |||||
| @Autowired | |||||
| private InvestRemindService investRemindService; | |||||
| /** | |||||
| * 分页列表 | |||||
| */ | |||||
| @ApiOperation("分页列表接口") | |||||
| @PostMapping("/list") | |||||
| public ResultData list(@RequestBody InvestRemindEntity params){ | |||||
| List page = investRemindService.queryPage(params); | |||||
| return new ResultData(page); | |||||
| } | |||||
| /** | |||||
| * 信息 | |||||
| */ | |||||
| @GetMapping("/info/{id}") | |||||
| public ResultData info(@PathVariable("id") Long id){ | |||||
| InvestRemindEntity investRemind = investRemindService.getById(id); | |||||
| return new ResultData(investRemind); | |||||
| } | |||||
| /** | |||||
| * 保存 | |||||
| */ | |||||
| @PostMapping("/save") | |||||
| public ResultData save(@RequestBody InvestRemindEntity investRemind){ | |||||
| investRemindService.save(investRemind); | |||||
| return new ResultData(); | |||||
| } | |||||
| /** | |||||
| * 修改 | |||||
| */ | |||||
| @PostMapping("/update") | |||||
| public ResultData update(@RequestBody InvestRemindEntity investRemind){ | |||||
| investRemindService.updateById(investRemind); | |||||
| return new ResultData(); | |||||
| } | |||||
| /** | |||||
| * 删除 | |||||
| */ | |||||
| @GetMapping("/delete") | |||||
| public ResultData delete(@RequestBody Long[] ids){ | |||||
| investRemindService.removeByIds(Arrays.asList(ids)); | |||||
| return new ResultData(); | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,86 @@ | |||||
| package com.iformall.controller.invest; | |||||
| import java.util.Arrays; | |||||
| import java.util.List; | |||||
| import java.util.Map; | |||||
| import com.iformall.common.ResultData; | |||||
| import com.iformall.domain.po.InvestTaskEntity; | |||||
| import com.iformall.service.invest.InvestTaskService; | |||||
| import lombok.extern.slf4j.Slf4j; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.web.bind.annotation.*; | |||||
| import io.swagger.annotations.Api; | |||||
| import io.swagger.annotations.ApiImplicitParam; | |||||
| import io.swagger.annotations.ApiImplicitParams; | |||||
| import io.swagger.annotations.ApiOperation; | |||||
| /** | |||||
| * 招商任务 | |||||
| * | |||||
| * @author | |||||
| * @date 2019-09-23 18:40:43 | |||||
| */ | |||||
| @Slf4j | |||||
| @RestController | |||||
| @RequestMapping("invest/task") | |||||
| @Api(tags = "招商任务") | |||||
| public class InvestTaskController { | |||||
| @Autowired | |||||
| private InvestTaskService investTaskService; | |||||
| /** | |||||
| * 分页列表 | |||||
| */ | |||||
| @ApiOperation("分页列表接口") | |||||
| @PostMapping("/list") | |||||
| public ResultData list(InvestTaskEntity params){ | |||||
| List page = investTaskService.queryPage(params); | |||||
| return new ResultData(page); | |||||
| } | |||||
| /** | |||||
| * 信息 | |||||
| */ | |||||
| @GetMapping("/info/{id}") | |||||
| public ResultData info(@PathVariable("id") Long id){ | |||||
| InvestTaskEntity investTask = investTaskService.getById(id); | |||||
| return new ResultData(investTask); | |||||
| } | |||||
| /** | |||||
| * 保存 | |||||
| */ | |||||
| @PostMapping("/save") | |||||
| public ResultData save(@RequestBody InvestTaskEntity investTask){ | |||||
| investTaskService.save(investTask); | |||||
| return new ResultData(); | |||||
| } | |||||
| /** | |||||
| * 修改 | |||||
| */ | |||||
| @PostMapping("/update") | |||||
| public ResultData update(@RequestBody InvestTaskEntity investTask){ | |||||
| investTaskService.updateById(investTask); | |||||
| return new ResultData(); | |||||
| } | |||||
| /** | |||||
| * 删除 | |||||
| */ | |||||
| @GetMapping("/delete") | |||||
| public ResultData delete(@RequestBody Long[] ids){ | |||||
| investTaskService.removeByIds(Arrays.asList(ids)); | |||||
| return new ResultData(); | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,49 @@ | |||||
| package com.iformall.log; | |||||
| import org.aspectj.lang.ProceedingJoinPoint; | |||||
| import org.aspectj.lang.annotation.Around; | |||||
| import org.aspectj.lang.annotation.Aspect; | |||||
| import org.aspectj.lang.annotation.Pointcut; | |||||
| import org.aspectj.lang.reflect.MethodSignature; | |||||
| import org.slf4j.Logger; | |||||
| import org.slf4j.LoggerFactory; | |||||
| import org.springframework.core.env.Environment; | |||||
| import org.springframework.stereotype.Component; | |||||
| import java.util.Arrays; | |||||
| /** | |||||
| * | |||||
| */ | |||||
| @Aspect | |||||
| @Component | |||||
| public class TableOperateAspect { | |||||
| private final Logger log = LoggerFactory.getLogger(TableOperateAspect.class); | |||||
| private final Environment env; | |||||
| public TableOperateAspect(Environment env) { | |||||
| this.env = env; | |||||
| } | |||||
| @Pointcut("@annotation(com.iformall.common.TableLog)") | |||||
| public void pointcut() { | |||||
| } | |||||
| @Around("pointcut()") | |||||
| public Object round(ProceedingJoinPoint joinPoint) { | |||||
| MethodSignature signature = (MethodSignature) joinPoint.getSignature(); | |||||
| log.debug("before , {}.{}() with argument[s] = {}", signature.getClass(), | |||||
| signature.getName(), Arrays.toString(joinPoint.getArgs())); | |||||
| Object object = null; | |||||
| try { | |||||
| object = joinPoint.proceed(); | |||||
| } catch (Throwable throwable) { | |||||
| log.error("Illegal argument: {} in {}.{}()", Arrays.toString(joinPoint.getArgs()), | |||||
| joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName(), throwable); | |||||
| } finally { | |||||
| log.debug("after , result: {}", object); | |||||
| } | |||||
| return object; | |||||
| } | |||||
| } | |||||
| @@ -62,6 +62,7 @@ mybatis-plus: | |||||
| cache-enabled: false | cache-enabled: false | ||||
| call-setters-on-nulls: true | call-setters-on-nulls: true | ||||
| type-aliases-package: com.iformall.domain.po | type-aliases-package: com.iformall.domain.po | ||||
| type-enums-package: com.iformall.enums | |||||
| # PageHelper | # PageHelper | ||||
| pagehelper: | pagehelper: | ||||
| @@ -0,0 +1,19 @@ | |||||
| INSERT INTO `mall_permission` (`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) | |||||
| VALUES | |||||
| (11, '招商管理', 0, 'Y', NULL, 0, '#d4237a', '212,35,122', NULL, NULL, 0, 11); | |||||
| INSERT INTO `mall_permission` (`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) | |||||
| VALUES | |||||
| (1001, '招商概览', 11, 'Y', NULL, 1, '#d4237a', '212,35,122', 'InvestPromotion', NULL, 0, 1); | |||||
| INSERT INTO `mall_permission` (`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) | |||||
| VALUES | |||||
| (1002, '我的招商任务', 11, 'Y', NULL, 1, '#d4237a', '212,35,122', 'InvestTask', NULL, 0, 2); | |||||
| INSERT INTO `mall_permission` (`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) | |||||
| VALUES | |||||
| (1003, '我的客户管理', 11, 'Y', NULL, 1, '#d4237a', '212,35,122', 'InvestCustomer', NULL, 0, 3); | |||||
| INSERT INTO `mall_permission` (`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) | |||||
| VALUES | |||||
| (1004, '品牌库', 11, 'Y', NULL, 1, '#d4237a', '212,35,122', 'brandlist', NULL, 0, 4); | |||||
| @@ -0,0 +1,84 @@ | |||||
| -- 招商任务 | |||||
| CREATE TABLE `invest_task` ( | |||||
| `id` BIGINT(20) NOT NULL COMMENT '主键ID', | |||||
| `tenant_id` VARCHAR(10) NOT NULL COMMENT '租户ID', | |||||
| `owner` json DEFAULT NULL COMMENT '负责人', | |||||
| `status` TINYINT(6) NOT NULL DEFAULT '0' COMMENT '任务状态:-1-关闭;0-待分配;1-洽谈中;2-意向签约;3-已完成', | |||||
| `target_type` SMALLINT(2) NOT NULL DEFAULT '0' COMMENT '目标类型:0-商铺招租;1-其他', | |||||
| `target_id` BIGINT(20) NOT NULL COMMENT '目标ID', | |||||
| `content` json DEFAULT NULL COMMENT '任务设定条件', | |||||
| `create_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |||||
| `update_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', | |||||
| PRIMARY KEY (`id`) | |||||
| ) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COMMENT='招商任务'; | |||||
| -- 客户需求 | |||||
| CREATE TABLE `invest_demand` ( | |||||
| `id` BIGINT(20) NOT NULL COMMENT '主键ID', | |||||
| `tenant_id` VARCHAR(10) NOT NULL COMMENT '租户ID', | |||||
| `owner` BIGINT(20) DEFAULT NULL COMMENT '负责人', | |||||
| `customer_id` BIGINT(20) NOT NULL COMMENT '客户ID', | |||||
| `intent` json DEFAULT NULL COMMENT '客户意向', | |||||
| `target_type` SMALLINT(2) NOT NULL DEFAULT '0' COMMENT '目标类型:0-商铺招租;1-其他', | |||||
| `target_id` BIGINT(20) NOT NULL COMMENT '目标ID', | |||||
| `create_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |||||
| `update_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', | |||||
| PRIMARY KEY (`id`) | |||||
| ) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COMMENT='客户需求'; | |||||
| -- 招商提醒 | |||||
| CREATE TABLE `invest_remind` ( | |||||
| `id` BIGINT(20) NOT NULL COMMENT '主键ID', | |||||
| `tenant_id` VARCHAR(10) NOT NULL COMMENT '租户ID', | |||||
| `owner` BIGINT(20) NOT NULL COMMENT '提醒用户', | |||||
| `content` json DEFAULT NULL COMMENT '提醒内容', | |||||
| `minute` BIGINT(6) NOT NULL COMMENT '提醒时间', | |||||
| `begin_date` DATETIME NOT NULL COMMENT '开始时间', | |||||
| `end_date` DATETIME NOT NULL COMMENT '结束时间', | |||||
| `create_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |||||
| `update_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', | |||||
| PRIMARY KEY (`id`) | |||||
| ) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COMMENT='招商提醒'; | |||||
| -- 客户列表 | |||||
| CREATE TABLE `invest_customer` ( | |||||
| `id` BIGINT(20) NOT NULL COMMENT '主键ID', | |||||
| `tenant_id` VARCHAR(10) NOT NULL COMMENT '租户ID', | |||||
| `name` VARCHAR(30) NOT NULL COMMENT '客户名称', | |||||
| `phone` VARCHAR(20) NOT NULL COMMENT '电话', | |||||
| `business` int(11) NOT NULL COMMENT '经营业态', | |||||
| `brand_id` BIGINT(20) NOT NULL COMMENT '品牌ID', | |||||
| `type` TINYINT(6) NOT NULL DEFAULT '0' COMMENT '客户分类:0-潜在客户;1-意向客户;2-合作客户;3-谈判失败', | |||||
| `rating` TINYINT(6) NOT NULL DEFAULT '0' COMMENT '客户预评级:0-无;1-主力店;2-次主力店;3-甲;4-乙;5-丙' , | |||||
| `invest_channel` VARCHAR(10) NOT NULL COMMENT '招商渠道:0-无;1-电视;2-广播;3-报纸;4-刊物;5-物联网;6-招商活动;7-中介机构;8-自定义渠道', | |||||
| `create_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |||||
| `update_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', | |||||
| PRIMARY KEY (`id`) | |||||
| ) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COMMENT='客户列表'; | |||||
| -- 跟踪记录 | |||||
| CREATE TABLE `invest_follow_record` ( | |||||
| `id` BIGINT(20) NOT NULL COMMENT '主键ID', | |||||
| `tenant_id` VARCHAR(10) NOT NULL COMMENT '租户ID', | |||||
| `owner` BIGINT(20) NOT NULL COMMENT '主谈人', | |||||
| `customer_id` BIGINT(20) NOT NULL COMMENT '客户ID', | |||||
| `content` json NOT NULL COMMENT '洽谈内容', | |||||
| `type` SMALLINT(2) NOT NULL COMMENT '跟踪类型:0-招商任务;1-客户需求', | |||||
| `create_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |||||
| `update_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', | |||||
| PRIMARY KEY (`id`) | |||||
| ) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COMMENT='跟踪记录'; | |||||
| -- 操作记录 | |||||
| CREATE TABLE `invest_operate_record` ( | |||||
| `id` BIGINT(20) NOT NULL COMMENT '主键ID', | |||||
| `tenant_id` VARCHAR(10) NOT NULL COMMENT '租户ID', | |||||
| `tbl` VARCHAR(30) DEFAULT NULL COMMENT '表名称', | |||||
| `tid` BIGINT(20) NOT NULL COMMENT '主键ID', | |||||
| `operator` BIGINT(20) NOT NULL DEFAULT '0' COMMENT '操作人:0-系统;其它', | |||||
| `operate_type` TINYINT(6) NOT NULL DEFAULT '0' COMMENT '操作类型:0-ADD;1-UPDATE;2-DELETE', | |||||
| `before` json DEFAULT NULL COMMENT '更新前', | |||||
| `after` json DEFAULT NULL COMMENT '更新后', | |||||
| `create_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |||||
| PRIMARY KEY (`id`) | |||||
| ) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COMMENT='操作记录'; | |||||
| @@ -0,0 +1,119 @@ | |||||
| package com.iformall.service.test; | |||||
| import com.alibaba.fastjson.JSON; | |||||
| import com.alibaba.fastjson.JSONArray; | |||||
| import com.alibaba.fastjson.JSONObject; | |||||
| import com.iformall.domain.po.WxLevelConfig; | |||||
| import com.iformall.domain.po.WxScoreRules; | |||||
| import com.iformall.utils.DateUtils; | |||||
| import lombok.extern.slf4j.Slf4j; | |||||
| import org.joda.time.Days; | |||||
| import org.junit.Test; | |||||
| import java.math.BigDecimal; | |||||
| import java.text.DateFormat; | |||||
| import java.text.ParseException; | |||||
| import java.text.SimpleDateFormat; | |||||
| import java.time.*; | |||||
| import java.time.temporal.ChronoUnit; | |||||
| import java.time.temporal.TemporalAdjusters; | |||||
| import java.util.*; | |||||
| import java.util.stream.Collectors; | |||||
| @Slf4j | |||||
| public class SimpleTest { | |||||
| @Test | |||||
| public void test() { | |||||
| // int creditChangeNumOrigin = 1; | |||||
| // int scoreScale = 12; | |||||
| // int levelScale = 12; | |||||
| // int creditChangeNum = new BigDecimal(creditChangeNumOrigin).multiply(new BigDecimal(levelScale)).multiply(new BigDecimal(scoreScale)).divide(new BigDecimal(WxScoreRules.DEFAULT_SCALE)).divide(new BigDecimal(WxLevelConfig.DEFAULT_SCALE), BigDecimal.ROUND_HALF_UP).intValue(); | |||||
| // log.debug("creditChangeNum -> {}", creditChangeNum); | |||||
| int birthdayScale = 11; | |||||
| float creditScale = new BigDecimal(birthdayScale).divide(new BigDecimal(WxScoreRules.DEFAULT_SCALE)).floatValue(); | |||||
| log.debug("creditScale -> {}", creditScale); | |||||
| log.debug("greater -> {}", birthdayScale > WxScoreRules.DEFAULT_SCALE); | |||||
| } | |||||
| @Test | |||||
| public void test2() { | |||||
| //List<Integer> data = Arrays.asList(1, 2, 3, 4, 5, 6); | |||||
| //data.forEach(d -> { | |||||
| // if (d == 2) { | |||||
| // return; | |||||
| // } | |||||
| // log.info("d ->{}", d); | |||||
| //}); | |||||
| //String[] data = new String[]{"1", "2"}; | |||||
| //List<Long> dd = Arrays.stream(data).map(Long::parseLong).collect(Collectors.toList()); | |||||
| //log.info("d ->{}", dd); | |||||
| Integer a = 127; | |||||
| Integer b = 127; | |||||
| assert a==b ; | |||||
| } | |||||
| @Test | |||||
| public void test3() { | |||||
| Date startTime = Date.from(LocalDateTime.now() | |||||
| .with(TemporalAdjusters.firstDayOfMonth()) | |||||
| .with(LocalTime.MIN) | |||||
| .atZone(ZoneId.systemDefault()) | |||||
| .toInstant()); | |||||
| Date endTime = Date.from(LocalDateTime.now() | |||||
| .with(TemporalAdjusters.lastDayOfMonth()) | |||||
| .with(LocalTime.MAX) | |||||
| .atZone(ZoneId.systemDefault()) | |||||
| .toInstant()); | |||||
| SimpleDateFormat formatter = new SimpleDateFormat("yyyy年MM月dd日hh小时mm分钟ss秒"); | |||||
| log.info("startTime:{}, endTime:{}", formatter.format(startTime), formatter.format(endTime)); | |||||
| } | |||||
| @Test | |||||
| public void test4() throws ParseException { | |||||
| String[] days = {"1988/08/21", "2019/08/11", "2019/08/21", "2019/08/13", "2019/08/14", "2019/08/15", "2019/08/16", "2019/08/17", "2019/09/18", "2019/09/10"}; | |||||
| DateFormat df = new SimpleDateFormat("yyyy/MM/dd"); | |||||
| int before = 10; | |||||
| //未来10天时间 | |||||
| Calendar today = Calendar.getInstance(); | |||||
| Date begin = today.getTime(); | |||||
| today.add(Calendar.DAY_OF_YEAR, before); | |||||
| Date end = today.getTime(); | |||||
| log.info("begin:{},end:{}", df.format(begin), df.format(end)); | |||||
| //过去10天时间 | |||||
| Calendar today1 = Calendar.getInstance(); | |||||
| Date end1 = today1.getTime(); | |||||
| today1.add(Calendar.DAY_OF_YEAR, -before); | |||||
| Date begin1 = today1.getTime(); | |||||
| log.info("begin:{},end:{}", df.format(begin1), df.format(end1)); | |||||
| } | |||||
| @Test | |||||
| public void test5() { | |||||
| JSONObject jsonObject = new JSONObject(); | |||||
| JSONArray jsonArray = new JSONArray(); | |||||
| jsonArray.add(1); | |||||
| jsonArray.add(2); | |||||
| jsonArray.add(3); | |||||
| jsonArray.add(4); | |||||
| jsonObject.put("couponIds", jsonArray); | |||||
| jsonObject.put("beforeDays", 4); | |||||
| List<Integer> ids = jsonArray.toJavaList(Integer.class); | |||||
| log.info("data -> {} ", jsonObject.toJSONString()); | |||||
| log.info("ids -> {} ", JSON.toJSONString(ids)); | |||||
| } | |||||
| @Test | |||||
| public void test6() { | |||||
| //Calendar calendar = Calendar.getInstance(); | |||||
| //calendar.add(Calendar.DAY_OF_YEAR, -1); | |||||
| //boolean flag = DateUtils.isDateBefore(calendar.getTime()); | |||||
| //log.info("flag -> {} ", JSON.toJSONString(flag)); | |||||
| log.info("uuid {}",UUID.randomUUID()); | |||||
| } | |||||
| } | |||||
| @@ -35,6 +35,7 @@ mybatis-plus: | |||||
| cache-enabled: false | cache-enabled: false | ||||
| call-setters-on-nulls: true | call-setters-on-nulls: true | ||||
| type-aliases-package: com.iformall.domain.po | type-aliases-package: com.iformall.domain.po | ||||
| type-enums-package: com.iformall.enums | |||||
| # PageHelper | # PageHelper | ||||
| pagehelper: | pagehelper: | ||||
| @@ -0,0 +1,153 @@ | |||||
| package com.iformall.b; | |||||
| import com.alibaba.fastjson.JSON; | |||||
| import com.fasterxml.jackson.databind.ObjectMapper; | |||||
| import com.iformall.domain.po.WxCouponSend; | |||||
| import com.iformall.enums.EnumCouponSendSendType; | |||||
| import lombok.extern.slf4j.Slf4j; | |||||
| import org.junit.FixMethodOrder; | |||||
| import org.junit.Test; | |||||
| import org.junit.runner.RunWith; | |||||
| import org.junit.runners.MethodSorters; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; | |||||
| import org.springframework.boot.test.context.SpringBootTest; | |||||
| import org.springframework.http.MediaType; | |||||
| import org.springframework.test.context.ActiveProfiles; | |||||
| import org.springframework.test.context.junit4.SpringRunner; | |||||
| import org.springframework.test.web.servlet.MockMvc; | |||||
| import org.springframework.test.web.servlet.MvcResult; | |||||
| import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; | |||||
| import org.springframework.test.web.servlet.result.MockMvcResultHandlers; | |||||
| import org.springframework.test.web.servlet.result.MockMvcResultMatchers; | |||||
| import java.util.Arrays; | |||||
| import java.util.HashMap; | |||||
| import java.util.Map; | |||||
| @Slf4j | |||||
| @RunWith(SpringRunner.class) | |||||
| @SpringBootTest | |||||
| @ActiveProfiles("dev") | |||||
| @AutoConfigureMockMvc | |||||
| @FixMethodOrder(MethodSorters.JVM) | |||||
| public class CouponsendTest { | |||||
| private static final String TOKEN = "c906835d-08c5-47b1-8843-179918f3b312"; | |||||
| @Autowired | |||||
| private MockMvc mockMvc; | |||||
| /** | |||||
| * 商户注券::卡券列表::全部 | |||||
| */ | |||||
| @Test | |||||
| public void listAll() throws Exception { | |||||
| //时间排序 | |||||
| MvcResult result = mockMvc.perform( | |||||
| MockMvcRequestBuilders.get("/api/couponSend/list") | |||||
| .header("token", TOKEN) | |||||
| .param("pageNum", "1") | |||||
| .param("pageSize", "10") | |||||
| .param("sortColumn", "createDate") | |||||
| .param("sortOrder", "desc") | |||||
| .param("expired", "0") | |||||
| .param("sendType", EnumCouponSendSendType.MERCHANT.getCode() + "") | |||||
| ) | |||||
| .andExpect(MockMvcResultMatchers.status().isOk()) | |||||
| .andDo(MockMvcResultHandlers.print()) | |||||
| .andReturn(); | |||||
| String responseStr = result.getResponse().getContentAsString(); | |||||
| ObjectMapper mapper = new ObjectMapper(); | |||||
| Map<String, String> respMap = mapper.readValue(responseStr, Map.class); | |||||
| log.info("respMap -> {}", JSON.toJSONString(respMap)); | |||||
| // 商家排序规则 | |||||
| //MvcResult result1 = mockMvc.perform( | |||||
| // MockMvcRequestBuilders.get("/api/couponSend/list") | |||||
| // .header("token", TOKEN) | |||||
| // .param("pageNum", "1") | |||||
| // .param("pageSize", "10") | |||||
| // .param("sortColumn", WxCouponSend.SORT_MERCHANT_SEND) | |||||
| // .param("sortOrder", "desc") | |||||
| // //.param("expired", "1") | |||||
| // .param("sendType", EnumCouponSendSendType.MERCHANT.getCode() + "") | |||||
| //) | |||||
| // .andExpect(MockMvcResultMatchers.status().isOk()) | |||||
| // .andDo(MockMvcResultHandlers.print()) | |||||
| // .andReturn(); | |||||
| //String responseStr1 = result1.getResponse().getContentAsString(); | |||||
| //ObjectMapper mapper1 = new ObjectMapper(); | |||||
| //Map<String, String> respMap1 = mapper1.readValue(responseStr1, Map.class); | |||||
| //log.info("respMap -> {}", JSON.toJSONString(respMap1)); | |||||
| } | |||||
| /** | |||||
| * 商户注券::卡券列表::有效 | |||||
| */ | |||||
| @Test | |||||
| public void listUnExpired() throws Exception { | |||||
| MvcResult result = mockMvc.perform( | |||||
| MockMvcRequestBuilders.get("/api/couponSend/list") | |||||
| .header("token", TOKEN) | |||||
| .param("pageNum", "1") | |||||
| .param("pageSize", "10") | |||||
| .param("expired", "0") | |||||
| //.param("status", "0") | |||||
| .param("sendType", EnumCouponSendSendType.MERCHANT.getCode() + "") | |||||
| ) | |||||
| .andExpect(MockMvcResultMatchers.status().isOk()) | |||||
| .andDo(MockMvcResultHandlers.print()) | |||||
| .andReturn(); | |||||
| String responseStr = result.getResponse().getContentAsString(); | |||||
| ObjectMapper mapper = new ObjectMapper(); | |||||
| Map<String, String> respMap = mapper.readValue(responseStr, Map.class); | |||||
| log.info("respMap -> {}", JSON.toJSONString(respMap)); | |||||
| } | |||||
| /** | |||||
| * 商户注券::商户注券 | |||||
| */ | |||||
| @Test | |||||
| public void handSel() throws Exception { | |||||
| Map<String, Object> pamas = new HashMap<>(); | |||||
| pamas.put("wxCouponSendIds", Arrays.asList("327321450622582784")); | |||||
| pamas.put("cUserId", "321555911759462400"); | |||||
| MvcResult result = mockMvc.perform( | |||||
| MockMvcRequestBuilders.post("/api/couponSend/handSel") | |||||
| .header("token", TOKEN) | |||||
| .contentType(MediaType.APPLICATION_JSON) | |||||
| .content(JSON.toJSONString(pamas)) | |||||
| ) | |||||
| .andExpect(MockMvcResultMatchers.status().isOk()) | |||||
| .andDo(MockMvcResultHandlers.print()) | |||||
| .andReturn(); | |||||
| String responseStr = result.getResponse().getContentAsString(); | |||||
| ObjectMapper mapper = new ObjectMapper(); | |||||
| Map<String, String> respMap = mapper.readValue(responseStr, Map.class); | |||||
| log.info("respMap -> {}", JSON.toJSONString(respMap)); | |||||
| } | |||||
| /** | |||||
| * 商户注券::注券记录 | |||||
| */ | |||||
| @Test | |||||
| public void actionLog() throws Exception { | |||||
| MvcResult result = mockMvc.perform( | |||||
| MockMvcRequestBuilders.get("/api/couponSend/actionLog") | |||||
| .header("token", TOKEN) | |||||
| .param("pageNum", "1") | |||||
| .param("pageSize", "10") | |||||
| .param("channelType", String.valueOf(EnumCouponSendSendType.MERCHANT.getCode())) | |||||
| //.param("beginDate", "2019-01-01") | |||||
| //.param("endDate", "2019-09-01") | |||||
| ) | |||||
| .andExpect(MockMvcResultMatchers.status().isOk()) | |||||
| .andDo(MockMvcResultHandlers.print()) | |||||
| .andReturn(); | |||||
| String responseStr = result.getResponse().getContentAsString(); | |||||
| ObjectMapper mapper = new ObjectMapper(); | |||||
| Map<String, String> respMap = mapper.readValue(responseStr, Map.class); | |||||
| log.info("respMap -> {}", JSON.toJSONString(respMap)); | |||||
| } | |||||
| } | |||||
| @@ -35,6 +35,7 @@ mybatis-plus: | |||||
| cache-enabled: false | cache-enabled: false | ||||
| call-setters-on-nulls: true | call-setters-on-nulls: true | ||||
| type-aliases-package: com.iformall.domain.po | type-aliases-package: com.iformall.domain.po | ||||
| type-enums-package: com.iformall.enums | |||||
| # PageHelper | # PageHelper | ||||
| pagehelper: | pagehelper: | ||||
| @@ -54,6 +54,7 @@ mybatis-plus: | |||||
| cache-enabled: false | cache-enabled: false | ||||
| call-setters-on-nulls: true | call-setters-on-nulls: true | ||||
| type-aliases-package: com.iformall.domain.po | type-aliases-package: com.iformall.domain.po | ||||
| type-enums-package: com.iformall.enums | |||||
| # PageHelper | # PageHelper | ||||
| pagehelper: | pagehelper: | ||||
| @@ -52,6 +52,7 @@ mybatis-plus: | |||||
| cache-enabled: false | cache-enabled: false | ||||
| call-setters-on-nulls: true | call-setters-on-nulls: true | ||||
| type-aliases-package: com.iformall.domain.po | type-aliases-package: com.iformall.domain.po | ||||
| type-enums-package: com.iformall.enums | |||||
| # PageHelper | # PageHelper | ||||
| pagehelper: | pagehelper: | ||||
| @@ -35,6 +35,7 @@ mybatis-plus: | |||||
| cache-enabled: false | cache-enabled: false | ||||
| call-setters-on-nulls: true | call-setters-on-nulls: true | ||||
| type-aliases-package: com.iformall.domain.po | type-aliases-package: com.iformall.domain.po | ||||
| type-enums-package: com.iformall.enums | |||||
| # PageHelper | # PageHelper | ||||
| pagehelper: | pagehelper: | ||||
| @@ -52,6 +52,7 @@ mybatis-plus: | |||||
| cache-enabled: false | cache-enabled: false | ||||
| call-setters-on-nulls: true | call-setters-on-nulls: true | ||||
| type-aliases-package: com.iformall.domain.po | type-aliases-package: com.iformall.domain.po | ||||
| type-enums-package: com.iformall.enums | |||||
| # PageHelper | # PageHelper | ||||
| pagehelper: | pagehelper: | ||||
| @@ -0,0 +1,260 @@ | |||||
| package com.iformall.schedule.test; | |||||
| import com.alibaba.fastjson.JSON; | |||||
| import com.alibaba.fastjson.JSONObject; | |||||
| import com.github.pagehelper.PageInfo; | |||||
| import com.iformall.domain.dto.WxCUserBasicInfoDto; | |||||
| import com.iformall.domain.po.*; | |||||
| import com.iformall.enums.EnumCouponSendSendType; | |||||
| import com.iformall.mapper.WxCUserBasicInfoMapper; | |||||
| import com.iformall.mapper.WxCUserMapper; | |||||
| import com.iformall.mapper.WxCouponActionLogMapper; | |||||
| import com.iformall.mapper.WxLevelConfigMapper; | |||||
| import com.iformall.schedule.CouponSendSchedule; | |||||
| import com.iformall.service.*; | |||||
| import com.iformall.utils.CreditUtil; | |||||
| import com.iformall.utils.DateUtils; | |||||
| import lombok.extern.slf4j.Slf4j; | |||||
| import org.junit.Test; | |||||
| import org.junit.runner.RunWith; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.boot.test.context.SpringBootTest; | |||||
| import org.springframework.test.context.ActiveProfiles; | |||||
| import org.springframework.test.context.junit4.SpringRunner; | |||||
| import org.springframework.util.CollectionUtils; | |||||
| import javax.annotation.Resource; | |||||
| import java.text.DateFormat; | |||||
| import java.text.SimpleDateFormat; | |||||
| import java.time.LocalDateTime; | |||||
| import java.time.LocalTime; | |||||
| import java.time.ZoneId; | |||||
| import java.time.temporal.TemporalAdjusters; | |||||
| import java.util.*; | |||||
| @Slf4j | |||||
| @RunWith(SpringRunner.class) | |||||
| @SpringBootTest | |||||
| @ActiveProfiles("dev") | |||||
| public class ScheduleTest { | |||||
| private static final String TENANT_ID = "456"; | |||||
| private static final int PAGE_INDEX = 1; | |||||
| private static final int PAGE_SIZE = 10; | |||||
| @Autowired | |||||
| CouponSendSchedule couponSendSchedule; | |||||
| @Autowired | |||||
| WxCouponSendService wxCouponSendService; | |||||
| @Autowired | |||||
| WxScoreRulesService scoreRulesService; | |||||
| @Resource | |||||
| WxCUserBasicInfoMapper cUserBasicInfoMapper; | |||||
| @Resource | |||||
| WxCUserMapper cUserMapper; | |||||
| @Resource | |||||
| WxLevelConfigMapper levelConfigMapper; | |||||
| @Resource | |||||
| WxCouponActionLogMapper wxCouponActionLogMapper; | |||||
| @Autowired | |||||
| private WxCouponService couponService; | |||||
| @Autowired | |||||
| WxCreditHistoryService wxCreditHistoryService; | |||||
| /** | |||||
| * 添加会员生日券 | |||||
| */ | |||||
| //@Test | |||||
| public void couponSend() { | |||||
| //获取配置 | |||||
| WxCouponSend config = wxCouponSendService.getConfig(EnumCouponSendSendType.BIRTHDAY.getCode(), TENANT_ID); | |||||
| log.info("会员权益配置 config -> {}", JSON.toJSONString(config)); | |||||
| //配置不存在,保存配置 | |||||
| JSONObject couponSendJo = JSONObject.parseObject(config.getConditions()); | |||||
| if (Objects.nonNull(couponSendJo)) { | |||||
| wxCouponSendService.saveOrUpdateConfig(0, EnumCouponSendSendType.BIRTHDAY.getCode(), TENANT_ID); | |||||
| } | |||||
| WxCoupon couponQuery = new WxCoupon(); | |||||
| couponQuery.setTenantId(TENANT_ID); | |||||
| PageInfo<WxCoupon> pageInfo = couponService.listAsPage(couponQuery, PAGE_INDEX, PAGE_SIZE); | |||||
| if (CollectionUtils.isEmpty(pageInfo.getList())) { | |||||
| return; | |||||
| } | |||||
| WxCoupon coupon = pageInfo.getList().get(0); | |||||
| WxCouponSend record = new WxCouponSend(); | |||||
| record.setCouponId(coupon.getCouponId()); | |||||
| record.setSendType(EnumCouponSendSendType.BIRTHDAY.getCode()); | |||||
| record.setTenantId(TENANT_ID); | |||||
| record.setTitle(coupon.getTitle()); | |||||
| record.setCreateDate(new Date()); | |||||
| wxCouponSendService.saveOrUpdate(record); | |||||
| log.info("会员生日券 record -> {}", JSON.toJSONString(record)); | |||||
| } | |||||
| /** | |||||
| * 获取列表 | |||||
| */ | |||||
| @Test | |||||
| public void couponsendList() { | |||||
| //生日券列表 | |||||
| WxCouponSend birthQuery = new WxCouponSend(); | |||||
| //birthQuery.setSendType(EnumCouponSendSendType.BIRTHDAY.getCode()); | |||||
| //birthQuery.setTenantId(TENANT_ID); | |||||
| //PageInfo birthPageInfo = wxCouponSendService.listAsPage(birthQuery, PAGE_INDEX, PAGE_SIZE); | |||||
| //log.info(EnumCouponSendSendType.BIRTHDAY.getMessage() + "列表 -> {}", JSON.toJSONString(birthPageInfo)); | |||||
| //商户注券列表 | |||||
| WxCouponSend merchantQuery = new WxCouponSend(); | |||||
| merchantQuery.setSendType(EnumCouponSendSendType.MERCHANT.getCode()); | |||||
| merchantQuery.setTenantId(TENANT_ID); | |||||
| merchantQuery.setSortColumn("createDate"); | |||||
| merchantQuery.setSortOrder("desc"); | |||||
| PageInfo merchantPageInfo = wxCouponSendService.listAsPage(merchantQuery, PAGE_INDEX, PAGE_SIZE); | |||||
| log.info(EnumCouponSendSendType.BIRTHDAY.getMessage() + "列表 -> {}", JSON.toJSONString(merchantPageInfo)); | |||||
| } | |||||
| /** | |||||
| * 生日券定时任务 | |||||
| */ | |||||
| @Test | |||||
| public void birthdaySchedule() { | |||||
| couponSendSchedule.birthdayCouponSendSchedule(); | |||||
| } | |||||
| @Test | |||||
| public void findBirdayUser() { | |||||
| DateFormat df = new SimpleDateFormat("MM-dd"); | |||||
| int before = 10; | |||||
| //未来10天时间 | |||||
| Calendar today = Calendar.getInstance(); | |||||
| Date begin = today.getTime(); | |||||
| today.add(Calendar.DAY_OF_YEAR, before); | |||||
| Date end = today.getTime(); | |||||
| log.info("begin:{},end:{}", df.format(begin), df.format(end)); | |||||
| List<WxCUserBasicInfo> users = cUserBasicInfoMapper.findBirthdayList("456", df.format(begin.getTime()), df.format(end.getTime())); | |||||
| log.info("users -> {}", JSON.toJSONString(users)); | |||||
| } | |||||
| /** | |||||
| * 会员积分倍率 | |||||
| */ | |||||
| @Test | |||||
| public void scoreScale() { | |||||
| //用户信息 | |||||
| WxCUser cUserQuery = new WxCUser(); | |||||
| cUserQuery.setPhone("15811234898"); | |||||
| cUserQuery.setTenantId(TENANT_ID); | |||||
| WxCUser cUser = cUserMapper.selectOne(cUserQuery); | |||||
| WxCUserBasicInfo toUpdate = new WxCUserBasicInfo(); | |||||
| toUpdate.setId(cUser.getId()); | |||||
| //Calendar calendar = Calendar.getInstance() ; | |||||
| //calendar.add(Calendar.DAY_OF_YEAR,2); | |||||
| //toUpdate.setBirthdate(calendar.getTime()); | |||||
| //cUserBasicInfoMapper.updateByPrimaryKeySelective(toUpdate) ; | |||||
| WxCUserBasicInfo wxCUserBasicInfo = cUserBasicInfoMapper.selectByPrimaryKey(cUser.getId()); | |||||
| //原始积分 | |||||
| int creditOrigin = 1; | |||||
| //获取等级倍率 | |||||
| Integer levelScale = levelConfigMapper.getScale(cUser.getTenantId(), cUser.getScore()); | |||||
| Integer score = CreditUtil.calUserCredit(creditOrigin, cUser, levelScale, wxCUserBasicInfo, scoreRulesService); | |||||
| log.info("计算后积分 score {}", score); | |||||
| ////如果享受了生日积分倍率,记录日期 | |||||
| if (Objects.equals(CreditUtil.getIsBirthDayScale(), cUser.getId())) { | |||||
| toUpdate.setScoreDate(new Date()); | |||||
| cUserBasicInfoMapper.updateByPrimaryKeySelective(toUpdate); | |||||
| CreditUtil.clear(); | |||||
| } | |||||
| } | |||||
| /** | |||||
| * 积分兑换 | |||||
| */ | |||||
| @Test | |||||
| public void findByMerchantIdAndSpend() { | |||||
| Long[] userIds = {291844648098332672L, 313534271008804864L, 321555911759462400L}; | |||||
| for (Long id : userIds) { | |||||
| Map<String, Integer> data = wxCreditHistoryService.findByMerchantIdAndSpend(264943049975529472L, "1", id, TENANT_ID); | |||||
| log.info("data -> {}", JSON.toJSONString(data)); | |||||
| } | |||||
| } | |||||
| /** | |||||
| * 计算用户积分 | |||||
| */ | |||||
| @Test | |||||
| public void usersScore() { | |||||
| Date startTime = Date.from(LocalDateTime.now() | |||||
| .with(TemporalAdjusters.firstDayOfYear()) | |||||
| .with(LocalTime.MIN) | |||||
| .atZone(ZoneId.systemDefault()) | |||||
| .toInstant()); | |||||
| Date endTime = Date.from(LocalDateTime.now() | |||||
| .with(TemporalAdjusters.lastDayOfYear()) | |||||
| .with(LocalTime.MAX) | |||||
| .atZone(ZoneId.systemDefault()) | |||||
| .toInstant()); | |||||
| WxCUserBasicInfoDto wxCUserBasicInfoDto = new WxCUserBasicInfoDto(); | |||||
| wxCUserBasicInfoDto.setTenantId(TENANT_ID); | |||||
| List<WxCUserBasicInfo> wxCUserBasicInfoList = null; | |||||
| //cUserBasicInfoMapper.findBirthdayList(wxCUserBasicInfoDto); | |||||
| if (!CollectionUtils.isEmpty(wxCUserBasicInfoList)) { | |||||
| int beforeDays = 2; | |||||
| wxCUserBasicInfoList.forEach(cu -> { | |||||
| Map<String, Object> params = new HashMap<>(); | |||||
| params.put("tenantId", cu.getTenantId()); | |||||
| params.put("cUserId", cu.getId()); | |||||
| params.put("couponId", null); | |||||
| params.put("startTime", startTime); | |||||
| params.put("endTime", endTime); | |||||
| params.put("channelType", EnumCouponSendSendType.BIRTHDAY.getCode()); | |||||
| int count = wxCouponActionLogMapper.getCountByUserAndCouponAndDate(params); | |||||
| if (count > 0) { | |||||
| log.info("会员{}已经发送过生日券, 本次不再发送", cu.getNickName()); | |||||
| return; | |||||
| } | |||||
| int diffBithday = DateUtils.birthdaysBetween(cu.getBirthdate()); | |||||
| StringBuilder tips = new StringBuilder(); | |||||
| if (diffBithday > 0) { | |||||
| tips.append("距离生日还有").append(diffBithday).append("天"); | |||||
| } else if (diffBithday < 0) { | |||||
| tips.append("生日已过").append(Math.abs(diffBithday)).append("天"); | |||||
| } else { | |||||
| tips.append("生日当天"); | |||||
| } | |||||
| //计算积分 | |||||
| WxCUser cUserQuery = new WxCUser(); | |||||
| cUserQuery.setTenantId(TENANT_ID); | |||||
| cUserQuery.setPhone(cu.getPhone()); | |||||
| WxCUser cUser = cUserMapper.selectOne(cUserQuery); | |||||
| //消费奖励原始积分 | |||||
| //calScore(cu, tips, cUser); | |||||
| if (diffBithday < 0 && Math.abs(diffBithday) > beforeDays || diffBithday > beforeDays) { | |||||
| log.info("[会员={},手机={},生日={} ,{}],不发短信", cu.getNickName(), cu.getPhone(), DateUtils.format(cu.getBirthdate()), tips); | |||||
| return; | |||||
| } | |||||
| //发送生日券时更新生日标志 | |||||
| //WxCUserBasicInfo toUpdate = new WxCUserBasicInfo(); | |||||
| //toUpdate.setId(cu.getId()); | |||||
| //toUpdate.setScoreDate(cu.getBirthdate()); | |||||
| //cUserBasicInfoMapper.updateByPrimaryKeySelective(toUpdate); | |||||
| log.error("[会员={},手机={},生日={} ,{}],发送短信", cu.getNickName(), cu.getPhone(), DateUtils.format(cu.getBirthdate()), tips); | |||||
| }); | |||||
| } | |||||
| } | |||||
| private void calScore(WxCUserBasicInfo cu, StringBuilder tips, WxCUser cUser) { | |||||
| int creditOrigin = 1; | |||||
| Integer levelScale = levelConfigMapper.getScale(cUser.getTenantId(), cUser.getScore()); | |||||
| int score = CreditUtil.calUserCredit(creditOrigin, cUser, levelScale, cu, scoreRulesService); | |||||
| log.info("[会员={},手机={},birthday={} , {} , 原始积分:{},计数后积分:{}]", cu.getNickName(), cu.getPhone(), DateUtils.format(cu.getBirthdate()), tips, creditOrigin, score); | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,17 @@ | |||||
| package com.iformall.common; | |||||
| import com.iformall.enums.EnumTableOperateType; | |||||
| import java.lang.annotation.*; | |||||
| @Target({ElementType.PARAMETER,ElementType.METHOD}) | |||||
| @Retention(RetentionPolicy.RUNTIME) | |||||
| @Documented | |||||
| public @interface TableLog { | |||||
| /** | |||||
| * 操作类型 | |||||
| * @return | |||||
| */ | |||||
| EnumTableOperateType operationType() default EnumTableOperateType.UPDATE; | |||||
| } | |||||
| @@ -43,6 +43,14 @@ public class BaseEntity implements Serializable { | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| protected String[] tempShop; | protected String[] tempShop; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "当前页", name = "pageIndex",example = "1") | |||||
| @TableField(exist = false) | |||||
| private Integer pageIndex; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "每页数据", name = "pageSize",example = "10") | |||||
| @TableField(exist = false) | |||||
| private Integer pageSize ; | |||||
| public String getSortColumns() { | public String getSortColumns() { | ||||
| if(StringUtils.isBlank(sortColumn)){ | if(StringUtils.isBlank(sortColumn)){ | ||||
| return sortColumns; | return sortColumns; | ||||
| @@ -0,0 +1,88 @@ | |||||
| package com.iformall.domain.po; | |||||
| import com.baomidou.mybatisplus.annotation.IdType; | |||||
| import com.baomidou.mybatisplus.annotation.TableId; | |||||
| import com.baomidou.mybatisplus.annotation.TableName; | |||||
| import java.io.Serializable; | |||||
| import java.util.Date; | |||||
| import com.iformall.enums.EnumCustomerRatingType; | |||||
| import com.iformall.enums.EnumCustomerType; | |||||
| import com.iformall.enums.EnumInvestChannel; | |||||
| import lombok.Data; | |||||
| import com.fasterxml.jackson.annotation.JsonFormat; | |||||
| /** | |||||
| * 客户列表 | |||||
| * | |||||
| * @author | |||||
| * @date 2019-09-24 14:48:11 | |||||
| */ | |||||
| @Data | |||||
| @TableName("invest_customer") | |||||
| public class InvestCustomerEntity extends BaseEntity { | |||||
| /** | |||||
| * 主键ID | |||||
| */ | |||||
| @TableId(type = IdType.ID_WORKER) | |||||
| @io.swagger.annotations.ApiModelProperty(value = "主键ID", name = "id") | |||||
| private Long id; | |||||
| /** | |||||
| * 租户ID | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "租户ID", name = "tenantId") | |||||
| private String tenantId; | |||||
| /** | |||||
| * 客户名称 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "客户名称", name = "name") | |||||
| private String name; | |||||
| /** | |||||
| * 电话 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "电话", name = "phone") | |||||
| private String phone; | |||||
| /** | |||||
| * 经营业态 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "经营业态", name = "business") | |||||
| private Integer business; | |||||
| /** | |||||
| * 品牌ID | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "品牌ID", name = "brandId") | |||||
| private Long brandId; | |||||
| /** | |||||
| * 客户分类:0-潜在客户;1-意向客户;2-合作客户;3-谈判失败 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "客户分类:0-潜在客户;1-意向客户;2-合作客户;3-谈判失败", name = "type") | |||||
| private EnumCustomerType type; | |||||
| /** | |||||
| * 客户预评级:0-无;1-主力店;2-次主力店;3-甲;4-乙;5-丙 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "客户预评级:0-无;1-主力店;2-次主力店;3-甲;4-乙;5-丙", name = "rating") | |||||
| private EnumCustomerRatingType rating; | |||||
| /** | |||||
| * 招商渠道:0-无;1-电视;2-广播;3-报纸;4-刊物;5-物联网;6-招商活动;7-中介机构;8-自定义渠道 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "招商渠道:0-无;1-电视;2-广播;3-报纸;4-刊物;5-物联网;6-招商活动;7-中介机构;8-自定义渠道", name = "investChannel") | |||||
| private EnumInvestChannel investChannel; | |||||
| /** | |||||
| * 创建时间 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "创建时间", name = "createDate", example = "2018-10-01 12:18:48") | |||||
| @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||||
| private Date createDate; | |||||
| /** | |||||
| * 更新时间 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "更新时间", name = "updateDate", example = "2018-10-01 12:18:48") | |||||
| @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||||
| private Date updateDate; | |||||
| } | |||||
| @@ -0,0 +1,77 @@ | |||||
| package com.iformall.domain.po; | |||||
| import com.baomidou.mybatisplus.annotation.IdType; | |||||
| import com.baomidou.mybatisplus.annotation.TableId; | |||||
| import com.baomidou.mybatisplus.annotation.TableName; | |||||
| import java.io.Serializable; | |||||
| import java.util.Date; | |||||
| import com.fasterxml.jackson.annotation.JsonIgnore; | |||||
| import com.iformall.enums.EnumInvestType; | |||||
| import lombok.Data; | |||||
| import com.fasterxml.jackson.annotation.JsonFormat; | |||||
| /** | |||||
| * 客户需求 | |||||
| * | |||||
| * @author | |||||
| * @date 2019-09-24 14:48:11 | |||||
| */ | |||||
| @Data | |||||
| @TableName("invest_demand") | |||||
| public class InvestDemandEntity extends BaseEntity { | |||||
| /** | |||||
| * 主键ID | |||||
| */ | |||||
| @TableId(type = IdType.ID_WORKER) | |||||
| @io.swagger.annotations.ApiModelProperty(value = "主键ID", name = "id") | |||||
| private Long id; | |||||
| /** | |||||
| * 租户ID | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "租户ID", name = "tenantId") | |||||
| private String tenantId; | |||||
| /** | |||||
| * 负责人 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "负责人", name = "owner") | |||||
| private Long owner; | |||||
| /** | |||||
| * 客户ID | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "客户ID", name = "customerId") | |||||
| private Long customerId; | |||||
| /** | |||||
| * 客户意向 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "客户意向", name = "intent") | |||||
| private String intent; | |||||
| /** | |||||
| * 目标类型:0-商铺招租;1-其他 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "目标类型:0-商铺招租;1-其他", name = "targetType") | |||||
| @JsonIgnore | |||||
| private EnumInvestType targetType; | |||||
| /** | |||||
| * 目标ID | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "目标ID", name = "targetId") | |||||
| private Long targetId; | |||||
| /** | |||||
| * 创建时间 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "创建时间", name = "createDate", example = "2018-10-01 12:18:48") | |||||
| @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||||
| private Date createDate; | |||||
| /** | |||||
| * 更新时间 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "更新时间", name = "updateDate", example = "2018-10-01 12:18:48") | |||||
| @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||||
| private Date updateDate; | |||||
| } | |||||
| @@ -0,0 +1,71 @@ | |||||
| package com.iformall.domain.po; | |||||
| import com.baomidou.mybatisplus.annotation.IdType; | |||||
| import com.baomidou.mybatisplus.annotation.TableId; | |||||
| import com.baomidou.mybatisplus.annotation.TableName; | |||||
| import java.io.Serializable; | |||||
| import java.util.Date; | |||||
| import com.fasterxml.jackson.annotation.JsonIgnore; | |||||
| import com.iformall.enums.EnumFollowType; | |||||
| import lombok.Data; | |||||
| import com.fasterxml.jackson.annotation.JsonFormat; | |||||
| /** | |||||
| * 跟踪记录 | |||||
| * | |||||
| * @author | |||||
| * @date 2019-09-24 14:48:11 | |||||
| */ | |||||
| @Data | |||||
| @TableName("invest_follow_record") | |||||
| public class InvestFollowRecordEntity extends BaseEntity { | |||||
| /** | |||||
| * 主键ID | |||||
| */ | |||||
| @TableId(type = IdType.ID_WORKER) | |||||
| @io.swagger.annotations.ApiModelProperty(value = "主键ID", name = "id") | |||||
| private Long id; | |||||
| /** | |||||
| * 租户ID | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "租户ID", name = "tenantId") | |||||
| private String tenantId; | |||||
| /** | |||||
| * 主谈人 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "主谈人", name = "owner") | |||||
| private Long owner; | |||||
| /** | |||||
| * 客户ID | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "客户ID", name = "customerId") | |||||
| private Long customerId; | |||||
| /** | |||||
| * 洽谈内容 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "洽谈内容", name = "content") | |||||
| private String content; | |||||
| /** | |||||
| * 跟踪类型:0-招商任务;1-客户需求 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "跟踪类型:0-招商任务;1-客户需求", name = "type") | |||||
| @JsonIgnore | |||||
| private EnumFollowType type; | |||||
| /** | |||||
| * 创建时间 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "创建时间", name = "createDate", example = "2018-10-01 12:18:48") | |||||
| @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||||
| private Date createDate; | |||||
| /** | |||||
| * 更新时间 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "更新时间", name = "updateDate", example = "2018-10-01 12:18:48") | |||||
| @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||||
| private Date updateDate; | |||||
| } | |||||
| @@ -0,0 +1,76 @@ | |||||
| package com.iformall.domain.po; | |||||
| import com.baomidou.mybatisplus.annotation.IdType; | |||||
| import com.baomidou.mybatisplus.annotation.TableField; | |||||
| import com.baomidou.mybatisplus.annotation.TableId; | |||||
| import com.baomidou.mybatisplus.annotation.TableName; | |||||
| import java.io.Serializable; | |||||
| import java.util.Date; | |||||
| import com.iformall.enums.EnumTableOperateType; | |||||
| import lombok.Data; | |||||
| import com.fasterxml.jackson.annotation.JsonFormat; | |||||
| /** | |||||
| * 操作记录 | |||||
| * | |||||
| * @author | |||||
| * @date 2019-09-24 14:48:11 | |||||
| */ | |||||
| @Data | |||||
| @TableName("invest_operate_record") | |||||
| public class InvestOperateRecordEntity extends BaseEntity { | |||||
| /** | |||||
| * 主键ID | |||||
| */ | |||||
| @TableId(type = IdType.ID_WORKER) | |||||
| @io.swagger.annotations.ApiModelProperty(value = "主键ID", name = "id") | |||||
| private Long id; | |||||
| /** | |||||
| * 租户ID | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "租户ID", name = "tenantId") | |||||
| private String tenantId; | |||||
| /** | |||||
| * 表名称 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "表名称", name = "tbl") | |||||
| private String tbl; | |||||
| /** | |||||
| * 主键ID | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "主键ID", name = "tid") | |||||
| private Long tid; | |||||
| /** | |||||
| * 操作人:0-系统;其它 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "操作人:0-系统;其它", name = "operator") | |||||
| private Long operator; | |||||
| /** | |||||
| * 操作类型:0-ADD;1-UPDATE;2-DELETE | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "操作类型:0-ADD;1-UPDATE;2-DELETE", name = "operateType") | |||||
| private EnumTableOperateType operateType; | |||||
| /** | |||||
| * 更新前 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "更新前", name = "before") | |||||
| @TableField(value = "`before`") | |||||
| private String before; | |||||
| /** | |||||
| * 更新后 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "更新后", name = "after") | |||||
| @TableField(value = "`after`") | |||||
| private String after; | |||||
| /** | |||||
| * 创建时间 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "创建时间", name = "createDate", example = "2018-10-01 12:18:48") | |||||
| @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||||
| private Date createDate; | |||||
| } | |||||
| @@ -0,0 +1,75 @@ | |||||
| package com.iformall.domain.po; | |||||
| import com.baomidou.mybatisplus.annotation.IdType; | |||||
| import com.baomidou.mybatisplus.annotation.TableId; | |||||
| import com.baomidou.mybatisplus.annotation.TableName; | |||||
| import java.io.Serializable; | |||||
| import java.util.Date; | |||||
| import lombok.Data; | |||||
| import com.fasterxml.jackson.annotation.JsonFormat; | |||||
| /** | |||||
| * 招商提醒 | |||||
| * | |||||
| * @author | |||||
| * @date 2019-09-24 14:48:11 | |||||
| */ | |||||
| @Data | |||||
| @TableName("invest_remind") | |||||
| public class InvestRemindEntity extends BaseEntity { | |||||
| /** | |||||
| * 主键ID | |||||
| */ | |||||
| @TableId(type = IdType.ID_WORKER) | |||||
| @io.swagger.annotations.ApiModelProperty(value = "主键ID", name = "id") | |||||
| private Long id; | |||||
| /** | |||||
| * 租户ID | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "租户ID", name = "tenantId") | |||||
| private String tenantId; | |||||
| /** | |||||
| * 提醒用户 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "提醒用户", name = "owner") | |||||
| private Long owner; | |||||
| /** | |||||
| * 提醒内容 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "提醒内容", name = "content") | |||||
| private String content; | |||||
| /** | |||||
| * 提醒时间 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "提醒时间", name = "minute") | |||||
| private Long minute; | |||||
| /** | |||||
| * 开始时间 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "开始时间", name = "beginDate", example = "2018-10-01 12:18:48") | |||||
| @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||||
| private Date beginDate; | |||||
| /** | |||||
| * 结束时间 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "结束时间", name = "endDate", example = "2018-10-01 12:18:48") | |||||
| @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||||
| private Date endDate; | |||||
| /** | |||||
| * 创建时间 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "创建时间", name = "createDate", example = "2018-10-01 12:18:48") | |||||
| @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||||
| private Date createDate; | |||||
| /** | |||||
| * 更新时间 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "更新时间", name = "updateDate", example = "2018-10-01 12:18:48") | |||||
| @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||||
| private Date updateDate; | |||||
| } | |||||
| @@ -0,0 +1,77 @@ | |||||
| package com.iformall.domain.po; | |||||
| import com.baomidou.mybatisplus.annotation.IdType; | |||||
| import com.baomidou.mybatisplus.annotation.TableId; | |||||
| import com.baomidou.mybatisplus.annotation.TableName; | |||||
| import java.io.Serializable; | |||||
| import java.util.Date; | |||||
| import com.fasterxml.jackson.annotation.JsonIgnore; | |||||
| import com.iformall.enums.EnumInvestType; | |||||
| import com.iformall.enums.EnumTaskStatus; | |||||
| import lombok.Data; | |||||
| import com.fasterxml.jackson.annotation.JsonFormat; | |||||
| /** | |||||
| * 招商任务 | |||||
| * | |||||
| * @author | |||||
| * @date 2019-09-24 14:48:11 | |||||
| */ | |||||
| @Data | |||||
| @TableName("invest_task") | |||||
| public class InvestTaskEntity extends BaseEntity { | |||||
| /** | |||||
| * 主键ID | |||||
| */ | |||||
| @TableId(type = IdType.ID_WORKER) | |||||
| @io.swagger.annotations.ApiModelProperty(value = "主键ID", name = "id") | |||||
| private Long id; | |||||
| /** | |||||
| * 租户ID | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "租户ID", name = "tenantId") | |||||
| private String tenantId; | |||||
| /** | |||||
| * 负责人 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "负责人", name = "owner") | |||||
| private String owner; | |||||
| /** | |||||
| * 任务状态:-1-关闭;0-待分配;1-洽谈中;2-意向签约;3-已完成 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "任务状态:-1-关闭;0-待分配;1-洽谈中;2-意向签约;3-已完成", name = "status") | |||||
| private EnumTaskStatus status; | |||||
| /** | |||||
| * 目标类型:0-商铺招租;1-其他 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "目标类型:0-商铺招租;1-其他", name = "targetType") | |||||
| @JsonIgnore | |||||
| private EnumInvestType targetType; | |||||
| /** | |||||
| * 目标ID | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "目标ID", name = "targetId") | |||||
| private Long targetId; | |||||
| /** | |||||
| * 任务设定条件 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "任务设定条件", name = "content") | |||||
| private String content; | |||||
| /** | |||||
| * 创建时间 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "创建时间", name = "createDate", example = "2018-10-01 12:18:48") | |||||
| @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||||
| private Date createDate; | |||||
| /** | |||||
| * 更新时间 | |||||
| */ | |||||
| @io.swagger.annotations.ApiModelProperty(value = "更新时间", name = "updateDate", example = "2018-10-01 12:18:48") | |||||
| @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||||
| private Date updateDate; | |||||
| } | |||||
| @@ -0,0 +1,44 @@ | |||||
| package com.iformall.enums; | |||||
| import com.baomidou.mybatisplus.annotation.EnumValue; | |||||
| import com.fasterxml.jackson.annotation.JsonValue; | |||||
| /** | |||||
| * 客户预评级:0-无;1-主力店;2-次主力店;3-甲;4-乙;5-丙 | |||||
| */ | |||||
| public enum EnumCustomerRatingType { | |||||
| NULL(0, ""), | |||||
| MAIN(1, "主力店"), | |||||
| SECONDARY(2, "次主力店"), | |||||
| THIRD(3, "甲"), | |||||
| FOUR(4, "乙"), | |||||
| FIVE(5, "丙"), | |||||
| ; | |||||
| public static EnumCustomerRatingType getEnum(Integer code) { | |||||
| for (EnumCustomerRatingType value : values()) { | |||||
| if (value.getCode().equals(code)) { | |||||
| return value; | |||||
| } | |||||
| } | |||||
| return null; | |||||
| } | |||||
| @EnumValue | |||||
| private final Integer code; | |||||
| private final String info; | |||||
| EnumCustomerRatingType(Integer code, String info) { | |||||
| this.code = code; | |||||
| this.info = info; | |||||
| } | |||||
| @JsonValue | |||||
| public Integer getCode() { | |||||
| return code; | |||||
| } | |||||
| public String getInfo() { | |||||
| return info; | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,42 @@ | |||||
| package com.iformall.enums; | |||||
| import com.baomidou.mybatisplus.annotation.EnumValue; | |||||
| import com.fasterxml.jackson.annotation.JsonValue; | |||||
| /** | |||||
| * 客户分类:0-潜在客户;1-意向客户;2-合作客户;3-谈判失败 | |||||
| */ | |||||
| public enum EnumCustomerType { | |||||
| POTENTIAL(0, "潜在客户"), | |||||
| INTENTIONAL(1, "意向客户"), | |||||
| COOPERATIVE(2, "合作客户"), | |||||
| FAILURE(3, "谈判失败"), | |||||
| ; | |||||
| public static EnumCustomerType getEnum(Integer code) { | |||||
| for (EnumCustomerType value : values()) { | |||||
| if (value.getCode().equals(code)) { | |||||
| return value; | |||||
| } | |||||
| } | |||||
| return null; | |||||
| } | |||||
| @EnumValue | |||||
| private final Integer code; | |||||
| private final String info; | |||||
| EnumCustomerType(Integer code, String info) { | |||||
| this.code = code; | |||||
| this.info = info; | |||||
| } | |||||
| @JsonValue | |||||
| public Integer getCode() { | |||||
| return code; | |||||
| } | |||||
| public String getInfo() { | |||||
| return info; | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,38 @@ | |||||
| package com.iformall.enums; | |||||
| import com.baomidou.mybatisplus.annotation.EnumValue; | |||||
| /** | |||||
| * 跟踪类型:0-招商任务;1-客户需求 | |||||
| */ | |||||
| public enum EnumFollowType { | |||||
| TASK(0, "招商任务"), | |||||
| DEMAND(1, "客户需求"), | |||||
| ; | |||||
| public static EnumFollowType getEnum(Integer code) { | |||||
| for (EnumFollowType value : values()) { | |||||
| if (value.getCode().equals(code)) { | |||||
| return value; | |||||
| } | |||||
| } | |||||
| return null; | |||||
| } | |||||
| @EnumValue | |||||
| private final Integer code; | |||||
| private final String info; | |||||
| EnumFollowType(Integer code, String info) { | |||||
| this.code = code; | |||||
| this.info = info; | |||||
| } | |||||
| public Integer getCode() { | |||||
| return code; | |||||
| } | |||||
| public String getInfo() { | |||||
| return info; | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,46 @@ | |||||
| package com.iformall.enums; | |||||
| import com.baomidou.mybatisplus.annotation.EnumValue; | |||||
| import com.fasterxml.jackson.annotation.JsonValue; | |||||
| /** | |||||
| * 招商渠道:0-无;1-电视;2-广播;3-报纸;4-刊物;5-物联网;6-招商活动;7-中介机构;8-自定义渠道 | |||||
| */ | |||||
| public enum EnumInvestChannel { | |||||
| TV(1, "电视"), | |||||
| BROADCAST(2, "广播"), | |||||
| NEWSPAPER(3, "报纸"), | |||||
| PUBLICATION(4, "刊物"), | |||||
| INTERNET(5, "物联网"), | |||||
| ACTIVITIES(6, "招商活动"), | |||||
| AGENCY(7, "中介机构"), | |||||
| CUSTOMIZE(8, "自定义渠道"), | |||||
| ; | |||||
| public static EnumInvestChannel getEnum(Integer code) { | |||||
| for (EnumInvestChannel value : values()) { | |||||
| if (value.getCode().equals(code)) { | |||||
| return value; | |||||
| } | |||||
| } | |||||
| return null; | |||||
| } | |||||
| EnumInvestChannel(Integer code, String info) { | |||||
| this.code = code; | |||||
| this.info = info; | |||||
| } | |||||
| private final Integer code; | |||||
| @EnumValue | |||||
| private final String info; | |||||
| public Integer getCode() { | |||||
| return code; | |||||
| } | |||||
| @JsonValue | |||||
| public String getInfo() { | |||||
| return info; | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,37 @@ | |||||
| package com.iformall.enums; | |||||
| import com.baomidou.mybatisplus.annotation.EnumValue; | |||||
| /** | |||||
| * 招商类型:0-商铺招租;1-其他 | |||||
| */ | |||||
| public enum EnumInvestType { | |||||
| SHOP(0, "商铺"), | |||||
| ; | |||||
| public static EnumInvestType getEnum(Integer code) { | |||||
| for (EnumInvestType value : values()) { | |||||
| if (value.getCode().equals(code)) { | |||||
| return value; | |||||
| } | |||||
| } | |||||
| return null; | |||||
| } | |||||
| @EnumValue | |||||
| private final Integer code; | |||||
| private final String info; | |||||
| EnumInvestType(Integer code, String info) { | |||||
| this.code = code; | |||||
| this.info = info; | |||||
| } | |||||
| public Integer getCode() { | |||||
| return code; | |||||
| } | |||||
| public String getInfo() { | |||||
| return info; | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,40 @@ | |||||
| package com.iformall.enums; | |||||
| import com.baomidou.mybatisplus.annotation.EnumValue; | |||||
| /** | |||||
| * 拜访方式:0-拜访;1-来访;2-电话;3-短信、微信或其它 | |||||
| */ | |||||
| public enum EnumNegotiationType { | |||||
| TO_VISIT(0, "拜访"), | |||||
| COME_VISIT(1, "来访"), | |||||
| TELEPHONE(2, "电话"), | |||||
| MESSAGE(3, "短信、微信或其它"), | |||||
| ; | |||||
| public static EnumNegotiationType getEnum(Integer code) { | |||||
| for (EnumNegotiationType value : values()) { | |||||
| if (value.getCode().equals(code)) { | |||||
| return value; | |||||
| } | |||||
| } | |||||
| return null; | |||||
| } | |||||
| @EnumValue | |||||
| private final Integer code; | |||||
| private final String info; | |||||
| EnumNegotiationType(Integer code, String info) { | |||||
| this.code = code; | |||||
| this.info = info; | |||||
| } | |||||
| public Integer getCode() { | |||||
| return code; | |||||
| } | |||||
| public String getInfo() { | |||||
| return info; | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,39 @@ | |||||
| package com.iformall.enums; | |||||
| import com.baomidou.mybatisplus.annotation.EnumValue; | |||||
| /** | |||||
| * 操作类型:0-添加;1-更新;2-删除 | |||||
| */ | |||||
| public enum EnumTableOperateType { | |||||
| ADD(0, "添加"), | |||||
| UPDATE(1, "更新"), | |||||
| DELETE(2, "删除"), | |||||
| ; | |||||
| public static EnumTableOperateType getEnum(Integer code) { | |||||
| for (EnumTableOperateType value : values()) { | |||||
| if (value.getCode().equals(code)) { | |||||
| return value; | |||||
| } | |||||
| } | |||||
| return null; | |||||
| } | |||||
| @EnumValue | |||||
| private final Integer code; | |||||
| private final String info; | |||||
| EnumTableOperateType(Integer code, String info) { | |||||
| this.code = code; | |||||
| this.info = info; | |||||
| } | |||||
| public Integer getCode() { | |||||
| return code; | |||||
| } | |||||
| public String getInfo() { | |||||
| return info; | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,43 @@ | |||||
| package com.iformall.enums; | |||||
| import com.baomidou.mybatisplus.annotation.EnumValue; | |||||
| import com.fasterxml.jackson.annotation.JsonValue; | |||||
| /** | |||||
| * 任务状态:-1-关闭;0-待分配;1-洽谈中;2-意向签约;3-已完成 | |||||
| */ | |||||
| public enum EnumTaskStatus { | |||||
| CLOSE(-1, "关闭"), | |||||
| CREATED(0, "待分配"), | |||||
| NEGOTIATING(1, "洽谈中"), | |||||
| INTENTION(2, "意向签约"), | |||||
| FINISH(3, "完成"), | |||||
| ; | |||||
| public static EnumTaskStatus getEnum(Integer code) { | |||||
| for (EnumTaskStatus value : values()) { | |||||
| if (value.getCode().equals(code)) { | |||||
| return value; | |||||
| } | |||||
| } | |||||
| return null; | |||||
| } | |||||
| EnumTaskStatus(Integer code, String info) { | |||||
| this.code = code; | |||||
| this.info = info; | |||||
| } | |||||
| @EnumValue | |||||
| private final Integer code; | |||||
| private final String info; | |||||
| @JsonValue | |||||
| public Integer getCode() { | |||||
| return code; | |||||
| } | |||||
| public String getInfo() { | |||||
| return info; | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,17 @@ | |||||
| package com.iformall.mapper; | |||||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||||
| import com.iformall.domain.po.InvestCustomerEntity; | |||||
| import org.apache.ibatis.annotations.Mapper; | |||||
| /** | |||||
| * 客户列表 | |||||
| * | |||||
| * @author | |||||
| * @date 2019-09-23 18:40:43 | |||||
| */ | |||||
| @Mapper | |||||
| public interface InvestCustomerDao extends BaseMapper<InvestCustomerEntity> { | |||||
| } | |||||
| @@ -0,0 +1,17 @@ | |||||
| package com.iformall.mapper; | |||||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||||
| import com.iformall.domain.po.InvestDemandEntity; | |||||
| import org.apache.ibatis.annotations.Mapper; | |||||
| /** | |||||
| * 客户需求 | |||||
| * | |||||
| * @author | |||||
| * @date 2019-09-23 18:40:42 | |||||
| */ | |||||
| @Mapper | |||||
| public interface InvestDemandDao extends BaseMapper<InvestDemandEntity> { | |||||
| } | |||||
| @@ -0,0 +1,17 @@ | |||||
| package com.iformall.mapper; | |||||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||||
| import com.iformall.domain.po.InvestFollowRecordEntity; | |||||
| import org.apache.ibatis.annotations.Mapper; | |||||
| /** | |||||
| * 跟踪记录 | |||||
| * | |||||
| * @author | |||||
| * @date 2019-09-23 18:40:43 | |||||
| */ | |||||
| @Mapper | |||||
| public interface InvestFollowRecordDao extends BaseMapper<InvestFollowRecordEntity> { | |||||
| } | |||||
| @@ -0,0 +1,17 @@ | |||||
| package com.iformall.mapper; | |||||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||||
| import com.iformall.domain.po.InvestOperateRecordEntity; | |||||
| import org.apache.ibatis.annotations.Mapper; | |||||
| /** | |||||
| * 操作记录 | |||||
| * | |||||
| * @author | |||||
| * @date 2019-09-23 18:40:43 | |||||
| */ | |||||
| @Mapper | |||||
| public interface InvestOperateRecordDao extends BaseMapper<InvestOperateRecordEntity> { | |||||
| } | |||||
| @@ -0,0 +1,17 @@ | |||||
| package com.iformall.mapper; | |||||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||||
| import com.iformall.domain.po.InvestRemindEntity; | |||||
| import org.apache.ibatis.annotations.Mapper; | |||||
| /** | |||||
| * 招商提醒 | |||||
| * | |||||
| * @author | |||||
| * @date 2019-09-23 18:40:43 | |||||
| */ | |||||
| @Mapper | |||||
| public interface InvestRemindDao extends BaseMapper<InvestRemindEntity> { | |||||
| } | |||||
| @@ -0,0 +1,17 @@ | |||||
| package com.iformall.mapper; | |||||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||||
| import com.iformall.domain.po.InvestTaskEntity; | |||||
| import org.apache.ibatis.annotations.Mapper; | |||||
| /** | |||||
| * 招商任务 | |||||
| * | |||||
| * @author | |||||
| * @date 2019-09-23 18:40:43 | |||||
| */ | |||||
| @Mapper | |||||
| public interface InvestTaskDao extends BaseMapper<InvestTaskEntity> { | |||||
| } | |||||
| @@ -0,0 +1,19 @@ | |||||
| package com.iformall.service.invest; | |||||
| import com.baomidou.mybatisplus.extension.service.IService; | |||||
| import com.iformall.domain.po.InvestCustomerEntity; | |||||
| import java.util.List; | |||||
| /** | |||||
| * 客户列表 | |||||
| * | |||||
| * @author | |||||
| * @date 2019-09-23 18:40:43 | |||||
| */ | |||||
| public interface InvestCustomerService extends IService<InvestCustomerEntity> { | |||||
| List queryPage(InvestCustomerEntity params); | |||||
| } | |||||
| @@ -0,0 +1,19 @@ | |||||
| package com.iformall.service.invest; | |||||
| import com.baomidou.mybatisplus.extension.service.IService; | |||||
| import com.iformall.domain.po.InvestDemandEntity; | |||||
| import java.util.List; | |||||
| /** | |||||
| * 客户需求 | |||||
| * | |||||
| * @author | |||||
| * @date 2019-09-23 18:40:42 | |||||
| */ | |||||
| public interface InvestDemandService extends IService<InvestDemandEntity> { | |||||
| List queryPage(InvestDemandEntity params); | |||||
| } | |||||
| @@ -0,0 +1,20 @@ | |||||
| package com.iformall.service.invest; | |||||
| import com.baomidou.mybatisplus.extension.service.IService; | |||||
| import com.iformall.domain.po.InvestFollowRecordEntity; | |||||
| import java.util.List; | |||||
| import java.util.Map; | |||||
| /** | |||||
| * 跟踪记录 | |||||
| * | |||||
| * @author | |||||
| * @date 2019-09-23 18:40:43 | |||||
| */ | |||||
| public interface InvestFollowRecordService extends IService<InvestFollowRecordEntity> { | |||||
| List queryPage(InvestFollowRecordEntity params); | |||||
| } | |||||
| @@ -0,0 +1,19 @@ | |||||
| package com.iformall.service.invest; | |||||
| import com.baomidou.mybatisplus.extension.service.IService; | |||||
| import com.iformall.domain.po.InvestOperateRecordEntity; | |||||
| import java.util.List; | |||||
| /** | |||||
| * 操作记录 | |||||
| * | |||||
| * @author | |||||
| * @date 2019-09-23 18:40:43 | |||||
| */ | |||||
| public interface InvestOperateRecordService extends IService<InvestOperateRecordEntity> { | |||||
| List queryPage(InvestOperateRecordEntity params); | |||||
| } | |||||
| @@ -0,0 +1,20 @@ | |||||
| package com.iformall.service.invest; | |||||
| import com.baomidou.mybatisplus.extension.service.IService; | |||||
| import com.iformall.domain.po.InvestRemindEntity; | |||||
| import java.util.List; | |||||
| import java.util.Map; | |||||
| /** | |||||
| * 招商提醒 | |||||
| * | |||||
| * @author | |||||
| * @date 2019-09-23 18:40:43 | |||||
| */ | |||||
| public interface InvestRemindService extends IService<InvestRemindEntity> { | |||||
| List queryPage(InvestRemindEntity params); | |||||
| } | |||||
| @@ -0,0 +1,19 @@ | |||||
| package com.iformall.service.invest; | |||||
| import com.baomidou.mybatisplus.extension.service.IService; | |||||
| import com.iformall.domain.po.InvestTaskEntity; | |||||
| import java.util.List; | |||||
| /** | |||||
| * 招商任务 | |||||
| * | |||||
| * @author | |||||
| * @date 2019-09-23 18:40:43 | |||||
| */ | |||||
| public interface InvestTaskService extends IService<InvestTaskEntity> { | |||||
| List queryPage(InvestTaskEntity params); | |||||
| } | |||||
| @@ -0,0 +1,44 @@ | |||||
| package com.iformall.service.invest.impl; | |||||
| import com.baomidou.mybatisplus.core.conditions.Wrapper; | |||||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||||
| import com.iformall.common.TableLog; | |||||
| import com.iformall.domain.po.InvestCustomerEntity; | |||||
| import com.iformall.mapper.InvestCustomerDao; | |||||
| import com.iformall.service.invest.InvestCustomerService; | |||||
| import org.springframework.stereotype.Service; | |||||
| import java.util.List; | |||||
| @Service | |||||
| public class InvestCustomerServiceImpl extends ServiceImpl<InvestCustomerDao, InvestCustomerEntity> implements InvestCustomerService { | |||||
| @Override | |||||
| public List queryPage(InvestCustomerEntity params) { | |||||
| return this.list(); | |||||
| } | |||||
| @TableLog | |||||
| @Override | |||||
| public boolean save(InvestCustomerEntity entity) { | |||||
| return super.save(entity); | |||||
| } | |||||
| @TableLog | |||||
| @Override | |||||
| public boolean update(InvestCustomerEntity entity, Wrapper<InvestCustomerEntity> updateWrapper) { | |||||
| return super.update(entity, updateWrapper); | |||||
| } | |||||
| @TableLog | |||||
| @Override | |||||
| public boolean saveOrUpdate(InvestCustomerEntity entity) { | |||||
| return super.saveOrUpdate(entity); | |||||
| } | |||||
| @TableLog | |||||
| @Override | |||||
| public boolean updateById(InvestCustomerEntity entity) { | |||||
| return super.updateById(entity); | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,47 @@ | |||||
| package com.iformall.service.invest.impl; | |||||
| import com.baomidou.mybatisplus.core.conditions.Wrapper; | |||||
| import com.iformall.common.TableLog; | |||||
| import com.iformall.domain.po.InvestDemandEntity; | |||||
| import com.iformall.mapper.InvestDemandDao; | |||||
| import com.iformall.service.invest.InvestDemandService; | |||||
| import org.springframework.stereotype.Service; | |||||
| import java.util.List; | |||||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||||
| @Service | |||||
| public class InvestDemandServiceImpl extends ServiceImpl<InvestDemandDao, InvestDemandEntity> implements InvestDemandService { | |||||
| @Override | |||||
| public List queryPage(InvestDemandEntity params) { | |||||
| return this.list() ; | |||||
| } | |||||
| @TableLog | |||||
| @Override | |||||
| public boolean save(InvestDemandEntity entity) { | |||||
| return super.save(entity); | |||||
| } | |||||
| @TableLog | |||||
| @Override | |||||
| public boolean update(InvestDemandEntity entity, Wrapper<InvestDemandEntity> updateWrapper) { | |||||
| return super.update(entity, updateWrapper); | |||||
| } | |||||
| @TableLog | |||||
| @Override | |||||
| public boolean saveOrUpdate(InvestDemandEntity entity) { | |||||
| return super.saveOrUpdate(entity); | |||||
| } | |||||
| @TableLog | |||||
| @Override | |||||
| public boolean updateById(InvestDemandEntity entity) { | |||||
| return super.updateById(entity); | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,45 @@ | |||||
| package com.iformall.service.invest.impl; | |||||
| import com.baomidou.mybatisplus.core.conditions.Wrapper; | |||||
| import com.iformall.common.TableLog; | |||||
| import com.iformall.domain.po.InvestFollowRecordEntity; | |||||
| import com.iformall.mapper.InvestFollowRecordDao; | |||||
| import com.iformall.service.invest.InvestFollowRecordService; | |||||
| import org.springframework.stereotype.Service; | |||||
| import java.util.List; | |||||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||||
| @Service | |||||
| public class InvestFollowRecordServiceImpl extends ServiceImpl<InvestFollowRecordDao, InvestFollowRecordEntity> implements InvestFollowRecordService { | |||||
| @Override | |||||
| public List queryPage(InvestFollowRecordEntity params) { | |||||
| return this.list() ; | |||||
| } | |||||
| @TableLog | |||||
| @Override | |||||
| public boolean save(InvestFollowRecordEntity entity) { | |||||
| return super.save(entity); | |||||
| } | |||||
| @TableLog | |||||
| @Override | |||||
| public boolean update(InvestFollowRecordEntity entity, Wrapper<InvestFollowRecordEntity> updateWrapper) { | |||||
| return super.update(entity, updateWrapper); | |||||
| } | |||||
| @TableLog | |||||
| @Override | |||||
| public boolean saveOrUpdate(InvestFollowRecordEntity entity) { | |||||
| return super.saveOrUpdate(entity); | |||||
| } | |||||
| @TableLog | |||||
| @Override | |||||
| public boolean updateById(InvestFollowRecordEntity entity) { | |||||
| return super.updateById(entity); | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,46 @@ | |||||
| package com.iformall.service.invest.impl; | |||||
| import com.baomidou.mybatisplus.core.conditions.Wrapper; | |||||
| import com.iformall.common.TableLog; | |||||
| import com.iformall.domain.po.InvestOperateRecordEntity; | |||||
| import com.iformall.mapper.InvestOperateRecordDao; | |||||
| import com.iformall.service.invest.InvestOperateRecordService; | |||||
| import org.springframework.stereotype.Service; | |||||
| import java.util.List; | |||||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||||
| @Service | |||||
| public class InvestOperateRecordServiceImpl extends ServiceImpl<InvestOperateRecordDao, InvestOperateRecordEntity> implements InvestOperateRecordService { | |||||
| @Override | |||||
| public List queryPage(InvestOperateRecordEntity params) { | |||||
| return this.list() ; | |||||
| } | |||||
| @TableLog | |||||
| @Override | |||||
| public boolean save(InvestOperateRecordEntity entity) { | |||||
| return super.save(entity); | |||||
| } | |||||
| @TableLog | |||||
| @Override | |||||
| public boolean update(InvestOperateRecordEntity entity, Wrapper<InvestOperateRecordEntity> updateWrapper) { | |||||
| return super.update(entity, updateWrapper); | |||||
| } | |||||
| @TableLog | |||||
| @Override | |||||
| public boolean saveOrUpdate(InvestOperateRecordEntity entity) { | |||||
| return super.saveOrUpdate(entity); | |||||
| } | |||||
| @TableLog | |||||
| @Override | |||||
| public boolean updateById(InvestOperateRecordEntity entity) { | |||||
| return super.updateById(entity); | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,46 @@ | |||||
| package com.iformall.service.invest.impl; | |||||
| import com.baomidou.mybatisplus.core.conditions.Wrapper; | |||||
| import com.iformall.common.TableLog; | |||||
| import com.iformall.domain.po.InvestRemindEntity; | |||||
| import com.iformall.mapper.InvestRemindDao; | |||||
| import com.iformall.service.invest.InvestRemindService; | |||||
| import org.springframework.stereotype.Service; | |||||
| import java.util.List; | |||||
| import java.util.Map; | |||||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||||
| @Service | |||||
| public class InvestRemindServiceImpl extends ServiceImpl<InvestRemindDao, InvestRemindEntity> implements InvestRemindService { | |||||
| @Override | |||||
| public List queryPage(InvestRemindEntity params) { | |||||
| return this.list() ; | |||||
| } | |||||
| @TableLog | |||||
| @Override | |||||
| public boolean save(InvestRemindEntity entity) { | |||||
| return super.save(entity); | |||||
| } | |||||
| @TableLog | |||||
| @Override | |||||
| public boolean update(InvestRemindEntity entity, Wrapper<InvestRemindEntity> updateWrapper) { | |||||
| return super.update(entity, updateWrapper); | |||||
| } | |||||
| @TableLog | |||||
| @Override | |||||
| public boolean saveOrUpdate(InvestRemindEntity entity) { | |||||
| return super.saveOrUpdate(entity); | |||||
| } | |||||
| @TableLog | |||||
| @Override | |||||
| public boolean updateById(InvestRemindEntity entity) { | |||||
| return super.updateById(entity); | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,45 @@ | |||||
| package com.iformall.service.invest.impl; | |||||
| import com.baomidou.mybatisplus.core.conditions.Wrapper; | |||||
| import com.iformall.common.TableLog; | |||||
| import com.iformall.domain.po.InvestTaskEntity; | |||||
| import com.iformall.mapper.InvestTaskDao; | |||||
| import com.iformall.service.invest.InvestTaskService; | |||||
| import org.springframework.stereotype.Service; | |||||
| import java.util.List; | |||||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||||
| @Service | |||||
| public class InvestTaskServiceImpl extends ServiceImpl<InvestTaskDao, InvestTaskEntity> implements InvestTaskService { | |||||
| @Override | |||||
| public List queryPage(InvestTaskEntity params) { | |||||
| return this.list() ; | |||||
| } | |||||
| @TableLog | |||||
| @Override | |||||
| public boolean save(InvestTaskEntity entity) { | |||||
| return super.save(entity); | |||||
| } | |||||
| @TableLog | |||||
| @Override | |||||
| public boolean update(InvestTaskEntity entity, Wrapper<InvestTaskEntity> updateWrapper) { | |||||
| return super.update(entity, updateWrapper); | |||||
| } | |||||
| @TableLog | |||||
| @Override | |||||
| public boolean saveOrUpdate(InvestTaskEntity entity) { | |||||
| return super.saveOrUpdate(entity); | |||||
| } | |||||
| @TableLog | |||||
| @Override | |||||
| public boolean updateById(InvestTaskEntity entity) { | |||||
| return super.updateById(entity); | |||||
| } | |||||
| } | |||||
| @@ -62,7 +62,7 @@ mybatis-plus: | |||||
| cache-enabled: false | cache-enabled: false | ||||
| call-setters-on-nulls: true | call-setters-on-nulls: true | ||||
| type-aliases-package: com.iformall.domain.po | type-aliases-package: com.iformall.domain.po | ||||
| type-enums-package: com.iformall.enums | |||||
| # PageHelper | # PageHelper | ||||
| pagehelper: | pagehelper: | ||||
| @@ -54,6 +54,7 @@ mybatis-plus: | |||||
| cache-enabled: false | cache-enabled: false | ||||
| call-setters-on-nulls: true | call-setters-on-nulls: true | ||||
| type-aliases-package: com.iformall.domain.po | type-aliases-package: com.iformall.domain.po | ||||
| type-enums-package: com.iformall.enums | |||||
| # PageHelper | # PageHelper | ||||
| pagehelper: | pagehelper: | ||||