diff --git a/textja/src/main/java/com/lan/textja/controller/dealer/DealerController.java b/textja/src/main/java/com/lan/textja/controller/dealer/DealerController.java index 22eb66f..6a2eba0 100644 --- a/textja/src/main/java/com/lan/textja/controller/dealer/DealerController.java +++ b/textja/src/main/java/com/lan/textja/controller/dealer/DealerController.java @@ -1,15 +1,15 @@ package com.lan.textja.controller.dealer; import com.lan.textja.entity.Dealer; +import com.lan.textja.entity.Product; import com.lan.textja.entity.Supplier; import com.lan.textja.entity.Supply; import com.lan.textja.service.dealer.DealerService; import com.lan.textja.util.JsonResult; +import com.lan.textja.util.PageResult; +import com.lan.textja.util.TreeResult; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.CrossOrigin; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -26,4 +26,57 @@ public class DealerController { List dealerNames= dealerService.dealerNames(); return JsonResult.ok(dealerNames); } + + //分页查询 + + @GetMapping("/selectDealerList") + public JsonResult selectProuductList(PageResult pageResult){ + pageResult = dealerService.selectDealerList(pageResult); + return JsonResult.ok(pageResult); + } + + @RequestMapping(value = "/onSubmit",method = RequestMethod.GET) + public JsonResult onSubmit(Dealer dealer){ + List dealerSelect= dealerService.dealerSelect(dealer); + return JsonResult.ok(dealerSelect); + } + + @RequestMapping(value = "/updateDealer",method = RequestMethod.GET) + public JsonResult updateDealer(Dealer dealer){ + List updateDealer= dealerService.updateDealer(dealer); + return JsonResult.ok(updateDealer); + } + + @RequestMapping(value = "/addupdateDealer",method = RequestMethod.POST) + public JsonResult addupdateDealer(Dealer dealer){ + dealerService.addupdateDealer(dealer); + return JsonResult.ok(JsonResult.SUCCESS); + } + + @RequestMapping(value = "/deleteDealer",method = RequestMethod.POST) + public JsonResult deleteDealer(Dealer dealer){ + dealerService.deleteDealer(dealer); + return JsonResult.ok(JsonResult.SUCCESS); + } + + + @RequestMapping(value = "/dealerNum",method = RequestMethod.GET) + public JsonResult dealerNum(){ + Integer maxValue=dealerService.dealerNum(); + return JsonResult.ok(maxValue); + } + + + @RequestMapping(value = "/onAddDealer",method = RequestMethod.POST) + public JsonResult onAddDealer(Dealer dealer){ + dealerService.onAddDealer(dealer); + return JsonResult.ok(JsonResult.SUCCESS); + } + + @RequestMapping(value = "/tree",method = RequestMethod.GET) + public JsonResult tree(){ + List treeResult =dealerService.treeResult(); + return JsonResult.ok(treeResult); + } + } diff --git a/textja/src/main/java/com/lan/textja/controller/order/DeliveryController.java b/textja/src/main/java/com/lan/textja/controller/order/DeliveryController.java new file mode 100644 index 0000000..4161efb --- /dev/null +++ b/textja/src/main/java/com/lan/textja/controller/order/DeliveryController.java @@ -0,0 +1,56 @@ +package com.lan.textja.controller.order; + +import com.lan.textja.entity.Order; +import com.lan.textja.service.Order.DeliveryService; +import com.lan.textja.util.JsonResult; +import com.lan.textja.util.JsonUtil; +import com.lan.textja.util.PageResult; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +@RestController +@CrossOrigin +@RequestMapping("/Delivery") +public class DeliveryController { + + @Autowired + private DeliveryService deliveryService; + + @RequestMapping(value = "/selectUnfinshedOrder",method = RequestMethod.GET) + public JsonResult selectUnfinshedOrder(PageResult pageResult){ + pageResult= deliveryService.selectUnfinsherdOrder(pageResult); + return JsonResult.ok(pageResult); + } + + @RequestMapping(value = "/orderDetail",method = RequestMethod.GET) + public JsonResult orderDetail(Order order){ + List orderDetailList= deliveryService.orderDetail(order); + return JsonResult.ok(orderDetailList); + } + + + @RequestMapping(value = "/onorder",method = RequestMethod.GET) + public JsonResult onorder(Order order){ + List onorder= deliveryService.onorder(order); + return JsonResult.ok(onorder); + } + + @RequestMapping(value = "/Signorder",method = RequestMethod.GET) + public JsonResult Signorder(Order order){ + deliveryService.Signorder(order); + return JsonResult.ok(JsonResult.SUCCESS); + } + + + @RequestMapping(value = "/selectDoneOrder",method = RequestMethod.GET) + public JsonResult selectDoneOrder(PageResult pageResult){ + pageResult= deliveryService.selectDoneOrder(pageResult); + return JsonResult.ok(pageResult); + } + +} diff --git a/textja/src/main/java/com/lan/textja/controller/product/ProuductController.java b/textja/src/main/java/com/lan/textja/controller/product/ProductController.java similarity index 57% rename from textja/src/main/java/com/lan/textja/controller/product/ProuductController.java rename to textja/src/main/java/com/lan/textja/controller/product/ProductController.java index 424dc45..b92531d 100644 --- a/textja/src/main/java/com/lan/textja/controller/product/ProuductController.java +++ b/textja/src/main/java/com/lan/textja/controller/product/ProductController.java @@ -1,7 +1,7 @@ package com.lan.textja.controller.product; -import com.lan.textja.entity.Prouduct; -import com.lan.textja.service.product.ProuductService; +import com.lan.textja.entity.Product; +import com.lan.textja.service.product.ProductService; import com.lan.textja.util.JsonResult; import com.lan.textja.util.PageResult; import org.springframework.beans.factory.annotation.Autowired; @@ -13,10 +13,10 @@ import java.util.List; @RestController @RequestMapping("/prouduct") @CrossOrigin -public class ProuductController { +public class ProductController { @Autowired - private ProuductService prouductService; + private ProductService productService; //全查询 // @GetMapping("/selectList") @@ -29,34 +29,34 @@ public class ProuductController { @GetMapping("/selectList") public JsonResult selectProuductList(PageResult pageResult){ - pageResult = prouductService.selectProuductList(pageResult); + pageResult = productService.selectProuductList(pageResult); return JsonResult.ok(pageResult); } //删除prouduct @PostMapping("/deleteProuduct") - public JsonResult deleteProuduct(Integer id){ - prouductService.deleteProuduct(id); + public JsonResult deleteProuduct(Integer productNum){ + productService.deleteProuduct(productNum); return JsonResult.ok(); } //添加产品 @PostMapping("/onAddProuduct") - public JsonResult addProuduct(Prouduct prouduct){ - prouductService.addProuduct(prouduct); + public JsonResult addProuduct(Product product){ + productService.addProuduct(product); return JsonResult.build(JsonResult.SUCCESS); } //修改产品信息 @GetMapping("/updateProuduct") - public JsonResult updateProuduct(Integer id){ - Prouduct prouduct= prouductService.updateProuduct(id); - return JsonResult.ok(prouduct); + public JsonResult updateProuduct(Integer productNum){ + Product product= productService.updateProuduct(productNum); + return JsonResult.ok(product); } @PostMapping("/addupdateProuduct") - public JsonResult addupdateProuduct(Prouduct prouduct){ - prouductService.addupdateProuduct(prouduct); + public JsonResult addupdateProuduct(Product product){ + productService.addupdateProuduct(product); return JsonResult.ok(); } @@ -64,34 +64,34 @@ public class ProuductController { @ResponseBody public void downloadExcel(HttpServletResponse response){ try { - prouductService.exportDataToEx(response); + productService.exportDataToEx(response); } catch (Exception e) { e.printStackTrace(); } } @GetMapping("/onSubmit") - public JsonResult onSubmit(Prouduct prouduct){ - List prouductList= prouductService.onSubmit(prouduct); + public JsonResult onSubmit(Product product){ + List prouductList= productService.onSubmit(product); return JsonResult.ok(prouductList); } @GetMapping("/onbrandslist") - public JsonResult onbrandslist(Prouduct prouduct){ - List brandslist= prouductService.onbrandslist(prouduct); + public JsonResult onbrandslist(Product product){ + List brandslist= productService.onbrandslist(product); //System.out.println(brandslist); return JsonResult.ok(brandslist); } @GetMapping("/onchannellist") - public JsonResult channellist(Prouduct prouduct){ - List channellist= prouductService.onchannellist(prouduct); + public JsonResult channellist(Product product){ + List channellist= productService.onchannellist(product); return JsonResult.ok(channellist); } @GetMapping("/ontypelist") - public JsonResult typelist(Prouduct prouduct){ - List typelist= prouductService.ontypelist(prouduct); + public JsonResult typelist(Product product){ + List typelist= productService.ontypelist(product); return JsonResult.ok(typelist); } diff --git a/textja/src/main/java/com/lan/textja/controller/product/ProuductBasicsController.java b/textja/src/main/java/com/lan/textja/controller/product/ProuductBasicsController.java deleted file mode 100644 index 9bbb09e..0000000 --- a/textja/src/main/java/com/lan/textja/controller/product/ProuductBasicsController.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.lan.textja.controller.product; - - -import com.lan.textja.entity.ProuductBasics; -import com.lan.textja.service.product.ProuductBasicsService; -import com.lan.textja.util.JsonResult; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.CrossOrigin; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import java.util.List; - -@CrossOrigin -@RestController -@RequestMapping("/proudcutbasics") -public class ProuductBasicsController { - @Autowired - private ProuductBasicsService prouductBasicsService; - - - -@GetMapping("/onbrandslist") - public JsonResult selectbrandslist(){ - Listbrandslist= prouductBasicsService.selectbrandslist(); - return JsonResult.ok(brandslist); - -} -} diff --git a/textja/src/main/java/com/lan/textja/controller/supplier/SupplierController.java b/textja/src/main/java/com/lan/textja/controller/supplier/SupplierController.java index 82e8308..7481dbd 100644 --- a/textja/src/main/java/com/lan/textja/controller/supplier/SupplierController.java +++ b/textja/src/main/java/com/lan/textja/controller/supplier/SupplierController.java @@ -70,8 +70,8 @@ public class SupplierController { @RequestMapping(value = "/SupplierNum",method = RequestMethod.GET) - public JsonResult SupplierNum(Supplier supplier){ - Integer maxValue=supplierService.SupplierNum(supplier); + public JsonResult SupplierNum(){ + Integer maxValue=supplierService.SupplierNum(); return JsonResult.ok(maxValue); } diff --git a/textja/src/main/java/com/lan/textja/controller/supplier/SupplyController.java b/textja/src/main/java/com/lan/textja/controller/supplier/SupplyController.java index 0ea2c70..9bfc438 100644 --- a/textja/src/main/java/com/lan/textja/controller/supplier/SupplyController.java +++ b/textja/src/main/java/com/lan/textja/controller/supplier/SupplyController.java @@ -55,8 +55,13 @@ public class SupplyController { @RequestMapping(value = "/SureOrder",method = RequestMethod.POST,produces = "application/json;charset=UTF-8") public JsonResult SureOrder(@RequestParam(required = false) Map params){ System.out.println(params); - supplyService.SureOrder(params); - return JsonResult.ok(JsonResult.SUCCESS); + Integer SUCCESS=supplyService.SureOrder(params); + if(SUCCESS==200){ + + return JsonResult.ok().code(200); + } + + return JsonResult.err().code(201); } diff --git a/textja/src/main/java/com/lan/textja/entity/Dealer.java b/textja/src/main/java/com/lan/textja/entity/Dealer.java index 65e7c84..98c23e6 100644 --- a/textja/src/main/java/com/lan/textja/entity/Dealer.java +++ b/textja/src/main/java/com/lan/textja/entity/Dealer.java @@ -1,10 +1,13 @@ package com.lan.textja.entity; import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import lombok.experimental.Accessors; import java.io.Serializable; +import java.sql.Date; + @Data @TableName("dealer") @Accessors(chain = true) @@ -14,5 +17,16 @@ public class Dealer implements Serializable { private String dealerContact; private String dealerAddress; private String dealerNumber; + private String dealerReceiver; + private String dealerEmail; + private Boolean dealerState; + @JsonFormat(pattern="yyyy-MM-dd") + private Date dealerStartDate; + @JsonFormat(pattern="yyyy-MM-dd") + private Date dealerTerminationDate; + + + + } diff --git a/textja/src/main/java/com/lan/textja/entity/Inventory.java b/textja/src/main/java/com/lan/textja/entity/Inventory.java index 9fbcf56..0e7842f 100644 --- a/textja/src/main/java/com/lan/textja/entity/Inventory.java +++ b/textja/src/main/java/com/lan/textja/entity/Inventory.java @@ -12,12 +12,12 @@ import java.io.Serializable; public class Inventory implements Serializable { //@TableField("name") //如果属性与字段同名(包括驼峰规则)注解可以省略 - private Integer productNum; - private String productName; - private String productType; - private String productBrands; - private Integer allStock; - private Integer remainingQty; + private Integer inventoryProductNum; + private String inventoryProductName; + private String inventoryProductType; + private String inventoryProductBrands; + private Integer inventoryAllStock; + private Integer inventoryRemainingQty; } diff --git a/textja/src/main/java/com/lan/textja/entity/Product.java b/textja/src/main/java/com/lan/textja/entity/Product.java new file mode 100644 index 0000000..ff96f18 --- /dev/null +++ b/textja/src/main/java/com/lan/textja/entity/Product.java @@ -0,0 +1,25 @@ +package com.lan.textja.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.io.Serializable; + +@Data +@Accessors(chain = true) +@TableName("product") +public class Product implements Serializable { + private String productName; + private String productType; + private Boolean productState; + private String productSize; + private String productBenefits; + private String productBrands; + private Integer productNum; + private String productChannel; + private Integer productSellingPrice; + private Integer productTypeNo; +} diff --git a/textja/src/main/java/com/lan/textja/entity/Prouduct.java b/textja/src/main/java/com/lan/textja/entity/Prouduct.java deleted file mode 100644 index 14a9a6c..0000000 --- a/textja/src/main/java/com/lan/textja/entity/Prouduct.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.lan.textja.entity; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; -import lombok.experimental.Accessors; - -import java.io.Serializable; - -@Data -@Accessors(chain = true) -@TableName("prouduct") -public class Prouduct implements Serializable { - @TableId(type = IdType.AUTO) - private Integer id; - private String name; - private String type; - private Boolean state; - private String size; - private String benefits; - private String brands; - private Integer num; - private String channel; -} diff --git a/textja/src/main/java/com/lan/textja/entity/ProuductBasics.java b/textja/src/main/java/com/lan/textja/entity/ProuductBasics.java deleted file mode 100644 index d99c45c..0000000 --- a/textja/src/main/java/com/lan/textja/entity/ProuductBasics.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.lan.textja.entity; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.experimental.Accessors; - -import java.io.Serializable; - -@Data -@AllArgsConstructor -@NoArgsConstructor -@TableName("prouductbasics") -@Accessors(chain = true) -public class ProuductBasics implements Serializable { - - @TableId(type = IdType.AUTO) - private Integer id; - private String type; - private String brands; - private String channel; -} diff --git a/textja/src/main/java/com/lan/textja/mapper/DealerMapper.java b/textja/src/main/java/com/lan/textja/mapper/DealerMapper.java index 0b66d80..a5592a2 100644 --- a/textja/src/main/java/com/lan/textja/mapper/DealerMapper.java +++ b/textja/src/main/java/com/lan/textja/mapper/DealerMapper.java @@ -2,6 +2,7 @@ package com.lan.textja.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.lan.textja.entity.Dealer; +import org.apache.ibatis.annotations.Select; import java.util.List; @@ -10,4 +11,19 @@ public interface DealerMapper extends BaseMapper { Dealer select(String dealerName); + + @Select("select * from dealer where dealer_State=1 limit #{start},#{size} ") + List findDealerListByPage(int start, int size); + + List dealerSelect(Dealer dealer); + + List updateDealer(Dealer dealer); + + void addupdateDealer(Dealer dealer); + + void deleteDealer(Dealer dealer); + + List dealerNum(); + + void onAddDealer(Dealer dealer); } diff --git a/textja/src/main/java/com/lan/textja/mapper/DeliveryMapper.java b/textja/src/main/java/com/lan/textja/mapper/DeliveryMapper.java new file mode 100644 index 0000000..7243100 --- /dev/null +++ b/textja/src/main/java/com/lan/textja/mapper/DeliveryMapper.java @@ -0,0 +1,24 @@ +package com.lan.textja.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.lan.textja.entity.Order; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +public interface DeliveryMapper extends BaseMapper { + + @Select("select * from orders where order_State=1 limit #{start},#{size} ") + List findDeliveryListByPage(int start, int size); + + List orderDetail(Order order); + + void SureOrder(Order order); + + List onorder(Order order); + + void Signorder(Order order); + + @Select("select * from orders where order_State=0 limit #{start},#{size} ") + List selectDoneOrder(int start, int size); +} diff --git a/textja/src/main/java/com/lan/textja/mapper/InventoryMapper.java b/textja/src/main/java/com/lan/textja/mapper/InventoryMapper.java index f21dac8..7715fbd 100644 --- a/textja/src/main/java/com/lan/textja/mapper/InventoryMapper.java +++ b/textja/src/main/java/com/lan/textja/mapper/InventoryMapper.java @@ -23,4 +23,9 @@ public interface InventoryMapper extends BaseMapper { List handleDetail(Inventory inventory); void UpdateInventory(Inventory inventory); + + Integer selectRemainingQty(Integer productNum); + + + void addQty(Integer remainingQty, Integer productNum); } diff --git a/textja/src/main/java/com/lan/textja/mapper/OrderMapper.java b/textja/src/main/java/com/lan/textja/mapper/OrderMapper.java deleted file mode 100644 index 91f43c9..0000000 --- a/textja/src/main/java/com/lan/textja/mapper/OrderMapper.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.lan.textja.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.lan.textja.entity.Order; - -public interface OrderMapper extends BaseMapper { - - void SureOrder(Order order); -} diff --git a/textja/src/main/java/com/lan/textja/mapper/ProductMapper.java b/textja/src/main/java/com/lan/textja/mapper/ProductMapper.java new file mode 100644 index 0000000..0867c35 --- /dev/null +++ b/textja/src/main/java/com/lan/textja/mapper/ProductMapper.java @@ -0,0 +1,32 @@ +package com.lan.textja.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.lan.textja.entity.Product; +import com.lan.textja.util.TreeResult; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +public interface ProductMapper extends BaseMapper { + + @Select("select * from product limit #{start},#{size}") + List findProuductListByPage(Integer start, Integer size); + + List onSubmit(Product product); + + @Select("select distinct product_Brands from product") + List onbrandslist(Product product); + + // @Select("select distinct channel from prouduct") + List onchannellist(Product product); + + List ontypelist(Product product); + + Product updateProuduct(Integer productNum); + + List selectSupplierNo(); + + +// @Update("pudate prouduct set name=#{name},type=#{type},state=#{state},size=#{size},alias=#{alias},brands=#{brands},num=#{num} where id=#{id}") +// void addupdateProuduct(Prouduct prouduct); +} diff --git a/textja/src/main/java/com/lan/textja/mapper/ProuductBasicsMapper.java b/textja/src/main/java/com/lan/textja/mapper/ProuductBasicsMapper.java deleted file mode 100644 index f73b6e9..0000000 --- a/textja/src/main/java/com/lan/textja/mapper/ProuductBasicsMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.lan.textja.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.lan.textja.entity.ProuductBasics; -import org.apache.ibatis.annotations.Select; - -import java.util.List; - -public interface ProuductBasicsMapper extends BaseMapper { - - @Select("select brands from prouductbasics") - List selectbrandslist(Object o); -} diff --git a/textja/src/main/java/com/lan/textja/mapper/ProuductMapper.java b/textja/src/main/java/com/lan/textja/mapper/ProuductMapper.java deleted file mode 100644 index 3f30ded..0000000 --- a/textja/src/main/java/com/lan/textja/mapper/ProuductMapper.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.lan.textja.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.lan.textja.entity.Prouduct; -import org.apache.ibatis.annotations.Select; - -import java.util.List; - -public interface ProuductMapper extends BaseMapper { - - @Select("select * from prouduct limit #{start},#{size}") - List findProuductListByPage(Integer start, Integer size); - - List onSubmit(Prouduct prouduct); - - @Select("select distinct brands from prouduct") - List onbrandslist(Prouduct prouduct); - - // @Select("select distinct channel from prouduct") - List onchannellist(Prouduct prouduct); - - List ontypelist(Prouduct prouduct); - - -// @Update("pudate prouduct set name=#{name},type=#{type},state=#{state},size=#{size},alias=#{alias},brands=#{brands},num=#{num} where id=#{id}") -// void addupdateProuduct(Prouduct prouduct); -} diff --git a/textja/src/main/java/com/lan/textja/service/Order/DeliveryService.java b/textja/src/main/java/com/lan/textja/service/Order/DeliveryService.java new file mode 100644 index 0000000..825744d --- /dev/null +++ b/textja/src/main/java/com/lan/textja/service/Order/DeliveryService.java @@ -0,0 +1,18 @@ +package com.lan.textja.service.Order; + +import com.lan.textja.entity.Order; +import com.lan.textja.util.PageResult; + +import java.util.List; + +public interface DeliveryService { + PageResult selectUnfinsherdOrder(PageResult pageResult); + + List orderDetail(Order order); + + List onorder(Order order); + + void Signorder(Order order); + + PageResult selectDoneOrder(PageResult pageResult); +} diff --git a/textja/src/main/java/com/lan/textja/service/Order/DeliveryServiceImp.java b/textja/src/main/java/com/lan/textja/service/Order/DeliveryServiceImp.java new file mode 100644 index 0000000..0be1949 --- /dev/null +++ b/textja/src/main/java/com/lan/textja/service/Order/DeliveryServiceImp.java @@ -0,0 +1,78 @@ +package com.lan.textja.service.Order; + +import com.lan.textja.entity.Dealer; +import com.lan.textja.entity.Order; +import com.lan.textja.mapper.DeliveryMapper; +import com.lan.textja.mapper.InventoryMapper; +import com.lan.textja.util.PageResult; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class DeliveryServiceImp implements DeliveryService{ + @Autowired + private DeliveryMapper deliveryMapper; + + @Autowired + private InventoryMapper inventoryMapper; + + @Override + public PageResult selectUnfinsherdOrder(PageResult pageResult) { + //起始位置 + int start = (pageResult.getPageNum()-1) * pageResult.getPageSize(); + //每页条数 + int size = pageResult.getPageSize(); + //分页结果 + List DeliveryList = deliveryMapper.findDeliveryListByPage(start,size); + //是user表的总数信息 暂时不需要where条件. + long total = deliveryMapper.selectCount(null); + //封装数据实现返回 + pageResult.setTotal(total).setRows(DeliveryList); + return pageResult; + } + + @Override + public List orderDetail(Order order) { + ListorderDetailList= deliveryMapper.orderDetail(order); + return orderDetailList; + } + + @Override + public List onorder(Order order) { + Listonorder= deliveryMapper.onorder(order); + return onorder; + } + + @Override + public void Signorder(Order order) { + + //state 1订单进行中 0订单完成 + order.setOrderState(false); + + //产品库存增加(入库增加) + Integer Qty=order.getOrderQty(); + Integer productNum=order.getOrderGoodsNo(); + Integer remainingQty1=inventoryMapper.selectRemainingQty(productNum); + Integer remainingQty= remainingQty1+Qty; + inventoryMapper.addQty(remainingQty,productNum); + + deliveryMapper.Signorder(order); + } + + @Override + public PageResult selectDoneOrder(PageResult pageResult) { + //起始位置 + int start = (pageResult.getPageNum()-1) * pageResult.getPageSize(); + //每页条数 + int size = pageResult.getPageSize(); + //分页结果 + List DeliveryList = deliveryMapper.selectDoneOrder(start,size); + //是user表的总数信息 暂时不需要where条件. + long total = deliveryMapper.selectCount(null); + //封装数据实现返回 + pageResult.setTotal(total).setRows(DeliveryList); + return pageResult; + } +} diff --git a/textja/src/main/java/com/lan/textja/service/dealer/DealerService.java b/textja/src/main/java/com/lan/textja/service/dealer/DealerService.java index 43bbd4b..4c3003b 100644 --- a/textja/src/main/java/com/lan/textja/service/dealer/DealerService.java +++ b/textja/src/main/java/com/lan/textja/service/dealer/DealerService.java @@ -1,9 +1,27 @@ package com.lan.textja.service.dealer; import com.lan.textja.entity.Dealer; +import com.lan.textja.util.PageResult; +import com.lan.textja.util.TreeResult; import java.util.List; public interface DealerService{ List dealerNames(); + + PageResult selectDealerList(PageResult pageResult); + + List dealerSelect(Dealer dealer); + + List updateDealer(Dealer dealer); + + void addupdateDealer(Dealer dealer); + + void deleteDealer(Dealer dealer); + + Integer dealerNum(); + + void onAddDealer(Dealer dealer); + + List treeResult(); } diff --git a/textja/src/main/java/com/lan/textja/service/dealer/DealerServiceImp.java b/textja/src/main/java/com/lan/textja/service/dealer/DealerServiceImp.java index a13c8c4..f069fdc 100644 --- a/textja/src/main/java/com/lan/textja/service/dealer/DealerServiceImp.java +++ b/textja/src/main/java/com/lan/textja/service/dealer/DealerServiceImp.java @@ -1,11 +1,16 @@ package com.lan.textja.service.dealer; import com.lan.textja.entity.Dealer; -import com.lan.textja.entity.Supplier; +import com.lan.textja.entity.Product; import com.lan.textja.mapper.DealerMapper; +import com.lan.textja.mapper.ProductMapper; +import com.lan.textja.util.PageResult; +import com.lan.textja.util.TreeResult; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.ArrayList; +import java.util.Collections; import java.util.List; @Service @@ -14,9 +19,76 @@ public class DealerServiceImp implements DealerService{ @Autowired private DealerMapper dealerMapper; + @Autowired + private ProductMapper productMapper; + @Override public List dealerNames() { List dealerNames =dealerMapper.dealerNames(); return dealerNames; } + + @Override + public PageResult selectDealerList(PageResult pageResult) { + //起始位置 + int start = (pageResult.getPageNum()-1) * pageResult.getPageSize(); + //每页条数 + int size = pageResult.getPageSize(); + //分页结果 + List DealerList = dealerMapper.findDealerListByPage(start,size); + //是user表的总数信息 暂时不需要where条件. + long total = dealerMapper.selectCount(null); + //封装数据实现返回 + pageResult.setTotal(total).setRows(DealerList); + return pageResult; + + + } + + @Override + public List dealerSelect(Dealer dealer) { + List dealerSelect= dealerMapper.dealerSelect(dealer); + return dealerSelect; + } + + @Override + public List updateDealer(Dealer dealer) { + List updateDealer= dealerMapper.updateDealer(dealer); + return updateDealer; + } + + @Override + public void addupdateDealer(Dealer dealer) { + dealerMapper.addupdateDealer(dealer); + } + + @Override + public void deleteDealer(Dealer dealer) { + dealer.setDealerState(false); + dealerMapper.deleteDealer(dealer); + } + + @Override + public Integer dealerNum() { + List Nums=dealerMapper.dealerNum(); + System.out.println(Nums); + Integer maxValue = Collections.max(Nums); + System.out.println(maxValue); + maxValue++; + return maxValue; + } + + @Override + public void onAddDealer(Dealer dealer) { + dealer.setDealerState(true); + dealerMapper.onAddDealer(dealer); + } + + @Override + public List treeResult() { + List OneTree=new ArrayList<>(); + List SupplierNo=productMapper.selectSupplierNo(); + System.out.println(OneTree); + return null; + } } diff --git a/textja/src/main/java/com/lan/textja/service/product/InventoryServiceImp.java b/textja/src/main/java/com/lan/textja/service/product/InventoryServiceImp.java index 0ec53c1..177033c 100644 --- a/textja/src/main/java/com/lan/textja/service/product/InventoryServiceImp.java +++ b/textja/src/main/java/com/lan/textja/service/product/InventoryServiceImp.java @@ -115,12 +115,12 @@ public class InventoryServiceImp implements InventoryService { for (int i =0 ;i selectProuductList(); + + PageResult selectProuductList(PageResult pageResult); + + void deleteProuduct(Integer productNum); + + void addProuduct(Product product); + + Product updateProuduct(Integer productNum); + + void addupdateProuduct(Product product); + + void exportDataToEx(HttpServletResponse response) throws IOException; + + + List onSubmit(Product product); + + List onbrandslist(Product product); + + List onchannellist(Product product); + + List ontypelist(Product product); +} diff --git a/textja/src/main/java/com/lan/textja/service/product/ProuductServiceImp.java b/textja/src/main/java/com/lan/textja/service/product/ProductServiceImp.java similarity index 74% rename from textja/src/main/java/com/lan/textja/service/product/ProuductServiceImp.java rename to textja/src/main/java/com/lan/textja/service/product/ProductServiceImp.java index 88771a7..6e7a3dc 100644 --- a/textja/src/main/java/com/lan/textja/service/product/ProuductServiceImp.java +++ b/textja/src/main/java/com/lan/textja/service/product/ProductServiceImp.java @@ -1,7 +1,8 @@ package com.lan.textja.service.product; -import com.lan.textja.entity.Prouduct; -import com.lan.textja.mapper.ProuductMapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.lan.textja.entity.Product; +import com.lan.textja.mapper.ProductMapper; import com.lan.textja.util.PageResult; import org.apache.poi.hssf.usermodel.*; import org.apache.poi.ss.usermodel.FillPatternType; @@ -18,9 +19,9 @@ import java.io.OutputStream; import java.util.List; @Service -public class ProuductServiceImp implements ProuductService { +public class ProductServiceImp implements ProductService { @Autowired - private ProuductMapper prouductMapper; + private ProductMapper productMapper; //全查询 // @Override @@ -82,40 +83,42 @@ public class ProuductServiceImp implements ProuductService { //每页条数 int size = pageResult.getPageSize(); //分页结果 - List prouductList = prouductMapper.findProuductListByPage(start,size); + List productList = productMapper.findProuductListByPage(start,size); //是user表的总数信息 暂时不需要where条件. - long total = prouductMapper.selectCount(null); + long total = productMapper.selectCount(null); //封装数据实现返回 - pageResult.setTotal(total).setRows(prouductList); + pageResult.setTotal(total).setRows(productList); return pageResult; } @Override - public void deleteProuduct(Integer id) { - prouductMapper.deleteById(id); + public void deleteProuduct(Integer productNum) { + productMapper.deleteById(productNum); } @Override - public void addProuduct(Prouduct prouduct) { - prouductMapper.insert(prouduct); + public void addProuduct(Product product) { + productMapper.insert(product); } @Override - public Prouduct updateProuduct(Integer id) { - Prouduct prouduct = prouductMapper.selectById(id); - return prouduct; + public Product updateProuduct(Integer productNum) { +// QueryWrapper wrapper = new QueryWrapper(); +// wrapper.eq("productNum",productNum); + Product product = productMapper.updateProuduct(productNum); + return product; } //根据对象中不为null的属性当做set条件,id当做唯一where条件 @Override - public void addupdateProuduct(Prouduct prouduct) { - prouductMapper.updateById(prouduct); + public void addupdateProuduct(Product product) { + productMapper.updateById(product); } @Override public void exportDataToEx(HttpServletResponse response) throws IOException { //获得数据库当中的数据,这里是已经写好的一个方法,返回的是一个select * 的list集合。 - List list = prouductMapper.selectList(null); + List list = productMapper.selectList(null); HSSFWorkbook workbook = new HSSFWorkbook(); @@ -149,16 +152,16 @@ public class ProuductServiceImp implements ProuductService { //对前面得到的list集合进行遍历 for (int i =0 ;i onSubmit(Prouduct prouduct) { - List prouductList=prouductMapper.onSubmit(prouduct); + public List onSubmit(Product product) { + List prouductList=productMapper.onSubmit(product); return prouductList; } @Override - public List onbrandslist(Prouduct prouduct) { - List brandslist =prouductMapper.onbrandslist(prouduct); + public List onbrandslist(Product product) { + List brandslist =productMapper.onbrandslist(product); return brandslist; } @Override - public List onchannellist(Prouduct prouduct) { - List channellist= prouductMapper.onchannellist(prouduct); + public List onchannellist(Product product) { + List channellist= productMapper.onchannellist(product); return channellist; } @Override - public List ontypelist(Prouduct prouduct) { - List typelist= prouductMapper.ontypelist(prouduct); + public List ontypelist(Product product) { + List typelist= productMapper.ontypelist(product); return typelist; } } diff --git a/textja/src/main/java/com/lan/textja/service/product/ProuductBasicsService.java b/textja/src/main/java/com/lan/textja/service/product/ProuductBasicsService.java deleted file mode 100644 index f762193..0000000 --- a/textja/src/main/java/com/lan/textja/service/product/ProuductBasicsService.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.lan.textja.service.product; - -import com.lan.textja.entity.ProuductBasics; - -import java.util.List; - -public interface ProuductBasicsService { - List selectbrandslist(); -} diff --git a/textja/src/main/java/com/lan/textja/service/product/ProuductBasicsServiceImp.java b/textja/src/main/java/com/lan/textja/service/product/ProuductBasicsServiceImp.java deleted file mode 100644 index 15fc0bf..0000000 --- a/textja/src/main/java/com/lan/textja/service/product/ProuductBasicsServiceImp.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.lan.textja.service.product; - - -import com.lan.textja.entity.ProuductBasics; -import com.lan.textja.mapper.ProuductBasicsMapper; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - -@Service -public class ProuductBasicsServiceImp implements ProuductBasicsService { - @Autowired - private ProuductBasicsMapper prouductBasicsMapper; - - - @Override - public List selectbrandslist() { - List brandslist= - prouductBasicsMapper.selectbrandslist(null); - return brandslist; - } -} diff --git a/textja/src/main/java/com/lan/textja/service/product/ProuductService.java b/textja/src/main/java/com/lan/textja/service/product/ProuductService.java deleted file mode 100644 index 6cf3760..0000000 --- a/textja/src/main/java/com/lan/textja/service/product/ProuductService.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.lan.textja.service.product; - -import com.lan.textja.entity.Prouduct; -import com.lan.textja.util.PageResult; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; - -public interface ProuductService { - //全查询 -// List selectProuductList(); - - PageResult selectProuductList(PageResult pageResult); - - void deleteProuduct(Integer id); - - void addProuduct(Prouduct prouduct); - - Prouduct updateProuduct(Integer id); - - void addupdateProuduct(Prouduct prouduct); - - void exportDataToEx(HttpServletResponse response) throws IOException; - - - List onSubmit(Prouduct prouduct); - - List onbrandslist(Prouduct prouduct); - - List onchannellist(Prouduct prouduct); - - List ontypelist(Prouduct prouduct); -} diff --git a/textja/src/main/java/com/lan/textja/service/supplier/SupplierService.java b/textja/src/main/java/com/lan/textja/service/supplier/SupplierService.java index 0bfb7f3..9fc1e90 100644 --- a/textja/src/main/java/com/lan/textja/service/supplier/SupplierService.java +++ b/textja/src/main/java/com/lan/textja/service/supplier/SupplierService.java @@ -20,5 +20,5 @@ public interface SupplierService { List onSubmit(Supplier supplier); - Integer SupplierNum(Supplier supplier); + Integer SupplierNum(); } diff --git a/textja/src/main/java/com/lan/textja/service/supplier/SupplierServiceImp.java b/textja/src/main/java/com/lan/textja/service/supplier/SupplierServiceImp.java index 055aba8..ff0e9c9 100644 --- a/textja/src/main/java/com/lan/textja/service/supplier/SupplierServiceImp.java +++ b/textja/src/main/java/com/lan/textja/service/supplier/SupplierServiceImp.java @@ -70,7 +70,7 @@ public class SupplierServiceImp implements SupplierService{ } @Override - public Integer SupplierNum(Supplier supplier) { + public Integer SupplierNum() { List Nums=supplierMapper.SupplierNum(); System.out.println(Nums); Integer maxValue = Collections.max(Nums); diff --git a/textja/src/main/java/com/lan/textja/service/supplier/SupplyService.java b/textja/src/main/java/com/lan/textja/service/supplier/SupplyService.java index 68465a7..75896c0 100644 --- a/textja/src/main/java/com/lan/textja/service/supplier/SupplyService.java +++ b/textja/src/main/java/com/lan/textja/service/supplier/SupplyService.java @@ -3,6 +3,7 @@ package com.lan.textja.service.supplier; import com.lan.textja.entity.Order; import com.lan.textja.entity.Supplier; import com.lan.textja.entity.Supply; +import com.lan.textja.util.JsonResult; import com.lan.textja.util.PageResult; import java.util.List; @@ -19,7 +20,7 @@ public interface SupplyService { List Onorder(Supply supply); - void SureOrder(Map params); + Integer SureOrder(Map params); Integer goodsNum(); diff --git a/textja/src/main/java/com/lan/textja/service/supplier/SupplyServiceImp.java b/textja/src/main/java/com/lan/textja/service/supplier/SupplyServiceImp.java index fd8b859..9f49aee 100644 --- a/textja/src/main/java/com/lan/textja/service/supplier/SupplyServiceImp.java +++ b/textja/src/main/java/com/lan/textja/service/supplier/SupplyServiceImp.java @@ -1,16 +1,9 @@ package com.lan.textja.service.supplier; -import com.lan.textja.entity.Dealer; -import com.lan.textja.entity.Order; -import com.lan.textja.entity.Supplier; -import com.lan.textja.entity.Supply; -import com.lan.textja.mapper.DealerMapper; -import com.lan.textja.mapper.OrderMapper; -import com.lan.textja.mapper.SupplierMapper; -import com.lan.textja.mapper.SupplyMapper; +import com.lan.textja.entity.*; +import com.lan.textja.mapper.*; +import com.lan.textja.util.JsonResult; import com.lan.textja.util.PageResult; -import com.sun.org.apache.regexp.internal.RE; -import org.apache.ibatis.javassist.expr.NewArray; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -26,11 +19,14 @@ public class SupplyServiceImp implements SupplyService { private DealerMapper dealerMapper; @Autowired - private OrderMapper orderMapper; + private DeliveryMapper deliveryMapper; @Autowired private SupplierMapper supplierMapper; + @Autowired + private InventoryMapper inventoryMapper; + @Override public PageResult supplyList(PageResult pageResult) { //起始位置 @@ -71,8 +67,14 @@ public class SupplyServiceImp implements SupplyService { } @Override - public void SureOrder(Map params) { - + public Integer SureOrder(Map params) { + + Integer remainingQty= inventoryMapper.selectRemainingQty(Integer.parseInt(String.valueOf(params.get("goodsNum")))); + int SUCCESS=200; + if(remainingQty>=2000){ + SUCCESS=401; + return SUCCESS; + }else { Order order = new Order(); //设置订单号 int max = 10000; @@ -89,7 +91,7 @@ public class SupplyServiceImp implements SupplyService { order.setOrderType(String.valueOf(Optional.ofNullable(params.get("goodsType")).orElse(""))); //获取dealer信息 - String dealerName = String.valueOf(Optional.ofNullable(params.get("dealerName")).orElse("")); + String dealerName = "紫艺化妆品(总店)"; Dealer dealerList = dealerMapper.select(dealerName); order.setOrderDealerContact(dealerList.getDealerContact()); order.setOrderDealerAddress(dealerList.getDealerAddress()); @@ -107,7 +109,11 @@ public class SupplyServiceImp implements SupplyService { //订单进行中 order.setOrderState(true); - orderMapper.SureOrder(order); + + deliveryMapper.SureOrder(order); + + return SUCCESS; + } } @Override diff --git a/textja/src/main/java/com/lan/textja/util/MenuResult.java b/textja/src/main/java/com/lan/textja/util/MenuResult.java index 6d50296..a3cbe2e 100644 --- a/textja/src/main/java/com/lan/textja/util/MenuResult.java +++ b/textja/src/main/java/com/lan/textja/util/MenuResult.java @@ -17,5 +17,4 @@ public class MenuResult implements Serializable { private String path; //菜单路径 private Integer level; //菜单排序 private List children; //子菜单列表 - } diff --git a/textja/src/main/java/com/lan/textja/util/TreeResult.java b/textja/src/main/java/com/lan/textja/util/TreeResult.java new file mode 100644 index 0000000..2b9c54d --- /dev/null +++ b/textja/src/main/java/com/lan/textja/util/TreeResult.java @@ -0,0 +1,19 @@ +package com.lan.textja.util; + +import lombok.Data; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.util.List; + +@Data +@Accessors(chain = true) +public class TreeResult implements Serializable { + private Integer productSupplierNo;//父id + private Integer productTypeNo;//一级子id + private String productType;//父名称 + private String productBrands;//一子名称 + private String productName;//二级子名称 + private List children; //一级子菜单列表 + private List children2;//二级子菜单列表 +} diff --git a/textja/src/main/resources/com/lan/textja/mapper/DealerMapper.xml b/textja/src/main/resources/com/lan/textja/mapper/DealerMapper.xml index 7fef872..db1c878 100644 --- a/textja/src/main/resources/com/lan/textja/mapper/DealerMapper.xml +++ b/textja/src/main/resources/com/lan/textja/mapper/DealerMapper.xml @@ -9,6 +9,11 @@ dealer_Contact AS "dealerContact", dealer_Address AS "dealerAddress", dealer_Number AS "dealerNumber", + dealer_Receiver AS "dealerReceiver", + dealer_Email AS "dealerEmail", + dealer_Start_Date AS "dealerStartDate", + dealer_Termination_Date AS "dealerTerminationDate", + dealer_State AS "dealerState" + + + + + + + update dealer set + dealer_Name =#{dealerName}, + dealer_Contact=#{dealerContact} , + dealer_Address=#{dealerAddress} , + dealer_Number=#{dealerNumber}, + dealer_Receiver=#{dealerReceiver} , + dealer_Email=#{dealerEmail}, + dealer_Start_Date=#{dealerStartDate}, + dealer_Termination_Date=#{dealerTerminationDate} + where dealer_Num =#{dealerNum} + + + + update dealer set dealer_State=#{dealerState} + where dealer_Num=#{dealerNum} + + + + + + insert into + Dealer ( + dealer_Num , + dealer_Name, + dealer_Contact, + dealer_Address, + dealer_Number, + dealer_Receiver, + dealer_Email, + dealer_Start_Date, + dealer_Termination_Date, + dealer_State + ) + values ( + #{dealerNum}, + #{dealerName}, + #{dealerContact}, + #{dealerAddress}, + #{dealerNumber}, + #{dealerReceiver}, + #{dealerEmail}, + #{dealerStartDate}, + #{dealerTerminationDate}, + #{dealerState} + ) + diff --git a/textja/src/main/resources/com/lan/textja/mapper/OrderMapper.xml b/textja/src/main/resources/com/lan/textja/mapper/DeliveryMapper.xml similarity index 78% rename from textja/src/main/resources/com/lan/textja/mapper/OrderMapper.xml rename to textja/src/main/resources/com/lan/textja/mapper/DeliveryMapper.xml index c44583e..591034d 100644 --- a/textja/src/main/resources/com/lan/textja/mapper/OrderMapper.xml +++ b/textja/src/main/resources/com/lan/textja/mapper/DeliveryMapper.xml @@ -2,7 +2,7 @@ - + order_No AS "orderNo", order_Name AS "orderName", @@ -62,4 +62,15 @@ ) + + + + + + update orders set order_State=#{orderState} where order_No=#{orderNo} + diff --git a/textja/src/main/resources/com/lan/textja/mapper/InventoryMapper.xml b/textja/src/main/resources/com/lan/textja/mapper/InventoryMapper.xml index 153cd2b..ac3941e 100644 --- a/textja/src/main/resources/com/lan/textja/mapper/InventoryMapper.xml +++ b/textja/src/main/resources/com/lan/textja/mapper/InventoryMapper.xml @@ -4,21 +4,21 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - product_num AS "productNum", - product_name AS "productName", - product_type AS "productType", - product_brands AS "productBrands", - all_stock AS "allStock", - remaining_qty AS "remainingQty" + inventory_Product_Num AS "inventoryProductNum", + Inventory_Product_Name AS "inventoryProductName", + Inventory_Product_Type AS "inventoryProductType", + Inventory_Product_Brands AS "inventoryProductBrands", + Inventory_All_Stock AS "inventoryAllStock", + Inventory_Remaining_Qty AS "inventoryRemainingQty" @@ -26,40 +26,51 @@ select from product_inventory where 1=1 - - and product_brands=#{productBrands} + + and Inventory_Product_Brands=#{inventoryProductBrands} - - and product_type=#{productType}; + + and Inventory_Product_Type=#{inventoryProductType}; - insert into product_inventory (product_num,product_name,product_type,product_brands,all_stock,remaining_qty) + insert into product_inventory (inventory_Product_Num,Inventory_Product_Name,Inventory_Product_Type,Inventory_Product_Brands,Inventory_All_Stock,Inventory_Remaining_Qty) values ( - #{productNum}, - #{productName}, - #{productType}, - #{productBrands}, - #{allStock}, - #{remainingQty} + #{inventoryProductNum}, + #{inventoryProductName}, + #{inventoryProductType}, + #{inventoryProductBrands}, + #{inventoryAllStock}, + #{inventoryRemainingQty} ) update product_inventory set - product_num=#{productNum}, - product_name=#{productName}, - product_type=#{productType}, - product_brands=#{productBrands}, - all_stock=#{allStock}, - remaining_qty=#{remainingQty} - where product_num=#{productNum}; + inventory_Product_Num=#{inventoryProductNum}, + Inventory_Product_Name=#{inventoryProductName}, + Inventory_Product_Type=#{inventoryProductType}, + Inventory_Product_Brands=#{inventoryProductBrands}, + Inventory_All_Stock=#{inventoryAllStock}, + Inventory_Remaining_Qty=#{inventoryRemainingQty} + where inventory_Product_Num=#{inventoryProductNum}; + + + + + + update product_inventory set + Inventory_Remaining_Qty=#{inventoryRemainingQty} + where inventory_Product_Num=#{inventoryProductNum}; diff --git a/textja/src/main/resources/com/lan/textja/mapper/ProductMapper.xml b/textja/src/main/resources/com/lan/textja/mapper/ProductMapper.xml new file mode 100644 index 0000000..fa973d4 --- /dev/null +++ b/textja/src/main/resources/com/lan/textja/mapper/ProductMapper.xml @@ -0,0 +1,62 @@ + + + + + product_Name AS "productName", + product_Type AS "productType", + product_State AS "productState", + product_Size AS "productSize", + product_Benefits AS "productBenefits", + product_Brands AS "productBrands", + product_Num AS "productNum", + product_Channel AS "productChannel", + product_Selling_Price AS "productSellingPrice", + product_Type_No AS "productTypeNo" + + + + + + + + + + + + diff --git a/textja/src/main/resources/com/lan/textja/mapper/ProuductMapper.xml b/textja/src/main/resources/com/lan/textja/mapper/ProuductMapper.xml deleted file mode 100644 index e5e3806..0000000 --- a/textja/src/main/resources/com/lan/textja/mapper/ProuductMapper.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - id AS "id", - name AS "name", - type AS "type", - state AS "state", - size AS "size", - benefits AS "benefits", - brands AS "brands", - num AS "num", - channel AS "channel" - - - - - - - - \ No newline at end of file