Commit 8e73aaf6 authored by mlchun's avatar mlchun

1.查询订单ID详情返回添加图片List等

parent 4e4af1d1
package io.hmit.modules.serviceOrder.dto; package io.hmit.modules.serviceOrder.dto;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
......
...@@ -72,5 +72,5 @@ mybatis-plus: ...@@ -72,5 +72,5 @@ mybatis-plus:
call-setters-on-nulls: true call-setters-on-nulls: true
jdbc-type-for-null: 'null' jdbc-type-for-null: 'null'
QR: QR:
# download-path: /home/resourse/bsqzc/ D:/123/ /home/websoft/java_jar/bl_workorder/myfile/ # download-path: /home/resourse/bsqzc/ D:/123/ /home/websoft/java_jar/pension_service/myfile/
download-path: /home/websoft/java_jar/pension_service/myfile/ download-path: /home/websoft/java_jar/pension_service/myfile/
...@@ -13,6 +13,7 @@ import io.hmit.common.validator.group.UpdateGroup; ...@@ -13,6 +13,7 @@ import io.hmit.common.validator.group.UpdateGroup;
import io.hmit.entity.UserEntity; import io.hmit.entity.UserEntity;
import io.hmit.modules.serviceOrder.dto.PensionOrderDTO; import io.hmit.modules.serviceOrder.dto.PensionOrderDTO;
import io.hmit.modules.serviceOrder.dto.ReservationDTO; import io.hmit.modules.serviceOrder.dto.ReservationDTO;
import io.hmit.modules.serviceOrder.service.PensionOrderDocumentService;
import io.hmit.modules.serviceOrder.service.PensionOrderService; import io.hmit.modules.serviceOrder.service.PensionOrderService;
import io.hmit.service.UserService; import io.hmit.service.UserService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -42,6 +43,9 @@ public class PensionOrderController { ...@@ -42,6 +43,9 @@ public class PensionOrderController {
@Autowired @Autowired
private UserService userService; private UserService userService;
@Autowired
private PensionOrderDocumentService pensionOrderDocumentService;
@Login @Login
@GetMapping("page") @GetMapping("page")
@ApiOperation("全部订单(志愿者)") @ApiOperation("全部订单(志愿者)")
...@@ -289,7 +293,9 @@ public class PensionOrderController { ...@@ -289,7 +293,9 @@ public class PensionOrderController {
@ApiOperation("信息") @ApiOperation("信息")
public Result<PensionOrderDTO> get(@PathVariable("id") Long id){ public Result<PensionOrderDTO> get(@PathVariable("id") Long id){
PensionOrderDTO data = pensionOrderService.get(id); PensionOrderDTO data = pensionOrderService.get(id);
data.setStaffImages(pensionOrderDocumentService.findByOrderIdAndRemark(id, "1"));
data.setStaffVoiceMessage(pensionOrderDocumentService.findStaffVoiceId(id));
data.setUserImages(pensionOrderDocumentService.findByOrderIdAndRemark(id, "3"));
return new Result<PensionOrderDTO>().ok(data); return new Result<PensionOrderDTO>().ok(data);
} }
......
package io.hmit.modules.serviceOrder.dao; package io.hmit.modules.serviceOrder.dao;
import io.hmit.common.dao.BaseDao; import io.hmit.common.dao.BaseDao;
import io.hmit.modules.serviceOrder.dto.PensionOrderDocumentDTO;
import io.hmit.modules.serviceOrder.entity.PensionOrderDocumentEntity; import io.hmit.modules.serviceOrder.entity.PensionOrderDocumentEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/** /**
* 订单及相关图片附件关联表 * 订单及相关图片附件关联表
* *
...@@ -13,4 +16,8 @@ import org.apache.ibatis.annotations.Mapper; ...@@ -13,4 +16,8 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface PensionOrderDocumentDao extends BaseDao<PensionOrderDocumentEntity> { public interface PensionOrderDocumentDao extends BaseDao<PensionOrderDocumentEntity> {
List<PensionOrderDocumentDTO> findByOrderIdAndRemark(Long orderId, String remark);
PensionOrderDocumentDTO findStaffVoiceId(Long orderId);
} }
\ No newline at end of file
package io.hmit.modules.serviceOrder.dto; package io.hmit.modules.serviceOrder.dto;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.hmit.common.constant.Constant; import io.hmit.common.constant.Constant;
import io.hmit.entity.UserEntity; import io.hmit.entity.UserEntity;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
...@@ -9,6 +10,7 @@ import lombok.Data; ...@@ -9,6 +10,7 @@ import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import java.util.List;
import java.util.UUID; import java.util.UUID;
...@@ -56,6 +58,7 @@ public class PensionOrderDTO implements Serializable { ...@@ -56,6 +58,7 @@ public class PensionOrderDTO implements Serializable {
@ApiModelProperty(value = "预约时间") @ApiModelProperty(value = "预约时间")
private Date appointmentTime; private Date appointmentTime;
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModelProperty(value = "取消原因") @ApiModelProperty(value = "取消原因")
private String cancelReason; private String cancelReason;
...@@ -77,7 +80,6 @@ public class PensionOrderDTO implements Serializable { ...@@ -77,7 +80,6 @@ public class PensionOrderDTO implements Serializable {
@ApiModelProperty(value = "服务内容描述") @ApiModelProperty(value = "服务内容描述")
private String content; private String content;
@JsonIgnore
@ApiModelProperty(value = "实际金额") @ApiModelProperty(value = "实际金额")
private String actPrice; private String actPrice;
...@@ -111,6 +113,18 @@ public class PensionOrderDTO implements Serializable { ...@@ -111,6 +113,18 @@ public class PensionOrderDTO implements Serializable {
@ApiModelProperty(value = "所属社区Id") @ApiModelProperty(value = "所属社区Id")
private Long communityId; private Long communityId;
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModelProperty(value = "用户评论照片")
private List<PensionOrderDocumentDTO> userImages;
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModelProperty(value = "服务人员评论照片")
private List<PensionOrderDocumentDTO> staffImages;
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModelProperty(value = "服务人员语音")
private PensionOrderDocumentDTO staffVoiceMessage;
public PensionOrderDTO assemblePensionOrder(ReservationDTO reservationDTO, UserEntity user){ public PensionOrderDTO assemblePensionOrder(ReservationDTO reservationDTO, UserEntity user){
PensionOrderDTO pensionOrder = new PensionOrderDTO(); PensionOrderDTO pensionOrder = new PensionOrderDTO();
pensionOrder.setOrderNum(""); pensionOrder.setOrderNum("");
......
...@@ -4,6 +4,8 @@ import io.hmit.common.service.CrudService; ...@@ -4,6 +4,8 @@ import io.hmit.common.service.CrudService;
import io.hmit.modules.serviceOrder.dto.PensionOrderDocumentDTO; import io.hmit.modules.serviceOrder.dto.PensionOrderDocumentDTO;
import io.hmit.modules.serviceOrder.entity.PensionOrderDocumentEntity; import io.hmit.modules.serviceOrder.entity.PensionOrderDocumentEntity;
import java.util.List;
/** /**
* 订单及相关图片附件关联表 * 订单及相关图片附件关联表
* *
...@@ -12,4 +14,8 @@ import io.hmit.modules.serviceOrder.entity.PensionOrderDocumentEntity; ...@@ -12,4 +14,8 @@ import io.hmit.modules.serviceOrder.entity.PensionOrderDocumentEntity;
*/ */
public interface PensionOrderDocumentService extends CrudService<PensionOrderDocumentEntity, PensionOrderDocumentDTO> { public interface PensionOrderDocumentService extends CrudService<PensionOrderDocumentEntity, PensionOrderDocumentDTO> {
List<PensionOrderDocumentDTO> findByOrderIdAndRemark(Long id, String reamrk);
PensionOrderDocumentDTO findStaffVoiceId(Long orderId);
} }
\ No newline at end of file
...@@ -7,8 +7,10 @@ import io.hmit.modules.serviceOrder.dto.PensionOrderDocumentDTO; ...@@ -7,8 +7,10 @@ import io.hmit.modules.serviceOrder.dto.PensionOrderDocumentDTO;
import io.hmit.modules.serviceOrder.entity.PensionOrderDocumentEntity; import io.hmit.modules.serviceOrder.entity.PensionOrderDocumentEntity;
import io.hmit.modules.serviceOrder.service.PensionOrderDocumentService; import io.hmit.modules.serviceOrder.service.PensionOrderDocumentService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
...@@ -30,5 +32,16 @@ public class PensionOrderDocumentServiceImpl extends CrudServiceImpl<PensionOrde ...@@ -30,5 +32,16 @@ public class PensionOrderDocumentServiceImpl extends CrudServiceImpl<PensionOrde
return wrapper; return wrapper;
} }
@Autowired
private PensionOrderDocumentDao dao;
@Override
public List<PensionOrderDocumentDTO> findByOrderIdAndRemark(Long id, String remark) {
return dao.findByOrderIdAndRemark(id, remark);
}
@Override
public PensionOrderDocumentDTO findStaffVoiceId(Long orderId) {
return dao.findStaffVoiceId(orderId);
}
} }
\ No newline at end of file
...@@ -16,5 +16,14 @@ ...@@ -16,5 +16,14 @@
<result property="updateDate" column="update_date"/> <result property="updateDate" column="update_date"/>
</resultMap> </resultMap>
<select id="findByOrderIdAndRemark" resultType="io.hmit.modules.serviceOrder.dto.PensionOrderDocumentDTO">
SELECT * FROM pension_order_document
WHERE order_id = #{orderId} AND remark = #{remark}
</select>
<select id="findStaffVoiceId" resultType="io.hmit.modules.serviceOrder.dto.PensionOrderDocumentDTO">
SELECT * FROM pension_order_document
WHERE order_id = #{orderId} AND remark = '2'
</select>
</mapper> </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