Commit 6b7b9673 by huluobin

Merge branch '3.7.1' into 3.8

parents 878f3d46 bed07381
package com.gogirl.application.product.serve.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gogirl.application.product.serve.BaseServeService;
import com.gogirl.domain.market.discount.LeisureDiscountConfig;
import com.gogirl.domain.product.serve.BaseProduce;
import com.gogirl.domain.product.serve.BaseServe;
import com.gogirl.infrastructure.mapper.market.discount.LeisureDiscountConfigMapper;
import com.gogirl.infrastructure.mapper.product.serve.BaseProduceMapper;
import com.gogirl.infrastructure.mapper.product.serve.BaseServeMapper;
import com.gogirl.infrastructure.mapper.product.serve.ProducePromotionTimeMapper;
import lombok.AllArgsConstructor;
......@@ -21,6 +24,7 @@ public class BaseServeServiceImpl extends ServiceImpl<BaseServeMapper, BaseServe
private final BaseServeMapper baseServeMapper;
private final LeisureDiscountConfigMapper leisureDiscountConfigMapper;
private final BaseProduceMapper baseProduceMapper;
@Override
......@@ -32,7 +36,12 @@ public class BaseServeServiceImpl extends ServiceImpl<BaseServeMapper, BaseServe
@Override
public BaseServe getAggregate(Integer id, LocalDateTime date, Integer departmentId) {
BaseServe baseServe = baseServeMapper.getAggregate(id);
BaseServe baseServe = baseServeMapper.selectById(id);
List<BaseProduce> baseProduceList = baseProduceMapper.selectList(new LambdaQueryWrapper<BaseProduce>()
.eq(BaseProduce::getServiceId, baseServe.getId()));
baseServe.setListProduce(baseProduceList);
if (date != null) {
LeisureDiscountConfig leisureDiscountConfig = leisureDiscountConfigMapper.selectLeisureDiscount(id,
date.toLocalTime().toString(),
......
......@@ -21,5 +21,4 @@ public interface BaseServeMapper extends BaseMapper<BaseServe> {
IPage<BaseServe> listLeisureServeForPage(@Param("page") IPage<BaseServe> page, @Param("baseServe") BaseServe baseServe, @Param("serveIdList") List<Integer> serveIdList, @Param("time") String time, @Param("week") Integer week);
BaseServe getAggregate(Integer id);
}
......@@ -5,7 +5,6 @@ import com.gogirl.application.store.store.StoreUserService;
import com.gogirl.application.xcx.GogirlTokenService;
import com.gogirl.domain.store.store.StoreTechnician;
import com.gogirl.domain.store.store.StoreUser;
import com.gogirl.domain.xcx.GogirlToken;
import com.gogirl.infrastructure.common.base.JsonResult;
import com.gogirl.infrastructure.config.property.GogirlProperties;
import com.gogirl.infrastructure.service.file.FileService;
......@@ -43,11 +42,8 @@ public class StoreTechnicianController {
@ApiOperation(value = "查询当前店铺的美甲师,选推荐人")
@GetMapping("/technician/user/queryUserForAll")
public JsonResult<List<StoreUser>> queryUserForAll(String token) {
GogirlToken gt = gogirlTokenService.getByToken(token);
if (gt == null) {
return new JsonResult<>(false, "TOKEN_NULL_CODE");
}
public JsonResult<List<StoreUser>> queryUserForAll() {
JsonResult<List<StoreUser>> jsonResult = new JsonResult<>();
StoreUser storeUser = new StoreUser();
storeUser.setDepartmentId(SessionUtils.getTechnicianToken().getDepartmentId());
......@@ -59,6 +55,19 @@ public class StoreTechnicianController {
return jsonResult;
}
@ApiOperation(value = "根据店铺查询美甲师")
@GetMapping("/customer/user/queryStoreUser")
public JsonResult<List<StoreUser>> queryStoreUser(@RequestParam(required = false) Integer departmentId) {
StoreUser storeUser = new StoreUser();
if (departmentId != null) {
storeUser.setDepartmentId(departmentId);
}
List<StoreUser> lists = storeUserService.listUserForAllNotQuit(storeUser);
return JsonResult.success(lists);
}
@ApiOperation(value = "美甲师根据code获取token")
@GetMapping(value = "/technician/xcx/login_t")
public JsonResult<String> technicianLogin(@RequestParam String code) {
......
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