6 files modified
2 files added
| | |
| | | private String account; |
| | | |
| | | @ApiModelProperty(value="状态 1-待接单2-服务中3-已收款4-待入库5-已完成6-已取消") |
| | | private String status; |
| | | private Integer status; |
| | | |
| | | @JsonFormat(shape=JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | @ApiModelProperty(value="预约开始时间") |
| | |
| | | @JsonFormat(shape=JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | @ApiModelProperty(value="预约结束时间") |
| | | private Date reserveTimeEnd; |
| | | |
| | | @ApiModelProperty(value="第几页",required=true) |
| | | private int page; |
| | | |
| | | @ApiModelProperty(value="每一页数量",required=true) |
| | | private int limit; |
| | | } |
New file |
| | |
| | | package com.xzx.gc.shop.mapper; |
| | | |
| | | import com.xzx.gc.entity.JhyOrder; |
| | | import com.xzx.gc.shop.dto.QueryJhyOrderListDto; |
| | | import com.xzx.gc.shop.vo.QueryJhyOrderListVo; |
| | | import com.xzx.gc.util.GcMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface JhyOrderMapper extends GcMapper<JhyOrder> { |
| | | |
| | | List<QueryJhyOrderListVo> queryOrderList(@Param("record") QueryJhyOrderListDto model); |
| | | |
| | | } |
| | |
| | | package com.xzx.gc.shop.service; |
| | | |
| | | import cn.hutool.core.convert.Convert; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.xzx.gc.shop.dto.QueryJhyOrderListDto; |
| | | import com.xzx.gc.shop.mapper.JhyOrderMapper; |
| | | import com.xzx.gc.shop.vo.QueryGoodsListVo; |
| | | import com.xzx.gc.shop.vo.QueryJhyOrderListVo; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Service |
| | | @Transactional |
| | | @Slf4j |
| | | public class JhyService { |
| | | |
| | | @Resource |
| | | JhyOrderMapper jhyOrderMapper; |
| | | |
| | | public Map<String, Object> queryOrderList(QueryJhyOrderListDto model) { |
| | | return null; |
| | | PageHelper.startPage(model.getPage(), model.getLimit()); |
| | | List<QueryJhyOrderListVo> maps = jhyOrderMapper.queryOrderList(model); |
| | | PageInfo pageInfo = new PageInfo(maps); |
| | | int count = Convert.toInt(pageInfo.getTotal()); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", maps); |
| | | map.put("count", count); |
| | | map.put("code", 0); |
| | | return map; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.xzx.gc.shop.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @ApiModel(value = "QueryJhyOrderListVo", description = "返回") |
| | | public class QueryJhyOrderListVo { |
| | | |
| | | private Long id; |
| | | @ApiModelProperty(value="订单号") |
| | | private String orderNo; |
| | | @ApiModelProperty(value="联系人") |
| | | private String name; |
| | | @ApiModelProperty(value="手机号") |
| | | private String mobilePhone; |
| | | @ApiModelProperty(value="区域地址") |
| | | private String area; |
| | | @ApiModelProperty(value="详细地址") |
| | | private String address; |
| | | @ApiModelProperty(value="预约时间") |
| | | private String reserveTime; |
| | | @ApiModelProperty(value="订单总金额") |
| | | private BigDecimal totalPrice; |
| | | @ApiModelProperty(value="状态 1-待接单2-服务中3-已收款4-待入库5-已完成6-已取消") |
| | | private Integer status; |
| | | @ApiModelProperty(value="集物员") |
| | | private String username; |
| | | @ApiModelProperty(value="备注") |
| | | private String remark; |
| | | |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.xzx.gc.shop.mapper.JhyOrderMapper"> |
| | | |
| | | <select id="queryOrderList" resultType="com.xzx.gc.shop.vo.QueryJhyOrderListVo"> |
| | | SELECT |
| | | a.id id, |
| | | a.order_no orderNo, |
| | | a.area area, |
| | | a.address address, |
| | | a.reserve_time reserveTime, |
| | | a.status status, |
| | | a.remark remark, |
| | | b.name name, |
| | | b.mobile_phone mobilePhone, |
| | | (select ifnull(sum(price),0) from xzx_jhy_order_items where order_id = a.id) totalPrice, |
| | | d.username username |
| | | FROM |
| | | xzx_jhy_order a |
| | | left join xzx_user_info b on b.user_id = a.user_id |
| | | left join xzx_jhy_info d on d.id = a.jhy_id |
| | | WHERE 1 = 1 |
| | | <if test="record.orderNo != null and record.orderNo != ''"> |
| | | and a.order_no like concat('%',#{record.orderNo},'%') |
| | | </if> |
| | | <if test="record.status != null and record.status != ''"> |
| | | and a.status = #{record.status} |
| | | </if> |
| | | <if test="record.account != null and record.account != ''"> |
| | | and ( b.name like concat('%',#{record.account},'%') |
| | | or b.mobile_phone like concat('%',#{record.account},'%') ) |
| | | </if> |
| | | <if test="record.reserveTimeStart != null"> |
| | | and a.reserve_time >= #{record.reserveTimeStart} |
| | | </if> |
| | | |
| | | <if test="record.reserveTimeEnd != null"> |
| | | and a.reserve_time <= #{record.reserveTimeEnd} |
| | | </if> |
| | | order by a.CREATED_TIME desc |
| | | </select> |
| | | |
| | | |
| | | |
| | | </mapper> |
| | |
| | | </if> |
| | | |
| | | <if test="record.createTimeEnd != null"> |
| | | and a.CREATED_TIME >= #{record.createTimeEnd} |
| | | and a.CREATED_TIME <= #{record.createTimeEnd} |
| | | </if> |
| | | order by a.CREATED_TIME desc |
| | | </select> |
| | |
| | | xzx_score_goods_category a |
| | | WHERE 1 = 1 |
| | | <if test="record.name != null and record.name != ''"> |
| | | and a.name=#{record.name} |
| | | and a.name like concat('%',#{record.name},'%') |
| | | </if> |
| | | <if test="record.categoryIden != null and record.categoryIden != ''"> |
| | | and a.category_iden=#{record.categoryIden} |
| | |
| | | </if> |
| | | |
| | | <if test="createdTimeEnd != null"> |
| | | and a.CREATED_TIME >= #{createdTimeEnd} |
| | | and a.CREATED_TIME <= #{createdTimeEnd} |
| | | </if> |
| | | order by a.CREATED_TIME desc |
| | | </select> |