Commit f8574e3b authored by mlchun's avatar mlchun

1.订单服务人员评价

2.订单用户评价
parent 3482883f
package io.hmit.modules.serviceOrder.controller;
import com.alibaba.fastjson.JSON;
import io.hmit.annotation.Login;
import io.hmit.annotation.LoginUser;
import io.hmit.common.constant.Constant;
......@@ -27,6 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.net.URLDecoder;
import java.util.Date;
import java.util.Map;
......@@ -219,16 +221,13 @@ public class PensionOrderController {
@Login
@PostMapping("staffFinishedOrder")
@ApiOperation(value = "服务人员完成订单接口(服务人员)")
// @ApiImplicitParams({
// @ApiImplicitParam(name = "id", value = "订单ID", paramType = "query", required = true, dataType="long") ,
// @ApiImplicitParam(name = "content", value = "描述服务内容", paramType = "query", required = true, dataType="String") ,
// @ApiImplicitParam(name = "images", value = "图片", allowMultiple = true, paramType = "query", dataType="String") ,
// @ApiImplicitParam(name = "voice", value = "语音", allowMultiple = true, paramType = "query", dataType="String") ,
// @ApiImplicitParam(name = "roleId", value = "用户角色", paramType = "query", dataType="String") ,
// @ApiImplicitParam(name = "location", value = "经纬定位", paramType = "query", dataType="String")
// })
public Result staffFinishedOrder(StaffFinishDTO dto){
pensionOrderService.staffFinishedOrder(dto);
public Result staffFinishedOrder(@RequestBody String dto){
String todto = null;
try {
todto = URLDecoder.decode(dto,"UTF-8");
}catch (Exception ignored){}
StaffFinishDTO staffFinishDTO = JSON.parseObject(todto.substring(4), StaffFinishDTO.class);
pensionOrderService.staffFinishedOrder(staffFinishDTO);
return new Result();
}
......@@ -311,9 +310,15 @@ public class PensionOrderController {
@Login
@PostMapping("reservationOrder")
@ApiOperation("预约保存")
public Result reservationOrder(@ApiIgnore @LoginUser UserEntity user, ReservationDTO dto){
public Result reservationOrder(@ApiIgnore @LoginUser UserEntity user, @RequestBody String dto){
PensionOrderDTO data = new PensionOrderDTO().assemblePensionOrder(dto,user);
String todto = null;
try {
todto = URLDecoder.decode(dto,"UTF-8");
}catch (Exception ignored){}
ReservationDTO reservationDTO = JSON.parseObject(todto.substring(4), ReservationDTO.class);
PensionOrderDTO data = new PensionOrderDTO().assemblePensionOrder(reservationDTO,user);
data.setCommunityId(user.getCommunityId());
data.setCommunityName(user.getCommunityName());
pensionOrderService.reservation(data);
......
package io.hmit.modules.serviceOrder.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import io.hmit.annotation.Login;
import io.hmit.common.constant.Constant;
import io.hmit.common.page.PageData;
......@@ -18,7 +20,9 @@ import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import springfox.documentation.spring.web.json.Json;
import java.net.URLDecoder;
import java.util.Map;
......@@ -63,11 +67,16 @@ public class PensionOrderEvaluationController {
@Login
@PostMapping
@ApiOperation("保存")
public Result save(PensionOrderEvaluationDTO dto){
public Result save(@RequestBody String dto){
String todto = null;
try {
todto = URLDecoder.decode(dto,"UTF-8");
}catch (Exception ignored){}
PensionOrderEvaluationDTO pensionOrderEvaluationDTO = JSON.parseObject(todto.substring(4), PensionOrderEvaluationDTO.class);
pensionOrderEvaluationService.save(dto);
pensionOrderEvaluationService.save(pensionOrderEvaluationDTO);
pensionOrderService.evaluationDone(dto);
pensionOrderService.evaluationDone(pensionOrderEvaluationDTO);
return new Result();
}
......
......@@ -71,5 +71,5 @@ mybatis-plus:
call-setters-on-nulls: true
jdbc-type-for-null: 'null'
QR:
# download-path: /home/resourse/bsqzc/ D:/123/ /home/websoft/java_jar/bl_workorder/myfile/
# download-path: D:/123/ /home/websoft/java_jar/pension_service/myfile/
download-path: D:/123/
\ No newline at end of file
......@@ -16,7 +16,7 @@
<select id="findByOrderId" resultType="io.hmit.modules.serviceOrder.dto.PensionOrderEvaluationDTO">
SELECT * FROM pension_order_evaluation
WHERE order_id = #{orderId}
WHERE order_id = #{orderId} limit 1
</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