|
@@ -670,10 +670,20 @@ public class FsPackageOrderServiceImpl implements IFsPackageOrderService
|
|
|
@Transactional
|
|
@Transactional
|
|
|
public R createOrder1(FsPackageOrderCreateParam param) {
|
|
public R createOrder1(FsPackageOrderCreateParam param) {
|
|
|
logger.info("创建订单传参:{}",param);
|
|
logger.info("创建订单传参:{}",param);
|
|
|
|
|
+ FsUserAddress address = null;
|
|
|
FsUser user=userService.selectFsUserByUserId(param.getUserId());
|
|
FsUser user=userService.selectFsUserByUserId(param.getUserId());
|
|
|
if(user.getStatus()!=1){
|
|
if(user.getStatus()!=1){
|
|
|
return R.error("非法用户操作");
|
|
return R.error("非法用户操作");
|
|
|
}
|
|
}
|
|
|
|
|
+ FsUserInformationCollection collection = userInformationCollectionMapper.selectFsUserInformationCollectionById(param.getCollectionId());
|
|
|
|
|
+ if (collection != null) {
|
|
|
|
|
+ if (collection.getIsPackage() == 1 && !(collection.getAmount().compareTo(new BigDecimal(0))==1) && collection.getPayType() == 2) {
|
|
|
|
|
+ address = userAddressService.selectFsUserAddressByDefault(param.getUserId());
|
|
|
|
|
+ if (address == null) {
|
|
|
|
|
+ return R.error("联系销售添加默认收货地址");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
FsPatient patient=null;
|
|
FsPatient patient=null;
|
|
|
FsDoctor doctor=null;
|
|
FsDoctor doctor=null;
|
|
|
FsPackage fsPackage=fsPackageMapper.selectFsPackageByPackageId(param.getPackageId());
|
|
FsPackage fsPackage=fsPackageMapper.selectFsPackageByPackageId(param.getPackageId());
|
|
@@ -814,7 +824,6 @@ public class FsPackageOrderServiceImpl implements IFsPackageOrderService
|
|
|
|
|
|
|
|
//用户信息采集分享
|
|
//用户信息采集分享
|
|
|
if(param.getCollectionId() != null) {
|
|
if(param.getCollectionId() != null) {
|
|
|
- FsUserInformationCollection collection = userInformationCollectionMapper.selectFsUserInformationCollectionById(param.getCollectionId());
|
|
|
|
|
//更新用户采集信息订单表
|
|
//更新用户采集信息订单表
|
|
|
if(collection != null) {
|
|
if(collection != null) {
|
|
|
FsUserInformationCollection collectionUser = new FsUserInformationCollection();
|
|
FsUserInformationCollection collectionUser = new FsUserInformationCollection();
|
|
@@ -842,10 +851,7 @@ public class FsPackageOrderServiceImpl implements IFsPackageOrderService
|
|
|
mapOrder.setDiscountMoney((BigDecimal)moneys.get("discountMoney"));
|
|
mapOrder.setDiscountMoney((BigDecimal)moneys.get("discountMoney"));
|
|
|
mapOrder.setPayRemain((BigDecimal)moneys.get("payRemain"));
|
|
mapOrder.setPayRemain((BigDecimal)moneys.get("payRemain"));
|
|
|
//地址处理
|
|
//地址处理
|
|
|
- FsUserAddress address = userAddressService.selectFsUserAddressByDefault(param.getUserId());
|
|
|
|
|
- if (address == null) {
|
|
|
|
|
- return R.error("联系销售添加默认收货地址");
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
Map<String, String> myMap = new HashMap<>();
|
|
Map<String, String> myMap = new HashMap<>();
|
|
|
myMap.put("userName", address.getRealName().trim());
|
|
myMap.put("userName", address.getRealName().trim());
|
|
|
myMap.put("userPhone", address.getPhone().trim());
|
|
myMap.put("userPhone", address.getPhone().trim());
|