| | |
| | | List<Map<String, Integer>> selectMemberOrderStatusCntByUniquecode(@Param("uniqueCode")String uniqueCode); |
| | | |
| | | List<MallOrderInfo> selectOrderByStatusAndPayTime(@Param("status")Integer i, @Param("paytime")DateTime offsetDay); |
| | | |
| | | IPage<MallOrderInfo> selectNewApiOrderListInPage(IPage<MallOrderInfo> page, @Param("record") OrderListDto orderListDto); |
| | | } |
| | |
| | | MallTeamLeader selectByFenceIdAndFenceNameAndLonAndLat(@Param("longitude")Double longitude, @Param("latitude")Double latitude,@Param("fenceId")String gfid, @Param("fenceName")String gfname); |
| | | |
| | | List<MallTeamLeader> getAllMallTeamLeaderList(); |
| | | |
| | | IPage<MallOrderInfo> selectNewApiLeaderOrderListInPage(IPage<MallOrderInfo> page, @Param("record")ApiLeaderOrderListDto apiLeaderOrderListDto); |
| | | } |
| | |
| | | public IPage<AdminMallOrderInfoVo> getOrderListInPage(MallOrderInfoDto mallOrderInfo, QueryRequest request) { |
| | | Page<AdminMallOrderInfoVo> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | IPage<AdminMallOrderInfoVo> adminMallOrderInfoVos = this.baseMapper.selectOrderListInPage(page, mallOrderInfo); |
| | | if(CollUtil.isNotEmpty(adminMallOrderInfoVos.getRecords())){ |
| | | for(AdminMallOrderInfoVo adminMallOrderInfoVo : adminMallOrderInfoVos.getRecords()){ |
| | | Long orderId = adminMallOrderInfoVo.getId(); |
| | | List<MallOrderItem> mallOrderItemList = mallOrderItemMapper.selectListByOrderId(orderId); |
| | | if(CollUtil.isNotEmpty(mallOrderItemList)){ |
| | | StringBuffer stringBuffer = new StringBuffer(); |
| | | for(MallOrderItem mallOrderItem : mallOrderItemList){ |
| | | stringBuffer.append(mallOrderItem.getGoodsName()).append("*").append(mallOrderItem.getCnt()).append(";"); |
| | | } |
| | | adminMallOrderInfoVo.setGoodsName(stringBuffer.toString()); |
| | | } |
| | | } |
| | | } |
| | | return adminMallOrderInfoVos; |
| | | } |
| | | |
| | |
| | | apiLeaderInfoVo.setDetailAddress(mallTeamLeader.getDetailAddress()); |
| | | apiLeaderInfoVo.setAddressArea(mallTeamLeader.getAddressArea()); |
| | | MallElectronicFence mallElectronicFence = mallElectronicFenceMapper.selectByTeamLeaderCode(mallTeamLeader.getUniqueCode()); |
| | | String longLatStr = mallElectronicFence.getLonglatiarr(); |
| | | apiLeaderInfoVo.setLonglatiarr(longLatStr); |
| | | if(ObjectUtil.isNotEmpty(mallElectronicFence)){ |
| | | String longLatStr = mallElectronicFence.getLonglatiarr(); |
| | | apiLeaderInfoVo.setLonglatiarr(longLatStr); |
| | | } |
| | | return new FebsResponse().success().data(apiLeaderInfoVo); |
| | | } |
| | | |
| | |
| | | MallMember member = LoginUserUtil.getLoginUser(); |
| | | IPage<MallOrderInfo> page = new Page<>(apiLeaderOrderListDto.getPageNum(), apiLeaderOrderListDto.getPageSize()); |
| | | apiLeaderOrderListDto.setMemberId(member.getId()); |
| | | IPage<MallOrderInfo> mallOrderInfos = this.baseMapper.selectApiLeaderOrderListInPage(page, apiLeaderOrderListDto); |
| | | // IPage<MallOrderInfo> mallOrderInfos = this.baseMapper.selectApiLeaderOrderListInPage(page, apiLeaderOrderListDto); |
| | | IPage<MallOrderInfo> mallOrderInfos = this.baseMapper.selectNewApiLeaderOrderListInPage(page, apiLeaderOrderListDto); |
| | | if(CollUtil.isNotEmpty(mallOrderInfos.getRecords())){ |
| | | for(MallOrderInfo mallOrderInfo : mallOrderInfos.getRecords()){ |
| | | Long orderInfoId = mallOrderInfo.getId(); |
| | | List<MallOrderItem> mallOrderItemList = mallOrderItemMapper.selectListByOrderId(orderInfoId); |
| | | if(CollUtil.isNotEmpty(mallOrderItemList)){ |
| | | mallOrderInfo.setItems(mallOrderItemList); |
| | | } |
| | | } |
| | | } |
| | | return MallOrderInfoConversion.INSTANCE.entitysToVos(mallOrderInfos.getRecords()); |
| | | } |
| | | |
| | |
| | | apiLeaderInfoVo.setDetailAddress(mallTeamLeader.getDetailAddress()); |
| | | apiLeaderInfoVo.setAddressArea(mallTeamLeader.getAddressArea()); |
| | | MallElectronicFence mallElectronicFence = mallElectronicFenceMapper.selectByTeamLeaderCode(mallTeamLeader.getUniqueCode()); |
| | | apiLeaderInfoVo.setLonglatiarr(mallElectronicFence.getLonglatiarr()); |
| | | if(ObjectUtil.isNotEmpty(mallElectronicFence)){ |
| | | apiLeaderInfoVo.setLonglatiarr(mallElectronicFence.getLonglatiarr()); |
| | | } |
| | | apiLeaderInfoVo.setLongitude(mallTeamLeader.getLongitude()); |
| | | apiLeaderInfoVo.setLatitude(mallTeamLeader.getLatitude()); |
| | | } |
| | |
| | | private Integer isHome; |
| | | //团长姓名 |
| | | private String leaderName; |
| | | //商品名称 |
| | | private String goodsName; |
| | | } |
| | |
| | | <select id="selectApiOrderListInPage" resultType="cc.mrbird.febs.mall.entity.MallOrderInfo"> |
| | | select |
| | | a.*, |
| | | -- b.id item_id, |
| | | -- b.order_id, |
| | | -- b.goods_id, |
| | | -- b.sku_id, |
| | | -- b.goods_name, |
| | | -- b.style_name, |
| | | -- b.sku_name, |
| | | -- b.sku_image, |
| | | -- b.state, |
| | | -- b.cnt, |
| | | -- b.price, |
| | | -- b.amount, |
| | | c.name leaderName, |
| | | c.phone leaderPhone, |
| | | c.address_pic addressPic, |
| | |
| | | c.township, |
| | | c.detail_address detailAddress |
| | | from mall_order_info a |
| | | inner join mall_order_item b on a.id=b.order_id |
| | | inner join mall_team_leader c on a.take_unique_code=c.unique_code |
| | | inner join mall_order_item b on a.id=b.order_id |
| | | inner join mall_team_leader c on a.take_unique_code=c.unique_code |
| | | <where> |
| | | a.del_flag=2 |
| | | <if test="record.query != null and record.query != ''"> |
| | | and (b.goods_name like CONCAT('%', CONCAT(#{record.query}, '%')) or b.style_name like CONCAT('%', CONCAT(#{record.query}, '%')) or b.sku_name like CONCAT('%', CONCAT(#{record.query}, '%'))) |
| | | <if test="record.memberId != null"> |
| | | and a.member_id=#{record.memberId} |
| | | </if> |
| | | <if test="record.status == 4 and record.status != 0"> |
| | | and a.status = 4 |
| | |
| | | <if test="record.status == 5"> |
| | | and a.status = 7 or b.state in (2,3) |
| | | </if> |
| | | <if test="record.memberId != null"> |
| | | and a.member_id=#{record.memberId} |
| | | <if test="record.query != null and record.query != ''"> |
| | | and (b.goods_name like CONCAT('%', CONCAT(#{record.query}, '%')) or b.style_name like CONCAT('%', CONCAT(#{record.query}, '%')) or b.sku_name like CONCAT('%', CONCAT(#{record.query}, '%'))) |
| | | </if> |
| | | <if test="record.orderType != null"> |
| | | and a.order_type=#{record.orderType} |
| | |
| | | ) * 1000 |
| | | ) AS distance |
| | | from mall_team_leader a |
| | | inner join mall_electronic_fence b on b.team_leader_code = a.unique_code |
| | | left join mall_electronic_fence b on b.team_leader_code = a.unique_code |
| | | <where> |
| | | a.state = 1 and a.online_state = 1 |
| | | <if test="record.query != null and record.query != ''"> |
| | |
| | | <result column="comment_state" property="commentState" /> |
| | | <result column="delivery_state" property="deliveryState" /> |
| | | <result column="carriage" property="carriage" /> |
| | | <result column="take_code" property="takeCode" /> |
| | | <result column="remark" property="remark" /> |
| | | <result column="del_flag" property="delFlag" /> |
| | | <result column="is_home" property="isHome" /> |
| | |
| | | inner join mall_order_item b on a.id=b.order_id |
| | | inner join mall_member c on a.take_unique_code=c.invite_id |
| | | <where> |
| | | a.delivery_type = 1 |
| | | and c.id=#{record.memberId} |
| | | <if test="record.query != null and record.query != ''"> |
| | | and ( a.name like CONCAT('%', CONCAT(#{record.query}, '%')) |
| | | or a.phone like CONCAT('%', CONCAT(#{record.query}, '%')) |
| | | or a.take_code like CONCAT('%', CONCAT(#{record.query}, '%')) |
| | | or b.goods_name like CONCAT('%', CONCAT(#{record.query}, '%')) |
| | | ) |
| | | </if> |
| | | c.id=#{record.memberId} |
| | | <if test="record.status == 4 and record.status != 0"> |
| | | and a.status = 4 |
| | | </if> |
| | |
| | | <if test="record.status == 0"> |
| | | and a.status in (2,3,4) |
| | | </if> |
| | | <if test="record.query != null and record.query != ''"> |
| | | and ( a.name like CONCAT('%', CONCAT(#{record.query}, '%')) |
| | | or a.phone like CONCAT('%', CONCAT(#{record.query}, '%')) |
| | | or a.take_code like CONCAT('%', CONCAT(#{record.query}, '%')) |
| | | or b.goods_name like CONCAT('%', CONCAT(#{record.query}, '%')) |
| | | ) |
| | | </if> |
| | | <if test="record.orderType != null"> |
| | | and a.order_type=#{record.orderType} |
| | | </if> |
| | | and a.delivery_type = 1 |
| | | </where> |
| | | order by a.created_time desc |
| | | </select> |
| | | |
| | | <resultMap id="NewOrderInfoMap" type="cc.mrbird.febs.mall.entity.MallOrderInfo"> |
| | | <id column="id" property="id" /> |
| | | <result column="order_no" property="orderNo" /> |
| | | <result column="member_id" property="memberId" /> |
| | | <result column="order_time" property="orderTime" /> |
| | | <result column="pay_time" property="payTime" /> |
| | | <result column="amount" property="amount" /> |
| | | <result column="pay_method" property="payMethod" /> |
| | | <result column="pay_order_no" property="payOrderNo" /> |
| | | <result column="pay_result" property="payResult" /> |
| | | <result column="status" property="status" /> |
| | | <result column="cancel_type" property="cancelType" /> |
| | | <result column="name" property="name" /> |
| | | <result column="phone" property="phone" /> |
| | | <result column="address" property="address" /> |
| | | <result column="longitude" property="longitude" /> |
| | | <result column="latitude" property="latitude" /> |
| | | <result column="order_type" property="orderType" /> |
| | | <result column="comment_state" property="commentState" /> |
| | | <result column="delivery_state" property="deliveryState" /> |
| | | <result column="carriage" property="carriage" /> |
| | | <result column="take_code" property="takeCode" /> |
| | | <result column="remark" property="remark" /> |
| | | <result column="del_flag" property="delFlag" /> |
| | | <result column="is_home" property="isHome" /> |
| | | </resultMap> |
| | | |
| | | <select id="selectNewApiLeaderOrderListInPage" resultMap="NewOrderInfoMap"> |
| | | select |
| | | a.* |
| | | from mall_order_info a |
| | | inner join mall_member c on a.take_unique_code=c.invite_id |
| | | <where> |
| | | c.id=#{record.memberId} |
| | | <if test="record.status == 4 and record.status != 0"> |
| | | and a.status = 4 |
| | | </if> |
| | | <if test="record.status != 4 and record.status != 1 and record.status != 0 and record.status != 5"> |
| | | and a.status = #{record.status} |
| | | </if> |
| | | <if test="record.status == 5"> |
| | | and (a.status = 6 or b.state = 2) |
| | | </if> |
| | | <if test="record.status == 1"> |
| | | and a.status = 2 |
| | | </if> |
| | | <if test="record.status == 0"> |
| | | and a.status in (2,3,4) |
| | | </if> |
| | | <if test="record.query != null and record.query != ''"> |
| | | and ( a.name like CONCAT('%', CONCAT(#{record.query}, '%')) |
| | | or a.phone like CONCAT('%', CONCAT(#{record.query}, '%')) |
| | | or a.take_code like CONCAT('%', CONCAT(#{record.query}, '%')) |
| | | ) |
| | | </if> |
| | | <if test="record.orderType != null"> |
| | | and a.order_type=#{record.orderType} |
| | | </if> |
| | | and a.delivery_type = 1 |
| | | </where> |
| | | order by a.created_time desc |
| | | </select> |
| | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">经纬度串:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" id="longlatiarr" name="longlatiarr" lay-verify="required" placeholder="" class="layui-input" readonly> |
| | | <input type="text" id="longlatiarr" name="longlatiarr" class="layui-input" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item febs-hide"> |
| | |
| | | {field: 'memberName', title: '购买人', minWidth: 120,align:'left'}, |
| | | {field: 'memberPhone', title: '联系方式', minWidth: 120,align:'left'}, |
| | | // {field: 'memberBindPhone', title: '联系方式', minWidth: 120,align:'left'}, |
| | | {field: 'goodsName', title: '商品', minWidth: 120,align:'left'}, |
| | | {field: 'amount', title: '订单金额', minWidth: 120,align:'left'}, |
| | | {field: 'leaderName', title: '团长', minWidth: 120,align:'left'}, |
| | | {field: 'orderTime', title: '下单时间', minWidth: 200,align:'left'}, |