|
|
|
@ -368,6 +368,7 @@ public class BsDiscountUserServiceImpl implements BsDiscountUserService { |
|
|
|
|
public BsDiscountUser getDetailByCodeId(Long stockCodeId) { |
|
|
|
|
BsDiscountUserExample example = new BsDiscountUserExample(); |
|
|
|
|
example.createCriteria().andDiscountStockCodeEqualTo(stockCodeId).andStatusNotEqualTo(DiscountUserStatusEnum.type0.getCode()); |
|
|
|
|
example.setOrderByClause("create_time desc"); |
|
|
|
|
List<BsDiscountUser> list = discountUserMapper.selectByExample(example); |
|
|
|
|
if (!list.isEmpty()) { |
|
|
|
|
return list.get(0); |
|
|
|
@ -382,6 +383,7 @@ public class BsDiscountUserServiceImpl implements BsDiscountUserService { |
|
|
|
|
.andUserPhoneEqualTo(phone) |
|
|
|
|
.andDiscountStockCodeEqualTo(stockCodeId) |
|
|
|
|
.andStatusNotEqualTo(DiscountUserStatusEnum.type0.getCode()); |
|
|
|
|
example.setOrderByClause("create_time desc"); |
|
|
|
|
List<BsDiscountUser> list = discountUserMapper.selectByExample(example); |
|
|
|
|
if (!list.isEmpty()) { |
|
|
|
|
return list.get(0); |
|
|
|
|