规范代码
This commit is contained in:
@ -82,7 +82,7 @@ public class AuthService {
|
|||||||
* @param loginParam loginParam
|
* @param loginParam loginParam
|
||||||
* @return long
|
* @return long
|
||||||
*/
|
*/
|
||||||
@Transactional
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public YxUser wxappLogin(LoginParam loginParam) {
|
public YxUser wxappLogin(LoginParam loginParam) {
|
||||||
String code = loginParam.getCode();
|
String code = loginParam.getCode();
|
||||||
String encryptedData = loginParam.getEncryptedData();
|
String encryptedData = loginParam.getEncryptedData();
|
||||||
@ -171,7 +171,7 @@ public class AuthService {
|
|||||||
* @param spread 上级用户
|
* @param spread 上级用户
|
||||||
* @return uid
|
* @return uid
|
||||||
*/
|
*/
|
||||||
@Transactional
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public YxUser wechatLogin(String code,String spread){
|
public YxUser wechatLogin(String code,String spread){
|
||||||
try {
|
try {
|
||||||
WxMpService wxService = WxMpConfiguration.getWxMpService();
|
WxMpService wxService = WxMpConfiguration.getWxMpService();
|
||||||
@ -257,7 +257,7 @@ public class AuthService {
|
|||||||
* 注册
|
* 注册
|
||||||
* @param param RegDTO
|
* @param param RegDTO
|
||||||
*/
|
*/
|
||||||
@Transactional
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void register(RegParam param){
|
public void register(RegParam param){
|
||||||
|
|
||||||
String account = param.getAccount();
|
String account = param.getAccount();
|
||||||
|
@ -33,8 +33,8 @@ public class PrintStoreOrderVO implements Serializable {
|
|||||||
private String driverNo;
|
private String driverNo;
|
||||||
@ApiModelProperty(value = "门店列表")
|
@ApiModelProperty(value = "门店列表")
|
||||||
private Integer storeId;
|
private Integer storeId;
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
long startSecond;
|
|
||||||
@ApiModelProperty(hidden = true)
|
@ApiModelProperty(hidden = true)
|
||||||
long endSecond;
|
Long startSecond;
|
||||||
|
@ApiModelProperty(hidden = true)
|
||||||
|
Long endSecond;
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ import java.io.Serializable;
|
|||||||
* @modified By:
|
* @modified By:
|
||||||
* @version:
|
* @version:
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("ALL")
|
||||||
@Data
|
@Data
|
||||||
@ApiModel(value="腾讯地图返回对象")
|
@ApiModel(value="腾讯地图返回对象")
|
||||||
public class GetTencentLocationVO implements Serializable {
|
public class GetTencentLocationVO implements Serializable {
|
||||||
@ -27,7 +28,7 @@ public class GetTencentLocationVO implements Serializable {
|
|||||||
@ApiModelProperty(value = "状态说明")
|
@ApiModelProperty(value = "状态说明")
|
||||||
private String message;
|
private String message;
|
||||||
@ApiModelProperty(value = "状态码,0为正常")
|
@ApiModelProperty(value = "状态码,0为正常")
|
||||||
private int status;
|
private Integer status;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ApiModel(value="地址解析结果")
|
@ApiModel(value="地址解析结果")
|
||||||
|
@ -73,7 +73,7 @@ public class YxStoreProductAttrServiceImpl extends BaseServiceImpl<StoreProductA
|
|||||||
* @param productId 商品id
|
* @param productId 商品id
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void insertYxStoreProductAttr(List<FromatDetailDto> items, List<ProductFormatDto> attrs,
|
public void insertYxStoreProductAttr(List<FromatDetailDto> items, List<ProductFormatDto> attrs,
|
||||||
Long productId)
|
Long productId)
|
||||||
{
|
{
|
||||||
|
@ -18,6 +18,7 @@ import co.yixiang.tools.domain.vo.EmailVo;
|
|||||||
import co.yixiang.tools.service.VerificationCodeService;
|
import co.yixiang.tools.service.VerificationCodeService;
|
||||||
import co.yixiang.tools.service.mapper.VerificationCodeMapper;
|
import co.yixiang.tools.service.mapper.VerificationCodeMapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import org.apache.commons.lang3.concurrent.BasicThreadFactory;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
@ -26,6 +27,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
import java.util.concurrent.ScheduledExecutorService;
|
import java.util.concurrent.ScheduledExecutorService;
|
||||||
|
import java.util.concurrent.ScheduledThreadPoolExecutor;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -83,7 +85,8 @@ public class VerificationCodeServiceImpl extends BaseServiceImpl<VerificationCod
|
|||||||
*/
|
*/
|
||||||
private void timedDestruction(VerificationCode verifyCode) {
|
private void timedDestruction(VerificationCode verifyCode) {
|
||||||
//以下示例为程序调用结束继续运行
|
//以下示例为程序调用结束继续运行
|
||||||
ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor();
|
ScheduledExecutorService executorService = new ScheduledThreadPoolExecutor(1,
|
||||||
|
new BasicThreadFactory.Builder().namingPattern("verifyCode-schedule-pool-%d").daemon(true).build());
|
||||||
try {
|
try {
|
||||||
executorService.schedule(() -> {
|
executorService.schedule(() -> {
|
||||||
verifyCode.setStatus(false);
|
verifyCode.setStatus(false);
|
||||||
|
Reference in New Issue
Block a user