Commit 2ea5c8fa authored by lings's avatar lings

Merge remote-tracking branch 'origin/master'

1 merge request!24、预约详情接口 5、当前预约排队人数接口 6、现场签到接口
......@@ -26,7 +26,7 @@ public class AppointmentServiceDTO implements Serializable {
private String serviceName;
@ApiModelProperty(value = "服务事项父类id")
private Long serviceParentId;
private Long pid;
@ApiModelProperty(value = "排序")
private Integer sort;
......
......@@ -26,7 +26,7 @@ public class AppointmentServiceEntity extends BaseEntity {
/**
* 服务事项父类id
*/
private Long serviceParentId;
private Long pid;
/**
* 排序
*/
......
......@@ -18,7 +18,7 @@ public class AppointmentServiceExcel {
@Excel(name = "服务事项名称")
private String serviceName;
@Excel(name = "服务事项父类id")
private Long serviceParentId;
private Long pid;
@Excel(name = "排序")
private Integer sort;
@Excel(name = "首页图标地址")
......
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="CheckStyle-IDEA-Module">
<option name="configuration">
<map />
</option>
</component>
<component name="FacetManager">
<facet type="Spring" name="Spring">
<configuration />
......@@ -57,8 +52,6 @@
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.9.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.1.9.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.1.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.1.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.9.3" level="project" />
......
......@@ -9,7 +9,10 @@ import io.hmit.common.validator.group.AddGroup;
import io.hmit.common.validator.group.DefaultGroup;
import io.hmit.common.validator.group.UpdateGroup;
import io.hmit.modules.appointment.dto.AppointmentOrderDTO;
import io.hmit.modules.appointment.dto.AppointmentOrderServiceDTO;
import io.hmit.modules.appointment.dto.ReservationDTO;
import io.hmit.modules.appointment.service.AppointmentOrderService;
import io.hmit.modules.appointment.service.AppointmentOrderServiceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
......@@ -18,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.Date;
import java.util.Map;
......@@ -34,6 +38,9 @@ public class AppointmentOrderController {
@Autowired
private AppointmentOrderService appointmentOrderService;
@Autowired
private AppointmentOrderServiceService appointmentOrderServiceService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
......@@ -56,13 +63,47 @@ public class AppointmentOrderController {
return new Result<AppointmentOrderDTO>().ok(data);
}
@GetMapping("identity/{identity}")
@ApiOperation("根据手机号或身份证号获取信息")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
public Result<PageData<AppointmentOrderDTO>> queryInfo(@ApiIgnore @RequestParam Map<String, Object> params,
@PathVariable("identity") String identity){
PageData<AppointmentOrderDTO> pageData = appointmentOrderService.getAppointmentInfoPage(params, identity);
return new Result<PageData<AppointmentOrderDTO>>().ok(pageData);
}
@PostMapping
@ApiOperation("保存")
public Result save(@RequestBody AppointmentOrderDTO dto){
@ApiOperation("预约保存")
public Result save(@RequestBody ReservationDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
appointmentOrderService.save(dto);
AppointmentOrderDTO appointmentOrderDTO = new AppointmentOrderDTO().assembleAppointmentOrderDTO(dto);
appointmentOrderService.save(appointmentOrderDTO);
AppointmentOrderServiceDTO orderServiceDTO = new AppointmentOrderServiceDTO().assembleAppointmentOrderServiceDTO(appointmentOrderDTO);
appointmentOrderServiceService.save(orderServiceDTO);
return new Result();
}
@GetMapping("/cancel/{id}")
@ApiOperation("预约取消")
public Result cancelReservation(@PathVariable("id") Long id){
AppointmentOrderDTO data = appointmentOrderService.get(id);
data.setStatus(3);
data.setServiceName("已取消");
data.setUpdateDate(new Date());
appointmentOrderService.update(data);
return new Result();
}
......
......@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
import java.util.Map;
......@@ -49,6 +50,14 @@ public class AppointmentServiceController {
return new Result<PageData<AppointmentServiceDTO>>().ok(page);
}
@GetMapping("list")
@ApiOperation("服务树形列表")
public Result<List<AppointmentServiceDTO>> list() {
List<AppointmentServiceDTO> list = appointmentServiceService.getAllServicesList();
return new Result<List<AppointmentServiceDTO>>().ok(list);
}
@GetMapping("{id}")
@ApiOperation("信息")
......
package io.hmit.modules.appointment.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.hmit.common.constant.Constant;
import io.hmit.common.page.PageData;
import io.hmit.common.utils.Result;
......@@ -9,6 +10,7 @@ import io.hmit.common.validator.group.AddGroup;
import io.hmit.common.validator.group.DefaultGroup;
import io.hmit.common.validator.group.UpdateGroup;
import io.hmit.modules.appointment.dto.AppointmentTimeManageDTO;
import io.hmit.modules.appointment.entity.AppointmentTimeManageEntity;
import io.hmit.modules.appointment.service.AppointmentTimeManageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
......@@ -36,58 +38,11 @@ public class AppointmentTimeManageController {
@Autowired
private AppointmentTimeManageService appointmentTimeManageService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
public Result<PageData<AppointmentTimeManageDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<AppointmentTimeManageDTO> page = appointmentTimeManageService.page(params);
return new Result<PageData<AppointmentTimeManageDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
public Result<AppointmentTimeManageDTO> get(@PathVariable("id") Long id){
AppointmentTimeManageDTO data = appointmentTimeManageService.get(id);
@GetMapping("getTime")
@ApiOperation("获取当前正使用的时间段")
public Result<AppointmentTimeManageDTO> getTime(@PathVariable("id") Long id){
AppointmentTimeManageDTO data = appointmentTimeManageService.getByUseState();
return new Result<AppointmentTimeManageDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
public Result save(@RequestBody AppointmentTimeManageDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
appointmentTimeManageService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
public Result update(@RequestBody AppointmentTimeManageDTO dto){
//校验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
appointmentTimeManageService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
public Result delete(@RequestBody Long[] ids){
//校验数据
AssertUtils.isArrayEmpty(ids, "id");
appointmentTimeManageService.delete(ids);
return new Result();
}
}
package io.hmit.modules.appointment.dao;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.hmit.common.dao.BaseDao;
import io.hmit.modules.appointment.dto.AppointmentOrderDTO;
import io.hmit.modules.appointment.entity.AppointmentOrderEntity;
import org.apache.ibatis.annotations.Mapper;
......@@ -13,4 +15,6 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface AppointmentOrderDao extends BaseDao<AppointmentOrderEntity> {
IPage<AppointmentOrderDTO> getAppointmentInfo(IPage<AppointmentOrderEntity> page, String phone, String idCard);
}
\ No newline at end of file
......@@ -4,6 +4,8 @@ import io.hmit.common.dao.BaseDao;
import io.hmit.modules.appointment.entity.AppointmentServiceEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 可供预约的服务事项种类(不确定是否数据落地)。
*
......@@ -13,4 +15,6 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface AppointmentServiceDao extends BaseDao<AppointmentServiceEntity> {
List<AppointmentServiceEntity> getAllServiceList();
}
......@@ -5,7 +5,9 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.UUID;
/**
......@@ -85,5 +87,33 @@ public class AppointmentOrderDTO implements Serializable {
@ApiModelProperty(value = "更新时间")
private Date updateDate;
public AppointmentOrderDTO assembleAppointmentOrderDTO(ReservationDTO reservationDTO){
AppointmentOrderDTO dto = new AppointmentOrderDTO();
Date dt = new Date();
SimpleDateFormat sf=new SimpleDateFormat("yyyyMMdd");
String strDate = sf.format(dt);
UUID uuid = UUID.randomUUID();
String[] strSequence = uuid.toString().split("-");
dto.setOrderNum("YUYUE-"+strDate + "-" + strSequence[1]);
dto.setAppointmentNum(reservationDTO.getAppointmentNum());
dto.setStatus(1);
dto.setStatusName("已预约");
dto.setServiceId(reservationDTO.getServiceId());
dto.setServiceName(reservationDTO.getServiceName());
dto.setIsApp(reservationDTO.getIsApp());
dto.setOrderQueueId(reservationDTO.getOrderQueueId());
dto.setAppointmentPerson(reservationDTO.getAppointmentPerson());
dto.setAppointmentPhone(reservationDTO.getAppointmentPhone());
dto.setAppointmentIdCard(reservationDTO.getAppointmentIdCard());
dto.setAppointmentTime(reservationDTO.getAppointmentTime());
dto.setServiceWindow(reservationDTO.getServiceWindow());
dto.setRemark(reservationDTO.getRemark());
dto.setCreateDate(new Date());
dto.setUpdateDate(new Date());
return dto;
}
}
......@@ -43,5 +43,11 @@ public class AppointmentOrderServiceDTO implements Serializable {
@ApiModelProperty(value = "更新时间")
private Date updateDate;
public AppointmentOrderServiceDTO assembleAppointmentOrderServiceDTO(AppointmentOrderDTO orderDTO){
AppointmentOrderServiceDTO dto = new AppointmentOrderServiceDTO();
dto.setOrderId(orderDTO.getId());
dto.setServiceId(orderDTO.getServiceId());
return dto;
}
}
package io.hmit.modules.appointment.dto;
import io.hmit.common.utils.TreeNode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -16,7 +17,7 @@ import java.util.Date;
*/
@Data
@ApiModel(value = "可供预约的服务事项种类(不确定是否数据落地)。")
public class AppointmentServiceDTO implements Serializable {
public class AppointmentServiceDTO extends TreeNode<AppointmentServiceDTO> implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "id")
......@@ -26,7 +27,7 @@ public class AppointmentServiceDTO implements Serializable {
private String serviceName;
@ApiModelProperty(value = "服务事项父类id")
private Long serviceParentId;
private Long pid;
@ApiModelProperty(value = "排序")
private Integer sort;
......
package io.hmit.modules.appointment.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 预约订单表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-02-13
*/
@Data
@ApiModel(value = "预约信息表")
public class ReservationDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "预约取单号(取号系统生成)")
private String appointmentNum;
@ApiModelProperty(value = "预约所属的服务事项id")
private Long serviceId;
@ApiModelProperty(value = "预约所属的服务事项名称")
private String serviceName;
@ApiModelProperty(value = "是否浙里办预约 0否,1是")
private Integer isApp;
@ApiModelProperty(value = "预约订单所在队列id")
private Long orderQueueId;
@ApiModelProperty(value = "预约人")
private String appointmentPerson;
@ApiModelProperty(value = "预约人电话")
private String appointmentPhone;
@ApiModelProperty(value = "预约人身份证号码")
private String appointmentIdCard;
@ApiModelProperty(value = "预约时间")
private Date appointmentTime;
@ApiModelProperty(value = "服务办事窗口")
private String serviceWindow;
@ApiModelProperty(value = "备注")
private String remark;
}
......@@ -26,7 +26,7 @@ public class AppointmentServiceEntity extends BaseEntity {
/**
* 服务事项父类id
*/
private Long serviceParentId;
private Long pid;
/**
* 排序
*/
......
package io.hmit.modules.appointment.service;
import io.hmit.common.page.PageData;
import io.hmit.common.service.CrudService;
import io.hmit.modules.appointment.dto.AppointmentOrderDTO;
import io.hmit.modules.appointment.entity.AppointmentOrderEntity;
import java.util.Map;
/**
* 预约订单表
*
......@@ -12,4 +15,6 @@ import io.hmit.modules.appointment.entity.AppointmentOrderEntity;
*/
public interface AppointmentOrderService extends CrudService<AppointmentOrderEntity, AppointmentOrderDTO> {
PageData<AppointmentOrderDTO> getAppointmentInfoPage(Map<String, Object> params, String identity);
}
\ No newline at end of file
......@@ -4,6 +4,8 @@ import io.hmit.common.service.CrudService;
import io.hmit.modules.appointment.dto.AppointmentServiceDTO;
import io.hmit.modules.appointment.entity.AppointmentServiceEntity;
import java.util.List;
/**
* 可供预约的服务事项种类(不确定是否数据落地)。
*
......@@ -12,4 +14,10 @@ import io.hmit.modules.appointment.entity.AppointmentServiceEntity;
*/
public interface AppointmentServiceService extends CrudService<AppointmentServiceEntity, AppointmentServiceDTO> {
/**
* 菜单列表
*
*/
List<AppointmentServiceDTO> getAllServicesList();
}
......@@ -12,4 +12,6 @@ import io.hmit.modules.appointment.entity.AppointmentTimeManageEntity;
*/
public interface AppointmentTimeManageService extends CrudService<AppointmentTimeManageEntity, AppointmentTimeManageDTO> {
AppointmentTimeManageDTO getByUseState();
}
package io.hmit.modules.appointment.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.hmit.common.constant.Constant;
import io.hmit.common.page.PageData;
import io.hmit.common.service.impl.CrudServiceImpl;
import io.hmit.common.utils.ConvertUtils;
import io.hmit.modules.appointment.dao.AppointmentOrderDao;
import io.hmit.modules.appointment.dto.AppointmentOrderDTO;
import io.hmit.modules.appointment.entity.AppointmentOrderEntity;
......@@ -9,6 +13,7 @@ import io.hmit.modules.appointment.service.AppointmentOrderService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Map;
/**
......@@ -20,6 +25,19 @@ import java.util.Map;
@Service
public class AppointmentOrderServiceImpl extends CrudServiceImpl<AppointmentOrderDao, AppointmentOrderEntity, AppointmentOrderDTO> implements AppointmentOrderService {
@Resource
private AppointmentOrderDao appointmentOrderDao;
/**
* 电话号码校验(不包含港澳台手机号)
*/
final static String VALIDATE_PHONE = "^(13[0-9]|14[579]|15[0-3,5-9]|16[0-9]|17[0135678]|18[0-9]|19[89])\\d{8}$";
/**
* 身份证校验
*/
final static String ID_NUMBER ="^[1-9]\\d{5}(18|19|20|(3\\d))\\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$";
@Override
public QueryWrapper<AppointmentOrderEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id");
......@@ -30,5 +48,18 @@ public class AppointmentOrderServiceImpl extends CrudServiceImpl<AppointmentOrde
return wrapper;
}
@Override
public PageData<AppointmentOrderDTO> getAppointmentInfoPage(Map<String, Object> params, String identity) {
String phone = null;
String idCard = null;
if (identity.matches(VALIDATE_PHONE)) {
phone = identity;
}
if (identity.matches(ID_NUMBER)) {
idCard = identity;
}
IPage<AppointmentOrderEntity> page = getPage(params, Constant.CREATE_DATE, false);
IPage<AppointmentOrderDTO> appointmentOrderDTOIPage = appointmentOrderDao.getAppointmentInfo(page, phone, idCard);
return getPageData(appointmentOrderDTOIPage, AppointmentOrderDTO.class);
}
}
\ No newline at end of file
......@@ -2,13 +2,18 @@ package io.hmit.modules.appointment.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.hmit.common.service.impl.CrudServiceImpl;
import io.hmit.common.utils.ConvertUtils;
import io.hmit.common.utils.HttpContextUtils;
import io.hmit.common.utils.TreeUtils;
import io.hmit.modules.appointment.dao.AppointmentServiceDao;
import io.hmit.modules.appointment.dto.AppointmentServiceDTO;
import io.hmit.modules.appointment.entity.AppointmentServiceEntity;
import io.hmit.modules.appointment.service.AppointmentServiceService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
......@@ -20,6 +25,9 @@ import java.util.Map;
@Service
public class AppointmentServiceServiceImpl extends CrudServiceImpl<AppointmentServiceDao, AppointmentServiceEntity, AppointmentServiceDTO> implements AppointmentServiceService {
@Autowired
private AppointmentServiceDao appointmentServiceDao;
@Override
public QueryWrapper<AppointmentServiceEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id");
......@@ -31,4 +39,13 @@ public class AppointmentServiceServiceImpl extends CrudServiceImpl<AppointmentSe
}
@Override
public List<AppointmentServiceDTO> getAllServicesList() {
List<AppointmentServiceEntity> servicesList = appointmentServiceDao.getAllServiceList();
List<AppointmentServiceDTO> dtoList = ConvertUtils.sourceToTarget(servicesList, AppointmentServiceDTO.class);
return TreeUtils.build(dtoList);
}
}
......@@ -2,10 +2,13 @@ package io.hmit.modules.appointment.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.hmit.common.service.impl.CrudServiceImpl;
import io.hmit.common.utils.ConvertUtils;
import io.hmit.modules.appointment.dao.AppointmentTimeManageDao;
import io.hmit.modules.appointment.dto.AppointmentTimeManageDTO;
import io.hmit.modules.appointment.entity.AppointmentTimeManageEntity;
import io.hmit.modules.appointment.service.AppointmentTimeManageService;
import net.sf.jsqlparser.statement.create.table.CreateTable;
import org.apache.commons.lang3.Conversion;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
......@@ -23,12 +26,21 @@ public class AppointmentTimeManageServiceImpl extends CrudServiceImpl<Appointmen
@Override
public QueryWrapper<AppointmentTimeManageEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id");
String useState = (String)params.get("useState");
QueryWrapper<AppointmentTimeManageEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), "id", id);
wrapper.eq(StringUtils.isNotBlank(useState), "use_state", useState);
return wrapper;
}
@Override
public AppointmentTimeManageDTO getByUseState(){
AppointmentTimeManageEntity entity = baseDao.selectOne(new QueryWrapper<AppointmentTimeManageEntity>()
.lambda().eq( AppointmentTimeManageEntity::getUseState, "1"));
return ConvertUtils.sourceToTarget(entity, AppointmentTimeManageDTO.class);
}
}
......@@ -28,5 +28,18 @@
<result property="updateDate" column="update_date"/>
</resultMap>
<select id="getAppointmentInfo" resultType="io.hmit.modules.appointment.dto.AppointmentOrderDTO">
SELECT *
FROM appointment_order ao
WHERE
<choose>
<when test="phone != null">
ao.appointment_phone = #{phone}
</when>
<otherwise>
ao.appointment_id_card = #{idCard}
</otherwise>
</choose>
</select>
</mapper>
\ No newline at end of file
......@@ -6,7 +6,7 @@
<resultMap type="io.hmit.modules.appointment.entity.AppointmentServiceEntity" id="appointmentServiceMap">
<result property="id" column="id"/>
<result property="serviceName" column="service_name"/>
<result property="serviceParentId" column="service_parent_id"/>
<result property="pid" column="pid"/>
<result property="sort" column="sort"/>
<result property="icon" column="icon"/>
<result property="remark" column="remark"/>
......@@ -17,5 +17,7 @@
<result property="updateDate" column="update_date"/>
</resultMap>
<select id="getAllServiceList" resultType="io.hmit.modules.appointment.entity.AppointmentServiceEntity" >
select * from appointment_service
</select>
</mapper>
File added
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
File added
No preview for this file type
No preview for this file type
......@@ -28,5 +28,18 @@
<result property="updateDate" column="update_date"/>
</resultMap>
<select id="getAppointmentInfo" resultType="io.hmit.modules.appointment.dto.AppointmentOrderDTO">
SELECT *
FROM appointment_order ao
WHERE
<choose>
<when test="phone != null">
ao.appointment_phone = #{phone}
</when>
<otherwise>
ao.appointment_id_card = #{idCard}
</otherwise>
</choose>
</select>
</mapper>
\ No newline at end of file
......@@ -6,7 +6,7 @@
<resultMap type="io.hmit.modules.appointment.entity.AppointmentServiceEntity" id="appointmentServiceMap">
<result property="id" column="id"/>
<result property="serviceName" column="service_name"/>
<result property="serviceParentId" column="service_parent_id"/>
<result property="pid" column="pid"/>
<result property="sort" column="sort"/>
<result property="icon" column="icon"/>
<result property="remark" column="remark"/>
......@@ -17,5 +17,7 @@
<result property="updateDate" column="update_date"/>
</resultMap>
<select id="getAllServiceList" resultType="io.hmit.modules.appointment.entity.AppointmentServiceEntity" >
select * from appointment_service
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.hmit.modules.appointment.dao.AppointmentTimeManageDao">
<resultMap type="io.hmit.modules.appointment.entity.AppointmentTimeManageEntity" id="appointmentTimeManageMap">
<result property="id" column="id"/>
<result property="startTime" column="start_time"/>
<result property="endTime" column="end_time"/>
<result property="timeType" column="time_type"/>
<result property="period" column="period"/>
<result property="useState" column="use_state"/>
</resultMap>
</mapper>
\ No newline at end of file
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