diff --git a/代码库/mall-admin/src/main/java/com/sock/mall/controller/OmsCompanyAddressController.java b/代码库/mall-admin/src/main/java/com/sock/mall/controller/OmsCompanyAddressController.java new file mode 100644 index 0000000..e807163 --- /dev/null +++ b/代码库/mall-admin/src/main/java/com/sock/mall/controller/OmsCompanyAddressController.java @@ -0,0 +1,34 @@ +package com.macro.mall.controller; + +import com.macro.mall.dto.CommonResult; +import com.macro.mall.model.OmsCompanyAddress; +import com.macro.mall.service.OmsCompanyAddressService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.List; + +/** + * ջַController + * Created by macro on 2018/10/18. + */ +@Controller +@Api(tags = "OmsCompanyAddressController", description = "ջַ") +@RequestMapping("/companyAddress") +public class OmsCompanyAddressController { + @Autowired + private OmsCompanyAddressService companyAddressService; + + @ApiOperation("ȡջַ") + @RequestMapping(value = "/list",method = RequestMethod.GET) + @ResponseBody + public Object list() { + List companyAddressList = companyAddressService.list(); + return new CommonResult().success(companyAddressList); + } +} diff --git a/代码库/mall-admin/src/main/java/com/sock/mall/controller/OmsOrderController.java b/代码库/mall-admin/src/main/java/com/sock/mall/controller/OmsOrderController.java new file mode 100644 index 0000000..8a228ad --- /dev/null +++ b/代码库/mall-admin/src/main/java/com/sock/mall/controller/OmsOrderController.java @@ -0,0 +1,110 @@ +package com.macro.mall.controller; + +import com.macro.mall.dto.*; +import com.macro.mall.model.OmsOrder; +import com.macro.mall.service.OmsOrderService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * Controller + * Created by macro on 2018/10/11. + */ +@Controller +@Api(tags = "OmsOrderController", description = "") +@RequestMapping("/order") +public class OmsOrderController { + @Autowired + private OmsOrderService orderService; + + @ApiOperation("ѯ") + @RequestMapping(value = "/list", method = RequestMethod.GET) + @ResponseBody + public Object list(OmsOrderQueryParam queryParam, + @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, + @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { + List orderList = orderService.list(queryParam, pageSize, pageNum); + return new CommonResult().pageSuccess(orderList); + } + + @ApiOperation("") + @RequestMapping(value = "/update/delivery", method = RequestMethod.POST) + @ResponseBody + public Object delivery(@RequestBody List deliveryParamList) { + int count = orderService.delivery(deliveryParamList);//Ͷ + if (count > 0) { + return new CommonResult().success(count); + } + return new CommonResult().failed(); + } + + @ApiOperation("رն") + @RequestMapping(value = "/update/close", method = RequestMethod.POST) + @ResponseBody + public Object close(@RequestParam("ids") List ids,@RequestParam String note) { + int count = orderService.close(ids,note); + if (count > 0) { + return new CommonResult().success(count); + } + return new CommonResult().failed(); + } + + @ApiOperation("ɾ") + @RequestMapping(value = "/delete", method = RequestMethod.POST) + @ResponseBody + public Object delete(@RequestParam("ids") List ids) { + int count = orderService.delete(ids); + if (count > 0) { + return new CommonResult().success(count); + } + return new CommonResult().failed(); + } + + @ApiOperation("ȡ:ϢƷϢ¼") + @RequestMapping(value = "/{id}", method = RequestMethod.GET) + @ResponseBody + public Object detail(@PathVariable Long id) { + OmsOrderDetail orderDetailResult = orderService.detail(id); + return new CommonResult().success(orderDetailResult); + } + + @ApiOperation("޸ջϢ") + @RequestMapping(value = "/update/receiverInfo", method = RequestMethod.POST) + @ResponseBody + public Object updateReceiverInfo(@RequestBody OmsReceiverInfoParam receiverInfoParam) { + int count = orderService.updateReceiverInfo(receiverInfoParam); + if (count > 0) { + return new CommonResult().success(count); + } + return new CommonResult().failed(); + } + + @ApiOperation("޸ĶϢ") + @RequestMapping(value = "/update/moneyInfo", method = RequestMethod.POST) + @ResponseBody + public Object updateReceiverInfo(@RequestBody OmsMoneyInfoParam moneyInfoParam) { + int count = orderService.updateMoneyInfo(moneyInfoParam); + if (count > 0) { + return new CommonResult().success(count); + } + return new CommonResult().failed(); + } + + @ApiOperation("ע") + @RequestMapping(value = "/update/note", method = RequestMethod.POST) + @ResponseBody + public Object updateNote(@RequestParam("id") Long id, + @RequestParam("note") String note, + @RequestParam("status") Integer status) {//״̬ + int count = orderService.updateNote(id,note,status); + if (count > 0) { + return new CommonResult().success(count); + } + return new CommonResult().failed(); + } +} diff --git a/代码库/mall-admin/src/main/java/com/sock/mall/controller/OmsOrderReturnApplyController.java b/代码库/mall-admin/src/main/java/com/sock/mall/controller/OmsOrderReturnApplyController.java new file mode 100644 index 0000000..550fb2a --- /dev/null +++ b/代码库/mall-admin/src/main/java/com/sock/mall/controller/OmsOrderReturnApplyController.java @@ -0,0 +1,68 @@ +package com.macro.mall.controller; + +import com.macro.mall.dto.CommonResult; +import com.macro.mall.dto.OmsOrderReturnApplyResult; +import com.macro.mall.dto.OmsReturnApplyQueryParam; +import com.macro.mall.dto.OmsUpdateStatusParam; +import com.macro.mall.model.OmsOrderReturnApply; +import com.macro.mall.service.OmsOrderReturnApplyService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * ˻ + */ +@Controller +@Api(tags = "OmsOrderReturnApplyController", description = "˻") +@RequestMapping("/returnApply") +public class OmsOrderReturnApplyController {//˻ + @Autowired + private OmsOrderReturnApplyService returnApplyService; + + @ApiOperation("ҳѯ˻") + @RequestMapping(value = "/list", method = RequestMethod.GET) + @ResponseBody + public Object list(OmsReturnApplyQueryParam queryParam, + @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, + @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { + List returnApplyList = returnApplyService.list(queryParam, pageSize, pageNum); + return new CommonResult().pageSuccess(returnApplyList); + } + + @ApiOperation("ɾ") + @RequestMapping(value = "/delete", method = RequestMethod.POST) + @ResponseBody + public Object delete(@RequestParam("ids") List ids) { + int count = returnApplyService.delete(ids); + if (count > 0) { + return new CommonResult().success(count); + } + return new CommonResult().failed(); + } + + @ApiOperation("ȡ˻") + @RequestMapping(value = "/{id}", method = RequestMethod.GET) + @ResponseBody + /*@PathVariableURLռλ*/ + public Object getItem(@PathVariable Long id) { + OmsOrderReturnApplyResult result = returnApplyService.getItem(id); + return new CommonResult().success(result); + } + + @ApiOperation("޸״̬") + @RequestMapping(value = "/update/status/{id}", method = RequestMethod.POST) + @ResponseBody + public Object updateStatus(@PathVariable Long id, @RequestBody OmsUpdateStatusParam statusParam) { + int count = returnApplyService.updateStatus(id, statusParam); + if (count > 0) { + return new CommonResult().success(count); + } + return new CommonResult().failed(); + } + +} diff --git a/代码库/mall-admin/src/main/java/com/sock/mall/controller/OmsOrderReturnReasonController.java b/代码库/mall-admin/src/main/java/com/sock/mall/controller/OmsOrderReturnReasonController.java new file mode 100644 index 0000000..ce799f1 --- /dev/null +++ b/代码库/mall-admin/src/main/java/com/sock/mall/controller/OmsOrderReturnReasonController.java @@ -0,0 +1,85 @@ +package com.macro.mall.controller; + +import com.macro.mall.dto.CommonResult; +import com.macro.mall.model.OmsOrderReturnReason; +import com.macro.mall.service.OmsOrderReturnReasonService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * ˻ԭController + */ +@Controller +@Api(tags = "OmsOrderReturnReasonController", description = "˻ԭ") +@RequestMapping("/returnReason") +public class OmsOrderReturnReasonController { + @Autowired + private OmsOrderReturnReasonService orderReturnReasonService; + + @ApiOperation("˻ԭ") + @RequestMapping(value = "/create", method = RequestMethod.POST) + @ResponseBody + public Object create(@RequestBody OmsOrderReturnReason returnReason) {//˻ԭ + int count = orderReturnReasonService.create(returnReason); + if(count>0){ + return new CommonResult().success(count); + } + return new CommonResult().failed(); + } + + @ApiOperation("޸˻ԭ") + @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) + @ResponseBody + public Object update(@PathVariable Long id, @RequestBody OmsOrderReturnReason returnReason) { + int count = orderReturnReasonService.update(id,returnReason); + if(count>0){ + return new CommonResult().success(count); + } + return new CommonResult().failed(); + } + + @ApiOperation("ɾ˻ԭ") + @RequestMapping(value = "/delete", method = RequestMethod.POST) + @ResponseBody + public Object delete(@RequestParam("ids") List ids) { + int count = orderReturnReasonService.delete(ids); + if(count>0){ + return new CommonResult().success(count); + } + return new CommonResult().failed(); + } + + @ApiOperation("ҳѯȫ˻ԭ") + @RequestMapping(value = "/list", method = RequestMethod.GET) + @ResponseBody + public Object list(@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, + @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { + List reasonList = orderReturnReasonService.list(pageSize,pageNum); + return new CommonResult().pageSuccess(reasonList); + } + + @ApiOperation("ȡ˻ԭϢ") + @RequestMapping(value = "/{id}", method = RequestMethod.GET) + @ResponseBody + public Object getItem(@PathVariable Long id) { + OmsOrderReturnReason reason = orderReturnReasonService.getItem(id); + return new CommonResult().success(reason); + } + + @ApiOperation("޸˻ԭ״̬") + @RequestMapping(value = "/update/status", method = RequestMethod.POST) + @ResponseBody + public Object updateStatus(@RequestParam(value = "status") Integer status, + @RequestParam("ids") List ids) {//޸״̬ + int count = orderReturnReasonService.updateStatus(ids,status); + if(count>0){ + return new CommonResult().success(count); + } + return new CommonResult().failed(); + } +} \ No newline at end of file diff --git a/代码库/mall-admin/src/main/java/com/sock/mall/controller/OmsOrderSettingController.java b/代码库/mall-admin/src/main/java/com/sock/mall/controller/OmsOrderSettingController.java new file mode 100644 index 0000000..03f1719 --- /dev/null +++ b/代码库/mall-admin/src/main/java/com/sock/mall/controller/OmsOrderSettingController.java @@ -0,0 +1,40 @@ +package com.macro.mall.controller; + +import com.macro.mall.dto.CommonResult; +import com.macro.mall.model.OmsOrderSetting; +import com.macro.mall.service.OmsOrderSettingService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +/** + * Controller + */ +@Controller +@Api(tags = "OmsOrderSettingController", description = "ù") +@RequestMapping("/orderSetting") +public class OmsOrderSettingController { + @Autowired + private OmsOrderSettingService orderSettingService; + + @ApiOperation("ȡָ") + @RequestMapping(value = "/{id}", method = RequestMethod.GET) + @ResponseBody + public Object getItem(@PathVariable Long id) {//ȡϢ + OmsOrderSetting orderSetting = orderSettingService.getItem(id); + return new CommonResult().success(orderSetting); + } + + @ApiOperation("޸ָ") + @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) + @ResponseBody + public Object update(@PathVariable Long id, @RequestBody OmsOrderSetting orderSetting) { + int count = orderSettingService.update(id,orderSetting); + if(count>0){ + return new CommonResult().success(count); + } + return new CommonResult().failed(); + } +} \ No newline at end of file