| @@ -54,7 +54,7 @@ public class WxCouponChannelController extends BaseController { | |||||
| wxCouponChannel.setStatus(null); | wxCouponChannel.setStatus(null); | ||||
| } | } | ||||
| wxCouponChannel.setTenantId(getUser().getTenantId()); | wxCouponChannel.setTenantId(getUser().getTenantId()); | ||||
| wxCouponChannel.setSortColumns(WxCouponChannel.Field.Id_DESC); | |||||
| wxCouponChannel.setSortColumns(WxCouponChannel.Field.UpdateDate_DESC); | |||||
| final PageInfo<WxCouponChannelVo> page = wxCouponChannelService.listPageCVo(wxCouponChannel, pageNum, pageSize); | final PageInfo<WxCouponChannelVo> page = wxCouponChannelService.listPageCVo(wxCouponChannel, pageNum, pageSize); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -39,7 +39,7 @@ public class WxCouponChannelController extends BaseController { | |||||
| if (null == wxCouponChannel) wxCouponChannel = new WxCouponChannel(); | if (null == wxCouponChannel) wxCouponChannel = new WxCouponChannel(); | ||||
| wxCouponChannel.setTenantId(getTenantId()); | wxCouponChannel.setTenantId(getTenantId()); | ||||
| wxCouponChannel.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode()); | wxCouponChannel.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode()); | ||||
| wxCouponChannel.setSortColumns(WxCouponChannel.Field.CreateDate_DESC); | |||||
| wxCouponChannel.setSortColumns(WxCouponChannel.Field.UpdateDate_DESC); | |||||
| PageInfo<WxCouponChannelVo> page = wxCouponChannelService.listPageCVo(wxCouponChannel, pageNum, pageSize); | PageInfo<WxCouponChannelVo> page = wxCouponChannelService.listPageCVo(wxCouponChannel, pageNum, pageSize); | ||||
| @@ -67,7 +67,6 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { | |||||
| record.setId(idWorker.nextId()); | record.setId(idWorker.nextId()); | ||||
| wxCouponChannelMapper.insertSelective(record); | wxCouponChannelMapper.insertSelective(record); | ||||
| } else { | } else { | ||||
| if (record.getCouponId() != null && record.getStatus() != null) { | if (record.getCouponId() != null && record.getStatus() != null) { | ||||
| WxCouponChannel orignal = getById(record.getId()); | WxCouponChannel orignal = getById(record.getId()); | ||||
| if (orignal.getStatus().equals(EnumCouponChannelStatus.STATUS_TAKE_OFFF.getCode()) | if (orignal.getStatus().equals(EnumCouponChannelStatus.STATUS_TAKE_OFFF.getCode()) | ||||
| @@ -100,6 +99,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { | |||||
| wxOrderService.updateOrderGroupStatusByCouponChannelId(record.getId(), record.getTenantId(), EnumOrderStatus.ORDER_STATUS_COOPERATING_CANCEL.getCode()); | wxOrderService.updateOrderGroupStatusByCouponChannelId(record.getId(), record.getTenantId(), EnumOrderStatus.ORDER_STATUS_COOPERATING_CANCEL.getCode()); | ||||
| } | } | ||||
| } | } | ||||
| record.setUpdateDate(new Date()); | |||||
| wxCouponChannelMapper.updateByPrimaryKeySelective(record); | wxCouponChannelMapper.updateByPrimaryKeySelective(record); | ||||
| } | } | ||||
| return new ResultData(); | return new ResultData(); | ||||