提交 58a85656 authored 作者: huyufan's avatar huyufan

数据大屏

上级 f71fa7a6
...@@ -99,6 +99,11 @@ public enum PerformanceResultEnum implements ResultEnum { ...@@ -99,6 +99,11 @@ public enum PerformanceResultEnum implements ResultEnum {
ORDER_GOODS_SAVE_FAIL(1801, "保存货单失败,请稍后再试"), ORDER_GOODS_SAVE_FAIL(1801, "保存货单失败,请稍后再试"),
USER_ID_IS_EMPTY(1900, "用户ID不能为空"),
MOBILE_IS_EMPTY(1901, "用户手机号不能为空"),
CAPTCHA_IS_EMPTY(1901, "验证码不能为空"),
USER_ACCOUNT_NOT_FOUND(1902, "用户账号未找到"),
; ;
private final int code; private final int code;
......
package com.clx.performance.param.app;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
@Getter
@Setter
@NoArgsConstructor
public class CheckMobileParam {
@ApiModelProperty(value = "手机号", example = "1")
@NotBlank(message = "手机号")
private String mobile;
@ApiModelProperty(value = "用户Id", example = "1")
@NotNull(message = "用户Id")
private Long userNo;
@ApiModelProperty(value = "验证码", example = "1")
@NotBlank(message = "验证码")
private String captcha;
}
...@@ -45,6 +45,13 @@ ...@@ -45,6 +45,13 @@
<artifactId>user-api</artifactId> <artifactId>user-api</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.clx.cy</groupId>
<artifactId>message-api</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency> <dependency>
<groupId>com.clx.cy</groupId> <groupId>com.clx.cy</groupId>
<artifactId>open-sdk</artifactId> <artifactId>open-sdk</artifactId>
......
...@@ -16,7 +16,7 @@ import org.springframework.scheduling.annotation.EnableAsync; ...@@ -16,7 +16,7 @@ import org.springframework.scheduling.annotation.EnableAsync;
// @ComponentScan("com.msl.common.utils.*"), // @ComponentScan("com.msl.common.utils.*"),
//}) //})
@ComponentScan({"com.clx.performance.*", "com.msl.*"}) @ComponentScan({"com.clx.performance.*", "com.msl.*"})
@EnableFeignClients(basePackages = {"com.msl.*", "com.clx.performance.*", "com.clx.order.*", "com.clx.user.*"}) @EnableFeignClients(basePackages = {"com.msl.*", "com.clx.performance.*", "com.clx.order.*", "com.clx.user.*", "com.clx.message.*"})
@ViewScan(basePackage = "com.clx.user.view") @ViewScan(basePackage = "com.clx.user.view")
public class PerformanceApplication { public class PerformanceApplication {
......
package com.clx.performance.config;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
@Configuration
@Getter
@Setter
@ConfigurationProperties(prefix = "clx.message")
public class ClxMessageConfig {
//应用ID
private Long appId;
//渠道ID
private Integer channelId;
//短信验证码模板
private String captchaTemplateCode;
}
...@@ -2,6 +2,7 @@ package com.clx.performance.service; ...@@ -2,6 +2,7 @@ package com.clx.performance.service;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.clx.performance.model.OwnerTransferInfo; import com.clx.performance.model.OwnerTransferInfo;
import com.clx.performance.param.app.CheckMobileParam;
import com.clx.performance.param.open.OpenOwnerBindCardParam; import com.clx.performance.param.open.OpenOwnerBindCardParam;
import com.clx.performance.param.open.OpenOwnerCaseOutParam; import com.clx.performance.param.open.OpenOwnerCaseOutParam;
import com.clx.performance.param.open.OpenOwnerTopUpParam; import com.clx.performance.param.open.OpenOwnerTopUpParam;
...@@ -89,4 +90,6 @@ public interface OwnerAccountService { ...@@ -89,4 +90,6 @@ public interface OwnerAccountService {
void createAccount(CreteAccountParam param); void createAccount(CreteAccountParam param);
void ownerAccountThaw(ThawAccountParam param); void ownerAccountThaw(ThawAccountParam param);
String checkMobile(CheckMobileParam param);
} }
...@@ -4,12 +4,14 @@ import cn.hutool.core.collection.CollectionUtil; ...@@ -4,12 +4,14 @@ import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.clx.message.feign.ClxMessageOpenapiFeign;
import com.clx.performance.component.IdGenerateSnowFlake; import com.clx.performance.component.IdGenerateSnowFlake;
import com.clx.performance.dao.*; import com.clx.performance.dao.*;
import com.clx.performance.enums.IdTypeEnum; import com.clx.performance.enums.IdTypeEnum;
import com.clx.performance.enums.OwnerAccountEnum; import com.clx.performance.enums.OwnerAccountEnum;
import com.clx.performance.enums.PerformanceResultEnum; import com.clx.performance.enums.PerformanceResultEnum;
import com.clx.performance.model.*; import com.clx.performance.model.*;
import com.clx.performance.param.app.CheckMobileParam;
import com.clx.performance.param.open.OpenOwnerBindCardParam; import com.clx.performance.param.open.OpenOwnerBindCardParam;
import com.clx.performance.param.open.OpenOwnerCaseOutParam; import com.clx.performance.param.open.OpenOwnerCaseOutParam;
import com.clx.performance.param.open.OpenOwnerTopUpParam; import com.clx.performance.param.open.OpenOwnerTopUpParam;
...@@ -70,6 +72,8 @@ public class OwnerAccountServiceImpl implements OwnerAccountService { ...@@ -70,6 +72,8 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
private final OwnerAccountStruct ownerAccountStruct; private final OwnerAccountStruct ownerAccountStruct;
private final ClxMessageOpenapiFeign clxMessageOpenapiFeign;
@Override @Override
public IPage<OwnerAccountVO> pageList(PageOwnerAccountListParam param) { public IPage<OwnerAccountVO> pageList(PageOwnerAccountListParam param) {
return ownerAccountDao.pageList(param); return ownerAccountDao.pageList(param);
...@@ -881,4 +885,28 @@ public class OwnerAccountServiceImpl implements OwnerAccountService { ...@@ -881,4 +885,28 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
} }
} }
} }
@Override
public String checkMobile(CheckMobileParam param) {
Long userNo = param.getUserNo();
if (ObjectUtil.isNull(userNo)) {
throw new ServiceSystemException(PerformanceResultEnum.USER_ID_IS_EMPTY);
}
if (StringUtils.isBlank(param.getMobile())) {
throw new ServiceSystemException(PerformanceResultEnum.MOBILE_IS_EMPTY);
}
if (StringUtils.isBlank(param.getCaptcha())) {
throw new ServiceSystemException(PerformanceResultEnum.CAPTCHA_IS_EMPTY);
}
List<OwnerAccount> accountList = ownerAccountDao.accountInfo(param.getUserNo());
if (CollectionUtil.isEmpty(accountList)) {
throw new ServiceSystemException(PerformanceResultEnum.USER_ACCOUNT_NOT_FOUND);
}
return null;
}
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论