用户签到为空时 无法签到问题
This commit is contained in:
parent
05c3c8a80c
commit
1f21d80dc0
@ -24,13 +24,13 @@ spring:
|
|||||||
boot:
|
boot:
|
||||||
admin:
|
admin:
|
||||||
client:
|
client:
|
||||||
url: http://127.0.0.1:8000
|
url: http://192.168.0.108:8000
|
||||||
cache:
|
cache:
|
||||||
type: redis
|
type: redis
|
||||||
# Redis
|
# Redis
|
||||||
redis:
|
redis:
|
||||||
host: 127.0.0.1
|
host: 192.168.31.108
|
||||||
port: 6379
|
port: 30379
|
||||||
password: lilishop
|
password: lilishop
|
||||||
lettuce:
|
lettuce:
|
||||||
pool:
|
pool:
|
||||||
@ -60,7 +60,7 @@ spring:
|
|||||||
default-datasource:
|
default-datasource:
|
||||||
type: com.alibaba.druid.pool.DruidDataSource
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://127.0.0.1:3306/lilishop?useUnicode=true&characterEncoding=utf-8&useSSL=false&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
url: jdbc:mysql://192.168.31.108:30306/lilishop?useUnicode=true&characterEncoding=utf-8&useSSL=false&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
username: root
|
username: root
|
||||||
password: lilishop
|
password: lilishop
|
||||||
maxActive: 50
|
maxActive: 50
|
||||||
@ -241,16 +241,16 @@ lili:
|
|||||||
sk: zhNKVrJK6UPOhqIjn8AQvG37b9sz6
|
sk: zhNKVrJK6UPOhqIjn8AQvG37b9sz6
|
||||||
#域名
|
#域名
|
||||||
domain:
|
domain:
|
||||||
pc: http://127.0.0.1:8888
|
pc: http://192.168.0.108:8888
|
||||||
wap: http://127.0.0.1:8888
|
wap: http://192.168.0.108:8888
|
||||||
seller: http://127.0.0.1:8888
|
seller: http://192.168.0.108:8888
|
||||||
admin: http://127.0.0.1:8888
|
admin: http://192.168.0.108:8888
|
||||||
#api地址
|
#api地址
|
||||||
api:
|
api:
|
||||||
buyer: https://z171l91606.51mypc.cn
|
buyer: https://z171l91606.51mypc.cn
|
||||||
base: http://127.0.0.1:8888
|
base: http://192.168.0.108:8888
|
||||||
manager: http://127.0.0.1:8888
|
manager: http://192.168.0.108:8888
|
||||||
seller: http://127.0.0.1:8888
|
seller: http://192.168.0.108:8888
|
||||||
|
|
||||||
# jwt 细节设定
|
# jwt 细节设定
|
||||||
jwt-setting:
|
jwt-setting:
|
||||||
@ -269,7 +269,7 @@ lili:
|
|||||||
data:
|
data:
|
||||||
elasticsearch:
|
elasticsearch:
|
||||||
cluster-name: elasticsearch
|
cluster-name: elasticsearch
|
||||||
cluster-nodes: 127.0.0.1:9200
|
cluster-nodes: 192.168.31.108:30920
|
||||||
index:
|
index:
|
||||||
number-of-replicas: 0
|
number-of-replicas: 0
|
||||||
number-of-shards: 3
|
number-of-shards: 3
|
||||||
@ -282,26 +282,26 @@ lili:
|
|||||||
logstash:
|
logstash:
|
||||||
server: 127.0.0.1:4560
|
server: 127.0.0.1:4560
|
||||||
rocketmq:
|
rocketmq:
|
||||||
promotion-topic: lili_promotion_topic
|
promotion-topic: shop_lili_promotion_topic
|
||||||
promotion-group: lili_promotion_group
|
promotion-group: shop_lili_promotion_group
|
||||||
msg-ext-topic: lili_msg_topic
|
msg-ext-topic: shop_lili_msg_topic
|
||||||
msg-ext-group: lili_msg_group
|
msg-ext-group: shop_lili_msg_group
|
||||||
goods-topic: lili_goods_topic
|
goods-topic: shop_lili_goods_topic
|
||||||
goods-group: lili_goods_group
|
goods-group: shop_lili_goods_group
|
||||||
order-topic: lili_order_topic
|
order-topic: shop_lili_order_topic
|
||||||
order-group: lili_order_group
|
order-group: shop_lili_order_group
|
||||||
member-topic: lili_member_topic
|
member-topic: shop_lili_member_topic
|
||||||
member-group: lili_member_group
|
member-group: shop_lili_member_group
|
||||||
other-topic: lili_other_topic
|
other-topic: shop_lili_other_topic
|
||||||
other-group: lili_other_group
|
other-group: shop_lili_other_group
|
||||||
notice-topic: lili_notice_topic
|
notice-topic: shop_lili_notice_topic
|
||||||
notice-group: lili_notice_group
|
notice-group: shop_lili_notice_group
|
||||||
notice-send-topic: lili_send_notice_topic
|
notice-send-topic: shop_lili_send_notice_topic
|
||||||
notice-send-group: lili_send_notice_group
|
notice-send-group: shop_lili_send_notice_group
|
||||||
after-sale-topic: lili_after_sale_topic
|
after-sale-topic: shop_lili_after_sale_topic
|
||||||
after-sale-group: lili_after_sale_group
|
after-sale-group: shop_lili_after_sale_group
|
||||||
rocketmq:
|
rocketmq:
|
||||||
name-server: 127.0.0.1:9876
|
name-server: 192.168.31.108:30876
|
||||||
isVIPChannel: false
|
isVIPChannel: false
|
||||||
producer:
|
producer:
|
||||||
group: lili_group
|
group: lili_group
|
||||||
@ -310,7 +310,7 @@ rocketmq:
|
|||||||
xxl:
|
xxl:
|
||||||
job:
|
job:
|
||||||
admin:
|
admin:
|
||||||
addresses: http://127.0.0.1:9001/xxl-job-admin
|
addresses: http://192.168.31.108:30001/xxl-job-admin
|
||||||
executor:
|
executor:
|
||||||
appname: xxl-job-executor-lilishop
|
appname: xxl-job-executor-lilishop
|
||||||
address:
|
address:
|
||||||
|
@ -189,10 +189,12 @@ public class ClerkServiceImpl extends ServiceImpl<ClerkMapper, Clerk> implements
|
|||||||
clerk.setIsSuper(clerkAddDTO.getIsSuper());
|
clerk.setIsSuper(clerkAddDTO.getIsSuper());
|
||||||
//校验此会员是否已经是店员
|
//校验此会员是否已经是店员
|
||||||
Clerk temp = this.getClerkByMemberId(clerkAddDTO.getMemberId());
|
Clerk temp = this.getClerkByMemberId(clerkAddDTO.getMemberId());
|
||||||
if (temp != null && !temp.getStoreId().equals(UserContext.getCurrentUser().getStoreId())) {
|
|
||||||
|
//店员信息不为空
|
||||||
|
if (temp != null && !temp.getStoreId().equals(clerkAddDTO.getStoreId())) {
|
||||||
throw new ServiceException(ResultCode.CLERK_USER_ERROR);
|
throw new ServiceException(ResultCode.CLERK_USER_ERROR);
|
||||||
}
|
}
|
||||||
if (temp != null && temp.getStoreId().equals(UserContext.getCurrentUser().getStoreId())) {
|
if (temp != null && temp.getStoreId().equals(clerkAddDTO.getStoreId())) {
|
||||||
throw new ServiceException(ResultCode.CLERK_ALREADY_EXIT_ERROR);
|
throw new ServiceException(ResultCode.CLERK_ALREADY_EXIT_ERROR);
|
||||||
}
|
}
|
||||||
//部门校验
|
//部门校验
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package cn.lili.modules.member.serviceimpl;
|
package cn.lili.modules.member.serviceimpl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.lili.common.enums.ResultCode;
|
import cn.lili.common.enums.ResultCode;
|
||||||
import cn.lili.common.exception.ServiceException;
|
import cn.lili.common.exception.ServiceException;
|
||||||
import cn.lili.common.properties.RocketmqCustomProperties;
|
import cn.lili.common.properties.RocketmqCustomProperties;
|
||||||
@ -19,6 +20,7 @@ import cn.lili.modules.system.entity.enums.SettingEnum;
|
|||||||
import cn.lili.modules.system.service.SettingService;
|
import cn.lili.modules.system.service.SettingService;
|
||||||
import cn.lili.rocketmq.RocketmqSendCallbackBuilder;
|
import cn.lili.rocketmq.RocketmqSendCallbackBuilder;
|
||||||
import cn.lili.rocketmq.tags.MemberTagsEnum;
|
import cn.lili.rocketmq.tags.MemberTagsEnum;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import org.apache.rocketmq.spring.core.RocketMQTemplate;
|
import org.apache.rocketmq.spring.core.RocketMQTemplate;
|
||||||
@ -62,8 +64,16 @@ public class MemberSignServiceImpl extends ServiceImpl<MemberSignMapper, MemberS
|
|||||||
public Boolean memberSign() {
|
public Boolean memberSign() {
|
||||||
//获取当前会员信息
|
//获取当前会员信息
|
||||||
AuthUser authUser = UserContext.getCurrentUser();
|
AuthUser authUser = UserContext.getCurrentUser();
|
||||||
if (authUser != null) {
|
if (ObjectUtil.isNotNull(authUser)) {
|
||||||
|
//获取当前用户当日签到日信息
|
||||||
|
LambdaQueryWrapper<MemberSign> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(MemberSign::getMemberId, authUser.getId());
|
||||||
|
queryWrapper.eq(MemberSign::getDay,DateUtil.getDayOfStart().intValue());
|
||||||
|
List<MemberSign> signSize = this.baseMapper.getTodayMemberSign(queryWrapper);
|
||||||
|
//当日签到信息不为空
|
||||||
|
if (!signSize.isEmpty()) {
|
||||||
|
throw new ServiceException(ResultCode.MEMBER_SIGN_REPEAT);
|
||||||
|
}
|
||||||
//当前签到天数的前一天日期
|
//当前签到天数的前一天日期
|
||||||
List<MemberSign> signs = this.baseMapper.getBeforeMemberSign(authUser.getId());
|
List<MemberSign> signs = this.baseMapper.getBeforeMemberSign(authUser.getId());
|
||||||
//构建参数
|
//构建参数
|
||||||
|
Loading…
x
Reference in New Issue
Block a user