|
@ -31,6 +31,7 @@ import com.ruoyi.model.service.*; |
|
|
import io.swagger.annotations.Api; |
|
|
import io.swagger.annotations.Api; |
|
|
import io.swagger.annotations.ApiOperation; |
|
|
import io.swagger.annotations.ApiOperation; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
|
import org.apache.tomcat.websocket.WsSession; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.data.domain.PageImpl; |
|
|
import org.springframework.data.domain.PageImpl; |
|
|
import org.springframework.data.domain.Pageable; |
|
|
import org.springframework.data.domain.Pageable; |
|
@ -39,6 +40,8 @@ import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
import java.util.ArrayList; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Slf4j |
|
|
@Slf4j |
|
|
@Api(description = "下单小程序端 - 订单信息列表") |
|
|
@Api(description = "下单小程序端 - 订单信息列表") |
|
@ -79,6 +82,7 @@ public class ApiMallOrderController extends BaseController { |
|
|
@Autowired |
|
|
@Autowired |
|
|
private MemberWechatService memberWechatService; |
|
|
private MemberWechatService memberWechatService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("mall-订单列表信息接口") |
|
|
@ApiOperation("mall-订单列表信息接口") |
|
|
@GetMapping("/listByOpenid") |
|
|
@GetMapping("/listByOpenid") |
|
|
public ResponseEntity<PageImpl<H5OrderVO>> orderPageByOpenid(Integer status, String openId, Pageable pageable){ |
|
|
public ResponseEntity<PageImpl<H5OrderVO>> orderPageByOpenid(Integer status, String openId, Pageable pageable){ |
|
@ -88,7 +92,6 @@ public class ApiMallOrderController extends BaseController { |
|
|
statusList.add(1); |
|
|
statusList.add(1); |
|
|
statusList.add(2); |
|
|
statusList.add(2); |
|
|
statusList.add(3); |
|
|
statusList.add(3); |
|
|
statusList.add(4); |
|
|
|
|
|
statusList.add(11); |
|
|
statusList.add(11); |
|
|
} else { |
|
|
} else { |
|
|
statusList.add(status); |
|
|
statusList.add(status); |
|
@ -219,7 +222,48 @@ public class ApiMallOrderController extends BaseController { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//查询服务过自己的伴宠师 |
|
|
|
|
|
@ApiOperation("mall-查询服务过自己的伴宠师") |
|
|
|
|
|
@GetMapping("/getTecByUser") |
|
|
|
|
|
public AjaxResult getTecByUser(String openId){ |
|
|
|
|
|
|
|
|
|
|
|
if (openId == null){ |
|
|
|
|
|
AjaxResult.error("openId不能为空"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Member member = memberWechatService.isRegister(openId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<Order> orders = orderMapper.selectList(Wrappers.<Order>lambdaQuery() |
|
|
|
|
|
.select(Order::getTeacherId) |
|
|
|
|
|
.eq(Order::getMemberId, member.getId())); |
|
|
|
|
|
|
|
|
|
|
|
ArrayList<Long> ids = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
for (Order order : orders) { |
|
|
|
|
|
if (order != null){ |
|
|
|
|
|
ids.add(order.getTeacherId()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
List<AppUsers> appUsersList = appUsersService |
|
|
|
|
|
.lambdaQuery() |
|
|
|
|
|
.in(ids.size() > 0, AppUsers::getUserId, ids) |
|
|
|
|
|
.list(); |
|
|
|
|
|
|
|
|
|
|
|
for (AppUsers appUsers : appUsersList) { |
|
|
|
|
|
appUsers.setAppletAddresseList(appletAddressService |
|
|
|
|
|
.lambdaQuery() |
|
|
|
|
|
.eq(AppletAddress::getUserId, appUsers.getUserId()) |
|
|
|
|
|
.list()); |
|
|
|
|
|
|
|
|
|
|
|
AppletUsersTeacher appletUsersTeacher = appletUsersTeacherService.selectAppletUsersTeacherByUserId(appUsers.getUserId()); |
|
|
|
|
|
appUsers.setAppletUsersTeacher(appletUsersTeacher); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return AjaxResult.success(appUsersList); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//查询-再来一单的历史伴宠师 |
|
|
//查询-再来一单的历史伴宠师 |
|
|