Pu Zhibing
2 天以前 a3698ecb84be4192754d7b2092491e727dbccec7
ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/MerchantActivityController.java
@@ -4,15 +4,17 @@
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.log.LogObjectHolder;
import com.stylefeng.guns.core.shiro.ShiroKit;
import com.stylefeng.guns.core.util.SinataUtil;
import com.stylefeng.guns.core.util.ToolUtil;
import com.stylefeng.guns.modular.system.model.*;
import com.stylefeng.guns.modular.system.model.MerchantActivity;
import com.stylefeng.guns.modular.system.model.MerchantActivitySlave;
import com.stylefeng.guns.modular.system.model.User;
import com.stylefeng.guns.modular.system.model.UserMerchantCoupon;
import com.stylefeng.guns.modular.system.response.MerchantActivityVo;
import com.stylefeng.guns.modular.system.service.*;
import io.swagger.models.auth.In;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -69,7 +71,7 @@
    @RequestMapping("/list")
    @ResponseBody
    public Object list(String startTime, String endTime, Integer type, String merchantName, Integer status) {
        Integer companyId = ShiroKit.getUser().getObjectId();
        Integer companyId = ShiroExtUtil.getUser().getObjectId();
        Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage();
        List<Map<String, Object>> list = merchantActivityService.list(startTime, endTime, type, merchantName, status, companyId, page);
@@ -138,8 +140,8 @@
    @RequestMapping("/add")
    @ResponseBody
    public Object add(@RequestBody MerchantActivity activity) {
        Integer userId = ShiroKit.getUser().getId();
        Integer userId = ShiroExtUtil.getUser().getId();
        User user = userService.selectById(userId);
        if (ToolUtil.isNotEmpty(user)) {
            if (user.getRoleType().equals(2)) {
@@ -354,12 +356,12 @@
    @RequestMapping("/activityExamineList")
    @ResponseBody
    public Object activityExamineList(String startTime, String endTime, Integer type, Integer auditStatus) {
        Integer companyId = null;
        if (ShiroKit.getUser().getRoleType().equals(1)) {
            companyId = ShiroKit.getUser().getObjectId();
        if (ShiroExtUtil.getUser().getRoleType().equals(1)) {
            companyId = ShiroExtUtil.getUser().getObjectId();
        }
        Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage();
        List<Map<String, Object>> list = merchantActivityService.activityExamineList(startTime, endTime, type, auditStatus, companyId, page);
        page.setRecords(list);
@@ -403,8 +405,8 @@
    public Object examine(Integer id, Integer state, String auditNote) {
        MerchantActivity activity = merchantActivityService.selectById(id);
        Integer userId = ShiroKit.getUser().getId();
        Integer userId = ShiroExtUtil.getUser().getId();
        User user = userService.selectById(userId);
        if (ToolUtil.isNotEmpty(activity)) {