Commit 37682961 by huluobin

门店不同价格 门店不同服务

parent a483822d
...@@ -35,8 +35,6 @@ import com.gogirl.infrastructure.common.util.SessionUtils; ...@@ -35,8 +35,6 @@ import com.gogirl.infrastructure.common.util.SessionUtils;
import com.gogirl.infrastructure.common.util.StringUtils; import com.gogirl.infrastructure.common.util.StringUtils;
import com.gogirl.infrastructure.mapper.order.serve.*; import com.gogirl.infrastructure.mapper.order.serve.*;
import com.gogirl.infrastructure.mapper.product.purchase.PurchaseSkuMapper; import com.gogirl.infrastructure.mapper.product.purchase.PurchaseSkuMapper;
import com.gogirl.infrastructure.mapper.product.serve.BaseProduceMapper;
import com.gogirl.infrastructure.mapper.product.serve.BaseServeMapper;
import com.gogirl.infrastructure.mapper.product.serve.BaseTypeMapper; import com.gogirl.infrastructure.mapper.product.serve.BaseTypeMapper;
import com.gogirl.infrastructure.mapper.product.serve.ProducePromotionTimeMapper; import com.gogirl.infrastructure.mapper.product.serve.ProducePromotionTimeMapper;
import com.gogirl.infrastructure.mapper.store.store.StoreTechnicianMapper; import com.gogirl.infrastructure.mapper.store.store.StoreTechnicianMapper;
...@@ -68,12 +66,8 @@ public class OrderManageServiceImpl extends ServiceImpl<OrderManageMapper, Order ...@@ -68,12 +66,8 @@ public class OrderManageServiceImpl extends ServiceImpl<OrderManageMapper, Order
@Resource @Resource
private OrderServeMapper orderServeMapper; private OrderServeMapper orderServeMapper;
@Resource @Resource
private BaseServeMapper baseServeMapper;
@Resource
private BaseTypeMapper baseTypeMapper; private BaseTypeMapper baseTypeMapper;
@Resource @Resource
private BaseProduceMapper baseProduceMapper;
@Resource
private ScheduleManageMapper scheduleManageMapper; private ScheduleManageMapper scheduleManageMapper;
@Resource @Resource
private CouponCustomerRelevanceService couponCustomerRelevanceService; private CouponCustomerRelevanceService couponCustomerRelevanceService;
...@@ -296,7 +290,7 @@ public class OrderManageServiceImpl extends ServiceImpl<OrderManageMapper, Order ...@@ -296,7 +290,7 @@ public class OrderManageServiceImpl extends ServiceImpl<OrderManageMapper, Order
orderServe.setIsOwnProduce(baseServe.getIsOwnProduce()); orderServe.setIsOwnProduce(baseServe.getIsOwnProduce());
if (orderServeParam.getProduceId() != null) { if (orderServeParam.getProduceId() != null) {
BaseProduce baseProduce = baseProduceMapper.selectById(orderServeParam.getProduceId()); BaseProduce baseProduce = baseProduceService.getProduceForDetail(orderServeParam.getProduceId());
//款式原价 //款式原价
orderServe.setProduceBargainPrice(baseProduce.getBargainPrice()); orderServe.setProduceBargainPrice(baseProduce.getBargainPrice());
//款式现价 //款式现价
......
...@@ -37,7 +37,10 @@ import com.gogirl.infrastructure.mapper.order.serve.OwnProduceMapper; ...@@ -37,7 +37,10 @@ import com.gogirl.infrastructure.mapper.order.serve.OwnProduceMapper;
import com.gogirl.infrastructure.mapper.order.serve.ScheduleManageMapper; import com.gogirl.infrastructure.mapper.order.serve.ScheduleManageMapper;
import com.gogirl.infrastructure.mapper.order.serve.ScheduleServeMapper; import com.gogirl.infrastructure.mapper.order.serve.ScheduleServeMapper;
import com.gogirl.infrastructure.mapper.product.purchase.PurchaseSkuMapper; import com.gogirl.infrastructure.mapper.product.purchase.PurchaseSkuMapper;
import com.gogirl.infrastructure.mapper.product.serve.*; import com.gogirl.infrastructure.mapper.product.serve.BaseProduceMapper;
import com.gogirl.infrastructure.mapper.product.serve.BaseScheduledTypeMapper;
import com.gogirl.infrastructure.mapper.product.serve.ProducePromotionTimeMapper;
import com.gogirl.infrastructure.mapper.product.serve.TechnicianServeMapper;
import com.gogirl.infrastructure.mapper.store.oa.TakeLeaveEventMapper; import com.gogirl.infrastructure.mapper.store.oa.TakeLeaveEventMapper;
import com.gogirl.infrastructure.mapper.store.store.StoreClassesTechnicianMapper; import com.gogirl.infrastructure.mapper.store.store.StoreClassesTechnicianMapper;
import com.gogirl.infrastructure.mapper.store.store.StoreManageMapper; import com.gogirl.infrastructure.mapper.store.store.StoreManageMapper;
...@@ -73,7 +76,6 @@ import static com.gogirl.domain.order.serve.OrderServe.COMMENT_STATUS_NO; ...@@ -73,7 +76,6 @@ import static com.gogirl.domain.order.serve.OrderServe.COMMENT_STATUS_NO;
public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper, ScheduleManage> implements ScheduleManageService { public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper, ScheduleManage> implements ScheduleManageService {
private final BaseServeMapper baseServeMapper;
private final TechnicianServeMapper technicianServeMapper; private final TechnicianServeMapper technicianServeMapper;
private final TakeLeaveEventMapper takeLeaveEventMapper; private final TakeLeaveEventMapper takeLeaveEventMapper;
private final LeisureDiscountConfigMapper leisureDiscountConfigMapper; private final LeisureDiscountConfigMapper leisureDiscountConfigMapper;
...@@ -257,7 +259,7 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper, ...@@ -257,7 +259,7 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
} else { } else {
scheduleServeQuery.setLengthTimeForEndTime(baseProduceService.getProduceForDetail(scheduleServeQuery.getProduceId()).getServiceDuration()); scheduleServeQuery.setLengthTimeForEndTime(baseProduceService.getProduceForDetail(scheduleServeQuery.getProduceId()).getServiceDuration());
} }
BaseServe baseServe = baseServeMapper.selectById(scheduleServeQuery.getServeId()); BaseServe baseServe = baseServeService.getAggregate(scheduleServeQuery.getServeId());
scheduleServeQuery.setServePicturePath(baseServe.getPicturePath()); scheduleServeQuery.setServePicturePath(baseServe.getPicturePath());
scheduleServeQuery.setServeName(baseServe.getName()); scheduleServeQuery.setServeName(baseServe.getName());
}); });
...@@ -1133,7 +1135,7 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper, ...@@ -1133,7 +1135,7 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
scheduleServe.setActualStartTime(scheduleServeCommand.getActualStartTime()); scheduleServe.setActualStartTime(scheduleServeCommand.getActualStartTime());
} }
//查询服务 //查询服务
BaseServe baseServe = baseServeMapper.selectById(scheduleServe.getServeId()); BaseServe baseServe = baseServeService.getAggregate(scheduleServe.getServeId());
//查询服务类型 //查询服务类型
BaseType baseType = baseTypeService.getById(baseServe.getTypeId()); BaseType baseType = baseTypeService.getById(baseServe.getTypeId());
//服务数量 //服务数量
...@@ -1479,7 +1481,7 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper, ...@@ -1479,7 +1481,7 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
*/ */
private Integer orderRecordCondition(Integer serveId) { private Integer orderRecordCondition(Integer serveId) {
BaseServe baseServe = baseServeMapper.selectById(serveId); BaseServe baseServe = baseServeService.getAggregate(serveId);
BaseScheduledType baseScheduledType = baseScheduledTypeMapper.selectById(baseServe.getSchTypeId()); BaseScheduledType baseScheduledType = baseScheduledTypeMapper.selectById(baseServe.getSchTypeId());
String schTypeName = baseScheduledType == null ? "" : baseScheduledType.getName(); String schTypeName = baseScheduledType == null ? "" : baseScheduledType.getName();
...@@ -1544,7 +1546,7 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper, ...@@ -1544,7 +1546,7 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
/*1、校验同类型服务一天只能预约一次*/ /*1、校验同类型服务一天只能预约一次*/
scheduleManage.getListScheduleServer().forEach(scheduleServe -> { scheduleManage.getListScheduleServer().forEach(scheduleServe -> {
if (scheduleServe.getMainServeId() == null) { if (scheduleServe.getMainServeId() == null) {
BaseServe baseServe = baseServeMapper.selectById(scheduleServe.getServeId()); BaseServe baseServe = baseServeService.getAggregate(scheduleServe.getServeId());
List<ScheduleServe> typeConflictScheduleServe = scheduleServeMapper.selectConflictType( List<ScheduleServe> typeConflictScheduleServe = scheduleServeMapper.selectConflictType(
scheduleManage.getScheduledUser(), scheduleManage.getScheduledUser(),
scheduleManage.getArriveTime(), scheduleManage.getArriveTime(),
......
...@@ -39,7 +39,7 @@ public class BaseProduce implements Serializable { ...@@ -39,7 +39,7 @@ public class BaseProduce implements Serializable {
@ApiModelProperty("图片") @ApiModelProperty("图片")
private String picturePath; private String picturePath;
;
@ApiModelProperty("1-上线 2-下线") @ApiModelProperty("1-上线 2-下线")
private String status; private String status;
......
...@@ -108,6 +108,8 @@ ...@@ -108,6 +108,8 @@
<if test="request.colorSystemId !=null "> <if test="request.colorSystemId !=null ">
left join color_system_product_map t3 on t1.id = t3.product_id left join color_system_product_map t3 on t1.id = t3.product_id
</if> </if>
left join base_serve t4 on t1.service_id = t4.id
left join store_shop_serve_relation t5 on t4.id =t5.serve_id
where true where true
<if test="request.sourceFrom !=null and request.sourceFrom == 'customer' "> <if test="request.sourceFrom !=null and request.sourceFrom == 'customer' ">
and t1.has_index_show = 1 and t1.has_index_show = 1
...@@ -125,6 +127,7 @@ ...@@ -125,6 +127,7 @@
and t1.service_id =#{request.serveId} and t1.service_id =#{request.serveId}
</if> </if>
and t1.`status` =1 and t1.`status` =1
and t5.store_id = #{request.departmentId}
<choose> <choose>
<when test="request.sort == 1 "> <when test="request.sort == 1 ">
order by t1.sales_num desc order by t1.sales_num desc
......
...@@ -166,6 +166,7 @@ ...@@ -166,6 +166,7 @@
<if test="baseServe.labelId != null "> <if test="baseServe.labelId != null ">
left join features_mapping t2 on t2.data_type=1 and t2.data_id=ser.id left join features_mapping t2 on t2.data_type=1 and t2.data_id=ser.id
</if> </if>
left join store_shop_serve_relation t3 on ser.id =t3.serve_id
where ser.status = 1 where ser.status = 1
<if test="baseServe.type != null and baseServe.type != ''"> <if test="baseServe.type != null and baseServe.type != ''">
and ser.type = #{baseServe.type} and ser.type = #{baseServe.type}
...@@ -174,7 +175,7 @@ ...@@ -174,7 +175,7 @@
and t2.features_id = #{baseServe.labelId} and t2.features_id = #{baseServe.labelId}
</if> </if>
and has_purchase_show=1 and has_purchase_show=1
and t3.store_id = #{baseServe.departmentId}
order by purchase_show_index desc order by purchase_show_index desc
</select> </select>
</mapper> </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