| @@ -108,5 +108,18 @@ public class WxOrderGroupController extends BaseController { | |||||
| return wxOrderGroupService.queryOrderGroupStatus(wxOrderGroup); | return wxOrderGroupService.queryOrderGroupStatus(wxOrderGroup); | ||||
| } | } | ||||
| @ApiOperation(value = "查询是否已参团") | |||||
| @GetMapping("queryAttendStatus") | |||||
| @ApiImplicitParams({ | |||||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true), | |||||
| }) | |||||
| public ResultData queryAttendStatus(@ModelAttribute WxOrderGroup wxOrderGroup) { | |||||
| if (wxOrderGroup.getId() == null) { | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "id不能为空"); | |||||
| } | |||||
| wxOrderGroup.setUserId(getUserId()); | |||||
| wxOrderGroup.setTenantId(getTenantId()); | |||||
| return wxOrderGroupService.queryAttendStatus(wxOrderGroup); | |||||
| } | |||||
| } | } | ||||
| @@ -23,4 +23,6 @@ public interface WxOrderGroupService { | |||||
| ResultData queryOrderGroupStatus(WxOrderGroup wxOrderGroup); | ResultData queryOrderGroupStatus(WxOrderGroup wxOrderGroup); | ||||
| ResultData queryAttendStatus(WxOrderGroup wxOrderGroup); | |||||
| } | } | ||||
| @@ -226,6 +226,16 @@ public class WxOrderGroupServiceImpl implements WxOrderGroupService { | |||||
| return toOrderGroup(wxOrderGroup); | return toOrderGroup(wxOrderGroup); | ||||
| } | } | ||||
| @Override | |||||
| public ResultData queryAttendStatus(WxOrderGroup wxOrderGroup) { | |||||
| WxOrder order = new WxOrder(); | |||||
| order.setTenantId(wxOrderGroup.getTenantId()); | |||||
| order.setCUserId(wxOrderGroup.getUserId()); | |||||
| order.setOrderGroupId(wxOrderGroup.getId()); | |||||
| int count = wxOrderMapper.selectCount(order); | |||||
| return new ResultData(count > 0 ? true : false); | |||||
| } | |||||
| public void updateGroupStatus(WxOrderGroup wxOrderGroup) { | public void updateGroupStatus(WxOrderGroup wxOrderGroup) { | ||||
| Long id = wxOrderGroup.getId(); | Long id = wxOrderGroup.getId(); | ||||
| WxOrderGroup group = wxOrderGroupMapper.selectByPrimaryKey(id); | WxOrderGroup group = wxOrderGroupMapper.selectByPrimaryKey(id); | ||||