Commit a010e3ad by 刘鑫

Merge branch 'develop' of https://gitlab.dituhui.com/bsh/project/project into develop-16542

2 parents 0ceaf43d 85e1a4ed
...@@ -134,7 +134,9 @@ public enum StatusCodeEnum { ...@@ -134,7 +134,9 @@ public enum StatusCodeEnum {
FENDAN_IS_TRANSCEND("024", "分单超派", false), FENDAN_IS_TRANSCEND("024", "分单超派", false),
RESOURCE_USER_EXISTS_ROLE("025", "用绑定用户的角色不允许删除,需要解绑后才可以删除角色", false); RESOURCE_USER_EXISTS_ROLE("025", "用绑定用户的角色不允许删除,需要解绑后才可以删除角色", false),
ORDER_EXISTS("026", "订单已存在", false);
/** /**
* 状态码 * 状态码
......
...@@ -28,8 +28,7 @@ import java.util.Map; ...@@ -28,8 +28,7 @@ import java.util.Map;
@Slf4j @Slf4j
public class SaasUtils { public class SaasUtils {
// todo @Value("SaaS.ak")
@Value("284c57cbabad4755a9c657885a8df3e2")
String ak; String ak;
@Value("${SaaS.url}") @Value("${SaaS.url}")
......
package com.dituhui.pea.order.dao; package com.dituhui.pea.order.dao;
import com.dituhui.pea.order.entity.OrgTeamEntity; import com.dituhui.pea.order.entity.OrgTeamEntity;
import org.hibernate.annotations.Where;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
...@@ -12,6 +13,7 @@ import org.springframework.stereotype.Repository; ...@@ -12,6 +13,7 @@ import org.springframework.stereotype.Repository;
import java.util.List; import java.util.List;
@Repository @Repository
@Where(clause = "status = 1")
public interface OrgTeamDao extends JpaRepository<OrgTeamEntity, Integer>, JpaSpecificationExecutor<OrgTeamEntity> { public interface OrgTeamDao extends JpaRepository<OrgTeamEntity, Integer>, JpaSpecificationExecutor<OrgTeamEntity> {
@Query("select t from OrgTeamEntity t where t.clusterId = :clusterId and t.status=1") @Query("select t from OrgTeamEntity t where t.clusterId = :clusterId and t.status=1")
......
...@@ -12,6 +12,7 @@ import java.util.List; ...@@ -12,6 +12,7 @@ import java.util.List;
@Repository @Repository
@Where(clause = "status = 1")
public interface OrgTeamEngineerDao extends JpaRepository<OrgTeamEngineerEntity, Integer> { public interface OrgTeamEngineerDao extends JpaRepository<OrgTeamEngineerEntity, Integer> {
@Query("select t from OrgTeamEngineerEntity t where t.teamId = :teamId and t.status=1") @Query("select t from OrgTeamEngineerEntity t where t.teamId = :teamId and t.status=1")
......
...@@ -135,6 +135,10 @@ public class OrderCreateServiceImpl implements OrderCreateService { ...@@ -135,6 +135,10 @@ public class OrderCreateServiceImpl implements OrderCreateService {
String s = UUID.randomUUID().toString().replace("-", ""); String s = UUID.randomUUID().toString().replace("-", "");
orderId = s.substring(s.length() - 9); orderId = s.substring(s.length() - 9);
} }
OrderInfoEntity byOrderId = orderInfoDao.getByOrderId(req.getOrderId());
if (ObjectUtil.isNull(byOrderId)) {
return Result.failed(StatusCodeEnum.ORDER_EXISTS);
}
// 分单处理 // 分单处理
String peaBrand = fixBrand(req.getBrand()); String peaBrand = fixBrand(req.getBrand());
......
...@@ -177,7 +177,7 @@ public class OrderInfoServiceImpl implements OrderInfoService { ...@@ -177,7 +177,7 @@ public class OrderInfoServiceImpl implements OrderInfoService {
location.setAddressId(orderInfo.getAddressId()); location.setAddressId(orderInfo.getAddressId());
} else { } else {
orderInfo.setX(location.getLongitude().toString()); orderInfo.setX(location.getLongitude().toString());
orderInfo.setY(location.getLongitude().toString()); orderInfo.setY(location.getLatitude().toString());
orderInfo.setAddress(location.getAddress()); orderInfo.setAddress(location.getAddress());
orderInfo.setAddressId(location.getAddressId()); orderInfo.setAddressId(location.getAddressId());
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!