Pu Zhibing
4 天以前 5dacdee9b54c78372b68140e2b068d03a620eab9
ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TVerifiedController.java
@@ -2,25 +2,22 @@
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;
import com.stylefeng.guns.core.util.SinataUtil;
import com.stylefeng.guns.modular.system.model.TSystemNotice;
import com.stylefeng.guns.modular.system.model.TUser;
import com.stylefeng.guns.modular.system.model.TVerified;
import com.stylefeng.guns.modular.system.service.ITSystemNoticeService;
import com.stylefeng.guns.modular.system.service.ITUserService;
import com.stylefeng.guns.modular.system.service.ITVerifiedService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.beans.factory.annotation.Autowired;
import com.stylefeng.guns.core.log.LogObjectHolder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import com.stylefeng.guns.modular.system.model.TVerified;
import com.stylefeng.guns.modular.system.service.ITVerifiedService;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Date;
import javax.annotation.Resource;
import java.util.Map;
/**
@@ -32,18 +29,20 @@
@Controller
@RequestMapping("/tVerified")
public class TVerifiedController extends BaseController {
    private String PREFIX = "/system/tVerified/";
    @Autowired
    private ITVerifiedService tVerifiedService;
    @Autowired
    private ITSystemNoticeService tSystemNoticeService;
    @Autowired
    private ITUserService tUserService;
    @Resource
    private ShiroExtUtil shiroExtUtil;
    /**
     * 跳转到实名认证列表首页
     */
@@ -51,7 +50,7 @@
    public String index() {
        return PREFIX + "tVerified.html";
    }
    /**
     * 跳转到添加实名认证列表
     */
@@ -81,16 +80,16 @@
                       Integer state) {
        String beginTime = null;
        String endTime = null;
        if (SinataUtil.isNotEmpty(insertTime)){
        if (SinataUtil.isNotEmpty(insertTime)) {
            String[] timeArray = insertTime.split(" - ");
            beginTime = timeArray[0];
            endTime = timeArray[1];
        }
        Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage();
        if (ShiroKit.getUser().getRoleType() != 1){
        if (shiroExtUtil.getUser().getRoleType() != 1) {
            page.setRecords(null);
        }else{
            page.setRecords(tVerifiedService.getVerifiedList(page,beginTime,endTime,userName,userPhone,name,state));
        } else {
            page.setRecords(tVerifiedService.getVerifiedList(page, beginTime, endTime, userName, userPhone, name, state));
        }
        return super.packForBT(page);
    }