Browse Source

用户店铺后台

zoujiajian 2 years ago
parent
commit
6580359310
17 changed files with 1151 additions and 0 deletions
  1. 3 0
      netflix-dao/src/main/java/com/cyksj/mapper/GoodsDonMapper.java
  2. 21 0
      netflix-dao/src/main/java/com/cyksj/mapper/shop/YhShopWaitingSendPointsMapper.java
  3. 22 0
      netflix-dao/src/main/java/com/cyksj/model/views/YhShopBrokenLineCpsUserWMoneyView.java
  4. 42 0
      netflix-dao/src/main/java/com/cyksj/model/views/YhShopUserDistributeDetailView.java
  5. 54 0
      netflix-dao/src/main/java/com/cyksj/model/views/YhShopUserDistributeOrdersDetailView.java
  6. 39 0
      netflix-dao/src/main/java/com/cyksj/model/views/YhShopUserDistributeOrdersStatisticsView.java
  7. 28 0
      netflix-dao/src/main/java/com/cyksj/model/views/YhShopUserDistributeRateView.java
  8. 22 0
      netflix-dao/src/main/java/com/cyksj/model/views/YhShopUserWMoneyStatisticsDataView.java
  9. 76 0
      netflix-dao/src/main/resources/YhShopWaitingSendPointsMapper.xml
  10. 4 0
      netflix-service/src/main/java/com/cyksj/config/wxlogin/WxOpenPlatYHLXLoginConfig.java
  11. 2 0
      netflix-service/src/main/java/com/cyksj/redis/RedisService.java
  12. 32 0
      netflix-service/src/main/java/com/cyksj/service/cps/shop/YhShopManageService.java
  13. 168 0
      netflix-service/src/main/java/com/cyksj/service/cps/shop/YhShopManageServiceImpl.java
  14. 312 0
      netflix-web/src/main/java/com/cyksj/web/controller/cps/YhShopLoginController.java
  15. 326 0
      netflix-web/src/main/java/com/cyksj/web/util/StpYhShopManageUser.java
  16. 0 0
      netflix-web/src/main/resources/application-dev.yml
  17. 0 0
      netflix-web/src/main/resources/application-prd.yml

+ 3 - 0
netflix-dao/src/main/java/com/cyksj/mapper/GoodsDonMapper.java

@@ -27,4 +27,7 @@ public interface GoodsDonMapper extends BaseMapper<GoodsDon> {
 	@Select("select sku.id as skuId,sku.goods_id,sku.spec_val,g.title as goodsTitle from goods_don_sku sku inner join goods_don g on g.id = sku.goods_id" +
 			" where g.deleted is true and type = #{type}")
 	List<GoodsDonSkuView> selectGoodsDonSkuByGoodsType(Integer type);
+
+	@Select("select g.id, g.title (select distinct goods_id from order_don where status not in ('close','noPayment') and yhs_id = #{yhsId}) o inner join goods_don g on g.id = o.goods_id")
+	List<GoodsDon> getYhShopDistributeGoodsDetail(Long yhsId);
 }

+ 21 - 0
netflix-dao/src/main/java/com/cyksj/mapper/shop/YhShopWaitingSendPointsMapper.java

@@ -0,0 +1,21 @@
+package com.cyksj.mapper.shop;
+
+import cn.hutool.core.date.DateTime;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.cyksj.model.views.YhShopBrokenLineCpsUserWMoneyView;
+import com.cyksj.model.views.YhShopUserWMoneyStatisticsDataView;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/*
+ *项目名: yhlxj
+ *文件名: YhShopWaitingSendPointsMapper
+ *创建者: JavaZou
+ *创建时间:2023/9/19 18:08
+ */
+public interface YhShopWaitingSendPointsMapper extends BaseMapper<YhShopWaitingSendPointsMapper> {
+	YhShopBrokenLineCpsUserWMoneyView getWMoneyStatisticsDataView(@Param("yhShopUserId") long yhShopUserId, @Param("first") DateTime first, @Param("end") DateTime end, @Param("today") Boolean today);
+
+	List<YhShopUserWMoneyStatisticsDataView> getWMoneyStatisticsDate(@Param("yhShopUserId") long yhShopUserId, @Param("first") DateTime first, @Param("end") DateTime end, @Param("today") Boolean today);
+}

+ 22 - 0
netflix-dao/src/main/java/com/cyksj/model/views/YhShopBrokenLineCpsUserWMoneyView.java

@@ -0,0 +1,22 @@
+package com.cyksj.model.views;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/*
+ *项目名: yhlxj
+ *文件名: YhShopBrokenLineCpsUserWMoneyView
+ *创建者: JavaZou
+ *创建时间:2023/9/19 18:04
+ */
+@Getter
+@Setter
+public class YhShopBrokenLineCpsUserWMoneyView {
+	private String firstDate;
+
+	private String lastDate;
+
+	private List<YhShopUserWMoneyStatisticsDataView> dataView;
+}

+ 42 - 0
netflix-dao/src/main/java/com/cyksj/model/views/YhShopUserDistributeDetailView.java

@@ -0,0 +1,42 @@
+package com.cyksj.model.views;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/*
+ *项目名: yhlxj
+ *文件名: YhShopUserDistributeDetailView
+ *创建者: JavaZou
+ *创建时间:2023/9/19 17:55
+ */
+@Getter
+@Setter
+public class YhShopUserDistributeDetailView {
+	/**
+	 * 待入账金额
+	 */
+	private BigDecimal wMoney;
+
+	/**
+	 * 返现金额
+	 */
+	private BigDecimal reMoney;
+
+	/**
+	 * 待提现金额
+	 */
+	private BigDecimal wApplyMoney;
+
+	/**
+	 * 已提现金额
+	 */
+	private BigDecimal gotApplyMoney;
+
+	/**
+	 * 各平台分销比例
+	 */
+	private List<YhShopUserDistributeRateView> rateViews;
+}

+ 54 - 0
netflix-dao/src/main/java/com/cyksj/model/views/YhShopUserDistributeOrdersDetailView.java

@@ -0,0 +1,54 @@
+package com.cyksj.model.views;
+
+import com.ejlchina.searcher.bean.DbField;
+import com.ejlchina.searcher.bean.SearchBean;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/*
+ *项目名: yhlxj
+ *文件名: YhShopUserDistributeOrdersDetailView
+ *创建者: JavaZou
+ *创建时间:2023/9/20 11:11
+ */
+@Getter
+@Setter
+@SearchBean(tables = "(select o.id,o.user_id,o.goods_id,o.sku_id,o.money,o.refund_money,o.coupon_money,o.created_time from order_don o inner join (select user_id from yh_shop_user_distribute_shared where :shopUserId:) us on us.user_id = o.user_id where o.yhs_id != 0 and o.status not in ('close','noPayment') :time:) od" +
+		" left join goods_don g on g.id = od.goods_id" +
+		" inner join yh_shop_distribute_waiting_send_points dp on dp.order_id = od.id")
+public class YhShopUserDistributeOrdersDetailView {
+	@DbField("select nickname from user where id = od.user_id limit 1")
+	private String nickname;
+
+	@JsonIgnore
+	@DbField("g.id")
+	private Long goodsId;
+
+	@DbField("g.title")
+	private String title;
+
+	@DbField("select spec_val from goods_don_sku where id = od.sku_id limit 1")
+	private String specVal;
+
+	@DbField("cast(od.money/100 as decimal(10,2))")
+	private BigDecimal money;
+
+//	@DbField("od.coupon_money")
+//	private BigDecimal couponMoney;
+
+	@DbField("TRUNCATE(dp.money/100,2)")
+	private BigDecimal reMoney = BigDecimal.ZERO;
+
+	@DbField("if(send_status = 'success',TRUNCATE(dp.money/100,2),0)")
+	private BigDecimal rdMoney;
+
+	@DbField("dp.send_status")
+	private String sendStatus;
+
+	@DbField("od.created_time")
+	private Date createdTime;
+}

+ 39 - 0
netflix-dao/src/main/java/com/cyksj/model/views/YhShopUserDistributeOrdersStatisticsView.java

@@ -0,0 +1,39 @@
+package com.cyksj.model.views;
+
+import com.ejlchina.searcher.bean.DbField;
+import com.ejlchina.searcher.bean.SearchBean;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+
+/*
+ *项目名: yhlxj
+ *文件名: YhShopUserDistributeOrdersStatisticsView
+ *创建者: JavaZou
+ *创建时间:2023/9/20 11:08
+ */
+@Getter
+@Setter
+@SearchBean(tables = "(select o.id,o.user_id,o.goods_id,o.money,o.refund_money,o.status from order_don o inner join (select user_id from yh_shop_user_distribute_shared where :shopUserId:) us on us.user_id = o.user_id where o.yhs_id != 0 and o.status not in ('close','noPayment') :time:) od left join goods_don g on g.id = od.goods_id" +
+		" inner join yh_shop_distribute_waiting_send_points dp on dp.order_id = od.id",
+		groupBy = "od.goods_id,g.title")
+public class YhShopUserDistributeOrdersStatisticsView {
+	@DbField("g.title")
+	private String title;
+
+	@DbField("cast(sum(od.money)/100 as decimal(10,2))")
+	private BigDecimal distributeOrderMoney;
+
+	@DbField("count(od.id)")
+	private Integer orders;
+
+	@DbField("TRUNCATE(sum(if(dp.send_status != 'close',dp.money,0))/100,2)")
+	private BigDecimal takeMoney;
+
+	@DbField("count(if(od.status = 'refund',1,NULL))")
+	private Integer refundOrders;
+
+	@DbField("cast(sum(if(od.status = 'refund',od.refund_money,0))/100 as decimal(10,2))")
+	private BigDecimal refundMoney;
+}

+ 28 - 0
netflix-dao/src/main/java/com/cyksj/model/views/YhShopUserDistributeRateView.java

@@ -0,0 +1,28 @@
+package com.cyksj.model.views;
+
+import com.ejlchina.searcher.bean.DbField;
+import com.ejlchina.searcher.bean.SearchBean;
+import lombok.Getter;
+import lombok.Setter;
+
+/*
+ *项目名: yhlxj
+ *文件名: YhShopUserDistributeRateView
+ *创建者: JavaZou
+ *创建时间:2023/9/19 18:00
+ */
+@Getter
+@Setter
+@SearchBean(tables = "goods_don g left join yh_shop_user_plat_distribute_rate upr on upr.goods_id = g.id :uid:",
+		where = "g.type = 1 and g.deleted is true and g.status is true and upr.rate > 0")
+public class YhShopUserDistributeRateView {
+
+	@DbField("g.category")
+	private Integer category;
+
+	@DbField("g.title")
+	private String title;
+
+	@DbField("upr.rate")
+	private Integer rate;
+}

+ 22 - 0
netflix-dao/src/main/java/com/cyksj/model/views/YhShopUserWMoneyStatisticsDataView.java

@@ -0,0 +1,22 @@
+package com.cyksj.model.views;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+
+/*
+ *项目名: yhlxj
+ *文件名: YhShopUserWMoneyStatisticsDataView
+ *创建者: JavaZou
+ *创建时间:2023/9/19 18:05
+ */
+@Getter
+@Setter
+public class YhShopUserWMoneyStatisticsDataView {
+	private int hour;
+
+	private BigDecimal money;
+
+	private String date;
+}

+ 76 - 0
netflix-dao/src/main/resources/YhShopWaitingSendPointsMapper.xml

@@ -0,0 +1,76 @@
+<?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.cyksj.mapper.shop.YhShopWaitingSendPointsMapper">
+
+    <select id="getWMoneyStatisticsDataView"
+            resultType="com.cyksj.model.views.YhShopBrokenLineCpsUserWMoneyView">
+        select
+        <if test="today">
+            date_format(send_time, '%H') as `hour`,
+        </if>
+        <if test="!today">
+            date_format(send_time, '%Y-%m-%d') `date`,
+        </if>
+        TRUNCATE(ifnull(sum(points),0)/ 1000,2) money
+        from `yh_shop_distribute_waiting_send_points`
+        where shop_user_id = #{yhShopUserId}
+        and send_status = 'waiting'
+        <choose>
+            <when test="today">
+                <if test="first != null">
+                    and send_time >= #{first}
+                </if>
+                <if test="end != null">
+                    and send_time &lt;= #{end}
+                </if>
+                group by date_format(send_time, '%H')
+                order by date_format(send_time, '%H')
+            </when>
+            <otherwise>
+                <if test="first != null">
+                    and date_format(send_time, '%Y-%m-%d') >= #{first}
+                </if>
+                <if test="end != null">
+                    and date_format(send_time, '%Y-%m-%d') &lt; #{end}
+                </if>
+                group by date_format(send_time, '%Y-%m-%d')
+                order by date_format(send_time, '%Y-%m-%d')
+            </otherwise>
+        </choose>
+    </select>
+    
+    <select id="getWMoneyStatisticsDate" resultType="com.cyksj.model.views.YhShopUserWMoneyStatisticsDataView">
+        select min(curdate) as firstDate,
+        max(curdate) as lastDate from (select
+        <if test="today">
+            date_format(send_time, '%H') as `curdate`
+        </if>
+        <if test="!today">
+            date_format(send_time, '%Y-%m-%d') `curdate`
+        </if>
+        from `yh_shop_distribute_waiting_send_points`
+        where shop_user_id = #{yhShopUserId}
+        and send_status = 'waiting'
+        <choose>
+            <when test="today">
+                <if test="first != null">
+                    and send_time >= #{first}
+                </if>
+                <if test="end != null">
+                    and send_time &lt;= #{end}
+                </if>
+                group by date_format(send_time, '%H')
+            </when>
+            <otherwise>
+                <if test="first != null">
+                    and date_format(send_time, '%Y-%m-%d') >= #{first}
+                </if>
+                <if test="end != null">
+                    and date_format(send_time, '%Y-%m-%d') &lt; #{end}
+                </if>
+                group by date_format(send_time, '%Y-%m-%d')
+            </otherwise>
+        </choose>
+        )s
+    </select>
+</mapper>

+ 4 - 0
netflix-service/src/main/java/com/cyksj/config/wxlogin/WxOpenPlatYHLXLoginConfig.java

@@ -35,6 +35,10 @@ public class WxOpenPlatYHLXLoginConfig {
 
 	private String cpsLoginUrl;
 
+	private String yhShopRedirectUri;
+
+	private String yhShopLoginUrl;
+
 	/**
 	 * 绑定账号回调接口地址
 	 */

+ 2 - 0
netflix-service/src/main/java/com/cyksj/redis/RedisService.java

@@ -615,6 +615,8 @@ public class RedisService {
         REGISTER_HOME_PAGE_CACHE("register_home_page_cache:", "注册首页缓存", 10 * 60),
         CPS_BACK_LOGIN_KEY("cps_back_login:", "cps商务后台登录key", 3 * 60),
         CPS_AUTH_SUCCESS_KEY("cps_auth_success_key:%s", "cps后台微信授权", 60 * 10),
+        YH_SHOP_BACK_LOGIN_KEY("yh_shop_back_login:", "店铺主后台key", 3 * 60),
+        YH_SHOP_AUTH_SUCCESS_KEY("yh_shop_auth_success_key:%s", "店铺主后台微信授权", 60 * 10),
         QUESTION_RESPONSE_KEY("question_response_key:%s", "问卷回答key", 60 * 60 * 24L),
         IMPORT_ACCOUNT_CACHE_KEY("import_account_cache_key:%s", "导入缓存key", 60 * 10L),
         MAKERTING_MSG_KEY("makerting_msg_key", "营销短信", 60 * 60 * 24 * 30),

+ 32 - 0
netflix-service/src/main/java/com/cyksj/service/cps/shop/YhShopManageService.java

@@ -0,0 +1,32 @@
+package com.cyksj.service.cps.shop;
+
+import cn.hutool.core.date.DateTime;
+import com.cyksj.model.entity.User;
+import com.cyksj.model.views.YhShopBrokenLineCpsUserWMoneyView;
+import com.cyksj.model.views.YhShopUserWMoneyStatisticsDataView;
+
+import java.util.List;
+
+/*
+ *项目名: yhlxj
+ *文件名: YhShopManageService
+ *创建者: JavaZou
+ *创建时间:2023/9/19 17:36
+ */
+public interface YhShopManageService {
+	/**
+	 * 获取登录验证码
+	 * @param type 1手机号、2邮箱
+	 * @param cid 国家或地区id +86
+	 * @param login
+	 */
+	void getLoginCode(Integer type, String login, Integer cid);
+
+	User login(Integer type, String login, String code);
+
+	YhShopBrokenLineCpsUserWMoneyView getWMoneyStatisticsDate(long yhShopUserId, DateTime first, DateTime end);
+
+	List<YhShopUserWMoneyStatisticsDataView> getWMoneyStatisticsDataView(long yhShopUserId, DateTime first, DateTime end);
+
+	User yhShopManageRedirect(long userId);
+}

+ 168 - 0
netflix-service/src/main/java/com/cyksj/service/cps/shop/YhShopManageServiceImpl.java

@@ -0,0 +1,168 @@
+package com.cyksj.service.cps.shop;
+
+import cn.hutool.core.date.DateTime;
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.lang.Validator;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.cyksj.common.exception.BusinessRuntimeException;
+import com.cyksj.common.util.SmsUtil;
+import com.cyksj.common.util.StringUtil;
+import com.cyksj.mapper.UserMapper;
+import com.cyksj.mapper.shop.YhShopMapper;
+import com.cyksj.mapper.shop.YhShopWaitingSendPointsMapper;
+import com.cyksj.model.entity.User;
+import com.cyksj.model.manage.entity.YhShop;
+import com.cyksj.model.views.YhShopBrokenLineCpsUserWMoneyView;
+import com.cyksj.model.views.YhShopUserWMoneyStatisticsDataView;
+import com.cyksj.redis.RedisService;
+import com.cyksj.service.mail.MailService;
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/*
+ *项目名: yhlxj
+ *文件名: YhShopManageServiceImpl
+ *创建者: JavaZou
+ *创建时间:2023/9/19 17:36
+ */
+@Service
+@RequiredArgsConstructor
+public class YhShopManageServiceImpl implements YhShopManageService{
+	private final YhShopMapper yhShopMapper;
+
+	private final UserMapper userMapper;
+
+	private final RedisService redisService;
+
+	private final MailService mailService;
+
+	private final YhShopWaitingSendPointsMapper yhShopWaitingSendPointsMapper;
+
+	@Override
+	public void getLoginCode(Integer type, String login, Integer cid) {
+		if (type > 2) {
+			throw BusinessRuntimeException.getInstance("");
+		}
+		if (cid == null) {
+			cid = 86;
+		}
+		String phone = null;
+		String email = null;
+		if (type == 1) phone = login;
+		else if (type == 2) email = login;
+		User user = userMapper.selectOne(Wrappers.lambdaQuery(User.class)
+				.eq(StrUtil.isNotBlank(phone), User::getLoginPhone, phone)
+				.eq(StrUtil.isNotBlank(email), User::getEmail, email).last("limit 1"));
+		if (user == null) throw BusinessRuntimeException.getInstance("登录信息不存在");
+		//是否是店铺主
+		YhShop yhShop = yhShopMapper.selectOne(Wrappers.lambdaQuery(YhShop.class)
+				.eq(YhShop::getVerifyStatus, YhShop.Status.success)
+				.eq(YhShop::getUserId, user.getId()).last("limit 1"));
+		if (yhShop == null) {
+			throw BusinessRuntimeException.getInstance("您不是银河小店店铺主");
+		}
+
+		String CACHE_LOGIN_KEY = RedisService.key.YH_SHOP_BACK_LOGIN_KEY.getName()  + login;
+		Object o = redisService.get(CACHE_LOGIN_KEY);
+		Long expire = redisService.getExpire(CACHE_LOGIN_KEY);
+		if (o != null && expire >= 3 * 60 - 10) {
+			throw BusinessRuntimeException.getInstance("获取验证码过于频繁");
+		}
+		String code = StringUtil.getRandomCodeStr(6);
+		if (type == 1) {
+			if (StrUtil.isEmpty(login) || (86 == cid && !Validator.isMobile(phone))) {
+				throw BusinessRuntimeException.getInstance("请输入正确的手机号");
+			}
+			SmsUtil.sendTencent(cid, login, code);
+		} else if (type == 2) {
+			if (!Validator.isEmail(login)) {
+				throw BusinessRuntimeException.getInstance("请输入正确的邮箱");
+			}
+			mailService.sendLoginCodeEmailToPeople(code, login);
+		}
+		redisService.set(CACHE_LOGIN_KEY, code, RedisService.key.YH_SHOP_BACK_LOGIN_KEY.getTimeout());
+	}
+
+	@Override
+	public User login(Integer type, String login, String code) {
+		String phone = null;
+		String email = null;
+		if (type == null) {
+			type = 1;
+		}
+		if (type > 2) {
+			throw BusinessRuntimeException.getInstance("");
+		}
+		if (type == 1) phone = login;
+		if (type == 2) email = login;
+		if (StrUtil.isEmpty(code)) {
+			throw BusinessRuntimeException.getInstance("请输入验证码");
+		}
+		String CACHE_LOGIN_KEY = RedisService.key.YH_SHOP_BACK_LOGIN_KEY.getName();
+		if (type == 1) {
+			if (StrUtil.isEmpty(phone)) {
+				throw BusinessRuntimeException.getInstance("请输入正确的手机号");
+			}
+			CACHE_LOGIN_KEY += phone;
+		} else if (type == 2) {
+			if (!Validator.isEmail(email)) {
+				throw BusinessRuntimeException.getInstance("请输入正确的邮箱");
+			}
+			CACHE_LOGIN_KEY += email;
+		}
+		String cache_code = (String) redisService.get(CACHE_LOGIN_KEY);
+		if (StrUtil.isBlank(cache_code) || !cache_code.equals(code)) {
+			throw BusinessRuntimeException.getInstance("验证码错误");
+		}
+		User user = userMapper.selectOne(Wrappers.lambdaQuery(User.class)
+				.eq(StrUtil.isNotBlank(phone), User::getLoginPhone, phone)
+				.eq(StrUtil.isNotBlank(email), User::getEmail, email).last("limit 1"));
+		if (user == null) throw BusinessRuntimeException.getInstance("用户不存在");
+		//是否是店铺主
+		YhShop yhShop = yhShopMapper.selectOne(Wrappers.lambdaQuery(YhShop.class)
+				.eq(YhShop::getVerifyStatus, YhShop.Status.success)
+				.eq(YhShop::getUserId, user.getId()).last("limit 1"));
+		if (yhShop == null) {
+			throw BusinessRuntimeException.getInstance("您不是银河小店店铺主");
+		}
+		redisService.del(CACHE_LOGIN_KEY);
+		return user;
+	}
+
+	@Override
+	public YhShopBrokenLineCpsUserWMoneyView getWMoneyStatisticsDate(long yhShopUserId, DateTime first, DateTime end) {
+		boolean today = isToday(first, end);
+		return yhShopWaitingSendPointsMapper.getWMoneyStatisticsDataView(yhShopUserId, first, end, today);
+	}
+
+	@Override
+	public List<YhShopUserWMoneyStatisticsDataView> getWMoneyStatisticsDataView(long yhShopUserId, DateTime first, DateTime end) {
+		boolean today = isToday(first, end);
+		return yhShopWaitingSendPointsMapper.getWMoneyStatisticsDate(yhShopUserId, first, end, today);
+	}
+
+	@Override
+	public User yhShopManageRedirect(long userId) {
+		//是否是店铺主
+		YhShop yhShop = yhShopMapper.selectOne(Wrappers.lambdaQuery(YhShop.class)
+				.eq(YhShop::getVerifyStatus, YhShop.Status.success)
+				.eq(YhShop::getUserId, userId).last("limit 1"));
+		if (yhShop == null) {
+			throw BusinessRuntimeException.getInstance("您不是银河小店店铺主");
+		}
+		return null;
+	}
+
+	public boolean isToday(DateTime first, DateTime end) {
+		boolean today = false;
+		if (first != null && end != null) {
+			if (DateUtil.beginOfDay(DateTime.now()).equals(first) && (DateUtil.beginOfDay(DateUtil.offsetDay(DateTime.now(), 1)).equals(end) || DateUtil.endOfDay(DateTime.now()).equals(end))) {
+				today = true;
+			}
+		}
+		return today;
+	}
+}

+ 312 - 0
netflix-web/src/main/java/com/cyksj/web/controller/cps/YhShopLoginController.java

@@ -0,0 +1,312 @@
+package com.cyksj.web.controller.cps;
+
+import cn.hutool.core.date.DateTime;
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.json.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.cyksj.common.annotation.NoSubmit;
+import com.cyksj.common.exception.BusinessRuntimeException;
+import com.cyksj.common.snowflake.Sequence;
+import com.cyksj.common.util.Codec;
+import com.cyksj.common.util.Jsons;
+import com.cyksj.config.wxlogin.WxOpenPlatYHLXLoginConfig;
+import com.cyksj.dto.Result;
+import com.cyksj.enums.GatewayResponse;
+import com.cyksj.mapper.GoodsDonMapper;
+import com.cyksj.mapper.UserMapper;
+import com.cyksj.mapper.shop.YhShopMapper;
+import com.cyksj.model.dto.AuthRedirect;
+import com.cyksj.model.dto.AuthToken;
+import com.cyksj.model.dto.CpsAuthDto;
+import com.cyksj.model.dto.GzhOAuth2UserInfo;
+import com.cyksj.model.entity.GoodsDon;
+import com.cyksj.model.entity.User;
+import com.cyksj.model.entity.YhShopDistributeMoneyApply;
+import com.cyksj.model.entity.YhShopDistributeWaitingSendPoints;
+import com.cyksj.model.manage.entity.YhShop;
+import com.cyksj.model.request.LoginReq;
+import com.cyksj.model.views.*;
+import com.cyksj.redis.RedisService;
+import com.cyksj.service.authorization.AuthorizationService;
+import com.cyksj.service.cps.shop.YhShopManageService;
+import com.cyksj.service.wechat.WeChatService;
+import com.cyksj.web.util.StpUserUtil;
+import com.cyksj.web.util.StpYhShopManageUser;
+import com.ejlchina.searcher.BeanSearcher;
+import com.ejlchina.searcher.SearchResult;
+import com.ejlchina.searcher.util.MapBuilder;
+import com.ejlchina.searcher.util.MapUtils;
+import lombok.RequiredArgsConstructor;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Optional;
+
+/*
+ *项目名: yhlxj
+ *文件名: YhShopController
+ *创建者: JavaZou
+ *创建时间:2023/9/19 17:34
+ */
+@RestController
+@RequestMapping("/yhShop/manage")
+@RequiredArgsConstructor
+public class YhShopLoginController {
+	private final YhShopManageService yhShopManageService;
+
+	private final BeanSearcher beanSearcher;
+
+	private final HttpServletRequest request;
+
+	private final GoodsDonMapper goodsDonMapper;
+
+	private final RedisService redisService;
+
+	private final static Sequence SEQUENCE = new Sequence(0);
+
+	private final WxOpenPlatYHLXLoginConfig wxOpenPlatYHLXLoginConfig;
+
+	private final AuthorizationService authorizationService;
+
+	private final WeChatService weChatService;
+
+	private final UserMapper userMapper;
+
+	private final YhShopMapper yhShopMapper;
+
+	/**
+	 * 获取登录验证码
+	 */
+	@GetMapping("/get/LoginCode")
+	@NoSubmit
+	public Result getLoginCode(@RequestParam(defaultValue = "1") Integer type, String login, Integer cid) {
+		yhShopManageService.getLoginCode(type, login, cid);
+		return GatewayResponse.SUCCESS.newBuilder().toResult();
+	}
+
+	/**
+	 * 跳转店铺后台 是否是店铺主
+	 */
+	@GetMapping("/redirect")
+	public void yhShopManageRedirect(String redirectUrl, HttpServletResponse response) throws IOException {
+		//银河官网token值
+		long userId = StpUserUtil.getLoginIdAsLong();
+		yhShopManageService.yhShopManageRedirect(userId);
+		//校验通过重定向
+		StpYhShopManageUser.login(userId);
+		response.sendRedirect(redirectUrl.contains("?") ? redirectUrl + "&t=" + StpYhShopManageUser.getTokenValue() : redirectUrl + "?t=" + StpYhShopManageUser.getTokenValue());
+	}
+
+
+	/**
+	 * 手机号、邮箱登录
+	 */
+	@PostMapping("/login")
+	public Result login(@RequestBody LoginReq loginReq) {
+		User user = yhShopManageService.login(loginReq.getType(), loginReq.getLogin(), loginReq.getCode());
+		StpYhShopManageUser.login(user.getId());
+		String yhShopToken = StpYhShopManageUser.getTokenValue();
+		JSONObject re = new JSONObject();
+		re.putOpt("satoken-yhShop", yhShopToken);
+		re.putOpt("img", user.getHeadimgurl());
+		re.putOpt("nickname", user.getNickname());
+		return GatewayResponse.SUCCESS.newBuilder().toResult(re.toString());
+	}
+
+	/**
+	 * 小店后台微信授权登录
+	 */
+	@GetMapping("/wx/authLogin")
+	public Result<CpsAuthDto> wxAuthorize() throws Exception {
+		Object authUrlObj = redisService.get(RedisService.key.WX_LOGIN_AUTH_URI.getNameFormat("yhShop", wxOpenPlatYHLXLoginConfig.getAppId()));
+		if (authUrlObj != null) {
+			CpsAuthDto cpsAuthDto = Jsons.parseObject(authUrlObj.toString(), CpsAuthDto.class);
+			return GatewayResponse.SUCCESS.newBuilder().toResult(cpsAuthDto);
+		}
+		CpsAuthDto cpsAuthDto = new CpsAuthDto();
+		Long mappingId = SEQUENCE.nextId();
+		String authState = mappingId.toString();
+		redisService.set(authState, authState, 60 * 60 * 24L);
+		AuthRedirect redirect = new AuthRedirect().setMappingId(mappingId);
+		String state = Codec.DoBase64.custom().setData(Jsons.toJson(redirect)).encodeAsText();
+		String wxAuthUrl = authorizationService.createWxAuthLoginUrl(state, wxOpenPlatYHLXLoginConfig.getYhShopRedirectUri());
+		cpsAuthDto.setAuthUrl(wxAuthUrl);
+		cpsAuthDto.setAuthState(authState);
+		redisService.set(RedisService.key.WX_LOGIN_AUTH_URI.getNameFormat("yhShop", wxOpenPlatYHLXLoginConfig.getAppId()), Jsons.toJson(cpsAuthDto), RedisService.key.WX_LOGIN_AUTH_URI.getTimeout());
+		return GatewayResponse.SUCCESS.newBuilder().toResult(cpsAuthDto);
+	}
+
+	/**
+	 * 网页微信授权后跳转
+	 */
+	@GetMapping("/wx/authLogin/baseRedirect")
+	public void wxAuthLoginRedirect(String code, String state, HttpServletResponse response) throws Exception {
+		if (StrUtil.isEmpty(state)) throw BusinessRuntimeException.getInstance("授权错误,请重新授权");
+		String json = Codec.DoBase64.custom().setData(state).decodeAsText();
+		AuthRedirect re = Jsons.parseObject(json, AuthRedirect.class);
+		AuthToken token = weChatService.getAuthToken(code, wxOpenPlatYHLXLoginConfig.getAppId());
+		GzhOAuth2UserInfo userinfo = weChatService.getUserInfo(token.getAccessToken(), token.getOpenid());
+		String unionId = userinfo.getUnionid();
+		String openId = userinfo.getOpenid();
+		User user = Optional.ofNullable(
+						userMapper.selectOne(new LambdaQueryWrapper<User>().eq(User::getUnionid, unionId)
+								.orderByAsc(User::getId)
+								.last("limit 1")))
+				.orElseGet(() -> userMapper.selectOne(new LambdaQueryWrapper<User>().eq(User::getOpenId, openId)
+						.orderByAsc(User::getId)
+						.last("limit 1")));
+		if (user == null) throw BusinessRuntimeException.getInstance("用户信息不存在");
+		YhShop yhShop = yhShopMapper.selectOne(Wrappers.lambdaQuery(YhShop.class)
+				.eq(YhShop::getVerifyStatus, YhShop.Status.success)
+				.eq(YhShop::getUserId, user.getId()).last("limit 1"));
+		if (yhShop == null) {
+			throw BusinessRuntimeException.getInstance("您不是银河小店店铺主");
+		}
+		JSONObject res = new JSONObject();
+		StpYhShopManageUser.login(user.getId());
+		String cpsToken = StpYhShopManageUser.getTokenValue();
+		res.putOpt("satoken-yhShop", cpsToken);
+		res.putOpt("img", user.getHeadimgurl());
+		res.putOpt("nickname", user.getNickname());
+		redisService.set(RedisService.key.YH_SHOP_AUTH_SUCCESS_KEY.getNameFormat(re.getMappingId()), res.toString(), RedisService.key.YH_SHOP_AUTH_SUCCESS_KEY.getTimeout());
+		response.sendRedirect(wxOpenPlatYHLXLoginConfig.getYhShopLoginUrl());
+	}
+
+	/**
+	 * 店铺用户是否已授权
+	 */
+	@GetMapping("/get/userInfo")
+	public Result<String> getCpsUserInfo(String authState) {
+		String key = RedisService.key.YH_SHOP_AUTH_SUCCESS_KEY.getNameFormat(authState);
+		Object o = redisService.get(key);
+		if (o == null) return GatewayResponse.SUCCESS.newBuilder().toResult();
+		redisService.del(key);
+		return GatewayResponse.SUCCESS.newBuilder().toResult(o.toString());
+	}
+
+
+	/**
+	 * 店铺分销平台数据详情
+	 */
+	@GetMapping("/get/distribute/detail")
+	public Result<YhShopUserDistributeDetailView> getDistributeDetail() {
+		long yhShopUserId = StpYhShopManageUser.getLoginIdAsLong();
+		User user = beanSearcher.searchFirst(User.class, MapUtils.builder().field(User::getId, yhShopUserId).onlySelect(User::getPoints).build());
+		BigDecimal wApplyMoney = user.getYhsMoney().divide(BigDecimal.valueOf(100));
+		//已提现
+		Number gotApplyMoney = beanSearcher.searchSum(YhShopDistributeMoneyApply.class, MapUtils.builder()
+				.field(YhShopDistributeMoneyApply::getUserId, yhShopUserId)
+				.field(YhShopDistributeMoneyApply::getVerifyStatus, YhShopDistributeMoneyApply.Status.success.name())
+				.build(), "money");
+		Number reMoneyPoints = beanSearcher.searchSum(YhShopDistributeWaitingSendPoints.class, MapUtils.builder().field(YhShopDistributeWaitingSendPoints::getSharedId, yhShopUserId).field(YhShopDistributeWaitingSendPoints::getSendStatus, YhShopDistributeWaitingSendPoints.Status.success.name()).build(), "money");
+		Number wMoneyPoints = beanSearcher.searchSum(YhShopDistributeWaitingSendPoints.class, MapUtils.builder().field(YhShopDistributeWaitingSendPoints::getSharedId, yhShopUserId).field(YhShopDistributeWaitingSendPoints::getSendStatus, YhShopDistributeWaitingSendPoints.Status.waiting.name()).build(), "money");
+
+		List<YhShopUserDistributeRateView> rateViews = beanSearcher.searchAll(YhShopUserDistributeRateView.class, MapUtils.builder()
+				.put("uid", String.format("and user_id = %s", yhShopUserId))
+				.orderBy(YhShopUserDistributeRateView::getRate).desc()
+				.build());
+		YhShopUserDistributeDetailView detailView = new YhShopUserDistributeDetailView();
+		detailView.setRateViews(rateViews);
+		detailView.setWMoney(BigDecimal.valueOf(wMoneyPoints.doubleValue()).divide(BigDecimal.valueOf(100)));
+		detailView.setReMoney(BigDecimal.valueOf(reMoneyPoints.doubleValue()).divide(BigDecimal.valueOf(100)));
+
+		detailView.setWApplyMoney(wApplyMoney);
+		detailView.setGotApplyMoney(BigDecimal.valueOf(gotApplyMoney.doubleValue()).divide(BigDecimal.valueOf(100)));
+		return GatewayResponse.SUCCESS.newBuilder().toResult(detailView);
+	}
+
+	/**
+	 * 店铺待入账数据统计
+	 */
+	@GetMapping("/get/wMoney/statisticsData")
+	public Result<YhShopBrokenLineCpsUserWMoneyView> getWMoneyStatisticsDataView(Long firstDate, Long lastDate) {
+		long yhShopUserId = StpYhShopManageUser.getLoginIdAsLong();
+		DateTime first = null;
+		DateTime end = null;
+		if (firstDate != null) {
+			first = DateUtil.date(firstDate);
+		}
+		if (lastDate != null) {
+			end = DateUtil.date(lastDate);
+		}
+		YhShopBrokenLineCpsUserWMoneyView brokenLineCpsUserWMoneyView = Optional.ofNullable(yhShopManageService.getWMoneyStatisticsDate(yhShopUserId, first, end)).orElse(new YhShopBrokenLineCpsUserWMoneyView());
+		List<YhShopUserWMoneyStatisticsDataView> dataView = yhShopManageService.getWMoneyStatisticsDataView(yhShopUserId, first, end);
+		brokenLineCpsUserWMoneyView.setDataView(dataView);
+		return GatewayResponse.SUCCESS.newBuilder().toResult(brokenLineCpsUserWMoneyView);
+	}
+
+	/**
+	 * 店铺分销订单收入统计
+	 */
+	@GetMapping("/get/distribute/orders/statistics")
+	public Result<SearchResult<YhShopUserDistributeOrdersStatisticsView>> getUserDistributeOrdersStatisticsView(Long firstDate, Long lastDate) {
+		long yhShopUserId = StpYhShopManageUser.getLoginIdAsLong();
+		String first = null;
+		String end = null;
+		String timeSql = StrUtil.EMPTY;
+		if (firstDate != null) {
+			first = DateUtil.format(DateTime.of(firstDate), "yyyy-MM-dd HH:mm:ss");
+			timeSql += String.format(" and o.created_time >= '%s'", first);
+		}
+		if (lastDate != null) {
+			end = DateUtil.format(DateTime.of(lastDate), "yyyy-MM-dd HH:mm:ss");
+			timeSql += String.format(" and o.created_time < '%s'", end);
+		}
+		MapBuilder builder = MapUtils.flatBuilder(request.getParameterMap());
+		builder.put("shopUserId", String.format("shop_user_id = %s", yhShopUserId));
+		if (StrUtil.isNotEmpty(timeSql)) {
+			builder.put("time", timeSql);
+		}
+		SearchResult<YhShopUserDistributeOrdersStatisticsView> search = beanSearcher.search(YhShopUserDistributeOrdersStatisticsView.class, builder.build());
+		return GatewayResponse.SUCCESS.newBuilder().toResult(search);
+	}
+
+	/**
+	 * 店铺分销订单收入详细
+	 */
+	@GetMapping("/get/distribute/orders/detail")
+	public Result<SearchResult<YhShopUserDistributeOrdersDetailView>> getUserDistributeOrdersDetailView(Long firstDate, Long lastDate) {
+		long yhShopUserId = StpYhShopManageUser.getLoginIdAsLong();
+		String first = null;
+		String end = null;
+		String timeSql = StrUtil.EMPTY;
+		if (firstDate != null) {
+			first = DateUtil.format(DateTime.of(firstDate), "yyyy-MM-dd HH:mm:ss");
+			timeSql += String.format(" and o.created_time >= '%s'", first);
+		}
+		if (lastDate != null) {
+			end = DateUtil.format(DateTime.of(lastDate), "yyyy-MM-dd HH:mm:ss");
+			timeSql += String.format(" and o.created_time < '%s'", end);
+		}
+		MapBuilder builder = MapUtils.flatBuilder(request.getParameterMap());
+		builder.put("shopUserId", String.format("shop_user_id = %s", yhShopUserId));
+		if (StrUtil.isNotEmpty(timeSql)) {
+			builder.put("time", timeSql);
+		}
+		SearchResult<YhShopUserDistributeOrdersDetailView> search = beanSearcher.search(YhShopUserDistributeOrdersDetailView.class, builder.build());
+		return GatewayResponse.SUCCESS.newBuilder().toResult(search);
+	}
+
+	/**
+	 * 店铺分销商品列表
+	 */
+	@GetMapping("/get/goods")
+	public Result<List<GoodsDon>> getGoodsList() {
+		long yhShopUserId = StpYhShopManageUser.getLoginIdAsLong();
+		YhShop yhShop = yhShopMapper.selectById(Wrappers.lambdaQuery(YhShop.class)
+				.eq(YhShop::getUserId, yhShopUserId)
+				.eq(YhShop::getVerifyStatus, YhShop.Status.success)
+				.last("limit 1"));
+		if (yhShop == null) {
+			return GatewayResponse.SUCCESS.newBuilder().toResult();
+		}
+		List<GoodsDon> goodsDons = goodsDonMapper.getYhShopDistributeGoodsDetail(yhShop.getId());
+		return GatewayResponse.SUCCESS.newBuilder().toResult(goodsDons);
+	}
+}

+ 326 - 0
netflix-web/src/main/java/com/cyksj/web/util/StpYhShopManageUser.java

@@ -0,0 +1,326 @@
+package com.cyksj.web.util;
+
+import cn.dev33.satoken.fun.SaFunction;
+import cn.dev33.satoken.session.SaSession;
+import cn.dev33.satoken.stp.SaLoginModel;
+import cn.dev33.satoken.stp.SaTokenInfo;
+import cn.dev33.satoken.stp.StpLogic;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/*
+ *项目名: yhlxj
+ *文件名: StpYhShopManageUser
+ *创建者: JavaZou
+ *创建时间:2023/9/19 17:47
+ */
+@Component
+public class StpYhShopManageUser {
+	// 使用匿名子类 重写`stpLogic对象`的一些方法
+	public static StpLogic stpLogic = new StpLogic("yhShop") {
+		// 重写 StpLogic 类下的 `splicingKeyTokenName` 函数,返回一个与 `StpUtil` 不同的token名称, 防止冲突
+		@Override
+		public String splicingKeyTokenName() {
+			return super.splicingKeyTokenName() + "-yhShop";
+		}
+		// 同理你可以按需重写一些其它方法 ...
+	};
+
+	public StpYhShopManageUser() {
+	}
+
+	public static String getLoginType() {
+		return stpLogic.getLoginType();
+	}
+
+	public static String getTokenName() {
+		return stpLogic.getTokenName();
+	}
+
+	public static void setTokenValue(String tokenValue, int cookieTimeout) {
+		stpLogic.setTokenValue(tokenValue, cookieTimeout);
+	}
+
+	public static String getTokenValue() {
+		return stpLogic.getTokenValue();
+	}
+
+	public static SaTokenInfo getTokenInfo() {
+		return stpLogic.getTokenInfo();
+	}
+
+	public static void login(Object id) {
+		stpLogic.login(id);
+	}
+
+	public static void login(Object id, String device) {
+		stpLogic.login(id, device);
+	}
+
+	public static void login(Object id, boolean isLastingCookie) {
+		stpLogic.login(id, isLastingCookie);
+	}
+
+	public static void login(Object id, SaLoginModel loginModel) {
+		stpLogic.login(id, loginModel);
+	}
+
+	public static void logout() {
+		stpLogic.logout();
+	}
+
+	public static void logoutByTokenValue(String tokenValue) {
+		stpLogic.logoutByTokenValue(tokenValue);
+	}
+
+	public static void logoutByLoginId(Object loginId) {
+		stpLogic.logoutByLoginId(loginId);
+	}
+
+	public static void logoutByLoginId(Object loginId, String device) {
+		stpLogic.logoutByLoginId(loginId, device);
+	}
+
+	public static boolean isLogin() {
+		return stpLogic.isLogin();
+	}
+
+	public static void checkLogin() {
+		stpLogic.checkLogin();
+	}
+
+	public static Object getLoginId() {
+		return stpLogic.getLoginId();
+	}
+
+	public static <T> T getLoginId(T defaultValue) {
+		return stpLogic.getLoginId(defaultValue);
+	}
+
+	public static Object getLoginIdDefaultNull() {
+		return stpLogic.getLoginIdDefaultNull();
+	}
+
+	public static String getLoginIdAsString() {
+		return stpLogic.getLoginIdAsString();
+	}
+
+	public static int getLoginIdAsInt() {
+		return stpLogic.getLoginIdAsInt();
+	}
+
+	public static long getLoginIdAsLong() {
+		return stpLogic.getLoginIdAsLong();
+	}
+
+	public static Object getLoginIdByToken(String tokenValue) {
+		return stpLogic.getLoginIdByToken(tokenValue);
+	}
+
+	public static SaSession getSessionByLoginId(Object loginId, boolean isCreate) {
+		return stpLogic.getSessionByLoginId(loginId, isCreate);
+	}
+
+	public static SaSession getSessionBySessionId(String sessionId) {
+		return stpLogic.getSessionBySessionId(sessionId);
+	}
+
+	public static SaSession getSessionByLoginId(Object loginId) {
+		return stpLogic.getSessionByLoginId(loginId);
+	}
+
+	public static SaSession getSession(boolean isCreate) {
+		return stpLogic.getSession(isCreate);
+	}
+
+	public static SaSession getSession() {
+		return stpLogic.getSession();
+	}
+
+	public static SaSession getTokenSessionByToken(String tokenValue) {
+		return stpLogic.getTokenSessionByToken(tokenValue);
+	}
+
+	public static SaSession getTokenSession() {
+		return stpLogic.getTokenSession();
+	}
+
+	public static void checkActivityTimeout() {
+		stpLogic.checkActivityTimeout();
+	}
+
+	public static void updateLastActivityToNow() {
+		stpLogic.updateLastActivityToNow();
+	}
+
+	public static long getTokenTimeout() {
+		return stpLogic.getTokenTimeout();
+	}
+
+	public static long getSessionTimeout() {
+		return stpLogic.getSessionTimeout();
+	}
+
+	public static long getTokenSessionTimeout() {
+		return stpLogic.getTokenSessionTimeout();
+	}
+
+	public static long getTokenActivityTimeout() {
+		return stpLogic.getTokenActivityTimeout();
+	}
+
+	public static boolean hasRole(Object loginId, String role) {
+		return stpLogic.hasRole(loginId, role);
+	}
+
+	public static boolean hasRole(String role) {
+		return stpLogic.hasRole(role);
+	}
+
+	public static void checkRole(String role) {
+		stpLogic.checkRole(role);
+	}
+
+	public static void checkRoleAnd(String... roleArray) {
+		stpLogic.checkRoleAnd(roleArray);
+	}
+
+	public static void checkRoleOr(String... roleArray) {
+		stpLogic.checkRoleOr(roleArray);
+	}
+
+	public static boolean hasPermission(Object loginId, String permission) {
+		return stpLogic.hasPermission(loginId, permission);
+	}
+
+	public static boolean hasPermission(String permission) {
+		return stpLogic.hasPermission(permission);
+	}
+
+	public static void checkPermission(String permission) {
+		stpLogic.checkPermission(permission);
+	}
+
+	public static void checkPermissionAnd(String... permissionArray) {
+		stpLogic.checkPermissionAnd(permissionArray);
+	}
+
+	public static void checkPermissionOr(String... permissionArray) {
+		stpLogic.checkPermissionOr(permissionArray);
+	}
+
+	public static String getTokenValueByLoginId(Object loginId) {
+		return stpLogic.getTokenValueByLoginId(loginId);
+	}
+
+	public static String getTokenValueByLoginId(Object loginId, String device) {
+		return stpLogic.getTokenValueByLoginId(loginId, device);
+	}
+
+	public static List<String> getTokenValueListByLoginId(Object loginId) {
+		return stpLogic.getTokenValueListByLoginId(loginId);
+	}
+
+	public static List<String> getTokenValueListByLoginId(Object loginId, String device) {
+		return stpLogic.getTokenValueListByLoginId(loginId, device);
+	}
+
+	public static String getLoginDevice() {
+		return stpLogic.getLoginDevice();
+	}
+
+	public static List<String> searchTokenValue(String keyword, int start, int size) {
+		return stpLogic.searchTokenValue(keyword, start, size);
+	}
+
+	public static List<String> searchSessionId(String keyword, int start, int size) {
+		return stpLogic.searchSessionId(keyword, start, size);
+	}
+
+	public static List<String> searchTokenSessionId(String keyword, int start, int size) {
+		return stpLogic.searchTokenSessionId(keyword, start, size);
+	}
+
+	public static void disable(Object loginId, long disableTime) {
+		stpLogic.disable(loginId, disableTime);
+	}
+
+	public static boolean isDisable(Object loginId) {
+		return stpLogic.isDisable(loginId);
+	}
+
+	public static long getDisableTime(Object loginId) {
+		return stpLogic.getDisableTime(loginId);
+	}
+
+	public static void untieDisable(Object loginId) {
+		stpLogic.untieDisable(loginId);
+	}
+
+	public static void switchTo(Object loginId) {
+		stpLogic.switchTo(loginId);
+	}
+
+	public static void endSwitch() {
+		stpLogic.endSwitch();
+	}
+
+	public static boolean isSwitch() {
+		return stpLogic.isSwitch();
+	}
+
+	public static void switchTo(Object loginId, SaFunction function) {
+		stpLogic.switchTo(loginId, function);
+	}
+
+	public static void openSafe(long safeTime) {
+		stpLogic.openSafe(safeTime);
+	}
+
+	public static boolean isSafe() {
+		return stpLogic.isSafe();
+	}
+
+	public static void checkSafe() {
+		stpLogic.checkSafe();
+	}
+
+	public static long getSafeTime() {
+		return stpLogic.getSafeTime();
+	}
+
+	public static void closeSafe() {
+		stpLogic.closeSafe();
+	}
+
+	/** @deprecated */
+	@Deprecated
+	public static String getLoginKey() {
+		return stpLogic.getLoginType();
+	}
+
+	/** @deprecated */
+	@Deprecated
+	public static void setLoginId(Object loginId) {
+		stpLogic.login(loginId);
+	}
+
+	/** @deprecated */
+	@Deprecated
+	public static void setLoginId(Object loginId, String device) {
+		stpLogic.login(loginId, device);
+	}
+
+	/** @deprecated */
+	@Deprecated
+	public static void setLoginId(Object loginId, boolean isLastingCookie) {
+		stpLogic.login(loginId, isLastingCookie);
+	}
+
+	/** @deprecated */
+	@Deprecated
+	public static void setLoginId(Object loginId, SaLoginModel loginModel) {
+		stpLogic.login(loginId, loginModel);
+	}
+}

File diff suppressed because it is too large
+ 0 - 0
netflix-web/src/main/resources/application-dev.yml


File diff suppressed because it is too large
+ 0 - 0
netflix-web/src/main/resources/application-prd.yml


Some files were not shown because too many files changed in this diff