123
This commit is contained in:
@@ -213,8 +213,8 @@ public class CaiLoginManager {
|
||||
log.info("邀请人没有工会,无法入会 inviteUserCode={}",inviteUserCode);
|
||||
return;
|
||||
}
|
||||
UnionUser checkUnionUser = unionUserService.getByUserId(user.getId());
|
||||
if(checkUnionUser != null){
|
||||
UnionUser checkUnionUser = unionUserService.getByUserIdAndUnionId(user.getId(),union.getId());
|
||||
if(checkUnionUser == null){
|
||||
UnionUser unionUser = new UnionUser();
|
||||
unionUser.setUnionId(union.getId());
|
||||
unionUser.setUnionUserId(union.getUserId());
|
||||
@@ -223,6 +223,7 @@ public class CaiLoginManager {
|
||||
unionUser.setGiftDivide(systemConfigManager.getSystemConfigOfBigDecimal(SystemConfigEnum.DEFAULT_UNION_VIDEO_INCOME_RATE));
|
||||
unionUser.setVipDivide(BigDecimal.ZERO);
|
||||
unionUser.setEnableRate(true);
|
||||
unionUser.setCreateTime(LocalDateTime.now());
|
||||
unionUserService.save(unionUser);
|
||||
}
|
||||
}finally {
|
||||
|
||||
@@ -8,7 +8,10 @@ import org.springframework.stereotype.Component;
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "ali.sms")
|
||||
public class AliSmsProperties {
|
||||
private String accessKeyId = "LTAI5tRf2jUyoYmAC9kw4AMF";
|
||||
private String accessKeySecret = "frvNLpySKxC38eihnWKi3NMFZSume3";
|
||||
private String signName = "武汉康慧创欣科技";
|
||||
// private String accessKeyId = "LTAI5tRf2jUyoYmAC9kw4AMF";
|
||||
// private String accessKeySecret = "frvNLpySKxC38eihnWKi3NMFZSume3";
|
||||
// private String signName = "武汉康慧创欣科技";
|
||||
private String accessKeyId = "LTAI5tNyNSJWXqBVNamiKfWZ";
|
||||
private String accessKeySecret = "xyEwLbbpePsG6NUUnKzRPxaXY1wzTo";
|
||||
private String signName = "深圳市馨曼琳网络科技";
|
||||
}
|
||||
|
||||
@@ -2,11 +2,14 @@ package com.ruoyi.cai.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 以前的 SMS_294195165
|
||||
*/
|
||||
@Getter
|
||||
public enum CodeEnum {
|
||||
REGISTER("注册短信","SMS_294195165"),
|
||||
RESET_PASSWORD("重置密码","SMS_294195165"),
|
||||
RESET_ADOLESCENT("重置青少年模式密码","SMS_294195165"),
|
||||
REGISTER("注册短信","SMS_465635333"),
|
||||
RESET_PASSWORD("重置密码","SMS_465635333"),
|
||||
RESET_ADOLESCENT("重置青少年模式密码","SMS_465635333"),
|
||||
;
|
||||
private final String name;
|
||||
private final String aliTemplate;
|
||||
|
||||
@@ -137,7 +137,7 @@ public class AliSmsKit {
|
||||
AliSmsProperties config = new AliSmsProperties();
|
||||
messageSenderUtil.setConfig(config);
|
||||
messageSenderUtil.init();
|
||||
messageSenderUtil.batchSendMessagePublic(Arrays.asList("15302786929"), CodeEnum.REGISTER.getAliTemplate());
|
||||
messageSenderUtil.sendMessage("15302786929", CodeEnum.REGISTER.getAliTemplate(),"778890");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ public class PayConfigManager {
|
||||
List<PayConfig> values = payConfigService.listOkByPayType(PayTypeEnum.ALI);
|
||||
Map<String,PayConfig> using = new HashMap<>();
|
||||
for (PayConfig value : values) {
|
||||
using.put(value.getWxMcid(),value);
|
||||
using.put(value.getAppid(),value);
|
||||
}
|
||||
if(using.isEmpty()){
|
||||
return null;
|
||||
@@ -66,7 +66,8 @@ public class PayConfigManager {
|
||||
List<PayTotal> totals = payTotalService.listByAliAppId(wxMcidSet);
|
||||
List<String> payIds = totals.stream()
|
||||
.sorted(Comparator.comparing(PayTotal::getMoney))
|
||||
.map(PayTotal::getPayId).collect(Collectors.toList());
|
||||
.map(PayTotal::getPayId)
|
||||
.collect(Collectors.toList());
|
||||
for (String wxMcid : wxMcidSet) {
|
||||
if(!payIds.contains(wxMcid)){
|
||||
return using.get(wxMcid);
|
||||
|
||||
@@ -19,6 +19,8 @@ public interface UnionUserService extends IService<UnionUser> {
|
||||
|
||||
UnionUser getByUserId(Long userId);
|
||||
|
||||
UnionUser getByUserIdAndUnionId(Long userId,Long unionId);
|
||||
|
||||
Page<UnionUserAdminVo> pageAdmin(PageQuery pageQuery, UnionUserAdminVo bo);
|
||||
|
||||
List<UnionCountDTO> countByUnionIds(List<Long> unionIds);
|
||||
|
||||
@@ -30,6 +30,14 @@ public class UnionUserServiceImpl extends ServiceImpl<UnionUserMapper, UnionUser
|
||||
.last("limit 1"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnionUser getByUserIdAndUnionId(Long userId, Long unionId) {
|
||||
return this.getOne(Wrappers.lambdaQuery(UnionUser.class)
|
||||
.eq(UnionUser::getUserId, userId)
|
||||
.eq(UnionUser::getUnionId, unionId)
|
||||
.last("limit 1"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<UnionUserAdminVo> pageAdmin(PageQuery pageQuery, UnionUserAdminVo bo) {
|
||||
return baseMapper.pageAdmin(pageQuery.build(),bo);
|
||||
|
||||
Reference in New Issue
Block a user