master
parent
88a9e26790
commit
ef878a30df
@ -1,11 +0,0 @@
|
|||||||
.----------------. .----------------. .----------------. .----------------. .----------------. .----------------.
|
|
||||||
| .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. |
|
|
||||||
| | ____ ____ | || | __ | || | _____ | || | _____ | || | _ _ | || | _____ | |
|
|
||||||
| ||_ \ / _|| || | / \ | || | |_ _| | || | |_ _| | || | | | | | | || | |_ _| | |
|
|
||||||
| | | \/ | | || | / /\ \ | || | | | | || | | | | || | | |__| |_ | || | | | | |
|
|
||||||
| | | |\ /| | | || | / ____ \ | || | | | _ | || | | | _ | || | |____ _| | || | _ | | | |
|
|
||||||
| | _| |_\/_| |_ | || | _/ / \ \_ | || | _| |__/ | | || | _| |__/ | | || | _| |_ | || | | |_' | | |
|
|
||||||
| ||_____||_____|| || ||____| |____|| || | |________| | || | |________| | || | |_____| | || | `.___.' | |
|
|
||||||
| | | || | | || | | || | | || | | || | | |
|
|
||||||
| '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' |
|
|
||||||
'----------------' '----------------' '----------------' '----------------' '----------------' '----------------'
|
|
||||||
@ -0,0 +1,53 @@
|
|||||||
|
package com.yami.shop.api.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.yami.shop.bean.model.UserPortfolio;
|
||||||
|
import com.yami.shop.common.response.ServerResponseEntity;
|
||||||
|
import com.yami.shop.security.api.model.YamiUser;
|
||||||
|
import com.yami.shop.security.api.util.SecurityUtils;
|
||||||
|
import com.yami.shop.service.UserPortfolioService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/p/user/portfolio")
|
||||||
|
@Tag(name = "会员建档")
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class UserPortfolioController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UserPortfolioService userPortfolioService;
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/save")
|
||||||
|
@Operation(summary = "会员建档", description = "保存档案信息")
|
||||||
|
public ServerResponseEntity<String> save(@RequestBody UserPortfolio portfolio) {
|
||||||
|
YamiUser user = SecurityUtils.getUser();
|
||||||
|
String userId = user.getUserId();
|
||||||
|
portfolio.setUserId(userId);
|
||||||
|
userPortfolioService.save(portfolio);
|
||||||
|
return ServerResponseEntity.success("建档成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/page")
|
||||||
|
@Operation(summary = "会员列表", description = "会员列表")
|
||||||
|
public ServerResponseEntity<List<UserPortfolio>> page() {
|
||||||
|
YamiUser user = SecurityUtils.getUser();
|
||||||
|
String userId = user.getUserId();
|
||||||
|
List<UserPortfolio> list = userPortfolioService.list(new LambdaQueryWrapper<UserPortfolio>().eq(UserPortfolio::getUserId, userId));
|
||||||
|
return ServerResponseEntity.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/detail")
|
||||||
|
@Operation(summary = "会员列表", description = "会员列表")
|
||||||
|
public ServerResponseEntity<UserPortfolio> detail(@RequestParam String profileId) {
|
||||||
|
|
||||||
|
UserPortfolio userPortfolio = userPortfolioService.getOne(new LambdaQueryWrapper<UserPortfolio>().eq(UserPortfolio::getPortfolioId, profileId));
|
||||||
|
return ServerResponseEntity.success(userPortfolio);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,11 +0,0 @@
|
|||||||
.----------------. .----------------. .----------------. .----------------. .----------------. .----------------.
|
|
||||||
| .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. |
|
|
||||||
| | ____ ____ | || | __ | || | _____ | || | _____ | || | _ _ | || | _____ | |
|
|
||||||
| ||_ \ / _|| || | / \ | || | |_ _| | || | |_ _| | || | | | | | | || | |_ _| | |
|
|
||||||
| | | \/ | | || | / /\ \ | || | | | | || | | | | || | | |__| |_ | || | | | | |
|
|
||||||
| | | |\ /| | | || | / ____ \ | || | | | _ | || | | | _ | || | |____ _| | || | _ | | | |
|
|
||||||
| | _| |_\/_| |_ | || | _/ / \ \_ | || | _| |__/ | | || | _| |__/ | | || | _| |_ | || | | |_' | | |
|
|
||||||
| ||_____||_____|| || ||____| |____|| || | |________| | || | |________| | || | |_____| | || | `.___.' | |
|
|
||||||
| | | || | | || | | || | | || | | || | | |
|
|
||||||
| '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' |
|
|
||||||
'----------------' '----------------' '----------------' '----------------' '----------------' '----------------'
|
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
package com.yami.shop.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.tencentcloudapi.common.Credential;
|
||||||
|
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
|
||||||
|
import com.tencentcloudapi.common.profile.ClientProfile;
|
||||||
|
import com.tencentcloudapi.common.profile.HttpProfile;
|
||||||
|
import com.tencentcloudapi.sms.v20210111.SmsClient;
|
||||||
|
import com.tencentcloudapi.sms.v20210111.models.SendSmsRequest;
|
||||||
|
import com.tencentcloudapi.sms.v20210111.models.SendSmsResponse;
|
||||||
|
import com.yami.shop.bean.model.SmsLog;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tencent Cloud Sms Sendsms
|
||||||
|
*/
|
||||||
|
|
||||||
|
public interface SendSmsService {
|
||||||
|
public SendSmsResponse sendSms(String phone, String code) ;
|
||||||
|
}
|
||||||
Loading…
Reference in new issue