|
|
@@ -5,10 +5,12 @@ import cn.com.taiji.common.manager.ManagerException; |
|
|
|
import cn.com.taiji.common.manager.net.http.ServiceHandleException; |
|
|
|
import cn.com.taiji.common.model.dao.Pagination; |
|
|
|
import cn.com.taiji.core.entity.dict.basic.SourceType; |
|
|
|
import cn.com.taiji.core.entity.issue.IssueProduct; |
|
|
|
import cn.com.taiji.core.entity.user.Staff; |
|
|
|
import cn.com.taiji.core.model.comm.protocol.ias.order.OrderInitRequest; |
|
|
|
import cn.com.taiji.core.model.comm.protocol.ias.order.OrderInitResponse; |
|
|
|
import cn.com.taiji.core.repo.jpa.issue.IssueOrderinfoRepo; |
|
|
|
import cn.com.taiji.core.repo.jpa.issue.IssueProductRepo; |
|
|
|
import cn.com.taiji.core.repo.jpa.user.StaffRepo; |
|
|
|
import cn.com.taiji.iaw.dto.issue.OrderAppPageReqDTO; |
|
|
|
import cn.com.taiji.iaw.dto.issue.OrderCreateReqDTO; |
|
|
@@ -32,6 +34,8 @@ public class IssueOrderManageImpl extends AbstractCommManager implements IssueOr |
|
|
|
private IssueOrderinfoRepo issueOrderinfoRepo; |
|
|
|
@Autowired |
|
|
|
private StaffRepo staffRepo; |
|
|
|
@Autowired |
|
|
|
private IssueProductRepo issueProductRepo; |
|
|
|
|
|
|
|
@Override |
|
|
|
public Pagination mOrderPage(OrderMinPageReqDTO reqDto) throws ServiceHandleException { |
|
|
@@ -52,10 +56,11 @@ public class IssueOrderManageImpl extends AbstractCommManager implements IssueOr |
|
|
|
|
|
|
|
@Override |
|
|
|
public String add(OrderCreateReqDTO reqDto) throws ManagerException { |
|
|
|
IssueProduct product = issueProductRepo.findByReleaseId(reqDto.getProductId()); |
|
|
|
OrderInitRequest request = copyProperties(reqDto, new OrderInitRequest()); |
|
|
|
|
|
|
|
if (SourceType.WECHAT == reqDto.getOrderSource()){ |
|
|
|
request.setAgentId("52010106004"); |
|
|
|
request.setAgentId(product.getAgencyId()); |
|
|
|
request.setChannelId("5201010200601130001"); |
|
|
|
request.setOpenId(findOpenIdByToken(reqDto.getAccessToken())); |
|
|
|
} |
|
|
@@ -66,7 +71,7 @@ public class IssueOrderManageImpl extends AbstractCommManager implements IssueOr |
|
|
|
request.setStaffNum(reqDto.getStaffId()); |
|
|
|
} |
|
|
|
if (SourceType.ALI == reqDto.getOrderSource()){ |
|
|
|
request.setAgentId("52010106004"); |
|
|
|
request.setAgentId(product.getAgencyId()); |
|
|
|
request.setChannelId("5201010600401140003"); |
|
|
|
request.setOpenId(findOpenIdByToken(reqDto.getAccessToken())); |
|
|
|
} |