|
|
@ -1,15 +1,20 @@ |
|
|
|
package com.hai.service.impl; |
|
|
|
package com.hai.service.impl; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.hai.common.utils.DateUtil; |
|
|
|
import com.hai.dao.HighGoodsPriceReferMapper; |
|
|
|
import com.hai.dao.HighGoodsPriceReferMapper; |
|
|
|
import com.hai.entity.HighGoodsPriceRefer; |
|
|
|
import com.hai.entity.*; |
|
|
|
import com.hai.entity.HighGoodsPriceReferExample; |
|
|
|
import com.hai.enum_type.ApproveType; |
|
|
|
import com.hai.entity.HighMerchant; |
|
|
|
import com.hai.service.HighApproveService; |
|
|
|
|
|
|
|
import com.hai.service.HighCouponService; |
|
|
|
import com.hai.service.HighGoodsPriceReferService; |
|
|
|
import com.hai.service.HighGoodsPriceReferService; |
|
|
|
import org.apache.commons.collections4.MapUtils; |
|
|
|
import org.apache.commons.collections4.MapUtils; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import org.springframework.transaction.annotation.Propagation; |
|
|
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import javax.annotation.Resource; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
|
|
import java.util.Date; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
@ -24,6 +29,12 @@ public class HighGoodsPriceReferServiceImpl implements HighGoodsPriceReferServic |
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private HighGoodsPriceReferMapper highGoodsPriceReferMapper; |
|
|
|
private HighGoodsPriceReferMapper highGoodsPriceReferMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private HighApproveService highApproveService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private HighCouponService highCouponService; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void insertPriceRefer(HighGoodsPriceRefer highGoodsPriceRefer) { |
|
|
|
public void insertPriceRefer(HighGoodsPriceRefer highGoodsPriceRefer) { |
|
|
|
highGoodsPriceReferMapper.insert(highGoodsPriceRefer); |
|
|
|
highGoodsPriceReferMapper.insert(highGoodsPriceRefer); |
|
|
@ -35,9 +46,22 @@ public class HighGoodsPriceReferServiceImpl implements HighGoodsPriceReferServic |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void submitApprove(HighGoodsPriceRefer highGoodsPriceRefer) { |
|
|
|
@Transactional(propagation= Propagation.REQUIRES_NEW) |
|
|
|
|
|
|
|
public void submitApprove(HighGoodsPriceRefer highGoodsPriceRefer) throws Exception { |
|
|
|
insertPriceRefer(highGoodsPriceRefer); |
|
|
|
insertPriceRefer(highGoodsPriceRefer); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HighApprove approve = new HighApprove(); |
|
|
|
|
|
|
|
approve.setObjectType(ApproveType.UP_SHELF_APPROVE.getType()); |
|
|
|
|
|
|
|
approve.setObjectId(highGoodsPriceRefer.getId()); |
|
|
|
|
|
|
|
approve.setObjectName(highCouponService.getCouponById(highGoodsPriceRefer.getObjectId()).getCouponName()); |
|
|
|
|
|
|
|
approve.setApproveSerialNo(DateUtil.date2String(new Date(), "yyyyMMddHHmmss")); |
|
|
|
|
|
|
|
approve.setStatus(1); |
|
|
|
|
|
|
|
approve.setCreateTime(new Date()); |
|
|
|
|
|
|
|
approve.setUpdateTime(new Date()); |
|
|
|
|
|
|
|
approve.setSubmitOperatorId(highGoodsPriceRefer.getOperatorId()); |
|
|
|
|
|
|
|
approve.setSubmitOperatorName(highGoodsPriceRefer.getOperatorName()); |
|
|
|
|
|
|
|
highApproveService.insertApprove(approve); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|