| @@ -0,0 +1,48 @@ | |||||
| package com.iformall.schedule; | |||||
| import com.iformall.domain.po.WxMall; | |||||
| import com.iformall.domain.vo.WxBillAll; | |||||
| import com.iformall.mapper.WxMallMapper; | |||||
| import com.iformall.service.WxBillAllService; | |||||
| import org.slf4j.Logger; | |||||
| import org.slf4j.LoggerFactory; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.scheduling.annotation.Scheduled; | |||||
| import org.springframework.stereotype.Component; | |||||
| import java.util.List; | |||||
| /** | |||||
| * @author gongbiao | |||||
| */ | |||||
| @Component | |||||
| public class BillStatusSchedule { | |||||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||||
| @Autowired | |||||
| private WxBillAllService wxBillAllService; | |||||
| @Autowired | |||||
| private WxMallMapper wxMallMapper; | |||||
| /** | |||||
| * 每天1点执行 | |||||
| */ | |||||
| @Scheduled(cron = "0 0 1 * * ?") | |||||
| public void updateBillStatus() { | |||||
| logger.info("账单状态更新开始"); | |||||
| List<WxMall> wxMalls = wxMallMapper.findList(null); | |||||
| for (WxMall wxMall : wxMalls) { | |||||
| String tenantId = wxMall.getTenantId(); | |||||
| WxBillAll wxBillAll = new WxBillAll(); | |||||
| wxBillAll.setTenantId(tenantId); | |||||
| wxBillAllService.updateBillStatus(wxBillAll); | |||||
| } | |||||
| logger.info("账单状态更新结束"); | |||||
| } | |||||
| } | |||||
| @@ -239,7 +239,7 @@ public enum ErrorCode{ | |||||
| * 核销 | * 核销 | ||||
| */ | */ | ||||
| VERIFY_ERROR(12050, "核销异常"), | VERIFY_ERROR(12050, "核销异常"), | ||||
| MSG_REPEAT_SEND(12061, "短信重新发送"), | |||||
| MSG_REPEAT_SEND(12061, "短信重复发送"), | |||||
| /** | /** | ||||
| * 解单 | * 解单 | ||||
| @@ -12,19 +12,19 @@ import java.util.Map; | |||||
| */ | */ | ||||
| public interface WxBillAllService { | public interface WxBillAllService { | ||||
| Map<String,Object> listAsPage(WxBillAll wxBillAll, Integer pageNum, Integer pageSize); | |||||
| Map<String, Object> listAsPage(WxBillAll wxBillAll, Integer pageNum, Integer pageSize); | |||||
| List<Map<String,Object>> listBillOweAndWaitPay(WxBillAll wxBillAll); | |||||
| List<Map<String, Object>> listBillOweAndWaitPay(WxBillAll wxBillAll); | |||||
| ResultData listBill(WxBillAll wxBillAll); | ResultData listBill(WxBillAll wxBillAll); | ||||
| void updateBill(Map<String,Object> bill); | |||||
| void updateBill(Map<String, Object> bill); | |||||
| void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillAll wxBillAll); | void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillAll wxBillAll); | ||||
| Object getBillInfo(WxBillAll wxBillAll); | Object getBillInfo(WxBillAll wxBillAll); | ||||
| Long hasOweBill(Long contractId,Integer type); | |||||
| Long hasOweBill(Long contractId, Integer type); | |||||
| /** | /** | ||||
| * 发送待缴通知邮件 | * 发送待缴通知邮件 | ||||
| @@ -38,10 +38,14 @@ public interface WxBillAllService { | |||||
| /** | /** | ||||
| * 欠缴商户分页列表 | * 欠缴商户分页列表 | ||||
| * | |||||
| * @return | * @return | ||||
| */ | */ | ||||
| Map<String, Object> getOweBillAsPage(WxBillAll record, Integer pageNum, Integer pageSize); | Map<String, Object> getOweBillAsPage(WxBillAll record, Integer pageNum, Integer pageSize); | ||||
| void exportOweMerchant(WxBillAll record, HttpServletRequest request, HttpServletResponse response); | void exportOweMerchant(WxBillAll record, HttpServletRequest request, HttpServletResponse response); | ||||
| } | |||||
| void updateBillStatus(WxBillAll record); | |||||
| } | |||||
| @@ -549,8 +549,8 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||||
| return count; | return count; | ||||
| } | } | ||||
| private void updateBillStatus(WxBillAll record) { | |||||
| @Override | |||||
| public void updateBillStatus(WxBillAll record) { | |||||
| logger.info("更新各账单状态开始"); | logger.info("更新各账单状态开始"); | ||||
| //更新其他押金账单 | //更新其他押金账单 | ||||
| //WxBillOtherDeposit wxBillOtherDeposit = new WxBillOtherDeposit(); | //WxBillOtherDeposit wxBillOtherDeposit = new WxBillOtherDeposit(); | ||||