Pu Zhibing
4 天以前 25cf266e99714ac5d428e66b40ce272325c91dd8
ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/SysCouponRecordController.java
@@ -4,6 +4,7 @@
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.stylefeng.guns.core.base.controller.BaseController;
import com.stylefeng.guns.core.beetl.ShiroExtUtil;
import com.stylefeng.guns.core.common.constant.factory.PageFactory;
import com.stylefeng.guns.core.shiro.ShiroKit;
@@ -93,8 +94,8 @@
        if(SinataUtil.isNotEmpty(couponType)){
            wrapper.eq("couponType",couponType);
        }
        wrapper.eq("companyId",ShiroKit.getUser().getObjectId());
        wrapper.eq("companyType",ShiroKit.getUser().getRoleType());
        wrapper.eq("companyId", ShiroExtUtil.getUser().getObjectId());
        wrapper.eq("companyType", ShiroExtUtil.getUser().getRoleType());
        wrapper.orderBy("id",false);
        return super.packForBT(sysCouponRecordService.selectPage(page,wrapper));
    }
@@ -106,8 +107,8 @@
    @ResponseBody
    public Object add(SysCouponRecord sysCouponRecord) {
        sysCouponRecord.setInsertTime(new Date());
        sysCouponRecord.setCompanyId(ShiroKit.getUser().getObjectId());
        sysCouponRecord.setCompanyType(ShiroKit.getUser().getRoleType());
        sysCouponRecord.setCompanyId(ShiroExtUtil.getUser().getObjectId());
        sysCouponRecord.setCompanyType(ShiroExtUtil.getUser().getRoleType());
        sysCouponRecordService.insert(sysCouponRecord);
        return SUCCESS_TIP;
    }