Commit 05ceebb5 by huluobin

排班合并 预约更新合并

parent 8866fe46
......@@ -316,6 +316,10 @@ public class CouponServiceImpl extends ServiceImpl<CouponMapper, Coupon> impleme
new LambdaQueryWrapper<Coupon>().in(Coupon::getId, ids)
);
Map<Integer, List<Coupon>> couponMap = couponList.stream().collect(Collectors.groupingBy(Coupon::getId));
couponCustomerRelevanceList.forEach(couponCustomerRelevance -> couponCustomerRelevance.setCoupon(couponMap.get(couponCustomerRelevance.getCouponId()).stream().findAny().orElse(null)));
couponCustomerRelevanceList.forEach(couponCustomerRelevance -> {
if (ListUtil.isNotEmpty(couponMap.get(couponCustomerRelevance.getCouponId()))) {
couponCustomerRelevance.setCoupon(couponMap.get(couponCustomerRelevance.getCouponId()).stream().findAny().orElse(null));
}
});
}
}
......@@ -62,10 +62,10 @@ public interface ScheduleManageService extends IService<ScheduleManage> {
/**
* 更新预约时间
* 更新预约状态
*
* @param scheduleServeId
* @param status
* @param scheduleServeId 预约服务id
* @param status 状态
*/
void updateScheduledServeStatus(Integer scheduleServeId, Integer status);
......@@ -117,4 +117,12 @@ public interface ScheduleManageService extends IService<ScheduleManage> {
ScheduleManage queryScheduleManage(Integer id);
IPage<ScheduleManage> queryPageScheduleManage(ScheduleManagePageQuery qry);
/**
* 当前服务是否在闲时 1-是 2-否
*
* @param scheduleServeId
* @return
*/
Integer getScheduledServeLeisure(Integer scheduleServeId);
}
......@@ -177,5 +177,4 @@ public class ScheduleServe implements Serializable {
@ApiModelProperty("实际结束时间")
private Date actualEndTime;
}
......@@ -26,4 +26,7 @@ public interface PurchaseSkuMapper extends BaseMapper<PurchaseSku> {
* @return
*/
List<PurchaseSku> selectByProduceId(Integer produceId);
List<PurchaseSku> getByProduceId(Integer produceId);
}
......@@ -20,7 +20,6 @@ import com.gogirl.shared.order.serve.command.schedule.UpdateScheduleCommand;
import com.gogirl.shared.order.serve.query.dto.IdleTimeDTO;
import com.gogirl.shared.order.serve.query.dto.ScheduleManageDTO;
import com.gogirl.shared.order.serve.query.qry.schedule.ScheduleManagePageQuery;
import com.gogirl.shared.order.serve.query.qry.schedule.ScheduleManageQuery;
import com.gogirl.shared.user.query.qry.VipServeQuery;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -203,13 +202,23 @@ public class ScheduleManageController {
}
@ApiOperation("s更新预约服务状态")
@ApiOperation("更新预约服务状态")
@GetMapping("/technician/schedule/updateScheduledServeStatus")
public JsonResult<Void> updateScheduledServeStatus(@RequestHeader String token,
@RequestParam Integer scheduleServeId,
@RequestParam Integer status) {
@RequestParam Integer status,
@RequestParam Integer forceLeisureConfig) {
scheduleManageService.updateScheduledServeStatus(scheduleServeId, status);
return JsonResult.success();
}
@ApiOperation("当前服务是否在闲时间范围内 1-是 2-否")
@GetMapping("/technician/schedule/getScheduledServeLeisure")
public JsonResult<Integer> getScheduledServeLeisure(@RequestHeader String token,
@RequestParam Integer scheduleServeId) {
scheduleManageService.getScheduledServeLeisure(scheduleServeId);
return JsonResult.success();
}
}
......@@ -18,14 +18,12 @@ import com.gogirl.infrastructure.common.util.JsonUtilByFsJson;
import com.gogirl.infrastructure.mapper.store.StoreClassesTechnicianMapper;
import com.gogirl.infrastructure.mapper.xcx.SysLogMapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.text.ParseException;
......@@ -37,7 +35,6 @@ import java.util.Map;
@Api(tags = {"11.美甲师排班"}, value = "美甲师排班")
@RestController
@RequestMapping("classestechnician")
@Slf4j
@AllArgsConstructor
public class ClassesTechnicianController {
......@@ -52,7 +49,7 @@ public class ClassesTechnicianController {
private final SysLogMapper sysLogMapper;
@ApiOperation(value = "美甲师端查询当天店铺排班")
@RequestMapping(method = {RequestMethod.GET}, value = "queryDayTechnicianClasses")
@GetMapping("/technician/classestechnician/queryDayTechnicianClasses")
@GogirlShop
public JsonResult<List<StoreTechnician>> queryDayTechnicianClasses(String token, String dayString) throws ParseException {
GogirlToken gogirlToken = gogirlTokenService.getTokenByToken_t(token);
......@@ -86,8 +83,8 @@ public class ClassesTechnicianController {
}
@ApiOperation(value = "美甲师端提交当天店铺排班", notes = "{\"dayString\":\"2019-08-28\",\"list\":[{\"id\":59,\"classesTechnician\":{\"classes\":1,\"id\":5678}},{\"id\":62,\"classesTechnician\":{\"classes\":2,\"id\":5709}}],\"token\":\"3a18ea5546\"}")
@RequestMapping(method = {RequestMethod.POST}, value = "updateDayTechnicianClasses")
@ApiOperation(value = "美甲师端提交当天店铺排班")
@PostMapping("/technician/classestechnician/updateDayTechnicianClasses")
@GogirlShop
public JsonResult<Object> updateDayTechnicianClasses(@RequestBody ParmTechnicianClasses ParmTechnicianClasses) {
......@@ -186,13 +183,7 @@ public class ClassesTechnicianController {
@ApiOperation(value = "美甲师端查询当月排班排班")
@RequestMapping(method = {RequestMethod.GET}, value = "queryMonthClasses")
@ApiImplicitParams({
@ApiImplicitParam(name = "month", value = "年月:2019-08", required = true, dataType = "String"),
@ApiImplicitParam(name = "technicianId", value = "美甲师id:59", required = true, dataType = "int"),
@ApiImplicitParam(name = "token", value = "token", required = true, dataType = "String")
})
@GogirlShop
@GetMapping("/technician/classestechnician/queryMonthClasses")
public JsonResult<List<StoreClassesTechnician>> queryMonthClasses(String token, Integer technicianId, String month) {
GogirlToken gogirlToken = gogirlTokenService.getTokenByToken_t(token);
if (gogirlToken == null) {
......
......@@ -17,4 +17,5 @@
left join purchase_sku t2 on t1.purchase_sku_id = t2.id
where t1.produce_id = #{produceId}
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment