RIceWqy 2 years ago
parent 88a9e26790
commit ef878a30df

@ -44,6 +44,11 @@
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.tencentcloudapi</groupId>
<artifactId>tencentcloud-sdk-java</artifactId>
<version>3.1.950</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
@ -133,6 +138,11 @@
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.tencentcloudapi</groupId>
<artifactId>tencentcloud-sdk-java</artifactId>
<version>3.1.950</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
@ -181,7 +191,7 @@
<repository>
<id>aliyun</id>
<name>aliyun</name>
<url>https://maven.aliyun.com/repository/public</url>
<url>https://mirrors.tencent.com/nexus/repository/maven-public/</url>
<releases>
<enabled>true</enabled>
</releases>

@ -4,7 +4,7 @@ spring:
datasource:
url: jdbc:mysql://127.0.0.1:3306/yami_shops?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true
username: root
password: root
password: 660100
driver-class-name: com.mysql.cj.jdbc.Driver
type: com.zaxxer.hikari.HikariDataSource
hikari:

@ -1,11 +0,0 @@
.----------------. .----------------. .----------------. .----------------. .----------------. .----------------.
| .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. |
| | ____ ____ | || | __ | || | _____ | || | _____ | || | _ _ | || | _____ | |
| ||_ \ / _|| || | / \ | || | |_ _| | || | |_ _| | || | | | | | | || | |_ _| | |
| | | \/ | | || | / /\ \ | || | | | | || | | | | || | | |__| |_ | || | | | | |
| | | |\ /| | | || | / ____ \ | || | | | _ | || | | | _ | || | |____ _| | || | _ | | | |
| | _| |_\/_| |_ | || | _/ / \ \_ | || | _| |__/ | | || | _| |__/ | | || | _| |_ | || | | |_' | | |
| ||_____||_____|| || ||____| |____|| || | |________| | || | |________| | || | |_____| | || | `.___.' | |
| | | || | | || | | || | | || | | || | | |
| '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' |
'----------------' '----------------' '----------------' '----------------' '----------------' '----------------'

@ -10,39 +10,77 @@
package com.yami.shop.api.controller;
import com.google.common.collect.Maps;
import com.tencentcloudapi.sms.v20210111.models.SendSmsResponse;
import com.tencentcloudapi.sms.v20210111.models.SendStatus;
import com.yami.shop.bean.app.param.SendSmsParam;
import com.yami.shop.bean.enums.SmsType;
import com.yami.shop.security.api.util.SecurityUtils;
import com.yami.shop.common.response.ServerResponseEntity;
import com.yami.shop.common.util.RedisUtil;
import com.yami.shop.service.SendSmsService;
import com.yami.shop.service.SmsLogService;
import io.swagger.v3.oas.annotations.tags.Tag;
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 com.yami.shop.common.response.ServerResponseEntity;
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;
import java.security.SecureRandom;
/**
* @author lanhai
*/
@RestController
@RequestMapping("/p/sms")
@RequestMapping("/sms")
@Tag(name = "发送验证码接口")
@AllArgsConstructor
public class SmsController {
@Autowired
private SmsLogService smsLogService;
// 数字字符集合
private static final String NUMERIC_CHARACTERS = "0123456789";
// 随机数生成器
private static final SecureRandom RANDOM = new SecureRandom();
@Autowired
private SmsLogService smsLogService;
@Autowired
private SendSmsService sendSmsService;
/**
*
*
* @param length
* @return
*/
public static String generateRandomNumericCode(int length) {
StringBuilder code = new StringBuilder();
for (int i = 0; i < length; i++) {
int randomIndex = RANDOM.nextInt(NUMERIC_CHARACTERS.length());
char randomChar = NUMERIC_CHARACTERS.charAt(randomIndex);
code.append(randomChar);
}
return code.toString();
}
/**
*
*/
@PostMapping("/send")
@Operation(summary = "发送验证码" , description = "用户的发送验证码")
public ServerResponseEntity<Void> audit(@RequestBody SendSmsParam sendSmsParam) {
String userId = SecurityUtils.getUser().getUserId();
smsLogService.sendSms(SmsType.VALID, userId, sendSmsParam.getMobile(),Maps.newHashMap());
return ServerResponseEntity.success();
@Operation(summary = "发送验证码", description = "用户的发送验证码")
public ServerResponseEntity<String> audit(@RequestBody SendSmsParam sendSmsParam) {
// String userId = SecurityUtils.getUser().getUserId();
// smsLogService.sendSms(SmsType.VALID, userId, sendSmsParam.getMobile(),Maps.newHashMap());
String code = generateRandomNumericCode(6);
RedisUtil.set("verification:code:" + sendSmsParam.getMobile(), code);
SendSmsResponse sendSmsResponse = sendSmsService.sendSms(sendSmsParam.getMobile(), code);
SendStatus[] sendStatusSet = sendSmsResponse.getSendStatusSet();
System.out.println(sendSmsResponse);
if (sendStatusSet[0].getCode().equals("Ok")) {
return ServerResponseEntity.success( "验证码发送成功");
}
return ServerResponseEntity.success("验证码发送失败");
}
}

@ -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);
}
}

@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yami.shop.bean.model.User;
import com.yami.shop.bean.param.UserRegisterParam;
import com.yami.shop.common.exception.YamiShopBindException;
import com.yami.shop.common.util.RedisUtil;
import com.yami.shop.security.common.bo.UserInfoInTokenBO;
import com.yami.shop.security.common.enums.SysTypeEnum;
import com.yami.shop.security.common.manager.PasswordManager;
@ -48,11 +49,25 @@ public class UserRegisterController {
if (StrUtil.isBlank(userRegisterParam.getNickName())) {
userRegisterParam.setNickName(userRegisterParam.getUserName());
}
if (userRegisterParam.getNickName().length() < 4) {
throw new YamiShopBindException("用户名长度小于4");
}
if (userRegisterParam.getPassWord().length() < 6) {
throw new YamiShopBindException("密码长度小于6");
}
// 正在进行申请注册
if (userService.count(new LambdaQueryWrapper<User>().eq(User::getNickName, userRegisterParam.getNickName())) > 0) {
// 该用户名已注册,无法重新注册
throw new YamiShopBindException("该用户名已注册,无法重新注册");
}
if (userService.count(new LambdaQueryWrapper<User>().eq(User::getPhone, userRegisterParam.getPhone())) > 0) {
// 该用户名已注册,无法重新注册
throw new YamiShopBindException("该手机号已注册,无法重新注册");
}
String code = RedisUtil.get("verification:code:" + userRegisterParam.getPhone());
if (!code.equals(userRegisterParam.getVerificationCode())) {
throw new YamiShopBindException("验证码不匹配");
}
Date now = new Date();
User user = new User();
user.setModifyTime(now);
@ -64,6 +79,7 @@ public class UserRegisterController {
user.setLoginPassword(passwordEncoder.encode(decryptPassword));
String userId = IdUtil.simpleUUID();
user.setUserId(userId);
user.setPhone(userRegisterParam.getPhone());
userService.save(user);
// 2. 登录
UserInfoInTokenBO userInfoInTokenBO = new UserInfoInTokenBO();

@ -5,7 +5,7 @@ spring:
datasource:
url: jdbc:mysql://127.0.0.1:3306/yami_shops?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true
username: root
password: root
password: 660100
driver-class-name: com.mysql.cj.jdbc.Driver
type: com.zaxxer.hikari.HikariDataSource
hikari:

@ -1,11 +0,0 @@
.----------------. .----------------. .----------------. .----------------. .----------------. .----------------.
| .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. |
| | ____ ____ | || | __ | || | _____ | || | _____ | || | _ _ | || | _____ | |
| ||_ \ / _|| || | / \ | || | |_ _| | || | |_ _| | || | | | | | | || | |_ _| | |
| | | \/ | | || | / /\ \ | || | | | | || | | | | || | | |__| |_ | || | | | | |
| | | |\ /| | | || | / ____ \ | || | | | _ | || | | | _ | || | |____ _| | || | _ | | | |
| | _| |_\/_| |_ | || | _/ / \ \_ | || | _| |__/ | | || | _| |__/ | | || | _| |_ | || | | |_' | | |
| ||_____||_____|| || ||____| |____|| || | |________| | || | |________| | || | |_____| | || | `.___.' | |
| | | || | | || | | || | | || | | || | | |
| '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' |
'----------------' '----------------' '----------------' '----------------' '----------------' '----------------'

@ -131,5 +131,9 @@ public class User implements Serializable {
*
*/
private Integer score;
/**
*
*/
private String phone;
}

@ -2,6 +2,7 @@ package com.yami.shop.bean.model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@ -12,8 +13,9 @@ public class UserPortfolio {
// 基本信息
@TableId
private Integer portfolioId; //档案id
private Integer userId; // 会员ID
private String userId; // 会员ID
private String name; // 姓名
@JsonFormat(pattern = "yyyy-MM-dd")
private Date birthDate; // 出生日期
private String gender; // 性别
private String ethnicity; // 民族
@ -56,4 +58,41 @@ public class UserPortfolio {
// 拒绝理由
private String rejectionReason;
@Override
public String toString() {
return "UserPortfolio{" +
"portfolioId=" + portfolioId +
", userId=" + userId +
", name='" + name + '\'' +
", birthDate=" + birthDate +
", gender='" + gender + '\'' +
", ethnicity='" + ethnicity + '\'' +
", nativePlace='" + nativePlace + '\'' +
", idCardNumber='" + idCardNumber + '\'' +
", address='" + address + '\'' +
", phoneNumber='" + phoneNumber + '\'' +
", emailAddress='" + emailAddress + '\'' +
", emergencyContactName='" + emergencyContactName + '\'' +
", emergencyContactPhone='" + emergencyContactPhone + '\'' +
", healthStatus='" + healthStatus + '\'' +
", medicalInsuranceInfo='" + medicalInsuranceInfo + '\'' +
", primaryDoctorContact='" + primaryDoctorContact + '\'' +
", longTermMedicationInfo='" + longTermMedicationInfo + '\'' +
", funeralMethod='" + funeralMethod + '\'' +
", ceremonyType='" + ceremonyType + '\'' +
", cemeteryInfo='" + cemeteryInfo + '\'' +
", prePurchasedGrave=" + prePurchasedGrave +
", preReservedFuneralLocation='" + preReservedFuneralLocation + '\'' +
", hasWillOrLivingDirective=" + hasWillOrLivingDirective +
", paymentMethod='" + paymentMethod + '\'' +
", bankAccountInfo='" + bankAccountInfo + '\'' +
", prePaidFuneralCost=" + prePaidFuneralCost +
", willCopy='" + willCopy + '\'' +
", preDeathAgentDesignation='" + preDeathAgentDesignation + '\'' +
", medicalAgentDesignation='" + medicalAgentDesignation + '\'' +
", lifeSupportDecision='" + lifeSupportDecision + '\'' +
", portfolioStatus=" + portfolioStatus +
", rejectionReason='" + rejectionReason + '\'' +
'}';
}
}

@ -46,4 +46,10 @@ public class UserRegisterParam {
@Schema(description = "用户id" )
private Long userId;
@Schema(description = "手机号" )
private String phone;
@Schema(description = "验证码" )
private String verificationCode;
}

@ -1,5 +1,6 @@
# \u4E03\u725B\u4E91\u914D\u7F6E
shop.qiniu.resourcesUrl=https://img.jintongapp.com/
shop.qiniu.resourcesUrl=https://img.mall4j.com/
; shop.qiniu.resourcesUrl=https://img.mall4j.com/
shop.qiniu.accessKey=gfzcyBDr9cd5FTForpe7HJGzELLJxztTtHhUmh6o
shop.qiniu.secretKey=zs4K9rT4Hxa3jo5OL_V2Aq5oM8yXw_O1F2jlvlJJ
shop.qiniu.bucket=****

@ -27,6 +27,8 @@ import java.util.Map;
* @author lanhai
*/
public interface ProductMapper extends BaseMapper<Product> {
Product getById( @Param("portId") String portId);
/**
*
* @param product

@ -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) ;
}

@ -195,6 +195,7 @@ public class BasketServiceImpl extends ServiceImpl<BasketMapper, Basket> impleme
ShopDetail shopDetail = shopDetailService.getShopDetailByShopId(orderItem.getShopId());
shopCartItemDto.setShopId(shopDetail.getShopId());
shopCartItemDto.setShopName(shopDetail.getShopName());
shopCartItemDto.setProductType(prod.getProductType());
return Collections.singletonList(shopCartItemDto);
}
List<ShopCartItemDto> dbShopCartItems = getShopCartItems(userId);

@ -116,9 +116,8 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
@Override
@Cacheable(cacheNames = "product", key = "#prodId")
public Product getProductByProdId(Long prodId) {
return productMapper.selectById(prodId);
return productMapper.getById(prodId.toString());
}
@Override
@Transactional(rollbackFor = Exception.class)
@Caching(evict = {

@ -0,0 +1,138 @@
package com.yami.shop.service.impl;
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.service.SendSmsService;
import org.springframework.stereotype.Service;
@Service
public class SendSmsServiceImpl implements SendSmsService {
@Override
public SendSmsResponse sendSms(String phone, String code) {
try {
/*
* secretIdsecretKey
*
*
*
* SecretIdSecretKey : https://console.cloud.tencent.com/cam/capi */
Credential cred = new Credential("AKID1EXk8c8b0U5lPh2TrEa1QnCeBphR9wka", "sjbOE4sidUlx5EIORRRL6jGkAZDmGb1T");
// 实例化一个http选项可选没有特殊需求可以跳过
HttpProfile httpProfile = new HttpProfile();
// 设置代理(无需要直接忽略)
// httpProfile.setProxyHost("真实代理ip");
// httpProfile.setProxyPort(真实代理端口);
/* SDK使POST
* 使GETGET */
httpProfile.setReqMethod("POST");
/* SDK
* */
httpProfile.setConnTimeout(60);
/* 指定接入地域域名,默认就近地域接入域名为 sms.tencentcloudapi.com ,也支持指定地域域名访问,例如广州地域的域名为 sms.ap-guangzhou.tencentcloudapi.com */
httpProfile.setEndpoint("sms.tencentcloudapi.com");
/* :
* */
ClientProfile clientProfile = new ClientProfile();
/* SDKTC3-HMAC-SHA256
* */
clientProfile.setSignMethod("HmacSHA256");
clientProfile.setHttpProfile(httpProfile);
/* (sms)client
* ap-guangzhou https://cloud.tencent.com/document/api/382/52071#.E5.9C.B0.E5.9F.9F.E5.88.97.E8.A1.A8 */
SmsClient client = new SmsClient(cred, "ap-guangzhou", clientProfile);
/*
* SDK
*
* 使IDE便 */
SendSmsRequest req = new SendSmsRequest();
/* ,request
* request
* :
*
* : https://console.cloud.tencent.com/smsv2
* : https://cloud.tencent.com/document/product/382/3773#.E6.8A.80.E6.9C.AF.E4.BA.A4.E6.B5.81 */
/* 短信应用ID: 短信SdkAppId在 [短信控制台] 添加应用后生成的实际SdkAppId示例如1400006666 */
// 应用 ID 可前往 [短信控制台](https://console.cloud.tencent.com/smsv2/app-manage) 查看
String sdkAppId = "1400878793";
req.setSmsSdkAppId(sdkAppId);
/* 短信签名内容: 使用 UTF-8 编码,必须填写已审核通过的签名 */
// 签名信息可前往 [国内短信](https://console.cloud.tencent.com/smsv2/csms-sign) 或 [国际/港澳台短信](https://console.cloud.tencent.com/smsv2/isms-sign) 的签名管理查看
String signName = "蕊鑫信息科技";
req.setSignName(signName);
/* 模板 ID: 必须填写已审核通过的模板 ID */
// 模板 ID 可前往 [国内短信](https://console.cloud.tencent.com/smsv2/csms-template) 或 [国际/港澳台短信](https://console.cloud.tencent.com/smsv2/isms-template) 的正文模板管理查看
String templateId = "2030693";
req.setTemplateId(templateId);
/* 模板参数: 模板参数的个数需要与 TemplateId 对应模板的变量个数保持一致,若无模板参数,则设置为空 */
String[] templateParamSet = {code};
req.setTemplateParamSet(templateParamSet);
/* E.164 +[][]
* +8613711112222 + 8613711112222200 */
String[] phoneNumberSet = {"+86" + phone};
req.setPhoneNumberSet(phoneNumberSet);
/* 用户的 session 内容(无需要可忽略): 可以携带用户侧 ID 等上下文信息server 会原样返回 */
String sessionContext = "";
req.setSessionContext(sessionContext);
/* 短信码号扩展号(无需要可忽略): 默认未开通,如需开通请联系 [腾讯云短信小助手] */
String extendCode = "";
req.setExtendCode(extendCode);
/* 国内短信无需填写该项;国际/港澳台短信已申请独立 SenderId 需要填写该字段,默认使用公共 SenderId无需填写该字段。注月度使用量达到指定量级可申请独立 SenderId 使用,详情请联系 [腾讯云短信小助手](https://cloud.tencent.com/document/product/382/3773#.E6.8A.80.E6.9C.AF.E4.BA.A4.E6.B5.81)。*/
String senderid = "";
req.setSenderId(senderid);
/* client SendSms
* res SendSmsResponse */
SendSmsResponse res = client.SendSms(req);
return res;
// 输出json格式的字符串回包
// 也可以取出单个值您可以通过官网接口文档或跳转到response对象的定义处查看返回字段的定义
// System.out.println(res.getRequestId());
/*
* [FailedOperation.SignatureIncorrectOrUnapproved](https://cloud.tencent.com/document/product/382/9558#.E7.9F.AD.E4.BF.A1.E5.8F.91.E9.80.81.E6.8F.90.E7.A4.BA.EF.BC.9Afailedoperation.signatureincorrectorunapproved-.E5.A6.82.E4.BD.95.E5.A4.84.E7.90.86.EF.BC.9F)
* [FailedOperation.TemplateIncorrectOrUnapproved](https://cloud.tencent.com/document/product/382/9558#.E7.9F.AD.E4.BF.A1.E5.8F.91.E9.80.81.E6.8F.90.E7.A4.BA.EF.BC.9Afailedoperation.templateincorrectorunapproved-.E5.A6.82.E4.BD.95.E5.A4.84.E7.90.86.EF.BC.9F)
* [UnauthorizedOperation.SmsSdkAppIdVerifyFail](https://cloud.tencent.com/document/product/382/9558#.E7.9F.AD.E4.BF.A1.E5.8F.91.E9.80.81.E6.8F.90.E7.A4.BA.EF.BC.9Aunauthorizedoperation.smssdkappidverifyfail-.E5.A6.82.E4.BD.95.E5.A4.84.E7.90.86.EF.BC.9F)
* [UnsupportedOperation.ContainDomesticAndInternationalPhoneNumber](https://cloud.tencent.com/document/product/382/9558#.E7.9F.AD.E4.BF.A1.E5.8F.91.E9.80.81.E6.8F.90.E7.A4.BA.EF.BC.9Aunsupportedoperation.containdomesticandinternationalphonenumber-.E5.A6.82.E4.BD.95.E5.A4.84.E7.90.86.EF.BC.9F)
* [](https://tccc.qcloud.com/web/im/index.html#/chat?webAppId=8fa15978f85cb41f7e2ea36920cb3ae1&title=Sms)
*/
} catch (TencentCloudSDKException e) {
e.printStackTrace();
}
return null;
}
}

@ -254,5 +254,10 @@
where tp.product_type = 2 and tp.status = 1
</select>
<select id="getById" resultType="com.yami.shop.bean.model.Product">
select * from tz_prod as tp
where prod_id = #{portId}
</select>
</mapper>

@ -22,6 +22,7 @@
<result column="birth_date" jdbcType="CHAR" property="birthDate" />
<result column="pic" jdbcType="VARCHAR" property="pic" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="phone" jdbcType="INTEGER" property="phone" />
</resultMap>
<select id="getUserByUserMail" resultType="com.yami.shop.bean.model.User">

Loading…
Cancel
Save