| | |
| | | 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.util.DateUtil; |
| | | 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.RequestParam; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.SysRedPacketRecord; |
| | | import com.stylefeng.guns.modular.system.service.ISysRedPacketRecordService; |
| | | import com.stylefeng.guns.modular.system.util.DateUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | @Controller |
| | | @RequestMapping("/sysRedPacketRecord") |
| | | public class SysRedPacketRecordController extends BaseController { |
| | | |
| | | |
| | | private String PREFIX = "/system/sysRedPacketRecord/"; |
| | | |
| | | |
| | | @Autowired |
| | | private ISysRedPacketRecordService sysRedPacketRecordService; |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | |
| | | public String index() { |
| | | return PREFIX + "sysRedPacketRecord.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | |
| | | if (SinataUtil.isNotEmpty(createTime)) { |
| | | wrapper.between("insertTime", startTimes, endTimes); |
| | | } |
| | | wrapper.eq("companyId", ShiroExtUtil.getUser().getObjectId()); |
| | | wrapper.eq("companyType", ShiroExtUtil.getUser().getRoleType()); |
| | | wrapper.eq("companyId", shiroExtUtil.getUser().getObjectId()); |
| | | wrapper.eq("companyType", shiroExtUtil.getUser().getRoleType()); |
| | | wrapper.orderBy("id", false); |
| | | return super.packForBT(sysRedPacketRecordService.selectPage(page, wrapper)); |
| | | } |
| | |
| | | @ResponseBody |
| | | public Object add(SysRedPacketRecord sysRedPacketRecord) { |
| | | sysRedPacketRecord.setInsertTime(new Date()); |
| | | sysRedPacketRecord.setCompanyId(ShiroExtUtil.getUser().getObjectId()); |
| | | sysRedPacketRecord.setCompanyType(ShiroExtUtil.getUser().getRoleType()); |
| | | sysRedPacketRecord.setCompanyId(shiroExtUtil.getUser().getObjectId()); |
| | | sysRedPacketRecord.setCompanyType(shiroExtUtil.getUser().getRoleType()); |
| | | sysRedPacketRecordService.insert(sysRedPacketRecord); |
| | | return SUCCESS_TIP; |
| | | } |