Compare commits
No commits in common. '9f7007896f29b3b6fd05b35e31acb68462117617' and '198eab375ed83b90f180cfc88f462efe0ffa118f' have entirely different histories.
9f7007896f
...
198eab375e
@ -1,30 +0,0 @@ |
||||
package com.ruoyi.web.controller.platform; |
||||
|
||||
import com.ruoyi.common.core.controller.BaseController; |
||||
import com.ruoyi.common.core.domain.AjaxResult; |
||||
import com.ruoyi.common.enums.PlatformConfig; |
||||
import com.ruoyi.framework.domain.Sms; |
||||
import com.ruoyi.framework.service.ISmsService; |
||||
import com.ruoyi.system.service.ISysConfigService; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.validation.annotation.Validated; |
||||
import org.springframework.web.bind.annotation.PostMapping; |
||||
import org.springframework.web.bind.annotation.RequestBody; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
@RestController |
||||
@RequestMapping("/platform/public/sms") |
||||
public class PlatformSmsController extends BaseController { |
||||
|
||||
@Autowired |
||||
private ISmsService platformSmsService; |
||||
|
||||
@Autowired |
||||
private ISysConfigService sysConfigService; |
||||
|
||||
@PostMapping("send") |
||||
public AjaxResult send(@Validated @RequestBody Sms sms) { |
||||
return success(platformSmsService.send(sms.getMobile(), Integer.valueOf(sysConfigService.selectConfigById(PlatformConfig.smsTime.getConfigId()).getConfigValue()))); |
||||
} |
||||
} |
@ -1,30 +0,0 @@ |
||||
package com.ruoyi.web.controller.platform.config; |
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult; |
||||
import com.ruoyi.common.enums.PlatformConfig; |
||||
import com.ruoyi.common.utils.StringUtils; |
||||
import com.ruoyi.system.domain.SysConfig; |
||||
import com.ruoyi.system.service.ISysConfigService; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
import org.springframework.web.bind.annotation.PathVariable; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
import static com.ruoyi.common.core.domain.AjaxResult.success; |
||||
|
||||
/** |
||||
* 平台设置 |
||||
*/ |
||||
@RestController |
||||
@RequestMapping("/platform/config") |
||||
public class PlatformConfigController { |
||||
@Autowired |
||||
private ISysConfigService configService; |
||||
|
||||
@GetMapping("{config}") |
||||
public AjaxResult config(@PathVariable PlatformConfig config) { |
||||
SysConfig _config = configService.selectConfigById(config.getConfigId()); |
||||
return success(StringUtils.format("{}获取成功", _config.getConfigName()), _config.getConfigValue()); |
||||
} |
||||
} |
@ -1,116 +0,0 @@ |
||||
package com.ruoyi.web.controller.platform.store.account; |
||||
|
||||
import com.ruoyi.common.annotation.Log; |
||||
import com.ruoyi.common.constant.Constants; |
||||
import com.ruoyi.common.core.controller.BaseController; |
||||
import com.ruoyi.common.core.domain.AjaxResult; |
||||
import com.ruoyi.common.core.page.TableDataInfo; |
||||
import com.ruoyi.common.enums.BusinessType; |
||||
import com.ruoyi.common.utils.poi.ExcelUtil; |
||||
import com.ruoyi.framework.web.service.StoreLoginService; |
||||
import com.ruoyi.store.domain.StoreAccount; |
||||
import com.ruoyi.store.domain.vo.StoreAccountVo; |
||||
import com.ruoyi.store.service.IStoreAccountService; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.security.access.prepost.PreAuthorize; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.servlet.http.HttpServletResponse; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 店家账号Controller |
||||
* |
||||
* @author ruoyi |
||||
* @date 2023-02-10 |
||||
*/ |
||||
@RestController |
||||
@RequestMapping("/platform/store/account") |
||||
public class PlatformStoreAccountController extends BaseController { |
||||
@Autowired |
||||
private IStoreAccountService platformStoreAccountService; |
||||
|
||||
@Autowired |
||||
private StoreLoginService loginService; |
||||
|
||||
@PostMapping("register") |
||||
public AjaxResult register(@RequestBody StoreAccountVo account) { |
||||
return success(platformStoreAccountService.register(account)); |
||||
} |
||||
|
||||
@PostMapping("login") |
||||
public AjaxResult login(@RequestBody StoreAccountVo account) { |
||||
AjaxResult ajax = AjaxResult.success("登陆成功"); |
||||
// 生成令牌
|
||||
String token = loginService.login(account.getMobile(), account.getPassword()); |
||||
ajax.put(Constants.TOKEN, token); |
||||
return ajax; |
||||
} |
||||
|
||||
@PostMapping("resetpwd") |
||||
public AjaxResult resetpwd(@RequestBody StoreAccountVo account) { |
||||
return success(platformStoreAccountService.resetpwd(account)); |
||||
} |
||||
|
||||
/** |
||||
* 查询店家账号列表 |
||||
*/ |
||||
@PreAuthorize("@ss.hasPermi('platform:account:list')") |
||||
@GetMapping("/list") |
||||
public TableDataInfo list(StoreAccount platformStoreAccount) { |
||||
startPage(); |
||||
List<StoreAccount> list = platformStoreAccountService.selectStoreAccountList(platformStoreAccount); |
||||
return getDataTable(list); |
||||
} |
||||
|
||||
/** |
||||
* 导出店家账号列表 |
||||
*/ |
||||
@PreAuthorize("@ss.hasPermi('platform:account:export')") |
||||
@Log(title = "店家账号", businessType = BusinessType.EXPORT) |
||||
@PostMapping("/export") |
||||
public void export(HttpServletResponse response, StoreAccount platformStoreAccount) { |
||||
List<StoreAccount> list = platformStoreAccountService.selectStoreAccountList(platformStoreAccount); |
||||
ExcelUtil<StoreAccount> util = new ExcelUtil<StoreAccount>(StoreAccount.class); |
||||
util.exportExcel(response, list, "店家账号数据"); |
||||
} |
||||
|
||||
/** |
||||
* 获取店家账号详细信息 |
||||
*/ |
||||
@PreAuthorize("@ss.hasPermi('platform:account:query')") |
||||
@GetMapping(value = "/{storeid}") |
||||
public AjaxResult getInfo(@PathVariable("storeid") Long storeid) { |
||||
return success(platformStoreAccountService.selectStoreAccountByStoreid(storeid)); |
||||
} |
||||
|
||||
/** |
||||
* 新增店家账号 |
||||
*/ |
||||
@PreAuthorize("@ss.hasPermi('platform:account:add')") |
||||
@Log(title = "店家账号", businessType = BusinessType.INSERT) |
||||
@PostMapping |
||||
public AjaxResult add(@RequestBody StoreAccount platformStoreAccount) { |
||||
return toAjax(platformStoreAccountService.insertStoreAccount(platformStoreAccount)); |
||||
} |
||||
|
||||
/** |
||||
* 修改店家账号 |
||||
*/ |
||||
@PreAuthorize("@ss.hasPermi('platform:account:edit')") |
||||
@Log(title = "店家账号", businessType = BusinessType.UPDATE) |
||||
@PutMapping |
||||
public AjaxResult edit(@RequestBody StoreAccount platformStoreAccount) { |
||||
return toAjax(platformStoreAccountService.updateStoreAccount(platformStoreAccount)); |
||||
} |
||||
|
||||
/** |
||||
* 删除店家账号 |
||||
*/ |
||||
@PreAuthorize("@ss.hasPermi('platform:account:remove')") |
||||
@Log(title = "店家账号", businessType = BusinessType.DELETE) |
||||
@DeleteMapping("/{storeids}") |
||||
public AjaxResult remove(@PathVariable Long[] storeids) { |
||||
return toAjax(platformStoreAccountService.deleteStoreAccountByStoreids(storeids)); |
||||
} |
||||
} |
@ -1,17 +0,0 @@ |
||||
package com.ruoyi.common.enums; |
||||
|
||||
public enum AccountType { |
||||
|
||||
backend("后台账号"), |
||||
store("店家账号"); |
||||
|
||||
private String remark; |
||||
|
||||
AccountType(String remark) { |
||||
this.remark = remark; |
||||
} |
||||
|
||||
public String getRemark() { |
||||
return remark; |
||||
} |
||||
} |
@ -1,23 +0,0 @@ |
||||
package com.ruoyi.common.enums; |
||||
|
||||
/** |
||||
* 平台设置 |
||||
*/ |
||||
public enum PlatformConfig { |
||||
//用户协议
|
||||
userAgreement(100L), |
||||
//隐私政策
|
||||
privacyPolicy(101L), |
||||
//短信验证码配置
|
||||
smsTime(102L); |
||||
|
||||
private final Long configId; |
||||
|
||||
PlatformConfig(Long configId) { |
||||
this.configId = configId; |
||||
} |
||||
|
||||
public Long getConfigId() { |
||||
return configId; |
||||
} |
||||
} |
@ -1,34 +0,0 @@ |
||||
package com.ruoyi.framework.security; |
||||
|
||||
import com.ruoyi.common.enums.AccountType; |
||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; |
||||
import org.springframework.security.core.GrantedAuthority; |
||||
|
||||
import javax.security.auth.Subject; |
||||
import java.util.Collection; |
||||
|
||||
/** |
||||
* 带账号类型的Token认证 |
||||
*/ |
||||
public class TypeUsernamePasswordAuthenticationToken extends UsernamePasswordAuthenticationToken { |
||||
private final AccountType type; |
||||
|
||||
public TypeUsernamePasswordAuthenticationToken(Object principal, Object credentials, AccountType type) { |
||||
super(principal, credentials); |
||||
this.type = type; |
||||
} |
||||
|
||||
public TypeUsernamePasswordAuthenticationToken(Object principal, Object credentials, Collection<? extends GrantedAuthority> authorities, AccountType type) { |
||||
super(principal, credentials, authorities); |
||||
this.type = type; |
||||
} |
||||
|
||||
@Override |
||||
public boolean implies(Subject subject) { |
||||
return super.implies(subject); |
||||
} |
||||
|
||||
public AccountType getType() { |
||||
return type; |
||||
} |
||||
} |
@ -1,35 +0,0 @@ |
||||
package com.ruoyi.framework.web.service; |
||||
|
||||
import com.ruoyi.common.enums.AccountType; |
||||
import com.ruoyi.framework.security.TypeUsernamePasswordAuthenticationToken; |
||||
import com.ruoyi.framework.security.context.AuthenticationContextHolder; |
||||
import com.ruoyi.store.domain.StoreLoginUser; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.security.authentication.AuthenticationManager; |
||||
import org.springframework.security.core.Authentication; |
||||
import org.springframework.stereotype.Component; |
||||
|
||||
import javax.annotation.Resource; |
||||
|
||||
/** |
||||
* 店家登录 |
||||
*/ |
||||
@Component |
||||
public class StoreLoginService { |
||||
@Autowired |
||||
private TokenService tokenService; |
||||
@Resource |
||||
private AuthenticationManager authenticationManager; |
||||
|
||||
public String login(String mobile, String password) { |
||||
// 用户验证
|
||||
Authentication authentication = null; |
||||
TypeUsernamePasswordAuthenticationToken authenticationToken = new TypeUsernamePasswordAuthenticationToken(mobile, password, AccountType.store); |
||||
AuthenticationContextHolder.setContext(authenticationToken); |
||||
// 该方法会去调用UserDetailsServiceImpl.loadUserByUsername
|
||||
authentication = authenticationManager.authenticate(authenticationToken); |
||||
StoreLoginUser loginUser = (StoreLoginUser) authentication.getPrincipal(); |
||||
|
||||
return tokenService.createToken(loginUser); |
||||
} |
||||
} |
@ -1,26 +0,0 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
<modelVersion>4.0.0</modelVersion> |
||||
<parent> |
||||
<groupId>com.ruoyi</groupId> |
||||
<artifactId>ruoyi</artifactId> |
||||
<version>3.8.5</version> |
||||
</parent> |
||||
|
||||
<artifactId>ttsbg-framework</artifactId> |
||||
|
||||
<properties> |
||||
<maven.compiler.source>11</maven.compiler.source> |
||||
<maven.compiler.target>11</maven.compiler.target> |
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
||||
</properties> |
||||
<dependencies> |
||||
<dependency> |
||||
<groupId>com.ruoyi</groupId> |
||||
<artifactId>ruoyi-common</artifactId> |
||||
</dependency> |
||||
</dependencies> |
||||
|
||||
</project> |
@ -1,76 +0,0 @@ |
||||
package com.ruoyi.framework.domain; |
||||
|
||||
import org.springframework.security.core.GrantedAuthority; |
||||
import org.springframework.security.core.userdetails.UserDetails; |
||||
|
||||
import java.util.Collection; |
||||
|
||||
public abstract class PlatformLoginUser<T> implements UserDetails { |
||||
|
||||
private String token; |
||||
|
||||
public String getToken() { |
||||
return token; |
||||
} |
||||
|
||||
public void setToken(String token) { |
||||
this.token = token; |
||||
} |
||||
|
||||
private T t; |
||||
|
||||
public PlatformLoginUser(T t) { |
||||
this.t = t; |
||||
} |
||||
|
||||
public T getT() { |
||||
return t; |
||||
} |
||||
|
||||
public void setT(T t) { |
||||
this.t = t; |
||||
} |
||||
|
||||
@Override |
||||
public Collection<? extends GrantedAuthority> getAuthorities() { |
||||
return null; |
||||
} |
||||
|
||||
/** |
||||
* 账户是否未过期,过期无法验证 |
||||
*/ |
||||
@Override |
||||
public boolean isAccountNonExpired() { |
||||
return true; |
||||
} |
||||
|
||||
/** |
||||
* 指定用户是否解锁,锁定的用户无法进行身份验证 |
||||
* |
||||
* @return |
||||
*/ |
||||
@Override |
||||
public boolean isAccountNonLocked() { |
||||
return true; |
||||
} |
||||
|
||||
/** |
||||
* 指示是否已过期的用户的凭据(密码),过期的凭据防止认证 |
||||
* |
||||
* @return |
||||
*/ |
||||
@Override |
||||
public boolean isCredentialsNonExpired() { |
||||
return true; |
||||
} |
||||
|
||||
/** |
||||
* 是否可用 ,禁用的用户不能身份验证 |
||||
* |
||||
* @return |
||||
*/ |
||||
@Override |
||||
public boolean isEnabled() { |
||||
return true; |
||||
} |
||||
} |
@ -1,124 +0,0 @@ |
||||
package com.ruoyi.framework.domain; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.ruoyi.common.annotation.Excel; |
||||
import com.ruoyi.common.core.domain.BaseEntity; |
||||
import org.apache.commons.lang3.builder.ToStringBuilder; |
||||
import org.apache.commons.lang3.builder.ToStringStyle; |
||||
|
||||
import javax.validation.constraints.NotBlank; |
||||
import javax.validation.constraints.Pattern; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* 短信验证码对象 platform_sms |
||||
* |
||||
* @author ruoyi |
||||
* @date 2023-02-09 |
||||
*/ |
||||
@TableName("platform_sms") |
||||
public class Sms extends BaseEntity { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 主键 |
||||
*/ |
||||
|
||||
@TableId(type = IdType.AUTO) |
||||
private Long id; |
||||
|
||||
/** |
||||
* 中国大陆手机号 |
||||
*/ |
||||
@Excel(name = "中国大陆手机号") |
||||
@NotBlank(message = "手机号不能为空") |
||||
@Pattern(message = "手机号不合法", regexp = "^1(3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$") |
||||
private String mobile; |
||||
|
||||
/** |
||||
* 6位数字 |
||||
*/ |
||||
@Excel(name = "6位数字") |
||||
private String code; |
||||
|
||||
/** |
||||
* 未发送或发送失败为空 |
||||
*/ |
||||
@Excel(name = "未发送或发送失败为空") |
||||
private Date sendtime; |
||||
|
||||
/** |
||||
* 未发送或发送失败为空 |
||||
*/ |
||||
@Excel(name = "未发送或发送失败为空") |
||||
private Date deadtime; |
||||
|
||||
/** |
||||
* $column.columnComment |
||||
*/ |
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
||||
private String error; |
||||
|
||||
public void setId(Long id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public Long getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setMobile(String mobile) { |
||||
this.mobile = mobile; |
||||
} |
||||
|
||||
public String getMobile() { |
||||
return mobile; |
||||
} |
||||
|
||||
public void setCode(String code) { |
||||
this.code = code; |
||||
} |
||||
|
||||
public String getCode() { |
||||
return code; |
||||
} |
||||
|
||||
public void setSendtime(Date sendtime) { |
||||
this.sendtime = sendtime; |
||||
} |
||||
|
||||
public Date getSendtime() { |
||||
return sendtime; |
||||
} |
||||
|
||||
public void setDeadtime(Date deadtime) { |
||||
this.deadtime = deadtime; |
||||
} |
||||
|
||||
public Date getDeadtime() { |
||||
return deadtime; |
||||
} |
||||
|
||||
public void setError(String error) { |
||||
this.error = error; |
||||
} |
||||
|
||||
public String getError() { |
||||
return error; |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) |
||||
.append("id", getId()) |
||||
.append("mobile", getMobile()) |
||||
.append("code", getCode()) |
||||
.append("sendtime", getSendtime()) |
||||
.append("deadtime", getDeadtime()) |
||||
.append("error", getError()) |
||||
.append("remark", getRemark()) |
||||
.toString(); |
||||
} |
||||
} |
@ -1,62 +0,0 @@ |
||||
package com.ruoyi.framework.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.ruoyi.framework.domain.Sms; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 短信验证码Mapper接口 |
||||
* |
||||
* @author ruoyi |
||||
* @date 2023-02-09 |
||||
*/ |
||||
public interface SmsMapper extends BaseMapper<Sms> { |
||||
/** |
||||
* 查询短信验证码 |
||||
* |
||||
* @param id 短信验证码主键 |
||||
* @return 短信验证码 |
||||
*/ |
||||
public Sms selectSmsById(Long id); |
||||
|
||||
/** |
||||
* 查询短信验证码列表 |
||||
* |
||||
* @param Sms 短信验证码 |
||||
* @return 短信验证码集合 |
||||
*/ |
||||
public List<Sms> selectSmsList(Sms Sms); |
||||
|
||||
/** |
||||
* 新增短信验证码 |
||||
* |
||||
* @param Sms 短信验证码 |
||||
* @return 结果 |
||||
*/ |
||||
public int insertSms(Sms Sms); |
||||
|
||||
/** |
||||
* 修改短信验证码 |
||||
* |
||||
* @param Sms 短信验证码 |
||||
* @return 结果 |
||||
*/ |
||||
public int updateSms(Sms Sms); |
||||
|
||||
/** |
||||
* 删除短信验证码 |
||||
* |
||||
* @param id 短信验证码主键 |
||||
* @return 结果 |
||||
*/ |
||||
public int deleteSmsById(Long id); |
||||
|
||||
/** |
||||
* 批量删除短信验证码 |
||||
* |
||||
* @param ids 需要删除的数据主键集合 |
||||
* @return 结果 |
||||
*/ |
||||
public int deleteSmsByIds(Long[] ids); |
||||
} |
@ -1,72 +0,0 @@ |
||||
package com.ruoyi.framework.service; |
||||
|
||||
import com.ruoyi.framework.domain.Sms; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 短信验证码Service接口 |
||||
* |
||||
* @author ruoyi |
||||
* @date 2023-02-09 |
||||
*/ |
||||
public interface ISmsService { |
||||
/** |
||||
* 查询短信验证码 |
||||
* |
||||
* @param id 短信验证码主键 |
||||
* @return 短信验证码 |
||||
*/ |
||||
public Sms selectSmsById(Long id); |
||||
|
||||
/** |
||||
* 查询短信验证码列表 |
||||
* |
||||
* @param Sms 短信验证码 |
||||
* @return 短信验证码集合 |
||||
*/ |
||||
public List<Sms> selectSmsList(Sms Sms); |
||||
|
||||
/** |
||||
* 新增短信验证码 |
||||
* |
||||
* @param Sms 短信验证码 |
||||
* @return 结果 |
||||
*/ |
||||
public int insertSms(Sms Sms); |
||||
|
||||
/** |
||||
* 修改短信验证码 |
||||
* |
||||
* @param Sms 短信验证码 |
||||
* @return 结果 |
||||
*/ |
||||
public int updateSms(Sms Sms); |
||||
|
||||
/** |
||||
* 批量删除短信验证码 |
||||
* |
||||
* @param ids 需要删除的短信验证码主键集合 |
||||
* @return 结果 |
||||
*/ |
||||
public int deleteSmsByIds(Long[] ids); |
||||
|
||||
/** |
||||
* 删除短信验证码信息 |
||||
* |
||||
* @param id 短信验证码主键 |
||||
* @return 结果 |
||||
*/ |
||||
public int deleteSmsById(Long id); |
||||
|
||||
/** |
||||
* 发送短信验证码 |
||||
* |
||||
* @param mobile 手机号 |
||||
* @param integer |
||||
* @return 结果 |
||||
*/ |
||||
public String send(String mobile, Integer integer); |
||||
|
||||
public Sms querySms(String mobile, String code); |
||||
} |
@ -1,125 +0,0 @@ |
||||
package com.ruoyi.framework.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
import com.ruoyi.common.utils.DateUtils; |
||||
import com.ruoyi.framework.domain.Sms; |
||||
import com.ruoyi.framework.mapper.SmsMapper; |
||||
import com.ruoyi.framework.service.ISmsService; |
||||
import org.apache.commons.lang3.RandomStringUtils; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.Date; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 短信验证码Service业务层处理 |
||||
* |
||||
* @author ruoyi |
||||
* @date 2023-02-09 |
||||
*/ |
||||
@Service |
||||
public class SmsServiceImpl implements ISmsService { |
||||
@Autowired |
||||
private SmsMapper smsMapper; |
||||
|
||||
/** |
||||
* 查询短信验证码 |
||||
* |
||||
* @param id 短信验证码主键 |
||||
* @return 短信验证码 |
||||
*/ |
||||
@Override |
||||
public Sms selectSmsById(Long id) { |
||||
return smsMapper.selectSmsById(id); |
||||
} |
||||
|
||||
/** |
||||
* 查询短信验证码列表 |
||||
* |
||||
* @param Sms 短信验证码 |
||||
* @return 短信验证码 |
||||
*/ |
||||
@Override |
||||
public List<Sms> selectSmsList(Sms Sms) { |
||||
return smsMapper.selectSmsList(Sms); |
||||
} |
||||
|
||||
/** |
||||
* 新增短信验证码 |
||||
* |
||||
* @param Sms 短信验证码 |
||||
* @return 结果 |
||||
*/ |
||||
@Override |
||||
public int insertSms(Sms Sms) { |
||||
return smsMapper.insertSms(Sms); |
||||
} |
||||
|
||||
/** |
||||
* 修改短信验证码 |
||||
* |
||||
* @param Sms 短信验证码 |
||||
* @return 结果 |
||||
*/ |
||||
@Override |
||||
public int updateSms(Sms Sms) { |
||||
return smsMapper.updateSms(Sms); |
||||
} |
||||
|
||||
/** |
||||
* 批量删除短信验证码 |
||||
* |
||||
* @param ids 需要删除的短信验证码主键 |
||||
* @return 结果 |
||||
*/ |
||||
@Override |
||||
public int deleteSmsByIds(Long[] ids) { |
||||
return smsMapper.deleteSmsByIds(ids); |
||||
} |
||||
|
||||
/** |
||||
* 删除短信验证码信息 |
||||
* |
||||
* @param id 短信验证码主键 |
||||
* @return 结果 |
||||
*/ |
||||
@Override |
||||
public int deleteSmsById(Long id) { |
||||
return smsMapper.deleteSmsById(id); |
||||
} |
||||
|
||||
/** |
||||
* 检查手机号是否存在有效短信验证码 |
||||
* |
||||
* @return |
||||
*/ |
||||
@Override |
||||
public Sms querySms(String mobile, String code) { |
||||
LambdaQueryWrapper<Sms> wrapper = new LambdaQueryWrapper<>(); |
||||
Date d = new Date(); |
||||
wrapper.select(Sms::getId).eq(Sms::getMobile, mobile).le(Sms::getSendtime, d).ge(Sms::getDeadtime, d); |
||||
if (code != null) { |
||||
wrapper.eq(Sms::getCode, code); |
||||
} |
||||
return smsMapper.selectOne(wrapper); |
||||
} |
||||
|
||||
@Override |
||||
public String send(String mobile, Integer smsTime) { |
||||
if (querySms(mobile, null) != null) { |
||||
return "短信发送过于频繁"; |
||||
} else { |
||||
String code = RandomStringUtils.randomNumeric(6); |
||||
Sms newSms = new Sms(); |
||||
newSms.setMobile(mobile); |
||||
newSms.setCode(code); |
||||
//TODO 发送验证码成功
|
||||
|
||||
newSms.setSendtime(new Date()); |
||||
newSms.setDeadtime(DateUtils.addSeconds(newSms.getSendtime(), smsTime)); |
||||
smsMapper.insert(newSms); |
||||
return "短信验证码发送成功"; |
||||
} |
||||
} |
||||
} |
@ -1,85 +0,0 @@ |
||||
<?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.ruoyi.framework.mapper.SmsMapper"> |
||||
|
||||
<resultMap type="Sms" id="PlatformSmsResult"> |
||||
<result property="id" column="id"/> |
||||
<result property="mobile" column="mobile"/> |
||||
<result property="code" column="code"/> |
||||
<result property="sendtime" column="sendTime"/> |
||||
<result property="deadtime" column="deadTime"/> |
||||
<result property="error" column="error"/> |
||||
<result property="remark" column="remark"/> |
||||
</resultMap> |
||||
|
||||
<sql id="selectPlatformSmsVo"> |
||||
select id, mobile, code, sendTime, deadTime, error, remark |
||||
from platform_sms |
||||
</sql> |
||||
|
||||
<select id="selectSmsList" parameterType="Sms" resultMap="PlatformSmsResult"> |
||||
<include refid="selectPlatformSmsVo"/> |
||||
<where> |
||||
<if test="mobile != null and mobile != ''">and mobile = #{mobile}</if> |
||||
<if test="code != null and code != ''">and code = #{code}</if> |
||||
<if test="sendtime != null ">and sendTime = #{sendtime}</if> |
||||
<if test="deadtime != null ">and deadTime = #{deadtime}</if> |
||||
<if test="error != null and error != ''">and error = #{error}</if> |
||||
</where> |
||||
</select> |
||||
|
||||
<select id="selectSmsById" parameterType="Long" resultMap="PlatformSmsResult"> |
||||
<include refid="selectPlatformSmsVo"/> |
||||
where id = #{id} |
||||
</select> |
||||
|
||||
<insert id="insertSms" parameterType="Sms"> |
||||
insert into platform_sms |
||||
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
<if test="id != null">id,</if> |
||||
<if test="mobile != null and mobile != ''">mobile,</if> |
||||
<if test="code != null and code != ''">code,</if> |
||||
<if test="sendtime != null">sendTime,</if> |
||||
<if test="deadtime != null">deadTime,</if> |
||||
<if test="error != null and error != ''">error,</if> |
||||
<if test="remark != null and remark != ''">remark,</if> |
||||
</trim> |
||||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
<if test="id != null">#{id},</if> |
||||
<if test="mobile != null and mobile != ''">#{mobile},</if> |
||||
<if test="code != null and code != ''">#{code},</if> |
||||
<if test="sendtime != null">#{sendtime},</if> |
||||
<if test="deadtime != null">#{deadtime},</if> |
||||
<if test="error != null and error != ''">#{error},</if> |
||||
<if test="remark != null and remark != ''">#{remark},</if> |
||||
</trim> |
||||
</insert> |
||||
|
||||
<update id="updateSms" parameterType="Sms"> |
||||
update platform_sms |
||||
<trim prefix="SET" suffixOverrides=","> |
||||
<if test="mobile != null and mobile != ''">mobile = #{mobile},</if> |
||||
<if test="code != null and code != ''">code = #{code},</if> |
||||
<if test="sendtime != null">sendTime = #{sendtime},</if> |
||||
<if test="deadtime != null">deadTime = #{deadtime},</if> |
||||
<if test="error != null and error != ''">error = #{error},</if> |
||||
<if test="remark != null and remark != ''">remark = #{remark},</if> |
||||
</trim> |
||||
where id = #{id} |
||||
</update> |
||||
|
||||
<delete id="deleteSmsById" parameterType="Long"> |
||||
delete |
||||
from platform_sms |
||||
where id = #{id} |
||||
</delete> |
||||
|
||||
<delete id="deleteSmsByIds" parameterType="String"> |
||||
delete from platform_sms where id in |
||||
<foreach item="id" collection="array" open="(" separator="," close=")"> |
||||
#{id} |
||||
</foreach> |
||||
</delete> |
||||
</mapper> |
@ -1,32 +0,0 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
<modelVersion>4.0.0</modelVersion> |
||||
<parent> |
||||
<groupId>com.ruoyi</groupId> |
||||
<artifactId>ruoyi</artifactId> |
||||
<version>3.8.5</version> |
||||
</parent> |
||||
|
||||
<artifactId>ttsbg-store</artifactId> |
||||
|
||||
<properties> |
||||
<maven.compiler.source>11</maven.compiler.source> |
||||
<maven.compiler.target>11</maven.compiler.target> |
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
||||
</properties> |
||||
<dependencies> |
||||
<dependency> |
||||
<groupId>com.ruoyi</groupId> |
||||
<artifactId>ruoyi-common</artifactId> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>com.ruoyi</groupId> |
||||
<artifactId>ttsbg-framework</artifactId> |
||||
<version>3.8.5</version> |
||||
</dependency> |
||||
</dependencies> |
||||
|
||||
</project> |
@ -1,164 +0,0 @@ |
||||
package com.ruoyi.store.domain; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.ruoyi.common.annotation.Excel; |
||||
import com.ruoyi.common.core.domain.BaseEntity; |
||||
import org.apache.commons.lang3.builder.ToStringBuilder; |
||||
import org.apache.commons.lang3.builder.ToStringStyle; |
||||
|
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* 店家账号对象 platform_store_account |
||||
* |
||||
* @author ruoyi |
||||
* @date 2023-02-10 |
||||
*/ |
||||
|
||||
@TableName("platform_store_account") |
||||
public class StoreAccount extends BaseEntity { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* $column.columnComment |
||||
*/ |
||||
@TableId(type = IdType.AUTO) |
||||
private Long storeid; |
||||
|
||||
/** |
||||
* 中国大陆手机号 |
||||
*/ |
||||
@Excel(name = "中国大陆手机号") |
||||
private String mobile; |
||||
|
||||
/** |
||||
* HS512 加密 |
||||
*/ |
||||
@Excel(name = "HS512 加密") |
||||
private String password; |
||||
|
||||
/** |
||||
* 枚举值、详看数据字典编码 |
||||
*/ |
||||
@Excel(name = "枚举值、详看数据字典编码") |
||||
private Long status; |
||||
|
||||
/** |
||||
* yyyy-MM-dd |
||||
*/ |
||||
@Excel(name = "yyyy-MM-dd") |
||||
private Date registerdate; |
||||
|
||||
/** |
||||
* 待确定格式 |
||||
*/ |
||||
@Excel(name = "待确定格式") |
||||
private String nickname; |
||||
|
||||
/** |
||||
* 枚举值、详看数据字典编码 |
||||
*/ |
||||
@Excel(name = "枚举值、详看数据字典编码") |
||||
private Long sex; |
||||
|
||||
/** |
||||
* 待确定存储格式 |
||||
*/ |
||||
@Excel(name = "待确定存储格式") |
||||
private String avatar; |
||||
|
||||
/** |
||||
* yyyy-MM-dd |
||||
*/ |
||||
@Excel(name = "yyyy-MM-dd") |
||||
private Date logindate; |
||||
|
||||
public void setStoreid(Long storeid) { |
||||
this.storeid = storeid; |
||||
} |
||||
|
||||
public Long getStoreid() { |
||||
return storeid; |
||||
} |
||||
|
||||
public void setMobile(String mobile) { |
||||
this.mobile = mobile; |
||||
} |
||||
|
||||
public String getMobile() { |
||||
return mobile; |
||||
} |
||||
|
||||
public void setPassword(String password) { |
||||
this.password = password; |
||||
} |
||||
|
||||
public String getPassword() { |
||||
return password; |
||||
} |
||||
|
||||
public void setStatus(Long status) { |
||||
this.status = status; |
||||
} |
||||
|
||||
public Long getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public void setRegisterdate(Date registerdate) { |
||||
this.registerdate = registerdate; |
||||
} |
||||
|
||||
public Date getRegisterdate() { |
||||
return registerdate; |
||||
} |
||||
|
||||
public void setNickname(String nickname) { |
||||
this.nickname = nickname; |
||||
} |
||||
|
||||
public String getNickname() { |
||||
return nickname; |
||||
} |
||||
|
||||
public void setSex(Long sex) { |
||||
this.sex = sex; |
||||
} |
||||
|
||||
public Long getSex() { |
||||
return sex; |
||||
} |
||||
|
||||
public void setAvatar(String avatar) { |
||||
this.avatar = avatar; |
||||
} |
||||
|
||||
public String getAvatar() { |
||||
return avatar; |
||||
} |
||||
|
||||
public void setLogindate(Date logindate) { |
||||
this.logindate = logindate; |
||||
} |
||||
|
||||
public Date getLogindate() { |
||||
return logindate; |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) |
||||
.append("storeid", getStoreid()) |
||||
.append("mobile", getMobile()) |
||||
.append("password", getPassword()) |
||||
.append("status", getStatus()) |
||||
.append("registerdate", getRegisterdate()) |
||||
.append("nickname", getNickname()) |
||||
.append("sex", getSex()) |
||||
.append("avatar", getAvatar()) |
||||
.append("logindate", getLogindate()) |
||||
.toString(); |
||||
} |
||||
} |
@ -1,20 +0,0 @@ |
||||
package com.ruoyi.store.domain; |
||||
|
||||
import com.ruoyi.framework.domain.PlatformLoginUser; |
||||
|
||||
public class StoreLoginUser extends PlatformLoginUser<StoreAccount> { |
||||
|
||||
public StoreLoginUser(StoreAccount storeAccount) { |
||||
super(storeAccount); |
||||
} |
||||
|
||||
@Override |
||||
public String getPassword() { |
||||
return getT().getPassword(); |
||||
} |
||||
|
||||
@Override |
||||
public String getUsername() { |
||||
return getT().getMobile(); |
||||
} |
||||
} |
@ -1,15 +0,0 @@ |
||||
package com.ruoyi.store.domain.vo; |
||||
|
||||
import lombok.Data; |
||||
|
||||
import javax.validation.constraints.NotBlank; |
||||
|
||||
@Data |
||||
public class StoreAccountVo { |
||||
@NotBlank |
||||
private String mobile; |
||||
@NotBlank |
||||
private String password; |
||||
@NotBlank |
||||
private String verificationCode; |
||||
} |
@ -1,56 +0,0 @@ |
||||
package com.ruoyi.store.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.ruoyi.store.domain.StoreAccount; |
||||
|
||||
import java.util.List; |
||||
|
||||
public interface StoreAccountMapper extends BaseMapper<StoreAccount> { |
||||
/** |
||||
* 查询店家账号 |
||||
* |
||||
* @param storeid 店家账号主键 |
||||
* @return 店家账号 |
||||
*/ |
||||
public StoreAccount selectStoreAccountByStoreid(Long storeid); |
||||
|
||||
/** |
||||
* 查询店家账号列表 |
||||
* |
||||
* @param StoreAccount 店家账号 |
||||
* @return 店家账号集合 |
||||
*/ |
||||
public List<StoreAccount> selectStoreAccountList(StoreAccount StoreAccount); |
||||
|
||||
/** |
||||
* 新增店家账号 |
||||
* |
||||
* @param StoreAccount 店家账号 |
||||
* @return 结果 |
||||
*/ |
||||
public int insertStoreAccount(StoreAccount StoreAccount); |
||||
|
||||
/** |
||||
* 修改店家账号 |
||||
* |
||||
* @param StoreAccount 店家账号 |
||||
* @return 结果 |
||||
*/ |
||||
public int updateStoreAccount(StoreAccount StoreAccount); |
||||
|
||||
/** |
||||
* 删除店家账号 |
||||
* |
||||
* @param storeid 店家账号主键 |
||||
* @return 结果 |
||||
*/ |
||||
public int deleteStoreAccountByStoreid(Long storeid); |
||||
|
||||
/** |
||||
* 批量删除店家账号 |
||||
* |
||||
* @param storeids 需要删除的数据主键集合 |
||||
* @return 结果 |
||||
*/ |
||||
public int deleteStoreAccountByStoreids(Long[] storeids); |
||||
} |
@ -1,75 +0,0 @@ |
||||
package com.ruoyi.store.service; |
||||
|
||||
|
||||
import com.ruoyi.store.domain.StoreAccount; |
||||
import com.ruoyi.store.domain.vo.StoreAccountVo; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 店家账号Service接口 |
||||
* |
||||
* @author ruoyi |
||||
* @date 2023-02-10 |
||||
*/ |
||||
public interface IStoreAccountService { |
||||
/** |
||||
* 查询店家账号 |
||||
* |
||||
* @param storeid 店家账号主键 |
||||
* @return 店家账号 |
||||
*/ |
||||
public StoreAccount selectStoreAccountByStoreid(Long storeid); |
||||
|
||||
/** |
||||
* 查询店家账号列表 |
||||
* |
||||
* @param StoreAccount 店家账号 |
||||
* @return 店家账号集合 |
||||
*/ |
||||
public List<StoreAccount> selectStoreAccountList(StoreAccount StoreAccount); |
||||
|
||||
/** |
||||
* 新增店家账号 |
||||
* |
||||
* @param StoreAccount 店家账号 |
||||
* @return 结果 |
||||
*/ |
||||
public int insertStoreAccount(StoreAccount StoreAccount); |
||||
|
||||
/** |
||||
* 修改店家账号 |
||||
* |
||||
* @param StoreAccount 店家账号 |
||||
* @return 结果 |
||||
*/ |
||||
public int updateStoreAccount(StoreAccount StoreAccount); |
||||
|
||||
/** |
||||
* 批量删除店家账号 |
||||
* |
||||
* @param storeids 需要删除的店家账号主键集合 |
||||
* @return 结果 |
||||
*/ |
||||
public int deleteStoreAccountByStoreids(Long[] storeids); |
||||
|
||||
/** |
||||
* 删除店家账号信息 |
||||
* |
||||
* @param storeid 店家账号主键 |
||||
* @return 结果 |
||||
*/ |
||||
public int deleteStoreAccountByStoreid(Long storeid); |
||||
|
||||
public String register(StoreAccountVo account); |
||||
|
||||
/** |
||||
* 手机号查询店家账号 |
||||
* |
||||
* @param mobile |
||||
* @return |
||||
*/ |
||||
public StoreAccount selectAccountByMobile(String mobile); |
||||
|
||||
String resetpwd(StoreAccountVo account); |
||||
} |
@ -1,150 +0,0 @@ |
||||
package com.ruoyi.store.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
import com.ruoyi.common.utils.SecurityUtils; |
||||
import com.ruoyi.framework.domain.Sms; |
||||
import com.ruoyi.framework.service.ISmsService; |
||||
import com.ruoyi.store.domain.StoreAccount; |
||||
import com.ruoyi.store.domain.vo.StoreAccountVo; |
||||
import com.ruoyi.store.mapper.StoreAccountMapper; |
||||
import com.ruoyi.store.service.IStoreAccountService; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.Date; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 店家账号Service业务层处理 |
||||
* |
||||
* @author ruoyi |
||||
* @date 2023-02-10 |
||||
*/ |
||||
@Service |
||||
public class StoreAccountServiceImpl implements IStoreAccountService { |
||||
@Autowired |
||||
private StoreAccountMapper storeAccountMapper; |
||||
|
||||
@Autowired |
||||
private ISmsService smsService; |
||||
|
||||
/** |
||||
* 查询店家账号 |
||||
* |
||||
* @param storeid 店家账号主键 |
||||
* @return 店家账号 |
||||
*/ |
||||
@Override |
||||
public StoreAccount selectStoreAccountByStoreid(Long storeid) { |
||||
return storeAccountMapper.selectStoreAccountByStoreid(storeid); |
||||
} |
||||
|
||||
/** |
||||
* 查询店家账号列表 |
||||
* |
||||
* @param StoreAccount 店家账号 |
||||
* @return 店家账号 |
||||
*/ |
||||
@Override |
||||
public List<StoreAccount> selectStoreAccountList(StoreAccount StoreAccount) { |
||||
return storeAccountMapper.selectStoreAccountList(StoreAccount); |
||||
} |
||||
|
||||
/** |
||||
* 新增店家账号 |
||||
* |
||||
* @param StoreAccount 店家账号 |
||||
* @return 结果 |
||||
*/ |
||||
@Override |
||||
public int insertStoreAccount(StoreAccount StoreAccount) { |
||||
return storeAccountMapper.insertStoreAccount(StoreAccount); |
||||
} |
||||
|
||||
/** |
||||
* 修改店家账号 |
||||
* |
||||
* @param StoreAccount 店家账号 |
||||
* @return 结果 |
||||
*/ |
||||
@Override |
||||
public int updateStoreAccount(StoreAccount StoreAccount) { |
||||
return storeAccountMapper.updateStoreAccount(StoreAccount); |
||||
} |
||||
|
||||
/** |
||||
* 批量删除店家账号 |
||||
* |
||||
* @param storeids 需要删除的店家账号主键 |
||||
* @return 结果 |
||||
*/ |
||||
@Override |
||||
public int deleteStoreAccountByStoreids(Long[] storeids) { |
||||
return storeAccountMapper.deleteStoreAccountByStoreids(storeids); |
||||
} |
||||
|
||||
/** |
||||
* 删除店家账号信息 |
||||
* |
||||
* @param storeid 店家账号主键 |
||||
* @return 结果 |
||||
*/ |
||||
@Override |
||||
public int deleteStoreAccountByStoreid(Long storeid) { |
||||
return storeAccountMapper.deleteStoreAccountByStoreid(storeid); |
||||
} |
||||
|
||||
@Override |
||||
public StoreAccount selectAccountByMobile(String mobile) { |
||||
LambdaQueryWrapper<StoreAccount> wrapper = new LambdaQueryWrapper<>(); |
||||
wrapper.select(StoreAccount::getStoreid, StoreAccount::getMobile, StoreAccount::getPassword).eq(StoreAccount::getMobile, mobile); |
||||
return storeAccountMapper.selectOne(wrapper); |
||||
} |
||||
|
||||
@Override |
||||
public String register(StoreAccountVo account) { |
||||
//检查验证码是否有效
|
||||
Sms sms = smsService.querySms(account.getMobile(), account.getVerificationCode()); |
||||
if (sms != null) { |
||||
sms.setDeadtime(new Date()); |
||||
smsService.updateSms(sms); |
||||
if (selectAccountByMobile(account.getMobile()) != null) { |
||||
return "手机号已注册"; |
||||
} else { |
||||
StoreAccount newAccount = new StoreAccount(); |
||||
newAccount.setMobile(account.getMobile()); |
||||
newAccount.setPassword(SecurityUtils.encryptPassword(account.getPassword())); |
||||
newAccount.setStatus(1L); |
||||
newAccount.setRegisterdate(new Date()); |
||||
newAccount.setNickname(newAccount.getMobile()); |
||||
newAccount.setSex(0L); |
||||
if (storeAccountMapper.insert(newAccount) > 0) { |
||||
return "注册成功"; |
||||
} else { |
||||
return "注册失败"; |
||||
} |
||||
} |
||||
} else { |
||||
return "手机号或验证码错误"; |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
public String resetpwd(StoreAccountVo account) { |
||||
//检查验证码是否有效
|
||||
Sms sms = smsService.querySms(account.getMobile(), account.getVerificationCode()); |
||||
if (sms != null) { |
||||
sms.setDeadtime(new Date()); |
||||
smsService.updateSms(sms); |
||||
StoreAccount storeAccount = selectAccountByMobile(account.getMobile()); |
||||
storeAccount.setPassword(SecurityUtils.encryptPassword(account.getPassword())); |
||||
if (storeAccountMapper.updateById(storeAccount) > 0) { |
||||
return "密码重置成功"; |
||||
} else { |
||||
return "密码重置失败"; |
||||
} |
||||
} else { |
||||
return "手机号或验证码错误"; |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue