| | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.modular.system.enums.StatusEnum; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | EntityWrapper<TEdition> wrapper = new EntityWrapper<>(); |
| | | if(StringUtils.hasLength(createTime)){ |
| | | String[] split = createTime.split(" - "); |
| | | Date startTime = DateUtil.getDate_str4(split[0]); |
| | | Date endTime = DateUtil.getDate_str4(split[1]); |
| | | Date startTime = DateUtil.getDate_str3(split[0]+" 00:00:00"); |
| | | Date endTime = DateUtil.getDate_str3(split[1]+" 23:59:59"); |
| | | wrapper.between("createTime",startTime,endTime); |
| | | } |
| | | if(StringUtils.hasLength(editionNo)){ |
| | | wrapper.like("editionNo",editionNo); |
| | | } |
| | | wrapper.ne("status", StatusEnum.DELETE.getCode()); |
| | | wrapper.orderBy("createTime",false); |
| | | return tEditionService.selectList(wrapper); |
| | | } |
| | | |
| | |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tEditionId) { |
| | | tEditionService.deleteById(tEditionId); |
| | | TEdition tEdition = tEditionService.selectById(tEditionId); |
| | | tEdition.setStatus(StatusEnum.DELETE.getCode()); |
| | | tEditionService.updateById(tEdition); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |