当前位置:网站首页>Analysis steps of commodity background management

Analysis steps of commodity background management

2020-11-09 19:54:00 learner

1. Commodity backstage management

1.1 New products

1.1.1 Page analysis

1.URL analysis
image.png
2. Parametric analysis
image.png
3. page JS page
image.png

1.1.2 encapsulation SysResult

explain : stay jt-common Add the system return value VO object
image.png

1.1.3 edit ItemController

image.png

1.1.4 edit ItemService

image.png

1.2 Global exception handling mechanism

explain : stay jt-common in Add a global exception handling mechanism .
image.png

1.3 Auto fill function

1.3.1 Business needs

For example, update time / Creation time , Each business operation needs to update the relevant data , Whether the data can be optimized , Simplify program calls .
image.png

1.3.2 edit BasePOJO Specify the fill properties

image.png

1.3.2 Edit configuration class

explain : stay jt-common in Edit configuration class , Realize automatic filling function .
image.png

1.4 Product modification operation

1.4.1 Page analysis

image.png

1.4.2 Realize the display of modified page classification information

image.png
Knowledge review :
explain : It can be classified by commodity Id, Get the name of commodity classification dynamically . The request path is identified in the diagram .
image.png
3. Edit page JS
image.png

1.4.3 The product is modified ajax

image.png

1.4.4 edit ItemController

image.png

1.4.5 edit ItemService

image.png

1.5 Product deletion operation

1.5.1 page url analysis

image.png
2. Parameter submission
image.png
3. page JS analysis
image.png

1.5.2 edit ItemController

image.png

1.5.3 edit ItemService

image.png

1.5.4 edit ItemMapper

image.png
image.png

1.6 Realize the goods on the shelves / Off the shelf operation

1.6.1 Business needs

explain : If you modify the status information of the product . shelves =1 Off the shelf =2. Just modify the database record .
image.png
url analysis :
http://localhost:8091/item/instock Off the shelf operation status=2
http://localhost:8091/item/reshelf On the shelf operation status=1

demand : Can we use a way to get on the shelf / Off the shelf operation ???
http://localhost:8091/item/updateStatus/2 Off the shelf operation status=2
http://localhost:8091/item/updateStatus/1 On the shelf operation status=1

1.6.2 Modify page JS

explain : Put the page on the shelf / Off the shelf operation , Modify according to the above analysis .
image.png

1.6.3 edit ItemController

image.png

1.6.3 edit ItemService

image.png

版权声明
本文为[learner]所创,转载请带上原文链接,感谢