|
|
|
@@ -4,6 +4,7 @@ import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.iformall.common.IdWorker; |
|
|
|
import com.iformall.common.Result; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.domain.po.*; |
|
|
|
@@ -69,6 +70,8 @@ public class WxPressBatchServiceImpl implements WxPressBatchService { |
|
|
|
@Override |
|
|
|
public void saveOrUpdate(WxPressBatch record) { |
|
|
|
if (null == record.getId()) { |
|
|
|
final IdWorker idWorker = IdWorker.get(); |
|
|
|
record.setId(idWorker.nextId()); |
|
|
|
record.setCreateDate(new Date()); |
|
|
|
record.setUpdateDate(new Date()); |
|
|
|
wxPressBatchMapper.insert(record); |
|
|
|
@@ -106,8 +109,8 @@ public class WxPressBatchServiceImpl implements WxPressBatchService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) |
|
|
|
@Override |
|
|
|
public void deleteBatch(Long id, String tenantId) { |
|
|
|
wxPressBatchMapper.deleteById(id, tenantId); |
|
|
|
deleteItemByBatchId(id, tenantId); |
|
|
|
@@ -128,6 +131,17 @@ public class WxPressBatchServiceImpl implements WxPressBatchService { |
|
|
|
iteq.setPressBatchId(batchId); |
|
|
|
wxPressBatchItemMapper.deleteAllItem(iteq); |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) |
|
|
|
@Override |
|
|
|
public void updateStatus(WxPressBatch pressBatch) { |
|
|
|
wxPressBatchMapper.updateWxPressBatchStatus(pressBatch); |
|
|
|
WxPressBatchItem item = new WxPressBatchItem(); |
|
|
|
item.updateTenantInfo(pressBatch); |
|
|
|
item.setPressBatchId(pressBatch.getId()); |
|
|
|
item.setPressBatchStatus(pressBatch.getStatus()); |
|
|
|
wxPressBatchItemMapper.updateWxPressBatchStatus(item); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public ResultData checkBargainerPressBatchRule(WxOrder order, Long cUserId) { |
|
|
|
@@ -202,5 +216,4 @@ public class WxPressBatchServiceImpl implements WxPressBatchService { |
|
|
|
} |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
} |