| | |
| | | import cn.exrick.xboot.core.common.utils.ResultUtil; |
| | | import cn.exrick.xboot.core.common.vo.PageVo; |
| | | import cn.exrick.xboot.core.common.vo.Result; |
| | | import cn.exrick.xboot.your.entity.OrderStatusCount; |
| | | import cn.exrick.xboot.your.entity.OrderTask2; |
| | | import cn.exrick.xboot.your.entity.OrderTask2Imgs; |
| | | import cn.exrick.xboot.your.entity.QueryRequest; |
| | | import cn.exrick.xboot.your.service.IOrderTask2Service; |
| | | import cn.exrick.xboot.your.vo.ImgSearchVo; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.security.PermitAll; |
| | | import java.util.List; |
| | | |
| | | import static cn.hutool.poi.excel.sax.ElementName.v; |
| | | |
| | | /** |
| | | * @author whj |
| | |
| | | @Api(tags = "订单任务历史表管理接口") |
| | | @RequestMapping("/xboot/orderTask2") |
| | | @Transactional |
| | | @PermitAll |
| | | public class OrderTask2Controller { |
| | | |
| | | @Autowired |
| | |
| | | |
| | | @RequestMapping(value = "/getByPage", method = RequestMethod.GET) |
| | | @ApiOperation(value = "分页获取") |
| | | public Result<IPage<OrderTask2>> getByPage(PageVo page) { |
| | | |
| | | IPage<OrderTask2> data = iOrderTask2Service.page(PageUtil.initMpPage(page)); |
| | | public Result<IPage<OrderTask2>> getByPage(PageVo page,String sendDate,String userName,String customerName,Integer status) { |
| | | QueryWrapper<OrderTask2> wrapper = new QueryWrapper<>(); |
| | | if(StrUtil.isNotEmpty(sendDate)){ |
| | | wrapper.eq("send_date",sendDate); |
| | | } |
| | | if(StrUtil.isNotEmpty(userName)){ |
| | | wrapper.like("user_name","%"+userName+"%"); |
| | | } |
| | | if(StrUtil.isNotEmpty(customerName)){ |
| | | wrapper.like("customer_name","%"+customerName+"%"); |
| | | } |
| | | if(status!=null){ |
| | | wrapper.eq("status",status); |
| | | } |
| | | IPage<OrderTask2> data = iOrderTask2Service.page(PageUtil.initMpPage(page),wrapper); |
| | | return new ResultUtil<IPage<OrderTask2>>().setData(data); |
| | | } |
| | | |
| | | @RequestMapping(value = "/getByPageImgs", method = RequestMethod.GET) |
| | | @ApiOperation(value = "分页获取") |
| | | @PermitAll |
| | | public Result<IPage<OrderTask2Imgs>> getByPageImgs(QueryRequest queryRequest, ImgSearchVo imgSearchVo) { |
| | | IPage<OrderTask2Imgs> data = iOrderTask2Service.getTask2Imgs(imgSearchVo,queryRequest); |
| | | return new ResultUtil<IPage<OrderTask2Imgs>>().setData(data); |
| | | } |
| | | |
| | | @RequestMapping(value = "/insertOrUpdate", method = RequestMethod.POST) |
| | | @ApiOperation(value = "编辑或更新数据") |
| | | public Result<OrderTask2> saveOrUpdate(OrderTask2 orderTask2) { |