package com.huimv.admin.controller; import com.huimv.admin.common.utils.Result; import com.huimv.admin.common.utils.ResultCode; import com.huimv.admin.service.IBillLuggageService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletRequest; import java.io.IOException; import java.util.Map; /** *
* 前端控制器 *
* * @author author * @since 2023-07-24 */ @RestController @RequestMapping("/bill-luggage") @CrossOrigin public class BillLuggageController { @Autowired private IBillLuggageService billLuggageService; @PostMapping("/addLuggage") public Result addLuggage(HttpServletRequest httpServletRequest, @RequestParam("userName") String userName, @RequestParam("phone") String phone, @RequestParam("luggageDate") String luggageDate, @RequestParam("luggageLocation") String luggageLocation, @RequestParam("luggageLocationId") String luggageLocationId, @RequestParam("luggageNum") Integer luggageNum, @RequestParam("img") MultipartFile img) throws IOException { return billLuggageService.addLuggage(httpServletRequest,userName,phone,luggageDate,luggageLocation,luggageLocationId,luggageNum,img); } @PostMapping("/listPersonalLuggage") public Result listPersonalLuggage(HttpServletRequest httpServletRequest, @RequestBody Map