Commit 80738b3ba62549e498ce888f2e361d5fd3f7bcc5

Authored by 张志伟
1 parent e38cdca3

公共池站岗必要类

doc/v2.0/update.sql
1 1 drop table if exists customer_clue_pool;
2 2  
3 3 drop table if exists follow_task;
  4 +
  5 +
  6 +CREATE TABLE IF NOT EXISTS fw_valhalla.pub_stand_staff_info
  7 +(
  8 + id bigint auto_increment comment 'pk'
  9 + primary key,
  10 + staff_name varchar(255) null comment '人员名称',
  11 + staff_id bigint not null comment '人员id',
  12 + lining tinyint(1) not null comment '是否处于排队中',
  13 + queueable tinyint(1) not null comment '可排队的',
  14 + no_involved tinyint(1) not null comment '不参与分配',
  15 + stand_type int(3) not null comment '站岗类型 1:公共池 2:活动',
  16 + id_code varchar(255) null comment '识别码 站岗类型为公共池类型时为空',
  17 + stand_rang int(3) not null comment '站岗范围 1:本门店范围 2:区域范围',
  18 + reason_of_no_lining varchar(255) null comment '不在队列原因',
  19 + shop_id bigint not null comment '门店id',
  20 + shop_name varchar(255) null comment '门店名称',
  21 + group_id bigint not null comment '集团id',
  22 + create_time datetime not null,
  23 + update_time datetime null,
  24 + constraint pub_stand_staff_info_staff_id_uindex
  25 + unique (staff_id) comment '用户id'
  26 +)
  27 + comment '公共池站岗配置';
  28 +
... ...
fw-valhalla-dao/src/main/java/cn/fw/valhalla/dao/mapper/PubStandStaffInfoMapper.java 0 → 100644
  1 +package cn.fw.valhalla.dao.mapper;
  2 +
  3 +import cn.fw.valhalla.domain.db.pub.PubStandStaffInfo;
  4 +import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  5 +import org.springframework.stereotype.Repository;
  6 +
  7 +
  8 +/**
  9 + *
  10 + * 公共池站岗人员配置
  11 + *
  12 + * @className : PubStandStaffInfoMapper
  13 + * @description : 公共池站岗人员配置
  14 + * @author : kurisu
  15 + * @date : 2023-03-10 11:40
  16 + * @version : 1.0
  17 + */
  18 +@Repository
  19 +public interface PubStandStaffInfoMapper extends BaseMapper<PubStandStaffInfo> {
  20 +}
0 21 \ No newline at end of file
... ...
fw-valhalla-dao/src/main/resources/mapper/PubStandStaffInfoMapper.xml 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="cn.fw.valhalla.dao.mapper.PubStandStaffInfoMapper">
  4 +
  5 +</mapper>
... ...
fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/db/WechatSubscribe.kt renamed to fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/db/WechatSubscribe.java
1   -package cn.fw.valhalla.domain.db
  1 +package cn.fw.valhalla.domain.db;
2 2  
3   -import cn.fw.common.annotation.NoArg
4   -import cn.fw.common.data.entity.BaseEntity
5   -import lombok.Data
6   -import java.util.Date
  3 +import cn.fw.common.data.entity.BaseEntity;
  4 +import lombok.Data;
  5 +
  6 +import java.util.Date;
7 7  
8 8 /**
9 9 * 微信公众号关注情况
  10 + *
  11 + * @author : kurisu
  12 + * @version : 1.0
10 13 * @className : WechatSubscribe
11 14 * @description : 微信公众号关注情况
12   - * @author : kurisu
13 15 * @date : 2023-03-09 23:18
14   - * @version : 1.0
15 16 */
16 17 @Data
17   -@NoArg
18   -data class WechatSubscribe(
  18 +public class WechatSubscribe extends BaseEntity<WechatSubscribe, Long> {
19 19 /**
20 20 * 会员号
21 21 */
22   - var memberId: Long?,
  22 + private Long memberId;
23 23 /**
24 24 * 是否关注公众号
25 25 */
26   - var subscribed: Boolean?,
  26 + private Boolean subscribed;
27 27 /**
28 28 * 关注时间
29 29 */
30   - var subscribeTime: Date?,
  30 + private Date subscribeTime;
31 31 /**
32 32 * 取关时间
33 33 */
34   - var unSubscribeTime: Date?,
35   -) : BaseEntity<WechatSubscribe, Long>()
  34 + private Date unSubscribeTime;
  35 +}
36 36 \ No newline at end of file
... ...
fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/db/pub/PubStandStaffInfo.java 0 → 100644
  1 +package cn.fw.valhalla.domain.db.pub;
  2 +
  3 +import cn.fw.common.data.entity.BaseAuditableTimeEntity;
  4 +import cn.fw.valhalla.domain.enums.PubStandRang;
  5 +import cn.fw.valhalla.domain.enums.PubStandType;
  6 +import lombok.Data;
  7 +
  8 +/**
  9 + * @author : kurisu
  10 + * @version : 1.0
  11 + * @className : PubStandStaffInfo
  12 + * @description : 公共池站岗人员配置信息
  13 + * @date : 2023-03-10 15:53
  14 + */
  15 +@Data
  16 +public class PubStandStaffInfo extends BaseAuditableTimeEntity<PubStandStaffInfo, Long> {
  17 + /**
  18 + * 人员名称
  19 + */
  20 + private String staffName;
  21 + /**
  22 + * 人员id
  23 + */
  24 + private Long staffId;
  25 + /**
  26 + * 是否处于排队中
  27 + */
  28 + private Boolean lining;
  29 + /**
  30 + * 是否可站岗
  31 + */
  32 + private Boolean queueable;
  33 + /**
  34 + * 不参与【员工主动设置】
  35 + */
  36 + private Boolean noInvolved;
  37 + /**
  38 + * 站岗类型
  39 + */
  40 + private PubStandType standType;
  41 + /**
  42 + * 站岗标识码「活动类型为活动编号」
  43 + */
  44 + private String idCode;
  45 + /**
  46 + * 站岗范围
  47 + */
  48 + private PubStandRang standRang;
  49 + /**
  50 + * 停止排队的原因
  51 + */
  52 + private String reasonOfNoLining;
  53 + /**
  54 + * 门店id
  55 + */
  56 + private Long shopId;
  57 + /**
  58 + * 门店名称
  59 + */
  60 + private String shopName;
  61 + /**
  62 + * 集团id
  63 + */
  64 + private Long groupId;
  65 +}
... ...
fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/enums/PubStandRang.java 0 → 100644
  1 +package cn.fw.valhalla.domain.enums;
  2 +
  3 +import com.baomidou.mybatisplus.core.enums.IEnum;
  4 +import com.fasterxml.jackson.annotation.JsonCreator;
  5 +import com.fasterxml.jackson.annotation.JsonValue;
  6 +
  7 +/**
  8 + * 公共池站岗范围
  9 + *
  10 + * @author : kurisu
  11 + * @version : 1.0
  12 + * @className : PubStandRang
  13 + * @description : 公共池站岗范围
  14 + * @date : 2023-03-10 11:25
  15 + */
  16 +public enum PubStandRang implements IEnum<Integer> {
  17 + /**
  18 + * 本门店
  19 + */
  20 + SHOP(1),
  21 + /**
  22 + * 区域 不含本门店
  23 + */
  24 + AREA(2),
  25 + ;
  26 +
  27 + /**
  28 + * 值
  29 + */
  30 + private final Integer value;
  31 +
  32 + PubStandRang(Integer value) {
  33 + this.value = value;
  34 + }
  35 +
  36 + /**
  37 + * 根据枚举值获取枚举对象
  38 + */
  39 + @JsonCreator
  40 + public static PubStandRang ofValue(final Integer value) {
  41 + for (final PubStandRang typeEnum : PubStandRang.values()) {
  42 + if (typeEnum.value.equals(value)) {
  43 + return typeEnum;
  44 + }
  45 + }
  46 + return null;
  47 + }
  48 +
  49 + /**
  50 + * 获取值
  51 + *
  52 + * @return 值
  53 + */
  54 + @JsonValue
  55 + @Override
  56 + public Integer getValue() {
  57 + return value;
  58 + }
  59 +}
... ...
fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/enums/PubStandType.java 0 → 100644
  1 +package cn.fw.valhalla.domain.enums;
  2 +
  3 +import com.baomidou.mybatisplus.core.enums.IEnum;
  4 +import com.fasterxml.jackson.annotation.JsonCreator;
  5 +import com.fasterxml.jackson.annotation.JsonValue;
  6 +
  7 +/**
  8 + * 公共池站岗类型
  9 + *
  10 + * @author : kurisu
  11 + * @version : 1.0
  12 + * @className : PubStandType
  13 + * @description : 公共池站岗类型
  14 + * @date : 2023-03-10 11:25
  15 + */
  16 +public enum PubStandType implements IEnum<Integer> {
  17 + /**
  18 + * 公共池
  19 + */
  20 + PUB(1),
  21 + /**
  22 + * 活动
  23 + */
  24 + ACTIVITY(2),
  25 + ;
  26 +
  27 + /**
  28 + * 值
  29 + */
  30 + private final Integer value;
  31 +
  32 + PubStandType(Integer value) {
  33 + this.value = value;
  34 + }
  35 +
  36 + /**
  37 + * 根据枚举值获取枚举对象
  38 + */
  39 + @JsonCreator
  40 + public static PubStandType ofValue(final Integer value) {
  41 + for (final PubStandType typeEnum : PubStandType.values()) {
  42 + if (typeEnum.value.equals(value)) {
  43 + return typeEnum;
  44 + }
  45 + }
  46 + return null;
  47 + }
  48 +
  49 + /**
  50 + * 获取值
  51 + *
  52 + * @return 值
  53 + */
  54 + @JsonValue
  55 + @Override
  56 + public Integer getValue() {
  57 + return value;
  58 + }
  59 +}
... ...
fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/config/CustomIdIdentifierGenerator.java
... ... @@ -3,6 +3,7 @@ package cn.fw.valhalla.controller.config;
3 3 import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
4 4 import com.github.yitter.contract.IdGeneratorOptions;
5 5 import com.github.yitter.idgen.YitIdHelper;
  6 +import lombok.extern.slf4j.Slf4j;
6 7 import org.springframework.stereotype.Component;
7 8  
8 9 /**
... ... @@ -10,6 +11,7 @@ import org.springframework.stereotype.Component;
10 11 * @author kurisu
11 12 */
12 13 @Component
  14 +@Slf4j
13 15 public class CustomIdIdentifierGenerator implements IdentifierGenerator {
14 16 static {
15 17 //全局初始化设置WorkerId,默认最大2^16-1,可通过调整 WorkerIdBitLength 增加最大值
... ... @@ -17,7 +19,7 @@ public class CustomIdIdentifierGenerator implements IdentifierGenerator {
17 19 options.WorkerId = 1;
18 20 options.WorkerIdBitLength = 1;
19 21 YitIdHelper.setIdGenerator(options);
20   - System.out.println("------------------初始化IdentifierGenerator------------------------");
  22 + log.debug("------------------初始化IdentifierGenerator------------------------");
21 23 }
22 24  
23 25 @Override
... ...
fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/wx/VehicleWxController.kt renamed to fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/wx/VehicleWxController.java
1 1 package cn.fw.valhalla.controller.wx;
2 2  
3   -import cn.fw.common.web.annotation.ControllerMethod
4   -import cn.fw.common.web.auth.PassportAuthBean
5   -import cn.fw.common.web.auth.annotation.CurrentUser
6   -import cn.fw.common.web.util.ResultBuilder.success
7   -import cn.fw.data.base.domain.common.Message
8   -import cn.fw.security.auth.client.annotation.Authorization
9   -import cn.fw.security.auth.client.enums.AuthType
10   -import cn.fw.valhalla.domain.dto.*
11   -import cn.fw.valhalla.domain.vo.customer.*
12   -import cn.fw.valhalla.service.bus.cust.*
13   -import lombok.extern.slf4j.Slf4j
14   -import org.springframework.validation.annotation.Validated
15   -import org.springframework.web.bind.annotation.*
  3 +import cn.fw.common.web.annotation.ControllerMethod;
  4 +import cn.fw.common.web.auth.PassportAuthBean;
  5 +import cn.fw.common.web.auth.annotation.CurrentUser;
  6 +import cn.fw.data.base.domain.common.Message;
  7 +import cn.fw.security.auth.client.annotation.Authorization;
  8 +import cn.fw.security.auth.client.enums.AuthType;
  9 +import cn.fw.valhalla.domain.vo.customer.MemberVehicleVO;
  10 +import cn.fw.valhalla.service.bus.cust.MemberVehicleBizService;
  11 +import lombok.extern.slf4j.Slf4j;
  12 +import org.springframework.validation.annotation.Validated;
  13 +import org.springframework.web.bind.annotation.GetMapping;
  14 +import org.springframework.web.bind.annotation.RequestMapping;
  15 +import org.springframework.web.bind.annotation.RestController;
  16 +
  17 +import java.util.List;
  18 +
  19 +import static cn.fw.data.base.domain.common.Message.success;
16 20  
17 21 /**
18 22 * 查询是否
... ... @@ -25,7 +29,9 @@ import org.springframework.web.bind.annotation.*
25 29 @RestController
26 30 @Authorization(AuthType.WECHAT)
27 31 @RequestMapping("/wx/vehicle")
28   -class VehicleWxController(val memberVehicleBizService: MemberVehicleBizService) {
  32 +public class VehicleWxController {
  33 + private MemberVehicleBizService memberVehicleBizService;
  34 +
29 35 /**
30 36 * 查询认证车辆
31 37 *
... ... @@ -34,7 +40,7 @@ class VehicleWxController(val memberVehicleBizService: MemberVehicleBizService)
34 40 */
35 41 @GetMapping("/list")
36 42 @ControllerMethod("查询所有认证车辆")
37   - fun vehicleList(@CurrentUser user: PassportAuthBean?): Message<MutableList<MemberVehicleVO>>? {
38   - return success(memberVehicleBizService.getVehicleList(user?.userId));
  43 + public Message<List<MemberVehicleVO>> vehicleList(@CurrentUser PassportAuthBean user) {
  44 + return success(memberVehicleBizService.getVehicleList(user.getUserId()));
39 45 }
40 46 }
... ...
fw-valhalla-server/src/main/resources/application.yml
... ... @@ -7,7 +7,13 @@ spring:
7 7 locker:
8 8 key-prefix: 'valhalla:locker:'
9 9 custom:
10   - global-prefix: 'valhalla'
  10 + global-prefix: valhalla
  11 + global:
  12 + ttl: 10m
  13 + use-json: true
  14 + cache:
  15 + - name: auth:url
  16 + ttl: 5m
11 17  
12 18 cloud:
13 19 nacos:
... ...
fw-valhalla-service/pom.xml
... ... @@ -88,5 +88,9 @@
88 88 <groupId>com.github.ben-manes.caffeine</groupId>
89 89 <artifactId>caffeine</artifactId>
90 90 </dependency>
  91 + <dependency>
  92 + <groupId>cn.fw</groupId>
  93 + <artifactId>fw-attendance-sdk</artifactId>
  94 + </dependency>
91 95 </dependencies>
92 96 </project>
93 97 \ No newline at end of file
... ...
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/pub/PubStandBizService.java 0 → 100644
  1 +package cn.fw.valhalla.service.bus.pub;
  2 +
  3 +import cn.fw.common.cache.CacheExtender;
  4 +import cn.fw.valhalla.rpc.ehr.EhrRpcService;
  5 +import cn.fw.valhalla.service.data.PubStandStaffInfoService;
  6 +import lombok.RequiredArgsConstructor;
  7 +import lombok.extern.slf4j.Slf4j;
  8 +import org.springframework.stereotype.Service;
  9 +
  10 +/**
  11 + * PubStandBizService
  12 + *
  13 + * @author : kurisu
  14 + * @version : 1.0
  15 + * @className : PubStandBizService
  16 + * @description : 公共池站岗人员配置
  17 + * @date : 2023-03-10 15:09
  18 + */
  19 +@Service
  20 +@Slf4j
  21 +@RequiredArgsConstructor
  22 +public class PubStandBizService {
  23 + private final EhrRpcService ehrRpcService;
  24 + private final PubStandStaffInfoService pubStandStaffInfoService;
  25 + private final CacheExtender cache;
  26 +}
... ...
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/data/PubStandStaffInfoService.java 0 → 100644
  1 +package cn.fw.valhalla.service.data;
  2 +
  3 +import cn.fw.valhalla.domain.db.pub.PubStandStaffInfo;
  4 +import com.baomidou.mybatisplus.extension.service.IService;
  5 +
  6 +
  7 +/**
  8 + * 公共池站岗人员配置
  9 + *
  10 + * @author : kurisu
  11 + * @version : 1.0
  12 + * @className : PubStandStaffInfoService
  13 + * @description : 公共池站岗人员配置
  14 + * @date : 2023-03-10 11:43
  15 + */
  16 +public interface PubStandStaffInfoService extends IService<PubStandStaffInfo> {
  17 +}
0 18 \ No newline at end of file
... ...
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/data/impl/PubStandStaffInfoServiceImpl.java 0 → 100644
  1 +package cn.fw.valhalla.service.data.impl;
  2 +
  3 +import cn.fw.valhalla.dao.mapper.PubStandStaffInfoMapper;
  4 +import cn.fw.valhalla.domain.db.pub.PubStandStaffInfo;
  5 +import cn.fw.valhalla.service.data.PubStandStaffInfoService;
  6 +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  7 +import org.springframework.stereotype.Service;
  8 +
  9 +
  10 +/**
  11 + * 公共池人员配置
  12 + *
  13 + * @author : kurisu
  14 + * @version : 1.0
  15 + * @className : PubStandStaffInfoServiceImpl
  16 + * @description : 公共池人员配置
  17 + * @date : 2023-03-10 11:44
  18 + */
  19 +@Service
  20 +public class PubStandStaffInfoServiceImpl extends ServiceImpl<PubStandStaffInfoMapper, PubStandStaffInfo> implements PubStandStaffInfoService {
  21 +}
0 22 \ No newline at end of file
... ...
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/data/impl/WechatSubscribeServiceImpl.java
... ... @@ -2,6 +2,7 @@ package cn.fw.valhalla.service.data.impl;
2 2  
3 3 import cn.fw.valhalla.dao.mapper.WechatSubscribeMapper;
4 4 import cn.fw.valhalla.domain.db.WechatSubscribe;
  5 +import cn.fw.valhalla.domain.db.pub.PubStandStaffInfo;
5 6 import cn.fw.valhalla.domain.dto.WechatSubscribeSaveDTO;
6 7 import cn.fw.valhalla.service.data.WechatSubscribeService;
7 8 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
... ...
lombok.config
1 1 config.stopBubbling = true
2 2 lombok.accessors.chain=true
  3 +lombok.equalsandhashcode.callsuper=call
  4 +lombok.tostring.callsuper=call
3 5 \ No newline at end of file
... ...
... ... @@ -54,7 +54,7 @@
54 54 <fw-angel-sdk.version>3.0.0</fw-angel-sdk.version>
55 55 <redis.spring.boot.starter>1.0</redis.spring.boot.starter>
56 56 <javase>3.0.0</javase>
57   - <caffeine>2.5.3</caffeine>
  57 + <caffeine>2.6.2</caffeine>
58 58 <hutool.all>5.2.5</hutool.all>
59 59 <fw.cas.sdk>2.1.6</fw.cas.sdk>
60 60 <fw-ehr-sdk.version>1.0</fw-ehr-sdk.version>
... ... @@ -66,6 +66,7 @@
66 66 <fw.backlog.sdk>1.0.0</fw.backlog.sdk>
67 67 <fw.shirasawa.sdk>1.0.2</fw.shirasawa.sdk>
68 68 <fw-identify-sdk.version>1.0.0</fw-identify-sdk.version>
  69 + <fw.attendance.sdk>1.0.0</fw.attendance.sdk>
69 70 </properties>
70 71  
71 72 <dependencyManagement>
... ... @@ -283,6 +284,11 @@
283 284 <artifactId>fw-identify-sdk</artifactId>
284 285 <version>${fw-identify-sdk.version}</version>
285 286 </dependency>
  287 + <dependency>
  288 + <groupId>cn.fw</groupId>
  289 + <artifactId>fw-attendance-sdk</artifactId>
  290 + <version>${fw.attendance.sdk}</version>
  291 + </dependency>
286 292 </dependencies>
287 293 </dependencyManagement>
288 294  
... ... @@ -297,31 +303,11 @@
297 303 <artifactId>junit</artifactId>
298 304 <scope>test</scope>
299 305 </dependency>
300   - <dependency>
301   - <groupId>org.jetbrains.kotlin</groupId>
302   - <artifactId>kotlin-stdlib</artifactId>
303   - </dependency>
304   - <dependency>
305   - <groupId>org.jetbrains.kotlin</groupId>
306   - <artifactId>kotlin-reflect</artifactId>
307   - </dependency>
308   - <dependency>
309   - <groupId>org.jetbrains.kotlin</groupId>
310   - <artifactId>kotlin-stdlib-jdk8</artifactId>
311   - </dependency>
312   - <dependency>
313   - <groupId>com.fasterxml.jackson.module</groupId>
314   - <artifactId>jackson-module-kotlin</artifactId>
315   - </dependency>
316 306 </dependencies>
317 307  
318 308 <build>
319 309 <plugins>
320 310 <plugin>
321   - <groupId>org.jetbrains.kotlin</groupId>
322   - <artifactId>kotlin-maven-plugin</artifactId>
323   - </plugin>
324   - <plugin>
325 311 <groupId>org.apache.maven.plugins</groupId>
326 312 <artifactId>maven-compiler-plugin</artifactId>
327 313 <configuration>
... ...