Browse Source

tt

release_toaliyun_real
xhxu 5 years ago
parent
commit
2019ed1fdd
2 changed files with 29 additions and 6 deletions
  1. +28
    -5
      mallinkTTAdmin/src/main/java/com/iformall/controller/tt/TtCouponController.java
  2. +1
    -1
      mallinkTTAdmin/src/main/java/com/iformall/controller/tt/TtOrderController.java

+ 28
- 5
mallinkTTAdmin/src/main/java/com/iformall/controller/tt/TtCouponController.java View File

@@ -12,6 +12,7 @@ import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.po.tt.TtCoupon;
import com.iformall.domain.po.tt.TtVideoLibrary;
import com.iformall.enums.*;
import com.iformall.exception.MallinkException;
import com.iformall.service.WxBusinessService;
import com.iformall.service.WxFlowService;
import com.iformall.service.WxMerchantService;
@@ -69,7 +70,7 @@ public class TtCouponController extends BaseController {
public ResultData list(@ModelAttribute TtCoupon record, Integer pageNum, Integer pageSize, Integer dataType) {
logger.debug("[" + getIpAddr() + "] TtCouponController::list");
if (record == null) record = new TtCoupon();
record.updateTenantInfo(ifParentUpdateTenantInfo());
record.updateTenantInfo(getTenantInfo());
// if(record.getType() == null || record.getType().equals(EnumTtCouponType.COUPON_SINGLE.getCode())){
// record.setType(EnumTtCouponType.COUPON_SINGLE.getCode());
// }else{
@@ -93,7 +94,13 @@ public class TtCouponController extends BaseController {
if(record == null){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR);
}
TenantEntity tenantEntity = ifParentUpdateAloneTenantInfo();
TenantEntity tenantEntity;
try {
tenantEntity = ifParentUpdateAloneTenantInfo();
} catch (MallinkException e) {
logger.error(e.getMessage());
return new ResultData(e.getErrorCode(), e.getMessage());
}
record.updateTenantInfo(tenantEntity);

if(record.getId() != null){
@@ -198,7 +205,13 @@ public class TtCouponController extends BaseController {
if (record.getId() == null) {
return new ResultData(ResultData.ERROR, "缺少id");
}
TenantEntity tenantEntity = ifParentUpdateAloneTenantInfo();
TenantEntity tenantEntity;
try {
tenantEntity = ifParentUpdateAloneTenantInfo();
} catch (MallinkException e) {
logger.error(e.getMessage());
return new ResultData(e.getErrorCode(), e.getMessage());
}
record.updateTenantInfo(tenantEntity);

TtCoupon coupon = ttCouponService.getById(record.getId());
@@ -317,7 +330,12 @@ public class TtCouponController extends BaseController {
if (id == null) {
return new ResultData(ResultData.ERROR, "缺少id");
}
ifParentTenantInfoAlone();
try {
ifParentTenantInfoAlone();
} catch (MallinkException e) {
logger.error(e.getMessage());
return new ResultData(e.getErrorCode(), e.getMessage());
}
return ttCouponService.auditPass(id);
}

@@ -330,7 +348,12 @@ public class TtCouponController extends BaseController {
if (record.getId() == null) {
return new ResultData(ResultData.ERROR, "缺少id");
}
ifParentTenantInfoAlone();
try {
ifParentTenantInfoAlone();
} catch (MallinkException e) {
logger.error(e.getMessage());
return new ResultData(e.getErrorCode(), e.getMessage());
}
return ttCouponService.auditRejected(record.getId());
}



+ 1
- 1
mallinkTTAdmin/src/main/java/com/iformall/controller/tt/TtOrderController.java View File

@@ -51,7 +51,7 @@ public class TtOrderController extends BaseController {
if (order == null){
order = new TtOrder();
}
order.updateTenantInfo(ifParentUpdateTenantInfo());
order.updateTenantInfo(getTenantInfo());
return new ResultData(ttOrderService.listAsPage(order, pageNum, pageSize));
}



Loading…
Cancel
Save