|
|
@@ -71,12 +71,12 @@ public class MerchantService {
|
|
|
|
|
|
if (ObjectUtil.isNotNull(merchant1)) {
|
|
|
if (merchant1.getStatus().equals(ApplyStatus.PENDING)) {
|
|
|
- return merchantDTO;
|
|
|
- //throw new BusinessException("申请中");
|
|
|
+ //return merchantDTO;
|
|
|
+ throw new BusinessException("申请中");
|
|
|
}
|
|
|
if (merchant1.getStatus().equals(ApplyStatus.PASS)) {
|
|
|
- return merchantDTO;
|
|
|
- //throw new BusinessException("已申请");
|
|
|
+ //return merchantDTO;
|
|
|
+ throw new BusinessException("该手机号已申请");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -130,6 +130,7 @@ public class MerchantService {
|
|
|
.isOpen(false)
|
|
|
.isShow(true)
|
|
|
.type(1)
|
|
|
+ .enabled(true)
|
|
|
.build());
|
|
|
merchantClassificationRepo.save(MerchantClassification.builder()
|
|
|
.merchantId(merchant.getId())
|
|
|
@@ -138,6 +139,7 @@ public class MerchantService {
|
|
|
.isOpen(true)
|
|
|
.isShow(false)
|
|
|
.type(2)
|
|
|
+ .enabled(true)
|
|
|
.build());
|
|
|
merchantClassificationRepo.save(MerchantClassification.builder()
|
|
|
.merchantId(merchant.getId())
|
|
|
@@ -146,6 +148,7 @@ public class MerchantService {
|
|
|
.isOpen(true)
|
|
|
.isShow(false)
|
|
|
.type(3)
|
|
|
+ .enabled(true)
|
|
|
.build());
|
|
|
|
|
|
return merchantDTO;
|
|
|
@@ -368,7 +371,7 @@ public class MerchantService {
|
|
|
/*
|
|
|
距离排序
|
|
|
*/
|
|
|
- public List<Merchant> distanceSorting(Double longitude, Double latitude){
|
|
|
+ public List<Merchant> distanceSorting(Double longitude, Double latitude) {
|
|
|
List<Merchant> merchants = merchantRepo.findAll();
|
|
|
|
|
|
//所有商家要按距离排序规则
|