Merge branch 'score-shop' of http://120.27.238.55:7000/r/xzx into score-shop
2 files added
6 files modified
| | |
| | | import com.xzx.gc.order.dto.*; |
| | | import com.xzx.gc.order.mapper.*; |
| | | import com.xzx.gc.order.service.*; |
| | | import com.xzx.gc.order.vo.InviteUserOrderVo; |
| | | import com.xzx.gc.util.DoubleUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation("邀请好友下单明细") |
| | | @ApiResponses( |
| | | @ApiResponse(code = 200, message = "success", response = InviteUserOrderVo.class) |
| | | ) |
| | | @PostMapping(value = Constants.ADMIN_VIEW_PREFIX + "/user/inviteUserQsOrderDetails.json") |
| | | public JsonResult<Object> inviteUserQsOrderDetails(@RequestBody InviteUserOrderDetailsDto detailsDto, HttpServletRequest request) { |
| | | String userId = getUserId(request); |
| | | detailsDto.setUserId(userId); |
| | | return JsonResult.success(orderService.inviteUserOrderDetail(detailsDto)); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | package com.xzx.gc.order.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2021-08-25 |
| | | **/ |
| | | @Data |
| | | @ApiModel(value = "InviteUserOrderDetailsDto", description = "邀请好友下单明细接收参数类") |
| | | public class InviteUserOrderDetailsDto { |
| | | |
| | | @ApiModelProperty(value = "第几页", required = true) |
| | | private int page; |
| | | |
| | | @ApiModelProperty(value = "每一页数量", required = true) |
| | | private int limit; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private String userId; |
| | | |
| | | @ApiModelProperty(value = "1-骑手单 2-集货员单") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private String phone; |
| | | } |
| | |
| | | |
| | | import com.xzx.gc.entity.JhyInfo; |
| | | import com.xzx.gc.entity.JhyOrder; |
| | | import com.xzx.gc.order.dto.InviteUserOrderDetailsDto; |
| | | import com.xzx.gc.order.dto.JhyOrderListDto; |
| | | import com.xzx.gc.order.vo.InviteUserOrderVo; |
| | | import com.xzx.gc.order.vo.JhyOrderListVo; |
| | | import com.xzx.gc.order.vo.JhyStatusCountVo; |
| | | import com.xzx.gc.util.GcMapper; |
| | |
| | | List<JhyOrder> selectJhyOrderListByStatus(@Param("list") List<String> list, @Param("userId") String userId); |
| | | |
| | | List<JhyOrder> selectJhyOrderNoWaitAndCancel(@Param("userId") String userId); |
| | | |
| | | List<InviteUserOrderVo> selectInviteUserOrderList(@Param("record") InviteUserOrderDetailsDto detailsDto); |
| | | } |
| | |
| | | import com.xzx.gc.model.user.UserInfoVo; |
| | | import com.xzx.gc.order.dto.CustomOrderDto; |
| | | import com.xzx.gc.order.dto.FindOrderByTimeDto; |
| | | import com.xzx.gc.order.dto.InviteUserOrderDetailsDto; |
| | | import com.xzx.gc.order.dto.OrderCustomDto; |
| | | import com.xzx.gc.order.vo.InviteUserOrderVo; |
| | | import com.xzx.gc.util.GcMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | |
| | | List<OrderInfo> selectOrderNoWaitAndCancel(@Param("userId") String userId); |
| | | |
| | | List<InviteUserOrderVo> selectInviteUserOrderList(@Param("record") InviteUserOrderDetailsDto detailsDto); |
| | | } |
| | | |
| | |
| | | import com.xzx.gc.model.user.*; |
| | | import com.xzx.gc.order.dto.*; |
| | | import com.xzx.gc.order.mapper.*; |
| | | import com.xzx.gc.order.vo.InviteUserOrderVo; |
| | | import com.xzx.gc.service.AccountContext; |
| | | import com.xzx.gc.util.DoubleUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | @Autowired |
| | | private DistribService distribService; |
| | | |
| | | @Autowired |
| | | private JhyOrderMapper jhyOrderMapper; |
| | | |
| | | |
| | | public OrderReserveResDto getReserveTimeNew(OrderReserveResDto orderReserveResDto, String partnerId) { |
| | |
| | | } |
| | | orderDetailService.updateAllById(orderDetailInfo); |
| | | } |
| | | |
| | | public PageInfo<InviteUserOrderVo> inviteUserOrderDetail(InviteUserOrderDetailsDto detailsDto) { |
| | | UserInfo userInfo = userMapper.selectByPrimaryKey(detailsDto.getUserId()); |
| | | if (userInfo == null) { |
| | | throw new RestException("用户不存在"); |
| | | } |
| | | |
| | | detailsDto.setPhone(userInfo.getMobilePhone()); |
| | | List<InviteUserOrderVo> orderVos = new ArrayList<>(); |
| | | PageHelper.startPage(detailsDto.getPage(), detailsDto.getLimit()); |
| | | if (detailsDto.getType() == 1) { |
| | | orderVos = orderMapper.selectInviteUserOrderList(detailsDto); |
| | | } else { |
| | | orderVos = jhyOrderMapper.selectInviteUserOrderList(detailsDto); |
| | | } |
| | | return new PageInfo<>(orderVos); |
| | | } |
| | | } |
New file |
| | |
| | | package com.xzx.gc.order.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2021-08-25 |
| | | **/ |
| | | @Data |
| | | @ApiModel(value = "InviteUserOrderVo", description = "邀请好友下单明细返回参数类") |
| | | public class InviteUserOrderVo { |
| | | |
| | | @ApiModelProperty(value = "订单编号") |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty(value = "用户名称") |
| | | private String username; |
| | | |
| | | @ApiModelProperty(value = "联系方式") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "订单用户") |
| | | private String orderName; |
| | | |
| | | @ApiModelProperty(value = "订单联系方式") |
| | | private String orderPhone; |
| | | |
| | | @ApiModelProperty(value = "预约时间") |
| | | private String time; |
| | | |
| | | @ApiModelProperty(value = "地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "回收类型") |
| | | private String recycleType; |
| | | |
| | | @ApiModelProperty(value = "环保币") |
| | | private BigDecimal coin; |
| | | |
| | | @ApiModelProperty(value = "积分") |
| | | private BigDecimal score; |
| | | |
| | | @ApiModelProperty(value = "状态 骑手(1为待接单,2为服务中,3为待确认,4为待入库,5为完成,6为取消,7为入库中) 集物员(1-待接单2-已接单3-已收款(用户)/待入库(集物员)4-已完成5-已取消)") |
| | | private Integer status; |
| | | } |
| | |
| | | select * from xzx_jhy_order |
| | | where status not in (1, 2, 5) and user_id=#{userId} |
| | | </select> |
| | | |
| | | <select id="selectInviteUserOrderList" resultType="com.xzx.gc.order.vo.InviteUserOrderVo"> |
| | | select |
| | | c.order_no orderNo, |
| | | from_base64(b.nick_name) username, |
| | | b.mobile_phone phone, |
| | | c.username orderName, |
| | | c.phone orderPhone, |
| | | concat(c.reserve_date, ' ', c.reserve_time) time, |
| | | concat(area, address) address, |
| | | group_concat(d.title) recycleType, |
| | | c.status status, |
| | | sum(d.score) score |
| | | from xzx_user_share_info a |
| | | inner join xzx_user_info b on a.register_mobile_phone=b.mobile_phone |
| | | inner join xzx_jhy_order c on b.user_id=c.user_id |
| | | inner join xzx_jhy_order_items d on c.id=d.order_id |
| | | where register_mobile_phone=#{record.phone} |
| | | group by c.order_no |
| | | </select> |
| | | </mapper> |
| | |
| | | select * from xzx_order_info |
| | | where order_status not in ('1', '2', '6') and create_user_id=#{userId} |
| | | </select> |
| | | |
| | | <select id="selectInviteUserOrderList" resultType="com.xzx.gc.order.vo.InviteUserOrderVo"> |
| | | select |
| | | a.order_id orderNo, |
| | | a.username, |
| | | a.mobile_phone phone, |
| | | a.rela_name orderName, |
| | | a.rela_phone orderPhone, |
| | | a.reserve_time time, |
| | | a.address, |
| | | a.order_status status, |
| | | group_concat(a.title) recycleType, |
| | | sum(a.money) coin |
| | | from ( |
| | | select c.order_id, b.mobile_phone, from_base64(b.nick_name) username, c.order_status, c.reserve_time, c.rela_name, c.rela_phone, concat(address_area, address, house_name, house_number, unit_name) address, d.money, e.title |
| | | from xzx_user_share_info a |
| | | inner join xzx_user_info b on a.register_mobile_phone=b.mobile_phone |
| | | inner join xzx_order_info c on b.user_id=c.create_user_id |
| | | left join xzx_order_item_info d on c.order_id=d.order_id and d.weight!='0.0' |
| | | left join xzx_sys_environmental_info e on d.item_type=e.item_type |
| | | where a.mobile_phone=#{record.phone} |
| | | group by c.order_id,c.create_time, d.item_type |
| | | order by c.create_time desc |
| | | ) a |
| | | group by a.order_id |
| | | </select> |
| | | </mapper> |