xhxu 5 лет назад
Родитель
Сommit
7ac2b99bb5
5 измененных файлов: 9 добавлений и 13 удалений
  1. +1
    -1
      mallinkService/src/main/java/com/iformall/service/tt/TtOrderService.java
  2. +3
    -3
      mallinkService/src/main/java/com/iformall/service/tt/impl/TtOrderServiceImpl.java
  3. +3
    -3
      mallinkTTCApi/src/main/java/com/iformall/controller/TtCouponController.java
  4. +1
    -5
      mallinkTTCApi/src/main/java/com/iformall/controller/TtOrderController.java
  5. +1
    -1
      mallinkTTCApi/src/main/java/com/iformall/controller/WxMerchantController.java

+ 1
- 1
mallinkService/src/main/java/com/iformall/service/tt/TtOrderService.java Просмотреть файл

@@ -33,7 +33,7 @@ public interface TtOrderService {


TtOrder detail(Long orderId, Long memberId); TtOrder detail(Long orderId, Long memberId);


ResultData createPay(TenantEntity tenantEntity,Long orderId, Long memberId, WxAppinfo appinfo);
ResultData createPay(TenantEntity tenantEntity,Long orderId, Long memberId);


ResultData updateOrderStatus(Long orderId, WxAppinfo cAppInfo, WxPayAccount payAccount); ResultData updateOrderStatus(Long orderId, WxAppinfo cAppInfo, WxPayAccount payAccount);




+ 3
- 3
mallinkService/src/main/java/com/iformall/service/tt/impl/TtOrderServiceImpl.java Просмотреть файл

@@ -204,7 +204,7 @@ public class TtOrderServiceImpl implements TtOrderService {
} }


@Override @Override
public ResultData createPay(TenantEntity tenantEntity,Long orderId, Long memberId, WxAppinfo appInfo) {
public ResultData createPay(TenantEntity tenantEntity,Long orderId, Long memberId) {
TtOrder order = ttOrderMapper.selectById(orderId); TtOrder order = ttOrderMapper.selectById(orderId);
if (null == order) { if (null == order) {
logger.error("pay order, order not allow, orderId: " + orderId); logger.error("pay order, order not allow, orderId: " + orderId);
@@ -213,7 +213,7 @@ public class TtOrderServiceImpl implements TtOrderService {
if(!order.getCUserId().equals(memberId)){ if(!order.getCUserId().equals(memberId)){
return new ResultData(ErrorCode.ORDER_USER_NOT_MATCH); return new ResultData(ErrorCode.ORDER_USER_NOT_MATCH);
} }
TtCUser byId = ttCUserService.getById(memberId, tenantEntity.getTenantId());
TtCUser byId = ttCUserService.getById(memberId, order.getTenantId());
// WxCUserBasicInfo wxCUserBasicInfo = wxCUserBasicInfoService.getById(memberId,tenantEntity.getFinalTenantId()); // WxCUserBasicInfo wxCUserBasicInfo = wxCUserBasicInfoService.getById(memberId,tenantEntity.getFinalTenantId());
// if ( null == wxCUserBasicInfo) { // if ( null == wxCUserBasicInfo) {
if ( byId == null) { if ( byId == null) {
@@ -224,7 +224,7 @@ public class TtOrderServiceImpl implements TtOrderService {
// return new ResultData(ErrorCode.MEMBER_IS_LOCKED); // return new ResultData(ErrorCode.MEMBER_IS_LOCKED);
// } // }


// WxAppinfo appInfo = wxAppinfoService.getByAppId(appId);
WxAppinfo appInfo = wxAppinfoService.getCAppInfo(order, EnumPayWay.PAY_WAY_TT);
if(appInfo == null) { if(appInfo == null) {
return new ResultData(ErrorCode.APP_ID_NOT_FOUND); return new ResultData(ErrorCode.APP_ID_NOT_FOUND);
} }


+ 3
- 3
mallinkTTCApi/src/main/java/com/iformall/controller/TtCouponController.java Просмотреть файл

@@ -139,8 +139,8 @@ public class TtCouponController extends BaseController {
if (id == null) { if (id == null) {
return new ResultData(ResultData.ERROR, "缺少id"); return new ResultData(ResultData.ERROR, "缺少id");
} }
TtCoupon byId = ttCouponService.getById(id);
if(byId == null){
TtCoupon coupon = ttCouponService.getById(id);
if(coupon == null){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR,"找不到数据"); return new ResultData(ErrorCode.SYS_PARAMETER_ERROR,"找不到数据");
} }
Long memberId; Long memberId;
@@ -149,7 +149,7 @@ public class TtCouponController extends BaseController {
} catch (MallinkException e) { } catch (MallinkException e) {
return new ResultData(e.getErrorCode(), e.getMessage()); return new ResultData(e.getErrorCode(), e.getMessage());
} }
ttCouponService.collectCoupon(getTenantInfo(),memberId,byId.getId());
ttCouponService.collectCoupon(coupon,memberId,coupon.getId());
return new ResultData(); return new ResultData();
} }




+ 1
- 5
mallinkTTCApi/src/main/java/com/iformall/controller/TtOrderController.java Просмотреть файл

@@ -170,11 +170,7 @@ public class TtOrderController extends BaseController {
} catch (MallinkException e) { } catch (MallinkException e) {
return new ResultData(e.getErrorCode(), e.getMessage()); return new ResultData(e.getErrorCode(), e.getMessage());
} }
WxAppinfo cAppInfo = wxAppinfoService.getCAppInfo(getTenantInfo(), EnumPayWay.PAY_WAY_TT);
if(cAppInfo == null){
return new ResultData(ErrorCode.APP_ID_NOT_ENABLE);
}
return ttOrderService.createPay(getTenantInfo(),orderId,memberId,cAppInfo);
return ttOrderService.createPay(getTenantInfo(),orderId,memberId);


} }




+ 1
- 1
mallinkTTCApi/src/main/java/com/iformall/controller/WxMerchantController.java Просмотреть файл

@@ -116,7 +116,7 @@ public class WxMerchantController extends BaseController {
} catch (MallinkException e) { } catch (MallinkException e) {
return new ResultData(e.getErrorCode(), e.getMessage()); return new ResultData(e.getErrorCode(), e.getMessage());
} }
wxMerchantService.followMerchant(getTenantInfo(),memberId,byId.getId());
wxMerchantService.followMerchant(byId,memberId,byId.getId());
return new ResultData(); return new ResultData();
} }




Загрузка…
Отмена
Сохранить