Commit a7b3b1af by huluobin

排序

parent fc60ebd3
......@@ -19,4 +19,11 @@ public interface BaseTypeService extends IService<BaseType> {
* @return
*/
boolean containFreeServe(List<Integer> serveIdList);
/**
* 查询服务分类
*
* @return
*/
List<BaseType> queryType();
}
......@@ -26,4 +26,10 @@ public class BaseTypeServiceImpl extends ServiceImpl<BaseTypeMapper, BaseType> i
List<BaseType> baseTypeList = baseTypeMapper.selectByServeIds(serveIdList);
return baseTypeList.stream().map(BaseType::getName).collect(Collectors.toList()).contains("会员福利");
}
@Override
public List<BaseType> queryType() {
return baseMapper.queryType();
}
}
......@@ -17,4 +17,11 @@ public interface BaseTypeMapper extends BaseMapper<BaseType> {
* @return
*/
List<BaseType> selectByServeIds(@Param("serveIdList") List<Integer> serveIdList);
/**
* 查询服务分类根据sorts升序
*
* @return
*/
List<BaseType> queryType();
}
......@@ -25,13 +25,13 @@ public class TypeController {
@ApiOperation("用户端询服务类型")
@GetMapping("/customer/type/queryType")
public JsonResult<List<BaseType>> queryType() {
return JsonResult.success(baseTypeService.list());
return JsonResult.success(baseTypeService.queryType());
}
@ApiOperation("美甲师端查询服务类型")
@GetMapping("/technician/type/queryType")
public JsonResult<List<BaseType>> technicianQueryType() {
return JsonResult.success(baseTypeService.list());
return JsonResult.success(baseTypeService.queryType());
}
}
......@@ -11,4 +11,9 @@
#{id}
</foreach>
</select>
<select id="queryType" resultType="com.gogirl.domain.product.serve.BaseType">
select *
from base_type
order by sorts
</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