Commit 3bbba332 by 软件中心

小程序数据报告独立工程

parent 75c6c9f8
2024-09-24 15:56:50,314 INFO (StartupInfoLogger.java:55)- Starting DjmDataReportApplication using Java 1.8.0_191 on DESKTOP-AB45DQR with PID 1384 (F:\workspace\djm-data-report\target\classes started by Administrator in F:\workspace\djm-data-report)
2024-09-24 15:56:50,320 DEBUG (StartupInfoLogger.java:56)- Running with Spring Boot v2.7.6, Spring v5.3.24
2024-09-24 15:56:50,321 INFO (SpringApplication.java:637)- The following 1 profile is active: "test"
2024-09-24 15:56:55,467 INFO (StartupInfoLogger.java:61)- Started DjmDataReportApplication in 5.883 seconds (JVM running for 8.921)
2024-09-24 15:56:55,471 INFO (DjmDataReportApplication.java:15)- __ __
/ \~~~/ \
,----( .. )
/ \__ __/
/| (\ |(
^ \ /___\ /\ |
|__| |__|-"
---------------djm-data-report------------start------->>>>>--------
2024-09-24 15:57:51,077 INFO (TestController.java:19)- ok
2024-10-21 16:45:25,139 INFO (StartupInfoLogger.java:55)- Starting DjmDataReportApplication using Java 1.8.0_191 on DESKTOP-AB45DQR with PID 38584 (F:\workspace\djm-data-report\target\classes started by Administrator in F:\workspace\djm-data-report)
2024-10-21 16:45:25,175 DEBUG (StartupInfoLogger.java:56)- Running with Spring Boot v2.7.6, Spring v5.3.24
2024-10-21 16:45:25,176 INFO (SpringApplication.java:637)- The following 1 profile is active: "test"
2024-10-21 16:45:36,531 INFO (StartupInfoLogger.java:61)- Started DjmDataReportApplication in 12.502 seconds (JVM running for 14.814)
2024-10-21 16:45:36,536 INFO (DjmDataReportApplication.java:15)- __ __
/ \~~~/ \
,----( .. )
/ \__ __/
/| (\ |(
^ \ /___\ /\ |
|__| |__|-"
---------------djm-data-report------------start------->>>>>--------
2024-10-21 16:46:33,183 INFO (StartupInfoLogger.java:55)- Starting DjmDataReportApplication using Java 1.8.0_191 on DESKTOP-AB45DQR with PID 83028 (F:\workspace\djm-data-report\target\classes started by Administrator in F:\workspace\djm-data-report)
2024-10-21 16:46:33,186 DEBUG (StartupInfoLogger.java:56)- Running with Spring Boot v2.7.6, Spring v5.3.24
2024-10-21 16:46:33,187 INFO (SpringApplication.java:637)- The following 1 profile is active: "test"
2024-10-21 16:46:41,192 INFO (StartupInfoLogger.java:61)- Started DjmDataReportApplication in 8.861 seconds (JVM running for 10.869)
2024-10-21 16:46:41,198 INFO (DjmDataReportApplication.java:15)- __ __
/ \~~~/ \
,----( .. )
/ \__ __/
/| (\ |(
^ \ /___\ /\ |
|__| |__|-"
---------------djm-data-report------------start------->>>>>--------
2024-10-21 16:47:21,364 INFO (StartupInfoLogger.java:55)- Starting DjmDataReportApplication using Java 1.8.0_191 on DESKTOP-AB45DQR with PID 17440 (F:\workspace\djm-data-report\target\classes started by Administrator in F:\workspace\djm-data-report)
2024-10-21 16:47:21,367 DEBUG (StartupInfoLogger.java:56)- Running with Spring Boot v2.7.6, Spring v5.3.24
2024-10-21 16:47:21,368 INFO (SpringApplication.java:637)- The following 1 profile is active: "test"
2024-10-21 16:47:28,529 INFO (StartupInfoLogger.java:61)- Started DjmDataReportApplication in 7.797 seconds (JVM running for 9.374)
2024-10-21 16:47:28,532 INFO (DjmDataReportApplication.java:15)- __ __
/ \~~~/ \
,----( .. )
/ \__ __/
/| (\ |(
^ \ /___\ /\ |
|__| |__|-"
---------------djm-data-report------------start------->>>>>--------
2024-10-21 16:48:29,905 INFO (StartupInfoLogger.java:55)- Starting DjmDataReportApplication using Java 1.8.0_191 on DESKTOP-AB45DQR with PID 6452 (F:\workspace\djm-data-report\target\classes started by Administrator in F:\workspace\djm-data-report)
2024-10-21 16:48:29,910 DEBUG (StartupInfoLogger.java:56)- Running with Spring Boot v2.7.6, Spring v5.3.24
2024-10-21 16:48:29,910 INFO (SpringApplication.java:637)- The following 1 profile is active: "test"
2024-10-21 16:48:36,809 INFO (StartupInfoLogger.java:61)- Started DjmDataReportApplication in 7.541 seconds (JVM running for 9.176)
2024-10-21 16:48:36,812 INFO (DjmDataReportApplication.java:15)- __ __
/ \~~~/ \
,----( .. )
/ \__ __/
/| (\ |(
^ \ /___\ /\ |
|__| |__|-"
---------------djm-data-report------------start------->>>>>--------
......@@ -120,6 +120,41 @@
<artifactId>knife4j-spring-boot-starter</artifactId>
<version>${knife4j.version}</version>
</dependency>
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
<version>7.6</version>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.5.1</version>
<exclusions>
<exclusion>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- rabbitmq -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.slf4j</groupId>-->
<!-- <artifactId>slf4j-api</artifactId>-->
......
package com.dr.config;
import org.springframework.amqp.core.*;
import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory;
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.HashMap;
import java.util.Map;
@Configuration
public class RabbitMqConfig {
@Bean
public RabbitTemplate rabbitTemplate(ConnectionFactory connectionFactory) {
RabbitTemplate rabbitTemplate = new RabbitTemplate(connectionFactory);
rabbitTemplate.setMessageConverter(new Jackson2JsonMessageConverter());
return rabbitTemplate;
}
@Bean
public SimpleRabbitListenerContainerFactory rabbitListenerContainerFactory(ConnectionFactory connectionFactory) {
SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory();
factory.setAcknowledgeMode(AcknowledgeMode.MANUAL);
factory.setConnectionFactory(connectionFactory);
factory.setMessageConverter(new Jackson2JsonMessageConverter());
return factory;
}
/**********************************用户下单后确定代理商门店绑定关系****************************************/
private final static String PROXY_SHOP_QUEUE = "proxyShopQueue";
private final static String PROXY_SHOP_KEY = "proxyShopKey";
private final static String PROXY_SHOP_EXCHANGE = "proxyShopExchange";
public static String getProxyShopKey() {
return PROXY_SHOP_KEY;
}
public static String getProxyShopExchange() {
return PROXY_SHOP_EXCHANGE;
}
@Bean
public Queue proxyShopQueue() {
return new Queue(PROXY_SHOP_QUEUE,true);
}
@Bean
public DirectExchange proxyShopExchange() {
return new DirectExchange(PROXY_SHOP_EXCHANGE, true, false);
}
@Bean
public Binding bindProxyShopExchangeDirect() {
return BindingBuilder.bind(proxyShopQueue()).to(proxyShopExchange()).with(PROXY_SHOP_KEY);
}
/**********************************用户下单后确定代理商门店绑定关系****************************************/
/**********************************用户购买指定商品开通VIP****************************************/
private final static String USER_VIP_QUEUE = "userVipQueue";
private final static String USER_VIP_KEY = "userVipKey";
private final static String USER_VIP_EXCHANGE = "userVipExchange";
public static String getUserVipKey() {
return USER_VIP_KEY;
}
public static String getUserVipExchange() {
return USER_VIP_EXCHANGE;
}
@Bean
public Queue userVipQueue() {
return new Queue(USER_VIP_QUEUE,true);
}
@Bean
public DirectExchange userVipExchange() {
return new DirectExchange(USER_VIP_EXCHANGE,true, false);
}
@Bean
public Binding bindUserVipExchangeDirect() {
return BindingBuilder.bind(userVipQueue()).to(userVipExchange()).with(USER_VIP_KEY);
}
/**********************************用户购买指定商品开通VIP****************************************/
/**********************************修改指定时间未审核的报价的状态****************************************/
private final static String COMMODITY_QUOTATION_QUEUE = "commodityQuotationQueue";
private final static String COMMODITY_QUOTATION_KEY = "commodityQuotationKey";
private final static String COMMODITY_QUOTATION_EXCHANGE = "commodityQuotationExchange";
public static String getCommodityQuotationKey() {
return COMMODITY_QUOTATION_KEY;
}
public static String getCommodityQuotationExchange() {
return COMMODITY_QUOTATION_EXCHANGE;
}
@Bean
public Queue commodityQuotationQueue() {
return new Queue(COMMODITY_QUOTATION_QUEUE,true);
}
@Bean
public CustomExchange commodityQuotationExchange() {
Map<String, Object> args = new HashMap<>(2);
args.put("x-delayed-type", "direct");
return new CustomExchange(COMMODITY_QUOTATION_EXCHANGE, "x-delayed-message", true, false, args);
}
@Bean
public Binding bindCommodityQuotationDelay() {
return BindingBuilder.bind(commodityQuotationQueue()).to(commodityQuotationExchange()).with(COMMODITY_QUOTATION_KEY).noargs();
}
/**********************************修改指定时间未审核的报价的状态****************************************/
/**********************************苗医生相关数据推送****************************************/
private final static String MYS_DATA_QUEUE = "reSyncDataQueue";
private final static String MYS_DATA_KEY = "mysDataKey";
private final static String MYS_DATA_EXCHANGE = "mysDataExchange";
public static String getMysDataKey() {
return MYS_DATA_KEY;
}
public static String getMysDataExchange() {
return MYS_DATA_EXCHANGE;
}
@Bean
public Queue mysDataQueue() {
return new Queue(MYS_DATA_QUEUE,true);
}
@Bean
public CustomExchange mysDataExchange() {
Map<String, Object> args = new HashMap<>(2);
args.put("x-delayed-type", "direct");
return new CustomExchange(MYS_DATA_EXCHANGE, "x-delayed-message", true, false, args);
}
@Bean
public Binding mysDataDelay() {
return BindingBuilder.bind(mysDataQueue()).to(mysDataExchange()).with(MYS_DATA_KEY).noargs();
}
/**********************************苗医生相关数据推送****************************************/
/**********************************数据板块统计相关数据推送****************************************/
public static final String SYNC_SKIN_PROBLEM_DATA_QUEUE = "syncSkinProblemDataQueue";
public static final String SYNC_SKIN_PROBLEM_DATA_KEY = "syncSkinProblemDatakey";
public static final String SYNC_SKIN_PROBLEM_DATA_EXCHANGE = "syncSkinProblemDataExchange";
public static final String SYNC_NEW_SKIN_PROBLEM_DATA_EXCHANGE = "syncNewSkinProblemDataExchange";
public static final String SYNC_NEW_SKIN_PROBLEM_DATA_KEY = "syncNewSkinProblemDatakey";
public static final String SYNC_NEW_SKIN_PROBLEM_DATA_QUEUE = "syncNewSkinProblemDataQueue";
//门店数据同步
public static final String SYNC_NEW_ORG_AND_SHOP_KEY = "syncNewOrgAndShopKey";
public static final String SYNC_NEW_ORG_AND_SHOP_QUEUE = "syncNewOrgAndShopQueue";
public static final String SYNC_NEW_ORG_AND_SHOP_EXCHANGE = "syncNewOrgAndShopExchange";
@Bean
public Queue syncSkinProblemDataQueue() {
return new Queue(SYNC_SKIN_PROBLEM_DATA_QUEUE,true);
}
@Bean
public DirectExchange syncSkinProblemDataExchange() {
return new DirectExchange(SYNC_SKIN_PROBLEM_DATA_EXCHANGE,true,false);
}
@Bean
public Binding syncSkinProblemDatakeyDelay() {
return BindingBuilder.bind(syncSkinProblemDataQueue()).to(syncSkinProblemDataExchange()).with(SYNC_SKIN_PROBLEM_DATA_KEY);
}
@Bean
public DirectExchange syncNewSkinProblemDataExchange() {
return new DirectExchange(SYNC_NEW_SKIN_PROBLEM_DATA_EXCHANGE,true,false);
}
/**
* 同步物联网数据队列
* @return
*/
@Bean
public Queue syncNewSkinProblemDataQueue(){
return new Queue(SYNC_NEW_SKIN_PROBLEM_DATA_QUEUE,true);
}
@Bean
public Binding syncNewSkinProblemDatakeyDelay() {
return BindingBuilder.bind(syncNewSkinProblemDataQueue()).to(syncNewSkinProblemDataExchange()).with(SYNC_NEW_SKIN_PROBLEM_DATA_KEY);
}
/**
* 同步物联网数据交换机
* @return
*/
@Bean
DirectExchange syncNewOrgAndShopExchange(){
return new DirectExchange(SYNC_NEW_ORG_AND_SHOP_EXCHANGE,true,false);
}
/**
* 同步物联网数据队列
* @return
*/
@Bean
public Queue syncNewOrgAndShopQueue(){
return new Queue(SYNC_NEW_ORG_AND_SHOP_QUEUE,true);
}
/**
* 同步物联网数据队列绑定
* @return
*/
@Bean
Binding syncNewOrgAndShopKey(){
return BindingBuilder.bind(syncNewOrgAndShopQueue()).to(syncNewOrgAndShopExchange()).with(SYNC_NEW_ORG_AND_SHOP_KEY);
}
/**********************************数据板块统计相关数据推送****************************************/
/**********************************数据板块下载中心****************************************/
public static final String SYNC_DR_DOWNLOAD_CENTER_KEY = "syncDRDownloadCenterKey";
public static final String SYNC_DR_DOWNLOAD_CENTER_QUEUE = "syncDRDownloadCenterQueue";
public static final String SYNC_DR_DOWNLOAD_CENTER_EXCHANGE = "syncDRDownloadCenterExchange";
/**
* 交换机绑定
*/
@Bean
DirectExchange syncDRDownloadCenterExchange(){
return new DirectExchange(SYNC_DR_DOWNLOAD_CENTER_EXCHANGE,true,false);
}
/**
* 队列绑定
*/
@Bean
public Queue syncDRDownloadCenterQueue(){
return new Queue(SYNC_DR_DOWNLOAD_CENTER_QUEUE,true);
}
/**
* 同步物联网数据队列绑定
*/
@Bean
Binding syncDRDownloadCenterKey(){
return BindingBuilder.bind(syncDRDownloadCenterQueue()).to(syncDRDownloadCenterExchange()).with(SYNC_DR_DOWNLOAD_CENTER_KEY);
}
/**********************************数据板块下载中心****************************************/
}
package com.dr.constant;
/**
* @description 新数据报告常量配置
* @author luocong
* @date 2024/8/7 14:53
* @version 1.0
*/
public class NewDataReportConstant {
private NewDataReportConstant() {
}
public static final String BASE_DR_REDIS_KEY = "dr_djm:";
/**
* 机构门店基本数据处理key
*/
public static final String DR_ORG_INFO_KEY = "org_info";
/**
* 机构门店基本地址信息key
*/
public static final String DR_ORG_SHOP_ADDRESS_KEY = "new_dr:org_shop_add";
/**
* 皮肤问题处理keu
*/
public static final String SKIN_PROB_REC_KEY = "skin_problem";
/**
* 城市线推荐key
*/
public static final String LINE_CITY_REC_KEY = "dr_line_city:";
}
package com.dr.controller;
import com.dr.dto.TokenDTO;
import com.dr.filter.token.JwtHelper;
import com.nimbusds.jose.Payload;
import net.minidev.json.JSONObject;
import org.springframework.util.Assert;
import javax.servlet.http.HttpServletRequest;
public class BaseController {
/**
* 解释token 获取token对象
*
* @param request
* @param jwtHelper
* @return
*/
protected TokenDTO parseTokenData(HttpServletRequest request, JwtHelper jwtHelper) {
String token = request.getHeader("token");
if(token==null || "".equals(token)){
token=request.getHeader("access_token");
}
Payload p = jwtHelper.parseTokenData(token);
JSONObject jsonObject = p.toJSONObject();
Assert.notNull(jsonObject, "token 不能为空");
Assert.notNull(jsonObject.getAsString("uid"), "openid 不能为空");
TokenDTO dto = new TokenDTO();
dto.setUid(jsonObject.getAsString("uid"));
dto.setId(Long.valueOf(jsonObject.getAsString("id")));
return dto;
}
}
package com.dr.dto;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
@Component
@PropertySource("classpath:AppConstant.properties")
public class AppConstantDTO {
@Value("${AppConstant.METIS_BASE_URL}")
public String metisBaseUrl;
}
package com.dr.dto;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
/**
* @ClassName: BranchMoistenDTO
* @Description: 分润配置表
* @Author: zhangyouhui
* @Date: 2021/12/23 17:20
*/
@Component
@PropertySource("classpath:AppConstant.properties")
public class BranchMoistenDTO {
/**
*员工登录token
*/
@Value("${AppConstant.BRANCHMOISTEN.TOKEN}")
private String TOKEN;
/**
*员工登录token过期时间
*/
@Value("${AppConstant.BRANCHMOISTEN.TOKENBEOVERDUE}")
private Integer TOKENBEOVERDUE;
public String getTOKEN() {
return TOKEN;
}
public Integer getTOKENBEOVERDUE() {
return TOKENBEOVERDUE;
}
}
package com.dr.dto;
import lombok.Data;
import java.io.Serializable;
/**
* @description 设备类型启动次数对象
* @author luocong
* @date 2024/8/24 15:18
* @version 1.0
*/
@Data
public class DeviceTypeStartByMonthDTO implements Serializable {
private static final long serialVersionUID = -8113685688583479564L;
/**
* 设备id
*/
private String deviceid;
/**
* 设备类型code
*/
private String deviceTypeCode;
/**
* 设备类型名称
*/
private String deviceTypeName;
/**
* 启动次数
*/
private String startUpNum;
/**
* 门店账号
*/
private String shopAccount;
/**
* 门店名称
*/
private String shopName;
}
package com.dr.dto;
import lombok.Data;
import java.io.Serializable;
/**
* @Description: 员工权限对象
* @Author: luocong
* @Since: 2022/8/22
* @Version: 1.0.0
*/
@Data
public class EmpPermissionDTO implements Serializable {
private static final long serialVersionUID = -8833257204315870137L;
/**
* 机构账号
*/
private String oAccount;
/**
* 机构名称
*/
private String orgName;
/**
* 门店账号
*/
private String shopAccount;
/**
* 权限 0无 1机构 2 门店
*/
private String powerType;
}
package com.dr.dto;
import lombok.Data;
import java.io.Serializable;
/**
* @description
* @author luocong
* @date 2024/8/16 11:22
* @version 1.0
*/
@Data
public class ParseTokenDTO implements Serializable {
private static final long serialVersionUID = 8367893624887300205L;
/**
* openid
*/
private String openId;
/**
* 用户id
*/
private Long userId;
/**
* 机构账号
*/
private String orgAccount;
/**
* 门店账号
*/
private String shopAccount;
/**
* 权限 0无 1机构 2 门店
*/
private String powerType;
}
package com.dr.dto;
import java.io.Serializable;
import java.util.List;
/**
* Token数据传输对象
* @author nymxj
*
*/
public class TokenDTO implements Serializable{
private static final long serialVersionUID = -5771827353887132409L;
private Long id;
private String uid;
private String state;
private String name;
private List<String> roles;
public TokenDTO(String uid) {
this.uid = uid;
}
public TokenDTO() {
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getUid() {
return uid;
}
public void setUid(String uid) {
this.uid = uid;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public List<String> getRoles() {
return roles;
}
public void setRoles(List<String> roles) {
this.roles = roles;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
package com.dr.entity;
/**
* @Auther tlw
* @Date 2022/5/5
*/
public class Config {
private Integer id;
private String keystr;
private String keyvalue;
private String remark;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getKeystr() {
return keystr;
}
public void setKeystr(String keystr) {
this.keystr = keystr;
}
public String getKeyvalue() {
return keyvalue;
}
public void setKeyvalue(String keyvalue) {
this.keyvalue = keyvalue;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}
package com.dr.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @description 数据统计-客户使用日志日表
* @author luocong
* @date 2024-08-06 15:59:16
* @version 1.0
*/
@Data
@TableName("dr_client_use_logs_by_day")
public class DrClientUseLogsByDayEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId(type = IdType.AUTO)
private Long id;
/**
* 当天日期
*/
private String dailyTime;
/**
* 是否删除(0-否,1是,默认0)
*/
private Integer deleted;
/**
* 创建人名字
*/
private String createUserName;
/**
* 创建时间
*/
private LocalDateTime createTime;
/**
* 修改时间
*/
private LocalDateTime updateTime;
/**
* 修改人名字
*/
private String updateUserName;
/**
* 门店名称
*/
private String shopName;
/**
* 门店账号
*/
private String shopAccount;
/**
* 机构名称
*/
private String orgName;
/**
* 机构账号
*/
private String orgAccount;
/**
* 单次到店客户数
*/
private Integer onceArriveClientNum;
/**
* 多次到店客户数
*/
private Integer moreArriveClientNum;
}
package com.dr.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @description 数据统计-耗材使用数据日表
* @author luocong
* @date 2024-08-06 15:59:16
* @version 1.0
*/
@Data
@TableName("dr_consumable_use_info_by_day")
public class DrConsumableUseInfoByDayEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId(type = IdType.AUTO)
private Long id;
/**
* 门店名称
*/
private String shopName;
/**
* 门店账号
*/
private String shopAccount;
/**
* 机构名称
*/
private String orgName;
/**
* 机构账号
*/
private String orgAccount;
/**
* 当天日期
*/
private String dailyTime;
/**
* 当天耗材消耗数量
*/
private Integer dailyConsumableUseNum;
/**
* 设备类型code
*/
private String deviceTypeCode;
/**
* 设备类型名称
*/
private String deviceTypeName;
/**
* 耗材类型code
*/
private String consumableTypeCode;
/**
* 耗材类型名称
*/
private String consumableTypeName;
/**
* 门店省行政名称
*/
private String shopProvinceName;
/**
* 门店市行政名称
*/
private String shopCityName;
/**
* 门店区行政名称
*/
private String shopRegionName;
/**
* 门店详细地址
*/
private String shopAddress;
/**
* 是否删除(0-否,1是,默认0)
*/
private Integer deleted;
/**
* 创建人名字
*/
private String createUserName;
/**
* 修改人名字
*/
private String updateUserName;
/**
* 创建时间
*/
private LocalDateTime createTime;
/**
* 修改时间
*/
private LocalDateTime updateTime;
}
package com.dr.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @description 数据统计-耗材使用数据月表
* @author luocong
* @date 2024-08-06 15:59:16
* @version 1.0
*/
@Data
@TableName("dr_consumable_use_info_by_month")
public class DrConsumableUseInfoByMonthEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId(type = IdType.AUTO)
private Long id;
/**
* 门店名称
*/
private String shopName;
/**
* 门店账号
*/
private String shopAccount;
/**
* 机构名称
*/
private String orgName;
/**
* 机构账号
*/
private String orgAccount;
/**
* 当月日期
*/
private String monthTime;
/**
* 当月耗材消耗数量
*/
private Integer dailyConsumableUseNum;
/**
* 设备类型code
*/
private String deviceTypeCode;
/**
* 设备类型名称
*/
private String deviceTypeName;
/**
* 耗材类型code
*/
private String consumableTypeCode;
/**
* 耗材类型名称
*/
private String consumableTypeName;
/**
* 门店省行政名称
*/
private String shopProvinceName;
/**
* 门店市行政名称
*/
private String shopCityName;
/**
* 门店区行政名称
*/
private String shopRegionName;
/**
* 门店详细地址
*/
private String shopAddress;
/**
* 创建人名字
*/
private String createUserName;
/**
* 创建时间
*/
private LocalDateTime createTime;
/**
* 修改时间
*/
private LocalDateTime updateTime;
/**
* 修改人名字
*/
private String updateUserName;
/**
* 是否删除(0-否,1是,默认0)
*/
private Integer deleted;
}
package com.dr.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @description 数据统计-设备启动次数日表
* @author luocong
* @date 2024-08-06 15:59:16
* @version 1.0
*/
@Data
@TableName("dr_device_type_start_by_day")
public class DrDeviceTypeStartByDayEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId(type = IdType.AUTO)
private Long id;
/**
* 门店名称
*/
private String shopName;
/**
* 门店账号
*/
private String shopAccount;
/**
* 机构名称
*/
private String orgName;
/**
* 机构账号
*/
private String orgAccount;
/**
* 当天日期
*/
private String dailyTime;
/**
* 设备id
*/
private String deviceid;
/**
* 设备类型code
*/
private String deviceTypeCode;
/**
* 设备类型名称
*/
private String deviceTypeName;
/**
* 启动次数
*/
private Integer startUpNum;
/**
* 门店省行政名称
*/
private String shopProvinceName;
/**
* 门店市行政名称
*/
private String shopCityName;
/**
* 门店区行政名称
*/
private String shopRegionName;
/**
* 门店详细地址
*/
private String shopAddress;
/**
* 是否删除(0-否,1是,默认0)
*/
private Integer deleted;
/**
* 创建人名字
*/
private String createUserName;
/**
* 创建时间
*/
private LocalDateTime createTime;
/**
* 修改时间
*/
private LocalDateTime updateTime;
/**
* 修改人名字
*/
private String updateUserName;
}
package com.dr.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @description 数据统计-设备启动次数月表
* @author luocong
* @date 2024-08-06 15:59:16
* @version 1.0
*/
@Data
@TableName("dr_device_type_start_by_month")
public class DrDeviceTypeStartByMonthEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId(type = IdType.AUTO)
private Long id;
/**
* 门店名称
*/
private String shopName;
/**
* 门店账号
*/
private String shopAccount;
/**
* 机构名称
*/
private String orgName;
/**
* 机构账号
*/
private String orgAccount;
/**
* 当月日期
*/
private String monthTime;
/**
* 设备id
*/
private String deviceid;
/**
* 设备类型code
*/
private String deviceTypeCode;
/**
* 设备类型名称
*/
private String deviceTypeName;
/**
* 启动次数
*/
private Integer startUpNum;
/**
* 门店省行政名称
*/
private String shopProvinceName;
/**
* 门店市行政名称
*/
private String shopCityName;
/**
* 门店区行政名称
*/
private String shopRegion;
/**
* 门店详细地址
*/
private String shopAddress;
/**
* 是否删除(0-否,1是,默认0)
*/
private Integer deleted;
/**
* 创建人名字
*/
private String createUserName;
/**
* 创建时间
*/
private LocalDateTime createTime;
/**
* 修改时间
*/
private LocalDateTime updateTime;
/**
* 修改人名字
*/
private String updateUserName;
}
package com.dr.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @description 数据统计-员工使用设备统计数据日表
* @author luocong
* @date 2024-08-06 15:59:16
* @version 1.0
*/
@Data
@TableName("dr_employee_use_device_count_by_day")
public class DrEmployeeUseDeviceCountByDayEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId(type = IdType.AUTO)
private Long id;
/**
* 门店账号
*/
private String shopAccount;
/**
* 门店名称
*/
private String shopName;
/**
* 机构账号
*/
private String orgAccount;
/**
* 机构名称
*/
private String orgName;
/**
* 当天日期
*/
private String dailyTime;
/**
* 操作次数
*/
private Integer operateNum;
/**
* 员工姓名
*/
private String employeeName;
/**
* 门店省行政名称
*/
private String shopProvinceName;
/**
* 门店市行政名称
*/
private String shopCityName;
/**
* 门店区行政名称
*/
private String shopRegion;
/**
* 门店详细地址
*/
private String shopAddress;
/**
* 是否删除(0-否,1是,默认0)
*/
private Integer deleted;
/**
* 创建人名字
*/
private String createUserName;
/**
* 创建时间
*/
private LocalDateTime createTime;
/**
* 修改时间
*/
private LocalDateTime updateTime;
/**
* 修改人名字
*/
private String updateUserName;
}
package com.dr.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @description 数据统计-去年皮肤问题明细月表
* @author luocong
* @date 2024-08-06 15:59:16
* @version 1.0
*/
@Data
@TableName("dr_last_year_skin_problem_by_month")
public class DrLastYearSkinProblemByMonthEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId(type = IdType.AUTO)
private Long id;
/**
* 门店账号
*/
private String shopAccount;
/**
* 门店名称
*/
private String shopName;
/**
* 机构账号
*/
private String orgAccount;
/**
* 机构名称
*/
private String orgName;
/**
* 当月日期
*/
private String monthTime;
/**
* 黑头数量
*/
private Integer blackhead;
/**
* 严重黑头数量
*/
private Integer seriousBlackhead;
/**
* 粉刺数量
*/
private Integer acne;
/**
* 严重粉刺数量
*/
private Integer seriousAcne;
/**
* 毛孔数量
*/
private Integer pore;
/**
* 严重毛孔数量
*/
private Integer seriousPore;
/**
* 皱纹数量
*/
private Integer wrinkle;
/**
* 严重皱纹数量
*/
private Integer seriousWrinkle;
/**
* 色斑数量
*/
private Integer stain;
/**
* 严重色斑数量
*/
private Integer seriousStain;
/**
* 是否删除(0-否,1是,默认0)
*/
private Integer deleted;
/**
* 创建人名字
*/
private String createUserName;
/**
* 修改人名字
*/
private String updateUserName;
/**
* 创建时间
*/
private LocalDateTime createTime;
/**
* 修改时间
*/
private LocalDateTime updateTime;
/**
* 门店省行政名称
*/
private String shopProvinceName;
/**
* 门店市行政名称
*/
private String shopCityName;
/**
* 门店区行政名称
*/
private String shopRegionName;
/**
* 门店详细地址
*/
private String shopAddress;
}
package com.dr.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @description 数据统计-机构、门店数据统计总表
* @author luocong
* @date 2024-08-06 15:59:16
* @version 1.0
*/
@Data
@TableName("dr_org_and_shop_data_count")
public class DrOrgAndShopDataCountEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId(type = IdType.AUTO)
private Long id;
/**
* 门店名称
*/
private String shopName;
/**
* 门店账号
*/
private String shopAccount;
/**
* 机构名称
*/
private String orgName;
/**
* 机构账号
*/
private String orgAccount;
/**
* 当天日期
*/
private String dailyTime;
/**
* 设备数量
*/
private Integer deviceNum;
/**
* 门店所在省行政名称
*/
private String shopProvinceName;
/**
* 是否删除(0-否,1是,默认0)
*/
private Integer deleted;
/**
* 创建人名字
*/
private String createUserName;
/**
* 创建时间
*/
private LocalDateTime createTime;
/**
* 修改时间
*/
private LocalDateTime updateTime;
/**
* 修改人名字
*/
private String updateUserName;
/**
* 耗材消耗数量
*/
private Integer consumableUseNum;
/**
* 门店市行政名称
*/
private String shopCityName;
/**
* 门店区行政名称
*/
private String shopRegion;
/**
* 门店详细地址
*/
private String shopAddress;
}
package com.dr.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @description 数据统计-门店设备类型地域分布数据表
* @author luocong
* @date 2024-08-06 15:59:16
* @version 1.0
*/
@Data
@TableName("dr_shop_device_type_distribute_by_day")
public class DrShopDeviceTypeDistributeByDayEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId(type = IdType.AUTO)
private Long id;
/**
* 门店账号
*/
private String shopAccount;
/**
* 门店名称
*/
private String shopName;
/**
* 机构账号
*/
private String orgAccount;
/**
* 机构名称
*/
private String orgName;
/**
* 当天日期
*/
private String dailyTime;
/**
* 设备类型code
*/
private String deviceTypeCode;
/**
* 设备类型名称
*/
private String deviceTypeName;
/**
* 设备数量
*/
private Integer deviceNum;
/**
* 创建时间
*/
private LocalDateTime createTime;
/**
* 修改时间
*/
private LocalDateTime updateTime;
/**
* 是否删除(0-否,1是,默认0)
*/
private Integer deleted;
/**
* 创建人名字
*/
private String createUserName;
/**
* 修改人名字
*/
private String updateUserName;
/**
* 门店所属国家名称
*/
private String shopCountryName;
/**
* 门店省行政名称
*/
private String shopProvinceName;
/**
* 门店市行政名称
*/
private String shopCityName;
/**
* 门店区行政名称
*/
private String shopRegion;
/**
* 门店详细地址
*/
private String shopAddress;
}
package com.dr.entity;
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 org.apache.ibatis.type.JdbcType;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* Created with IntelliJ IDEA.
*
* @Auther: zhangyouhui
* @Date: 2021/03/10/16:11
* @Description:
*/
@TableName("t_wx_appletuser")
public class WxAppletuserEntity {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(type = IdType.AUTO)
private Long id;
/**
* 微信小程序唯一id
*/
private String openId;
/**
* 用户手机号码
*/
private String phone;
/**
* 用户头像
*/
private String avatarUrl;
/**
* 用户昵称
*/
private String nickName;
/***
* 是否关注了绑定的公众号
*/
private String officialAccount;
/**
* vip等级
*/
private String vipLevel;
/**
* 门店账号
*/
private String shopAccountNumber;
/**
* uuid
*/
private String unionId;
/**
* 地址
*/
private String address;
/**
* 性别
*/
private String gender;
/**
* 分享code
*/
private String qrcode;
/**
* 状态,0,新客,1,更进中,2,已绑定
*/
private String state;
/**
* 创建时间
*/
private Date createTime;
/**
* 销售账号
*/
private String salesAccountNumber;
/**
* 职位
*/
private String position;
/**
* 机构id
*/
private Integer orgid;
private String sale;
/**
* 喵币数量
*/
@TableField(jdbcType = JdbcType.DECIMAL)
private BigDecimal catcoinNum;
/**
* 会员等级
*/
private Integer memberLevel;
/**
* 主业务员类型 0:员工 1:业务员
*/
private Integer salesmanType;
/**
* 主业务员id
*/
private Integer mainSalesmanId;
/**
* 长期有效成长值
*/
private Integer longTermValue;
/**
* 用户等级升级日期
*/
private Date upgradeTime;
/**
* 展示门店(0,展示,1,不展示)
*/
private String displayShop;
/**
* 最后访问时间
*/
private Date lastVisitTime;
/**
* 会员权益是否通过报价修改过 0:否 1:是
*/
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getOpenId() {
return openId;
}
public void setOpenId(String openId) {
this.openId = openId;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getAvatarUrl() {
return avatarUrl;
}
public void setAvatarUrl(String avatarUrl) {
this.avatarUrl = avatarUrl;
}
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public String getOfficialAccount() {
return officialAccount;
}
public void setOfficialAccount(String officialAccount) {
this.officialAccount = officialAccount;
}
public String getVipLevel() {
return vipLevel;
}
public void setVipLevel(String vipLevel) {
this.vipLevel = vipLevel;
}
public String getShopAccountNumber() {
return shopAccountNumber;
}
public void setShopAccountNumber(String shopAccountNumber) {
this.shopAccountNumber = shopAccountNumber;
}
public String getUnionId() {
return unionId;
}
public void setUnionId(String unionId) {
this.unionId = unionId;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public String getQrcode() {
return qrcode;
}
public void setQrcode(String qrcode) {
this.qrcode = qrcode;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getSalesAccountNumber() {
return salesAccountNumber;
}
public void setSalesAccountNumber(String salesAccountNumber) {
this.salesAccountNumber = salesAccountNumber;
}
public String getPosition() {
return position;
}
public void setPosition(String position) {
this.position = position;
}
public Integer getOrgid() {
return orgid;
}
public void setOrgid(Integer orgid) {
this.orgid = orgid;
}
public String getSale() {
return sale;
}
public void setSale(String sale) {
this.sale = sale;
}
public BigDecimal getCatcoinNum() {
return catcoinNum;
}
public void setCatcoinNum(BigDecimal catcoinNum) {
this.catcoinNum = catcoinNum;
}
public Integer getMemberLevel() {
return memberLevel;
}
public void setMemberLevel(Integer memberLevel) {
this.memberLevel = memberLevel;
}
public Integer getSalesmanType() {
return salesmanType;
}
public void setSalesmanType(Integer salesmanType) {
this.salesmanType = salesmanType;
}
public Integer getMainSalesmanId() {
return mainSalesmanId;
}
public void setMainSalesmanId(Integer mainSalesmanId) {
this.mainSalesmanId = mainSalesmanId;
}
public Integer getLongTermValue() {
return longTermValue;
}
public void setLongTermValue(Integer longTermValue) {
this.longTermValue = longTermValue;
}
public Date getUpgradeTime() {
return upgradeTime;
}
public void setUpgradeTime(Date upgradeTime) {
this.upgradeTime = upgradeTime;
}
public String getDisplayShop() {
return displayShop;
}
public void setDisplayShop(String displayShop) {
this.displayShop = displayShop;
}
public Date getLastVisitTime() {
return lastVisitTime;
}
public void setLastVisitTime(Date lastVisitTime) {
this.lastVisitTime = lastVisitTime;
}
@Override
public String toString() {
return "WxAppletuserEntity{" +
"id=" + id +
", openId='" + openId + '\'' +
", phone='" + phone + '\'' +
", avatarUrl='" + avatarUrl + '\'' +
", nickName='" + nickName + '\'' +
", officialAccount='" + officialAccount + '\'' +
", vipLevel='" + vipLevel + '\'' +
", shopAccountNumber='" + shopAccountNumber + '\'' +
", unionId='" + unionId + '\'' +
", address='" + address + '\'' +
", gender='" + gender + '\'' +
", qrcode='" + qrcode + '\'' +
", state='" + state + '\'' +
", createTime=" + createTime +
", salesAccountNumber='" + salesAccountNumber + '\'' +
", position='" + position + '\'' +
", orgid=" + orgid +
", sale='" + sale + '\'' +
", catcoinNum=" + catcoinNum +
", memberLevel=" + memberLevel +
", salesmanType=" + salesmanType +
", mainSalesmanId=" + mainSalesmanId +
", longTermValue=" + longTermValue +
", upgradeTime=" + upgradeTime +
", displayShop='" + displayShop + '\'' +
", lastVisitTime=" + lastVisitTime +
'}';
}
}
package com.dr.filter.token;
import com.dr.dto.BranchMoistenDTO;
import com.dr.util.WxAppletsConstant;
import com.nimbusds.jose.*;
import com.nimbusds.jose.crypto.MACSigner;
import com.nimbusds.jose.crypto.MACVerifier;
import net.minidev.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
import java.text.ParseException;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
/**
*
* @author jytao
*
*/
@Component
public class JwtHelper {
private final Logger log = LoggerFactory.getLogger(this.getClass());
@Autowired
private RedisTemplate<String, String> redisTemplate;
@Autowired
private WxAppletsConstant appConstant;
@Autowired
private BranchMoistenDTO branchMoistenDTO;
/**
* redis 缓存 数据
*/
public void putRedisTemplateToken(String key, String token, int expirationdate) {
try {
redisTemplate.opsForValue().set(key, token, expirationdate, TimeUnit.SECONDS);
} catch (Exception e) {
log.error("数据写入redis 失败");
e.printStackTrace();
}
}
public String getRedisTemplateToken(String key) {
return redisTemplate.opsForValue().get(key);
}
/**
* redis 获取token 过期时间
*/
public Long getTokenExpirationDate(String key) {
return redisTemplate.getExpire(key);
}
/**
* 秘钥
*/
private static final byte[] SECRET = "345R0d227691751vd04467df11ff67JU".getBytes();
/**
* 初始化head部分的数据为 { "alg":"HS256", "type":"JWT" }
*/
private static final JWSHeader header = new JWSHeader(JWSAlgorithm.HS256, JOSEObjectType.JWT, null, null, null,
null, null, null, null, null, null, null, null);
/**
* 生成token,该方法只在用户登录成功后调用
* @param payload 可以存储用户id,token生成时间,token过期时间等自定义字段
* @return token 字符串,若失败则返回null
*/
public String createToken(Map<String, Object> payload) {
String tokenString = null;
// 创建一个 JWS object
JWSObject jwsObject = new JWSObject(header, new Payload(new JSONObject(payload)));
try {
// 将jwsObject 进行HMAC签名
jwsObject.sign(new MACSigner(SECRET));
tokenString = jwsObject.serialize();
} catch (JOSEException e) {
log.error("签名失败 : {}", e.getMessage());
e.printStackTrace();
}
return tokenString;
}
/***
* 重新设置过期时间
*/
public void setUpExpirationDate(String token,String type,Integer typedate) {
try {
JWSObject jwsObject = JWSObject.parse(token);
Payload payload = jwsObject.getPayload();
JSONObject jsonOBj = payload.toJSONObject();
putRedisTemplateToken(type+ jsonOBj.get("uid").toString(), token, typedate);
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 校验token是否合法,返回Map集合,集合中主要包含 state状态码 data鉴权成功后从token中提取的数据
* 该方法在过滤器中调用,每次请求API时都校验
* @param token
* @param access_token
* @return Map<String, Object>
*/
public Map<String, Object> validToken(String token,String access_token) {
Map<String, Object> resultMap = new HashMap<String, Object>();
String admintoken=null;
if(token!=null){
admintoken=token;
}
if(access_token!=null){
admintoken=access_token;
}
try {
JWSObject jwsObject = JWSObject.parse(admintoken);
Payload payload = jwsObject.getPayload();
JWSVerifier verifier = new MACVerifier(SECRET);
JSONObject jsonOBj = payload.toJSONObject();
// token校验成功(此时没有校验是否过期)
resultMap.put("state", TokenState.VALID.toString());
// 缓存中能否找到token
String newtoken=null;
Long expirationdate =null;
String type=null;
Integer typedate=0;
if(token!=null){
newtoken = getRedisTemplateToken(appConstant.getBEOVERDUE_TOEKN()+ jsonOBj.get("uid").toString());
expirationdate = getTokenExpirationDate(appConstant.getBEOVERDUE_TOEKN() + jsonOBj.get("uid").toString());
type=appConstant.getBEOVERDUE_TOEKN();
//TOKEN_DFT_EXPIRE_TIME
typedate=appConstant.getTOKEN_DFT_EXPIRE_TIME();
}
if(access_token!=null){
newtoken = getRedisTemplateToken(branchMoistenDTO.getTOKEN()+ jsonOBj.get("uid").toString());
expirationdate = getTokenExpirationDate(branchMoistenDTO.getTOKEN()+ jsonOBj.get("uid").toString());
type=branchMoistenDTO.getTOKEN();
typedate=branchMoistenDTO.getTOKENBEOVERDUE();
}
if (jwsObject.verify(verifier)) {
// token是null或者token不一样
if (newtoken == null || (!newtoken.equals(admintoken))) {
resultMap.put("state", TokenState.EXPIRED.toString());
// token过期
} else if (expirationdate == -2) {
resultMap.put("state", TokenState.EXPIRED.toString());
} else {
// 设置过期时间的token
setUpExpirationDate(admintoken,type,typedate);
}
resultMap.put("data", jsonOBj);
} else {
// 校验失败
log.info("传入token=\t" + admintoken);
log.info("缓存token=\t" + newtoken);
resultMap.put("state", TokenState.INVALID.toString());
}
} catch (Exception e) {
resultMap.clear();
resultMap.put("state", TokenState.INVALID.toString());
}
return resultMap;
}
public Object getToken(String key) {
return redisTemplate.opsForValue().get(key);
}
/**
* 解析token,获取token中信息
* @param token
* @return Map<String, Object>
*/
public Payload parseTokenData(String token) {
Payload payload = null;
try {
JWSObject jwsObject = JWSObject.parse(token);
payload = jwsObject.getPayload();
} catch (ParseException e) {
e.printStackTrace();
}
return payload;
}
}
package com.dr.filter.token;
public enum TokenState {
/**
* 过期
*/
EXPIRED("EXPIRED"),
/**
* 无效(token不合法)
*/
INVALID("INVALID"),
/**
* 有效的
*/
VALID("VALID");
private String state;
private TokenState(String state) {
this.state = state;
}
/**
* 根据状态字符串获取token状态枚举对象
* @param tokenState
* @return
*/
public static TokenState getTokenState(String tokenState){
TokenState[] states=TokenState.values();
TokenState ts=null;
for (TokenState state : states) {
if(state.toString().equals(tokenState)){
ts=state;
break;
}
}
return ts;
}
public String toString() {
return this.state;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
}
package com.dr.mapper;
import com.dr.entity.Config;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @Auther tlw
* @Date 2022/5/5
*/
public interface ConfigMapper {
Config findConfigByKeystr(@Param("keystr") String keystr);
List<Config> findConfigListByKeystr(@Param("keystr")String keystr);
}
package com.dr.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dr.entity.DrConsumableUseInfoByDayEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* @description 数据统计-耗材使用数据日表
* @author luocong
* @date 2024-08-06 15:59:16
* @version 1.0
*/
@Mapper
public interface DrConsumableUseInfoByDayMapper extends BaseMapper<DrConsumableUseInfoByDayEntity> {
}
package com.dr.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dr.entity.DrConsumableUseInfoByMonthEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* @description 数据统计-耗材使用数据月表
* @author luocong
* @date 2024-08-06 15:59:16
* @version 1.0
*/
@Mapper
public interface DrConsumableUseInfoByMonthMapper extends BaseMapper<DrConsumableUseInfoByMonthEntity> {
}
package com.dr.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dr.dto.DeviceTypeStartByMonthDTO;
import com.dr.entity.DrDeviceTypeStartByMonthEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Set;
/**
* @description 数据统计-设备启动次数月表
* @author luocong
* @date 2024-08-06 15:59:16
* @version 1.0
*/
@Mapper
public interface DrDeviceTypeStartByMonthMapper extends BaseMapper<DrDeviceTypeStartByMonthEntity> {
/**
* 设备类型分组查询单个设备类型启动次数
*
* @param startTime 开始时间
* @param endTime 结束时间
* @param deviceTypeSet 设备类型集
* @param orgAccount 机构账号
* @param shopAccount 门店账号
* @param lineCityId 城市线id
* @return List<DeviceTypeStartByMonthDTO>
*/
List<DeviceTypeStartByMonthDTO> selectDevStartList(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("deviceTypeSet") Set<String> deviceTypeSet,
@Param("orgAccount") String orgAccount, @Param("shopAccount") String shopAccount, @Param("lineCityId") Long lineCityId);
}
package com.dr.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dr.entity.DrEmployeeUseDeviceCountByDayEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* @description 数据统计-员工使用设备统计数据日表
* @author luocong
* @date 2024-08-06 15:59:16
* @version 1.0
*/
@Mapper
public interface DrEmployeeUseDeviceCountByDayMapper extends BaseMapper<DrEmployeeUseDeviceCountByDayEntity> {
}
package com.dr.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dr.entity.DrLastYearSkinProblemByMonthEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @description 数据统计-去年皮肤问题明细月表
* @author luocong
* @date 2024-08-06 15:59:16
* @version 1.0
*/
@Mapper
public interface DrLastYearSkinProblemByMonthMapper extends BaseMapper<DrLastYearSkinProblemByMonthEntity> {
/**
* 查询皮肤问题
*
* @param regionId 区域ID
* @param startTime 开始时间
* @param endTime 结束时间
* @return DrLastYearSkinProblemByMonthEntity
*/
List<DrLastYearSkinProblemByMonthEntity> selectSkinProblemRecommend(@Param("regionId") Long regionId, @Param("startTime") String startTime, @Param("endTime") String endTime);
}
package com.dr.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dr.entity.DrOrgAndShopDataCountEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* @description 数据统计-机构、门店数据统计总表
* @author luocong
* @date 2024-08-06 15:59:16
* @version 1.0
*/
@Mapper
public interface DrOrgAndShopDataCountMapper extends BaseMapper<DrOrgAndShopDataCountEntity> {
}
package com.dr.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dr.entity.DrShopDeviceTypeDistributeByDayEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* @description 数据统计-门店设备类型地域分布数据表
* @author luocong
* @date 2024-08-06 15:59:16
* @version 1.0
*/
@Mapper
public interface DrShopDeviceTypeDistributeByDayMapper extends BaseMapper<DrShopDeviceTypeDistributeByDayEntity> {
}
package com.dr.mapper;
import com.dr.dto.EmpPermissionDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface EmployeeManageMapper {
EmpPermissionDTO findEmpPermission(@Param("openId") String openId, @Param("sAccount") String sAccount);
}
package com.dr.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dr.entity.WxAppletuserEntity;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface WxAppletuserMapper extends BaseMapper<WxAppletuserEntity> {
}
package com.dr.service;
import java.util.List;
import com.dr.entity.Config;
/**
* @Auther tlw
* @Date 2022/5/5
*/
public interface IConfigService {
Config findConfigByKeystr(String keystr);
List<Config> findConfigListByKeystr(String keystr);
}
package com.dr.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dr.entity.DrClientUseLogsByDayEntity;
/**
* @description 数据统计-客户使用日志日表
* @author luocong
* @date 2024-08-06 15:59:16
* @version 1.0
*/
public interface IDrClientUseLogsByDayService extends IService<DrClientUseLogsByDayEntity> {
}
package com.dr.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dr.entity.DrConsumableUseInfoByDayEntity;
/**
* @description 数据统计-耗材使用数据日表
* @author luocong
* @date 2024-08-06 15:59:16
* @version 1.0
*/
public interface IDrConsumableUseInfoByDayService extends IService<DrConsumableUseInfoByDayEntity> {
}
package com.dr.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dr.entity.DrConsumableUseInfoByMonthEntity;
/**
* @description 数据统计-耗材使用数据月表
* @author luocong
* @date 2024-08-06 15:59:16
* @version 1.0
*/
public interface IDrConsumableUseInfoByMonthService extends IService<DrConsumableUseInfoByMonthEntity> {
}
package com.dr.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dr.entity.DrDeviceTypeStartByDayEntity;
/**
* @description 数据统计-设备启动次数日表
* @author luocong
* @date 2024-08-06 15:59:16
* @version 1.0
*/
public interface IDrDeviceTypeStartByDayService extends IService<DrDeviceTypeStartByDayEntity> {
}
package com.dr.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dr.dto.DeviceTypeStartByMonthDTO;
import com.dr.entity.DrDeviceTypeStartByMonthEntity;
import java.util.List;
import java.util.Set;
/**
* @description 数据统计-设备启动次数月表
* @author luocong
* @date 2024-08-06 15:59:16
* @version 1.0
*/
public interface IDrDeviceTypeStartByMonthService extends IService<DrDeviceTypeStartByMonthEntity> {
/**
* 设备类型分组查询单个设备类型启动次数
*
* @param startTime 开始时间
* @param endTime 结束时间
* @param deviceTypeSet 设备类型集
* @param orgAccount 机构账号
* @param shopAccount 门店账号
* @param lineCityId 城市线id
* @return List<DeviceTypeStartByMonthDTO>
*/
List<DeviceTypeStartByMonthDTO> selectDevStartList(String startTime, String endTime, Set<String> deviceTypeSet, String orgAccount, String shopAccount, Long lineCityId);
}
package com.dr.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dr.entity.DrEmployeeUseDeviceCountByDayEntity;
/**
* @description 数据统计-员工使用设备统计数据日表
* @author luocong
* @date 2024-08-06 15:59:16
* @version 1.0
*/
public interface IDrEmployeeUseDeviceCountByDayService extends IService<DrEmployeeUseDeviceCountByDayEntity> {
}
package com.dr.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dr.entity.DrLastYearSkinProblemByMonthEntity;
import java.util.List;
/**
* @description 数据统计-去年皮肤问题明细月表
* @author luocong
* @date 2024-08-06 15:59:16
* @version 1.0
*/
public interface IDrLastYearSkinProblemByMonthService extends IService<DrLastYearSkinProblemByMonthEntity> {
/**
* 查询皮肤问题
*
* @param regionId 区域ID
* @param startTime 开始时间
* @param endTime 结束时间
* @return DrLastYearSkinProblemByMonthEntity
*/
List<DrLastYearSkinProblemByMonthEntity> selectSkinProblemRecommend(Long regionId, String startTime, String endTime);
}
package com.dr.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dr.entity.DrOrgAndShopDataCountEntity;
/**
* @description 数据统计-机构、门店数据统计总表
* @author luocong
* @date 2024-08-06 15:59:16
* @version 1.0
*/
public interface IDrOrgAndShopDataCountService extends IService<DrOrgAndShopDataCountEntity> {
}
package com.dr.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dr.entity.DrShopDeviceTypeDistributeByDayEntity;
/**
* @description 数据统计-门店设备类型地域分布数据表
* @author luocong
* @date 2024-08-06 15:59:16
* @version 1.0
*/
public interface IDrShopDeviceTypeDistributeByDayService extends IService<DrShopDeviceTypeDistributeByDayEntity> {
}
package com.dr.service;
import com.dr.filter.token.JwtHelper;
import com.dr.util.PageUtils;
import com.dr.util.Result;
import com.dr.vo.*;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
* @description
* @author luocong
* @date 2024/8/16 11:08
* @version 1.0
*/
public interface IMeowShopDataReportService {
/**
* 查询设备与耗材数据
*
* @param request request
* @param jwtHelper jwtHelper
* @return Result<NewDeviceAndConsumableVO>
*/
Result<NewDeviceAndConsumableVO> selectDeviceAndConsumable(HttpServletRequest request, JwtHelper jwtHelper);
/**
* 设备实时数据查询
*
* @param request request
* @param jwtHelper jwtHelper
* @return Result<List < NewDeviceRealTimeVO>>
*/
Result<List<NewDeviceRealTimeVO>> selectDeviceRealTime(HttpServletRequest request, JwtHelper jwtHelper);
/**
* 员工排行数据
*
* @param request request
* @param jwtHelper jwtHelper
* @param flag flag
* @param shopAccount shopAccount
* @return Result<List < NewEmployeeRankVO>>
*/
Result<List<NewEmployeeRankVO>> selectEmpOperateRank(HttpServletRequest request, JwtHelper jwtHelper, Integer flag, String[] shopAccount);
/**
* 门店消耗排行数据
*
* @param request request
* @param jwtHelper jwtHelper
* @param flag 日期 1-昨天 2-近七天 3-近三十天
* @param pageNum pageNum
* @param pageSize pageSize
* @return Result<PageUtils>
*/
Result<PageUtils> selectShopConsumerRank(HttpServletRequest request, JwtHelper jwtHelper, Integer flag, Integer pageNum, Integer pageSize);
/**
* 设备地域分布
*
* @param request request
* @param jwtHelper jwtHelper
* @param deviceCode deviceCode
* @param pageNum pageNum
* @param pageSize pageSize
* @return Result<PageUtils>
*/
Result<PageUtils> selectRegionalDistribution(HttpServletRequest request, JwtHelper jwtHelper, String[] deviceCode, Integer pageNum, Integer pageSize);
/**
* 客户与案例
*
* @param request request
* @param jwtHelper jwtHelper
* @return Result<NewClientAndCaseGroup>
*/
Result<NewClientAndCaseGroupVO> selectClientAndCase(HttpServletRequest request, JwtHelper jwtHelper);
/**
* 检测排行
*
* @param request request
* @param jwtHelper jwtHelper
* @param flag 日期 1-昨天 2-近七天 3-近三十天
* @param pageNum pageNum
* @param pageSize pageSize
* @return Result<List < NewCheckCaseRankVO>>
*/
Result<PageUtils> selectCheckCaseRank(HttpServletRequest request, JwtHelper jwtHelper, Integer flag, Integer pageNum, Integer pageSize);
/**
* 产品推荐曝光
*
* @param request request
* @param jwtHelper jwtHelper
* @param pageNum pageNum
* @param pageSize pageSize
* @return
*/
Result<PageUtils> selectProductRecommend(HttpServletRequest request, JwtHelper jwtHelper, Integer pageNum, Integer pageSize);
/**
* 客户到店排行
*
* @param request request
* @param jwtHelper jwtHelper
* @param flag flag
* @param pageNum pageNum
* @param pageSize pageSize
* @return Result<List<NewArriveShopRankVO>>
*/
Result<PageUtils> selectArriveShopRank(HttpServletRequest request, JwtHelper jwtHelper, Integer flag, Integer pageNum, Integer pageSize);
/**
* 年龄分布
*
* @param request request
* @param jwtHelper jwtHelper
* @param shopAccounts 门店账号
* @return Result<List<NewAgeDistributionVO>>
*/
Result<List<NewAgeDistributionVO>> selectAgeDistribution(HttpServletRequest request, JwtHelper jwtHelper, String[] shopAccounts);
/**
* 客户地域分布 - 机构专属
*
* @param request request
* @param jwtHelper jwtHelper
* @param pageNum pageNum
* @param pageSize pageSize
* @return Result<List<NewClientDistributionVO>>
*/
Result<PageUtils> selectClientDistribution(HttpServletRequest request, JwtHelper jwtHelper, Integer pageNum, Integer pageSize);
/**
* 皮肤问题方案推荐
*
* @param regionId 区域id
* @return Result<List<SkinProblemRecommendVO>>
*/
Result<List<SkinProblemRecommendVO>> selectSkinProblemRecommend(Long regionId);
/**
* 耗材消耗排行
*
* @param request request
* @param jwtHelper jwtHelper
* @param shopAccounts 门店账号
* @param selectType 选择类型(0-我的,1-全国)
* @return Result<List<NewConsumableRankVO>>
*/
Result<List<NewConsumableRankVO>> selectConsumableRank(HttpServletRequest request, JwtHelper jwtHelper, String[] shopAccounts, Integer selectType);
/**
* 耗材消耗排行
*
* @param request request
* @param jwtHelper jwtHelper
* @param shopAccounts 门店账号
* @param selectType 选择类型(0-我的,1-全国)
*/
Result<Void> newConsumableDownload(HttpServletRequest request, JwtHelper jwtHelper, String[] shopAccounts, Integer selectType);
/**
* 业绩排行
*
* @param request request
* @param jwtHelper jwtHelper
* @param lineCityId 城市线id
* @return Result<List<NewPerformanceRankVO>>
*/
Result<List<NewPerformanceRankVO>> performanceRank(HttpServletRequest request, JwtHelper jwtHelper, Long lineCityId);
/**
* 业绩报表下载
*
* @param request request
* @param jwtHelper jwtHelper
* @param lineCityId lineCityId
*/
Result<Void> performanceDownload(HttpServletRequest request, JwtHelper jwtHelper, Long lineCityId);
/**
*
* @param request
* @param jwtHelper
* @param pageNum
* @param pageSize
* @return
*/
Result<PageUtils> selectDownloadList(HttpServletRequest request, JwtHelper jwtHelper, Integer pageNum, Integer pageSize);
}
package com.dr.service.impl;
import com.dr.entity.Config;
import com.dr.mapper.ConfigMapper;
import com.dr.service.IConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Auther tlw
* @Date 2022/5/5
*/
@Service
public class ConfigServiceImpl implements IConfigService {
@Autowired
private ConfigMapper configMapper;
@Override
public Config findConfigByKeystr(String keystr) {
return configMapper.findConfigByKeystr(keystr);
}
@Override
public List<Config> findConfigListByKeystr(String keystr) {
return configMapper.findConfigListByKeystr(keystr);
}
}
package com.dr.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dr.entity.DrConsumableUseInfoByDayEntity;
import com.dr.mapper.DrConsumableUseInfoByDayMapper;
import com.dr.service.IDrConsumableUseInfoByDayService;
import org.springframework.stereotype.Service;
@Service
public class DrConsumableUseInfoByDayServiceImpl extends ServiceImpl<DrConsumableUseInfoByDayMapper, DrConsumableUseInfoByDayEntity> implements IDrConsumableUseInfoByDayService {
}
\ No newline at end of file
package com.dr.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dr.entity.DrConsumableUseInfoByMonthEntity;
import com.dr.mapper.DrConsumableUseInfoByMonthMapper;
import com.dr.service.IDrConsumableUseInfoByMonthService;
import org.springframework.stereotype.Service;
@Service
public class DrConsumableUseInfoByMonthServiceImpl extends ServiceImpl<DrConsumableUseInfoByMonthMapper, DrConsumableUseInfoByMonthEntity> implements IDrConsumableUseInfoByMonthService {
}
\ No newline at end of file
package com.dr.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dr.dto.DeviceTypeStartByMonthDTO;
import com.dr.entity.DrDeviceTypeStartByMonthEntity;
import com.dr.mapper.DrDeviceTypeStartByMonthMapper;
import com.dr.service.IDrDeviceTypeStartByMonthService;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Set;
@Service
public class DrDeviceTypeStartByMonthServiceImpl extends ServiceImpl<DrDeviceTypeStartByMonthMapper, DrDeviceTypeStartByMonthEntity> implements IDrDeviceTypeStartByMonthService {
@Override
public List<DeviceTypeStartByMonthDTO> selectDevStartList(String startTime, String endTime, Set<String> deviceTypeSet, String orgAccount, String shopAccount, Long lineCityId) {
return this.baseMapper.selectDevStartList(startTime, endTime, deviceTypeSet, orgAccount, shopAccount, lineCityId);
}
}
\ No newline at end of file
package com.dr.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dr.entity.DrEmployeeUseDeviceCountByDayEntity;
import com.dr.mapper.DrEmployeeUseDeviceCountByDayMapper;
import com.dr.service.IDrEmployeeUseDeviceCountByDayService;
import org.springframework.stereotype.Service;
@Service
public class DrEmployeeUseDeviceCountByDayServiceImpl extends ServiceImpl<DrEmployeeUseDeviceCountByDayMapper, DrEmployeeUseDeviceCountByDayEntity> implements IDrEmployeeUseDeviceCountByDayService {
}
\ No newline at end of file
package com.dr.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dr.entity.DrLastYearSkinProblemByMonthEntity;
import com.dr.mapper.DrLastYearSkinProblemByMonthMapper;
import com.dr.service.IDrLastYearSkinProblemByMonthService;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class DrLastYearSkinProblemByMonthServiceImpl extends ServiceImpl<DrLastYearSkinProblemByMonthMapper, DrLastYearSkinProblemByMonthEntity> implements IDrLastYearSkinProblemByMonthService {
@Override
public List<DrLastYearSkinProblemByMonthEntity> selectSkinProblemRecommend(Long regionId, String startTime, String endTime) {
return this.baseMapper.selectSkinProblemRecommend(regionId, startTime, endTime);
}
}
\ No newline at end of file
package com.dr.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dr.mapper.DrOrgAndShopDataCountMapper;
import com.dr.service.IDrOrgAndShopDataCountService;
import com.dr.entity.DrOrgAndShopDataCountEntity;
import org.springframework.stereotype.Service;
@Service
public class DrOrgAndShopDataCountServiceImpl extends ServiceImpl<DrOrgAndShopDataCountMapper, DrOrgAndShopDataCountEntity> implements IDrOrgAndShopDataCountService {
}
\ No newline at end of file
package com.dr.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dr.entity.DrShopDeviceTypeDistributeByDayEntity;
import com.dr.mapper.DrShopDeviceTypeDistributeByDayMapper;
import com.dr.service.IDrShopDeviceTypeDistributeByDayService;
import org.springframework.stereotype.Service;
@Service
public class DrShopDeviceTypeDistributeByDayServiceImpl extends ServiceImpl<DrShopDeviceTypeDistributeByDayMapper, DrShopDeviceTypeDistributeByDayEntity> implements IDrShopDeviceTypeDistributeByDayService {
}
\ No newline at end of file
package com.dr.util;
import org.springframework.stereotype.Component;
/**
* GRPC 响应模板 form Metis/Moreme
*/
@Component
public class ApiTemplate {
//数据
private Object data;
//请求状态0 失败 1 成功
private Integer sign;
//提示信息
private String messages;
//code业务代码
private Integer code;
private Long total;
/**
* 请求成功模板
*
* @param data 数据实体
* @return 响应数据模板
*/
public ApiTemplate setApiTemplate(Object data) {
this.data = data;
this.sign = 1;
this.messages = "请求成功";
this.code = 200;
return this;
}
/**
* 失败模板
*
* @param messages 失败原因
* @param code BusinessCode 业务状态码
* @return 响应数据模板
*/
public ApiTemplate setApiTemplate(String messages, Integer code) {
this.data = null;
this.sign = 0;
this.messages = messages;
this.code = code;
return this;
}
public Object getData() {
return data;
}
public void setData(Object data) {
this.data = data;
}
public Integer getSign() {
return sign;
}
public void setSign(Integer sign) {
this.sign = sign;
}
public String getMessages() {
return messages;
}
public void setMessages(String messages) {
this.messages = messages;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public Long getTotal() {
return total;
}
public void setTotal(Long total) {
this.total = total;
}
}
/**
* Copyright (c) 2016-2019 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有,侵权必究!
*/
package com.dr.util;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.io.Serializable;
import java.util.List;
/**
* 分页工具类
*
* @author Mark sunlightcs@gmail.com
*/
public class PageUtils implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 总记录数
*/
private long totalCount;
/**
* 每页记录数
*/
private int pageSize;
/**
* 总页数
*/
private int totalPage;
/**
* 当前页数
*/
private int currPage;
/**
* 列表数据
*/
private List<?> list;
/**
* 分页
* @param list 列表数据
* @param totalCount 总记录数
* @param pageSize 每页记录数
* @param currPage 当前页数
*/
public PageUtils(List<?> list, long totalCount, int pageSize, int currPage) {
this.list = list;
this.totalCount = totalCount;
this.pageSize = pageSize;
this.currPage = currPage;
this.totalPage = (int)Math.ceil((double)totalCount/pageSize);
}
/**
* 分页
*/
public PageUtils(IPage<?> page) {
this.list = page.getRecords();
this.totalCount = (int)page.getTotal();
this.pageSize = (int)page.getSize();
this.currPage = (int)page.getCurrent();
this.totalPage = (int)page.getPages();
}
public long getTotalCount() {
return totalCount;
}
public void setTotalCount(int totalCount) {
this.totalCount = totalCount;
}
public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getTotalPage() {
return totalPage;
}
public void setTotalPage(int totalPage) {
this.totalPage = totalPage;
}
public int getCurrPage() {
return currPage;
}
public void setCurrPage(int currPage) {
this.currPage = currPage;
}
public List<?> getList() {
return list;
}
public void setList(List<?> list) {
this.list = list;
}
}
package com.dr.util;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.Map;
/**
* @author songyouyu
* @date 2022/6/9 15:15
*/
@Component
public class RabbitmqSendMessageUtil {
@Resource
private RabbitTemplate rabbitTemplate;
private static RabbitmqSendMessageUtil rabbitmqSendMessageUtil;
@PostConstruct
public void init(){
rabbitmqSendMessageUtil = this;
rabbitmqSendMessageUtil.rabbitTemplate = this.rabbitTemplate;
}
/**
* 发送延迟消息
* @param exchange
* @param routingKey
* @param map
* @param dateTime 毫秒
*/
public static void sendDelayMessage(String exchange, String routingKey, Map<String, Object> map, Long dateTime) {
rabbitmqSendMessageUtil.rabbitTemplate.convertAndSend(exchange, routingKey, map, message -> {
message.getMessageProperties().setHeader("x-delay", dateTime);
return message;
});
}
/**
* 用户下单后确定代理商门店绑定关系
* @param exchange
* @param routingKey
* @param map
*/
public static void sendProxyShopMessage(String exchange, String routingKey, Map<String, Object> map) {
rabbitmqSendMessageUtil.rabbitTemplate.convertAndSend(exchange, routingKey, map);
}
/**
* 用户购买指定商品开通VIP
* @param exchange
* @param routingKey
* @param map
*/
public static void sendUserVipMessage(String exchange, String routingKey, Map<String, Object> map) {
rabbitmqSendMessageUtil.rabbitTemplate.convertAndSend(exchange, routingKey, map);
}
}
package com.dr.util;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.data.redis.core.StringRedisTemplate;
import java.io.Serializable;
/**
* Created with IntelliJ IDEA.
*
* @Auther: zhangyouhui
* @Date: 2021/03/08/18:12
* @Description: 消息返回工具类
*/
@Slf4j
public class Result<T> implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 编码:0表示成功,其他值表示失败
*/
private int code = 0;
/**
* 消息内容
*/
private String msg = "success";
/**
* 响应数据
*/
private T data;
private String token;
public static long getSerialVersionUID() {
return serialVersionUID;
}
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
public Result<T> ok(T data) {
this.setCode(0);
this.setData(data);
return this;
}
public boolean success(){
return code == 0;
}
public Result<T> error(int code, String msg) {
this.code = code;
this.msg = msg;
return this;
}
/*public Result<T> errorByLanguage(int code, int language, StringRedisTemplate stringRedisTemplate) {
this.code = code;
Boolean lanFlag = stringRedisTemplate.opsForHash().hasKey(LDMConstant.LANGUAGE_LIST + language, String.valueOf(code));
if(Boolean.TRUE.equals(lanFlag)){
Object lanMsg = stringRedisTemplate.opsForHash().get(LDMConstant.LANGUAGE_LIST + language, String.valueOf(code));
if(null != lanMsg && StringUtils.isNotBlank(lanMsg.toString())){
this.msg = lanMsg.toString();
}
}else {
log.error("---------语言不存在---------code:{}------>language{}", code, language);
throw new BusinessRuntimeException(11001, "language error");
}
return this;
}*/
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public T getData() {
return data;
}
public void setData(T data) {
this.data = data;
}
}
package com.dr.util;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
/**
* Created with IntelliJ IDEA.
*
* @Auther: zhangyouhui
* @Date: 2021/03/09/10:05
* @Description: 微信小程序常量配置类
*/
@Component
@PropertySource("classpath:AppConstant.properties")
public class WxAppletsConstant {
/**
* 小程序 appId
*/
@Value("${AppConstant.APPID}")
private String APP_ID ="";
/**
* 小程序 appSecret
*/
@Value("${AppConstant.SECRET}")
private String SECRET = "";
/**
* 授权类型
*/
@Value("${AppConstant.GRANTTYPE}")
private String GRANT_TYPE = "";
/**
* 获取OpenId 及SeesionKey的url地址
*/
@Value("${AppConstant.GETOPENIDURL}")
private String GET_OPENID_URL = "";
/**
* redis存储token目录
*/
@Value("${AppConstant.BEOVERDUE_TOEKN}")
private String BEOVERDUE_TOEKN = "";
/**
*
* redis存储sessionkey目录
*/
@Value("${AppConstant.BEOVERDUE_SESSIONKEY}")
private String BEOVERDUE_SESSIONKEY = "";
// Token 默认过期时间15天
@Value("${AppConstant.TOKENDFTEXPIRETIME}")
private Integer TOKEN_DFT_EXPIRE_TIME ;
@Value("${AppConstant.DEVICETYPE}")
private String DEVICETYPE;
public String getBEOVERDUE_TOEKN() {
return BEOVERDUE_TOEKN;
}
public String getBEOVERDUE_SESSIONKEY() {
return BEOVERDUE_SESSIONKEY;
}
public String getDEVICETYPE() {
return DEVICETYPE;
}
public String getAPP_ID() {
return APP_ID;
}
public String getSECRET() {
return SECRET;
}
public String getGRANT_TYPE() {
return GRANT_TYPE;
}
public String getGET_OPENID_URL() {
return GET_OPENID_URL;
}
public Integer getTOKEN_DFT_EXPIRE_TIME() {
return TOKEN_DFT_EXPIRE_TIME;
}
}
package com.dr.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @description 年龄分布
* @author luocong
* @date 2023/12/4 11:40
* @version 1.0
*/
@ApiModel(value = "NewAgeDistributionVO", description = "年龄分布对象")
@Data
public class NewAgeDistributionVO implements Serializable {
private static final long serialVersionUID = 7183121346355376718L;
@ApiModelProperty(value = "性别 0-男,1-女")
private Integer sex;
@ApiModelProperty(value = "60岁以上")
private String overSixtyYear;
@ApiModelProperty(value = "40-60岁")
private String fortyToSixtyYear;
@ApiModelProperty(value = "30-40岁")
private String thirtyToFortyYear;
@ApiModelProperty(value = "18-30岁")
private String eighteenToThirtyYear;
@ApiModelProperty(value = "18岁以下")
private String underEighteenYear;
}
package com.dr.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @description 到店排行
* @author luocong
* @date 2023/12/4 11:40
* @version 1.0
*/
@ApiModel(value = "NewArriveShopRankVO", description = "到店排行")
@Data
public class NewArriveShopRankVO implements Serializable {
private static final long serialVersionUID = 4848395767834609852L;
@ApiModelProperty(value = "门店名称")
private String shopName;
@ApiModelProperty(value = "到店人数")
private Long arriveShopNum;
@ApiModelProperty(value = "占比")
private String ratio;
}
package com.dr.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @description 检测排行对象
* @author luocong
* @date 2023/12/4 11:40
* @version 1.0
*/
@ApiModel(value = "NewCheckCaseRankVO", description = "检测排行对象")
@Data
public class NewCheckCaseRankVO implements Serializable {
private static final long serialVersionUID = 4848395767834609852L;
@ApiModelProperty(value = "门店名称")
private String shopName;
@ApiModelProperty(value = "检测案例数")
private Long checkCaseNum;
@ApiModelProperty(value = "占比")
private String ratio;
}
package com.dr.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @description 客户与案例数据对象
* @author luocong
* @date 2023/12/2 14:06
* @version 1.0
*/
@ApiModel(value = "NewClientAndCaseGroupVO", description = "客户与案例数据对象")
@Data
public class NewClientAndCaseGroupVO implements Serializable {
private static final long serialVersionUID = -3357931515145301514L;
@ApiModelProperty(value = "案例总数")
private Long caseGroupNum;
@ApiModelProperty(value = "昨日新增案例数")
private Long addCaseByYesterday;
@ApiModelProperty(value = "客户总数")
private Long clientNum;
@ApiModelProperty(value = "单次到店客户数")
private Long onceArriveShopClientNum;
@ApiModelProperty(value = "多次到店客户数")
private Long moreArriveShopClientNum;
@ApiModelProperty(value = "昨日新增客户数")
private Long addClientByYesterday;
}
package com.dr.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @description 客户地域分布
* @author luocong
* @date 2023/12/4 11:40
* @version 1.0
*/
@ApiModel(value = "NewClientDistributionVO", description = "客户地域分布对象")
@Data
public class NewClientDistributionVO implements Serializable {
private static final long serialVersionUID = 8505699363792365071L;
@ApiModelProperty(value = "省份名称")
private String deviceName;
@ApiModelProperty(value = "门店数量")
private Long shopNum;
@ApiModelProperty(value = "客户数量")
private Long clientNum;
}
package com.dr.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import lombok.Data;
import java.io.Serializable;
/**
* @description 耗材消耗报表
* @author luocong
* @date 2023/10/31 10:01
* @version 1.0
*/
@ContentRowHeight(150)
@ColumnWidth(35)
@Data
public class NewConsumableDownloadVO implements Serializable {
private static final long serialVersionUID = -31686143367751831L;
@ExcelProperty("门店名称")
private String shopName;
@ExcelProperty("设备类型")
private String deviceTypeName;
@ExcelProperty("耗材类型")
private String consumableTypeName;
@ExcelProperty("消耗量")
private Integer consumerNum;
}
package com.dr.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @description
* @author luocong
* @date 2023/10/26 17:29
* @version 1.0
*/
@ApiModel(value = "NewConsumableListVO", description = "耗材对象")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class NewConsumableListVO implements Serializable {
private static final long serialVersionUID = -8258074442973110834L;
@ApiModelProperty(value = "耗材类型名称")
private String consumableTypeName;
@ApiModelProperty(value = "数量或排名")
private Integer num;
}
package com.dr.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* @description
* @author luocong
* @date 2023/10/26 17:27
* @version 1.0
*/
@ApiModel(value = "NewConsumableRankVO", description = "耗材消耗排行")
@NoArgsConstructor
@AllArgsConstructor
@Data
public class NewConsumableRankVO implements Serializable {
private static final long serialVersionUID = -1994567169400398216L;
@ApiModelProperty(value = "设备类型名称")
private String deviceTypeName;
@ApiModelProperty(value = "耗材对象")
private List<NewConsumableListVO> consumableList;
}
package com.dr.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @description 统计设备与耗材消耗数据
* @author luocong
* @date 2023/12/2 14:06
* @version 1.0
*/
@ApiModel(value = "NewDeviceAndConsumableVO", description = "统计设备与耗材消耗数据")
@Data
public class NewDeviceAndConsumableVO implements Serializable {
private static final long serialVersionUID = 7772874501340823347L;
@ApiModelProperty(value = "设备数量")
private Long deviceNumber;
@ApiModelProperty(value = "耗材消耗次数")
private Long consumableNumber;
}
package com.dr.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @description 设备地域分布对象
* @author luocong
* @date 2023/12/4 11:40
* @version 1.0
*/
@ApiModel(value = "NewDeviceDistributionVO", description = "设备地域分布对象")
@Data
public class NewDeviceDistributionVO implements Serializable {
private static final long serialVersionUID = 5013280554365099795L;
@ApiModelProperty(value = "省份名称")
private String provinceName;
@ApiModelProperty(value = "仪器数")
private Long deviceNum;
}
package com.dr.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @description 统计设备与耗材消耗数据
* @author luocong
* @date 2023/12/2 14:06
* @version 1.0
*/
@ApiModel(value = "NewDeviceRealTimeVO", description = "设备实时数据对象")
@Data
public class NewDeviceRealTimeVO implements Serializable {
private static final long serialVersionUID = -7775120696707315537L;
@JsonFormat(pattern = "yyyy/MM/dd HH:mm", timezone = "GMT+8")
@ApiModelProperty(value = "开始时间 ")
private LocalDateTime startTime;
@ApiModelProperty(value = "仪器名称")
private String deviceTypeName;
@ApiModelProperty(value = "操作人员")
private String employeeName;
@ApiModelProperty(value = "顾客名称")
private String clientName;
@ApiModelProperty(value = "耗材名称")
private String consumableTypeName;
@ApiModelProperty(value = "所属门店")
private String shopName;
}
package com.dr.vo;
import com.dr.dto.ParseTokenDTO;
import lombok.Data;
import java.io.Serializable;
/**
* @description 下载中心
* @author luocong
* @date 2023/12/4 11:40
* @version 1.0
*/
@Data
public class NewDownloadCenterVO implements Serializable {
private static final long serialVersionUID = 4916151280858055924L;
/**
* uuid
*/
private String uuid;
/**
* 消费标识(1-业绩排行,2-耗材消耗排行)
*/
private Integer consumerFlag;
/**
* ParseTokenDTO
*/
private ParseTokenDTO parseTokenDTO;
/**
* 城市线id
*/
private Long lineCityId;
/**
* selectType 选择类型(0-我的,1-全国)
*/
private Integer selectType;
/**
* 门店账号
*/
private String[] shopAccounts;
}
package com.dr.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @description 文件下载中心对象
* @author luocong
* @date 2023/12/4 11:40
* @version 1.0
*/
@ApiModel(value = "NewDrDownloadCenterVO", description = "文件下载中心对象")
@Data
public class NewDrDownloadCenterVO implements Serializable {
private static final long serialVersionUID = 8505699363792365071L;
@ApiModelProperty(value = "文件名称")
private String filename;
@ApiModelProperty(value = "下载链接")
private String downUrl;
}
package com.dr.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @description 员工排行
* @author luocong
* @date 2023/12/4 11:40
* @version 1.0
*/
@ApiModel(value = "NewEmployeeRankVO", description = "员工排名对象")
@Data
public class NewEmployeeRankVO implements Serializable {
private static final long serialVersionUID = 7183121346355376718L;
@ApiModelProperty(value = "员工姓名")
private String employeeName;
@ApiModelProperty(value = "操作次数")
private Long operationNum;
@ApiModelProperty(value = "门店名称")
private String shopName;
}
package com.dr.vo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @description 机构门店数据同步物联网对象
* @author luocong
* @date 2024/8/29 10:56
* @version 1.0
*/
@NoArgsConstructor
@AllArgsConstructor
@Data
public class NewOrgAndShopConsumeVO implements Serializable {
private static final long serialVersionUID = -8778117513527681936L;
/**
* 机构账号
*/
private String orgAccount;
/**
* 机构名称
*/
private String orgName;
/**
* 门店账号
*/
private String shopAccount;
/**
* 门店名称
*/
private String shopName;
/**
* 门店省名称
*/
private String shopProvinceName;
/**
* 门店市名称
*/
private String shopCityName;
/**
* 门店区名称
*/
private String shopRegionName;
/**
* 详细地址
*/
private String shopAddress;
}
package com.dr.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @description 业绩排行对象
* @author luocong
* @date 2023/10/20 10:10
* @version 1.0
*/
@ApiModel(value = "NewPerformanceRankVO", description = "业绩排行对象")
@Data
public class NewPerformanceRankVO implements Serializable {
private static final long serialVersionUID = 2905158483403094072L;
@ApiModelProperty(value = "设备类型编码")
private String deviceTypeCode;
@ApiModelProperty(value = "设备类型名称")
private String deviceTypeName;
@ApiModelProperty(value = "业绩排行")
private Long rank;
@ApiModelProperty(value = "业绩价值")
private String performanceValue;
@ApiModelProperty(value = "标杆业绩价值")
private String topOnePerValue;
@ApiModelProperty(value = "门店账号")
private String shopAccount;
@ApiModelProperty(value = "门店名称")
private String shopName;
}
package com.dr.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @description 产品推广曝光对象
* @author luocong
* @date 2023/12/4 11:40
* @version 1.0
*/
@ApiModel(value = "NewProductRecommendVO", description = "产品推广曝光对象")
@Data
public class NewProductRecommendVO implements Serializable {
private static final long serialVersionUID = 4848395767834609852L;
@ApiModelProperty(value = "产品/仪器")
private String productName;
@ApiModelProperty(value = "推荐量")
private Long recommendNum;
}
package com.dr.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @description 门店消耗排行
* @author luocong
* @date 2023/12/4 11:40
* @version 1.0
*/
@ApiModel(value = "NewShopConsumableRankVO", description = "门店消耗排行对象")
@Data
public class NewShopConsumableRankVO implements Serializable {
private static final long serialVersionUID = 4848395767834609852L;
@ApiModelProperty(value = "门店名称")
private String shopName;
@ApiModelProperty(value = "耗材消耗次数")
private Long operationNum;
@ApiModelProperty(value = "占比")
private String ratio;
}
package com.dr.vo;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @description
* @author luocong
* @date 2023/11/6 10:04
* @version 1.0
*/
@ApiModel(value = "SkinProblemContentVO", description = "推荐内容对象")
@AllArgsConstructor
@NoArgsConstructor
@Data
public class SkinProblemContentVO implements Serializable {
private static final long serialVersionUID = 5540492448805735430L;
/**
* 内容标题
*/
private String contentTitle;
/**
* 封面图
*/
private String coverPicture;
/**
* 跳转链接
*/
private String jumpLinkUrl;
/**
* 视觉效果 0:普通,1:高亮
*/
private Integer view;
/**
* 区域配置表id(多个逗号分割)
*/
private String areaConfigId;
/**
* 所属分类id
*/
private Integer beautyServiceTypeId;
}
package com.dr.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* @description
* @author luocong
* @date 2023/11/4 15:36
* @version 1.0
*/
@ApiModel(value = "SkinProblemRecommendVO", description = "皮肤问题推荐方案")
@AllArgsConstructor
@NoArgsConstructor
@Data
public class SkinProblemRecommendVO implements Serializable {
private static final long serialVersionUID = -1179193090514776730L;
@ApiModelProperty(value = "12-黑头,13-粉刺,14-毛孔,15-皱纹,16-色斑")
private Integer skinFlag;
@ApiModelProperty(value = "占比")
private String ratio;
@ApiModelProperty(value = "推荐内容")
private List<SkinProblemContentVO> skinProblemContentList;
}
#\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F\u914D\u7F6E-----
AppConstant.APPID=wx8aa5b38ca44ec5c9
AppConstant.SECRET=e6fd4084ab4a2a85691cfe632286551d
AppConstant.GRANTTYPE=authorization_code
AppConstant.GETOPENIDURL=https://api.weixin.qq.com/sns/jscode2session
#60*60*24*60
AppConstant.TOKENDFTEXPIRETIME=5184000
#redis\u5B58\u50A8token\u76EE\u5F55
AppConstant.BEOVERDUE_TOEKN=wxapple:token:
#redis\u5B58\u50A8sesssionkey\u76EE\u5F55
AppConstant.BEOVERDUE_SESSIONKEY=wxapple:sessionkey:
#\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F\u914D\u7F6E-----
#\u77ED\u4FE1\u53D1\u9001\u914D\u7F6E
AppConstant.SID=de744e783e4b4c62d9305316cab46e8e
AppConstant.TOKEN=e6d07eafa4ef85f2b71c7348d5e151ed
AppConstant.DXAPPID=83126e378d914edda98e2716f50ccad8
AppConstant.TEMPLATEID=2380
AppConstant.UID=2d92c6132139467b989d087c84a365d8
#\u4EE5\u5206\u949F\u8BA1\u7B97
AppConstant.MESSAGEDFTEXPIRETIME=3
#\u77ED\u4FE1\u53D1\u9001\u914D\u7F6Emessage
#\u963F\u91CC\u4E91oss\u914D\u7F6E
#\u963F\u91CC\u4E91API\u7684\u5916\u7F51\u57DF\u540D
AppConstant.ENDPOINT=https://oss-cn-shenzhen.aliyuncs.com
#\u963F\u91CC\u4E91API\u7684\u5BC6\u94A5Access Key ID
AppConstant.ACCESS_KEY_ID=LTAI5t67fmqMFCqT6q2FuzpN
#\u963F\u91CC\u4E91API\u7684\u5BC6\u94A5Access Key Secret
AppConstant.ACCESS_KEY_SECRET=eFke8ODvNob4Rbkn1GFDLa3XvV6nyG
#\u963F\u91CC\u4E91API\u7684bucket\u540D\u79F0
AppConstant.BACKET_NAME=djmaftersales
#\u963F\u91CC\u4E91API\u7684\u6587\u4EF6\u5939\u540D\u79F0
AppConstant.FOLDER=img/
#\u963F\u91CC\u4E91oss\u914D\u7F6E
#\u67E5\u8BE2\u9644\u4EF6\u95E8\u5E97\u7684\u65F6\u5019\uFF0C\u7C7B\u578B\u914D\u7F6E ,"DBQ3-3"
AppConstant.DEVICETYPE="DAF03-1","DBQ3-3"
#\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F\u5B58\u50A8token\uFF0C\u548Csessionkey\u89C4\u8303\u5199\u6CD5
AppConstant.wxapple.token=wxapple:token:
AppConstant.wxapple.sessionkey=wxapple:sessionkey:
#\u5FAE\u4FE1\u652F\u4ED8\u914D\u7F6E
#\u5BC6\u94A5
AppConstant.PAYMENT.PAYSECRETKEY=fdsDCDEFC425345233DEFCERFEed2021
#\u5546\u6237api\u8BC1\u4E66\u652F\u4ED8\u8BC1\u4E66
AppConstant.PAYMENT.PAYCERTIFICATE=/cert/apiclient_cert.p12
#\u5546\u6237API\u79C1\u94A5
AppConstant.PAYMENT.PRIVATEKEY=/cert/apiclient_key.pem
AppConstant.PAYMENT.PRIVATECERT=/cert/apiclient_cert.pem
#\u5546\u6237\u53F7
AppConstant.PAYMENT.MCHID=1602367576
#apiV3Key
AppConstant.PAYMENT.APIV3KEY=FVEVD23654fevertf4SCDWDDddee2021
#\u5546\u6237\u8BC1\u4E66\u5E8F\u5217\u53F7
AppConstant.PAYMENT.CERTSERIALNMBER=7677241ADCDBEAAF11E0F48D09172CE8FB99685D
#\u5F85\u652F\u4ED8\u76EE\u5F55,redis\u5B58\u50A8\u8C03\u8D77\u652F\u4ED8\u53C2\u6570,\u76EE\u5F55\u6539\u7684\u8BDD\uFF0Credis\u8FC7\u671F\u673A\u5236\u90A3\u91CC\u8981\u6539\u4E00\u4E0B
AppConstant.PAYMENT.TOBEPAIDORDER=wxorder:beoverdue:
#\u5F85\u652F\u4ED8\u8BA2\u5355\u8FC7\u671F\u65F6\u95F4,\u9ED8\u8BA4\u662F30\u5206\u949F 60*30=1800=30\u5206\u949F//1800
AppConstant.PAYMENT.BEOVERDUEORDER=1800
#15\u5929\u4E3A\u6536\u8D27\u5012\u8BA1\u65F6receiving
AppConstant.PAYMENT.RECEIVING=wxorder:automaticreceipt:
#\u81EA\u52A8\u6536\u8D27\u65F6\u95F4\uFF0C\u9ED8\u8BA4\u662F 15\u5929:60*60*24*15=1296000
AppConstant.PAYMENT.RECEIVINGTIME=1296000
#\u76F4\u64AD\u72B6\u6001
AppConstant.LIVEBROADCAST.STATIC=livebroadcast:state:
#\u76F4\u64AD\u6D88\u606F\u63A8\u9001
AppConstant.LIVEBROADCAST.MESSAGEPUSH=livebroadcast:messagepush:
#\u5458\u5DE5\u767B\u5F55token
AppConstant.BRANCHMOISTEN.TOKEN=wxStaff:
#\u5458\u5DE5\u767B\u5F55token\u8FC7\u671F\u65F6\u95F4\uFF0C\u4EE5\u79D2\u505A\u5355\u4F4D
AppConstant.BRANCHMOISTEN.TOKENBEOVERDUE=3600
AppConstant.METIS_BASE_URL=http://192.168.1.164:8089
......@@ -4,7 +4,7 @@ spring:
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3308/aiot?useUnicode=true&allowMultiQueries=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
url: jdbc:mysql://192.168.1.57:3306/metis?useUnicode=true&allowMultiQueries=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
username: root
password: 123456
hikari:
......@@ -59,4 +59,4 @@ mybatis-plus:
logic-delete-value: 1
# 逻辑未删除值(默认为 0)
logic-not-delete-value: 0
type-aliases-package: com.dr.domain.entity
\ No newline at end of file
type-aliases-package: com.dr.domain.entity
......@@ -4,7 +4,7 @@ spring:
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.1.72:3308/aiot?useUnicode=true&allowMultiQueries=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
url: jdbc:mysql://192.168.1.57:3306/metis?useUnicode=true&allowMultiQueries=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
username: root
password: 123456
hikari:
......@@ -60,3 +60,4 @@ mybatis-plus:
# 逻辑未删除值(默认为 0)
logic-not-delete-value: 0
type-aliases-package: com.dr.domain.entity
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dr.mapper.ConfigMapper">
<select id="findConfigByKeystr" resultType="com.dr.entity.Config">
select * from t_config where keystr = #{keystr}
</select>
<select id="findConfigListByKeystr" resultType="com.dr.entity.Config">
select * from t_config where keystr = #{keystr}
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dr.mapper.DrDeviceTypeStartByMonthMapper">
<select id="selectDevStartList" resultType="com.dr.dto.DeviceTypeStartByMonthDTO">
SELECT
t1.deviceid AS "deviceid",
t1.device_type_code AS "deviceTypeCode",
t1.device_type_name AS "deviceTypeName",
sum( t1.start_up_num ) AS "startUpNum",
t1.shop_account as "shopAccount",
t1.shop_name as "shopName"
FROM
dr_device_type_start_by_day t1
INNER JOIN t_area t2 ON t1.shop_city_name = t2.`name`
INNER JOIN t_a_config_area t3 ON t2.id = t3.area_id
WHERE
t1.deleted = 0
AND t2.isdel = 0
AND t1.month_time BETWEEN #{startTime} AND #{endTime}
AND t1.device_type_code IN
<foreach collection="deviceTypeSet" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
AND t3.area_config_id = #{lineCityId}
<if test="null != shopAccount">
AND t1.shop_account = #{shopAccount}
</if>
<if test="null != orgAccount">
AND t1.org_account = #{orgAccount}
</if>
GROUP BY
t1.device_type_code,
t1.deviceid
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dr.mapper.DrLastYearSkinProblemByMonthMapper">
<select id="selectSkinProblemRecommend"
resultType="com.dr.entity.DrLastYearSkinProblemByMonthEntity">
SELECT
t1.*
FROM
dr_last_year_skin_problem_by_month t1
INNER JOIN
t_area t2
ON t1.shop_province_name = t2.`name`
INNER JOIN t_a_config_area t3 ON t2.id = t3.area_id
WHERE
t1.deleted = 0
and t2.isdel = 0
and t3.deleted = 0
and t3.area_config_id = #{regionId}
and t1.month_time between #{startTime} and #{endTime}
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.dr.mapper.EmployeeManageMapper" >
<select id="findEmpPermission" resultType="com.dr.dto.EmpPermissionDTO">
SELECT
ce.power_type AS powerType,
o.accounts AS oAccount,
s.accounts AS shopAccount,
o.orgname AS orgName
FROM
c_employee ce
INNER JOIN t_organization o ON ce.per_id = o.id
INNER JOIN t_shop s ON s.id = ce.per_cus_Id
WHERE
ce.per_cus_Id = s.id and ce.openid =#{openId} and s.accounts = #{sAccount} limit 1
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.dr.mapper.WxAppletuserMapper">
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment