935090232@qq.com
2022-02-22 85dce973eb29eb2372c76d5b95b30354da9c41c8
zq-erp/src/main/java/com/matrix/system/hive/action/MoneyCardUseController.java
@@ -1,11 +1,10 @@
package com.matrix.system.hive.action;
import com.matrix.component.rabbitmq.RabiitMqTemplate;
import com.matrix.component.asyncmessage.AsyncMessageManager;
import com.matrix.core.constance.MatrixConstance;
import com.matrix.core.exception.GlobleException;
import com.matrix.core.pojo.AjaxResult;
import com.matrix.core.pojo.PaginationVO;
import com.matrix.core.tools.DateUtil;
import com.matrix.core.tools.WebUtil;
import com.matrix.system.common.bean.SysUsers;
import com.matrix.system.constance.Dictionary;
@@ -14,7 +13,7 @@
import com.matrix.system.hive.dao.MoneyCardUseFlowDao;
import com.matrix.system.hive.pojo.CzXkVo;
import com.matrix.system.hive.service.*;
import com.matrix.system.shopXcx.mqTask.MQTaskRouting;
import com.matrix.system.shopXcx.mqTask.AsyncMessageRouting;
import com.matrix.system.wechart.templateMsg.UniformMsgParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@@ -62,10 +61,9 @@
    @Value("${evn}")
    private  String evn;
    @Autowired
    private RabiitMqTemplate rabiitMqTemplate;
    private AsyncMessageManager asyncMessageManager;
    /**
     * 跳转 充值页面
     *
@@ -95,7 +93,7 @@
        //发送微信公众号提醒
        UniformMsgParam uniformMsgParam=new UniformMsgParam(order.getCompanyId(),UniformMsgParam.GZH_CZCG);
        uniformMsgParam.put("orderId",order.getId());
        rabiitMqTemplate.sendMsg(MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG+evn,uniformMsgParam.toJSONString());
        asyncMessageManager.sendMsg(AsyncMessageRouting.SEND_UNIFORM_TEMPLATE_MSG ,uniformMsgParam);
        result.putInMap("orderId",order.getId());
        return result;
@@ -118,6 +116,10 @@
    @RequestMapping(value = "/showCardFlowList")
    public @ResponseBody
    AjaxResult showCardFlowList(MoneyCardUseFlow moneyCardUseFlow, PaginationVO pageVo) {
        MoneyCardUse vipCard = cardUseService.findByVipId(moneyCardUseFlow.getVipId());
        if (vipCard != null) {
            moneyCardUseFlowDao.updateVipCardId(moneyCardUseFlow.getVipId(), vipCard.getId());
        }
        List<MoneyCardUseFlow> dataList = moneyCardUseFlowDao.selectInPage(moneyCardUseFlow, pageVo);
        return AjaxResult.buildSuccessInstance(dataList, moneyCardUseFlowDao.selectTotalRecord(moneyCardUseFlow));
    }
@@ -217,13 +219,11 @@
    /**
     * 补交
     *
     * @throws GlobleException
     * @author jyy
     */
    @RequestMapping(value = "/bj")
    public @ResponseBody
    AjaxResult bj(@RequestBody SysOrder order) throws GlobleException {
    AjaxResult bj(@RequestBody SysOrder order){
        orderService.updateAfterMoney(order);
        return new AjaxResult(AjaxResult.STATUS_SUCCESS, "补交成功");
@@ -299,9 +299,7 @@
                break;
            //如果是冻结状态则要算出冻结的天数,延长有效期
            case Dictionary.TAOCAN_STATUS_DJ:
                MoneyCardUseFreeze freeze = new MoneyCardUseFreeze();
                freeze = moneyCardUseFreezeService.findByMoneyCardUseId(cardUse.getId());
                cardUse.setFailTime(DateUtil.nextNDate(failTime, freeze.getGapDays()));
                break;
            default:
                return new AjaxResult(AjaxResult.STATUS_FAIL, "请选择无效或者冻结的充值卡");