From 19abf7e302577ea7566629d44b539d877b3a1f3b Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Thu, 26 Oct 2023 11:04:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=BF=E5=88=A9=E5=BA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fuintAdmin/src/api/convenienceStore/goods.js | 4 +- .../src/api/convenienceStore/ljgoods.js | 44 +++ .../src/api/convenienceStore/supplier.js | 44 +++ .../src/views/convenienceStore/supplier.vue | 289 ++++++++++++++++++ fuintAdmin/src/views/member/fixingLevel.vue | 4 +- fuintAdmin/src/views/staff/list.vue | 2 +- .../controller/CvsGoodsController.java | 21 +- .../controller/LJGoodsController.java | 78 +++++ .../controller/SupplierController.java | 11 +- .../convenienceSore/entity/LJGoods.java | 5 + .../mapper/xml/LJGoodsMapper.xml | 32 +- .../mapper/xml/SupplierMapper.xml | 20 +- .../service/CvsGoodsService.java | 12 +- .../service/LJGoodsService.java | 13 +- .../service/impl/CvsGoodsServiceImpl.java | 11 +- .../service/impl/LJGoodsServiceImpl.java | 12 +- 16 files changed, 542 insertions(+), 60 deletions(-) create mode 100644 fuintAdmin/src/api/convenienceStore/ljgoods.js create mode 100644 fuintAdmin/src/api/convenienceStore/supplier.js create mode 100644 fuintAdmin/src/views/convenienceStore/supplier.vue create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/LJGoodsController.java diff --git a/fuintAdmin/src/api/convenienceStore/goods.js b/fuintAdmin/src/api/convenienceStore/goods.js index 1a97a3c6a..4c3bba41d 100644 --- a/fuintAdmin/src/api/convenienceStore/goods.js +++ b/fuintAdmin/src/api/convenienceStore/goods.js @@ -13,8 +13,8 @@ export function insertCvsGoods(data) { export function selectTree(data) { return request({ url: '/business/cvsGoods/selectTree', - method: 'post', - data: data + method: 'get', + params: data }) } diff --git a/fuintAdmin/src/api/convenienceStore/ljgoods.js b/fuintAdmin/src/api/convenienceStore/ljgoods.js new file mode 100644 index 000000000..63fea631f --- /dev/null +++ b/fuintAdmin/src/api/convenienceStore/ljgoods.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询供应商列表 +export function listLJGoods(query) { + return request({ + url: '/business/convenience/goods/list', + method: 'get', + params: query + }) +} + +// 查询供应商详细 +export function getLJGoods(id) { + return request({ + url: '/business/convenience/goods/' + id, + method: 'get' + }) +} + +// 新增供应商 +export function addLJGoods(data) { + return request({ + url: '/business/convenience/goods', + method: 'post', + data: data + }) +} + +// 修改供应商 +export function updateLJGoods(data) { + return request({ + url: '/business/convenience/goods', + method: 'put', + data: data + }) +} + +// 删除供应商 +export function delLJGoods(id) { + return request({ + url: '/business/convenience/goods/' + id, + method: 'delete' + }) +} diff --git a/fuintAdmin/src/api/convenienceStore/supplier.js b/fuintAdmin/src/api/convenienceStore/supplier.js new file mode 100644 index 000000000..5ab053e83 --- /dev/null +++ b/fuintAdmin/src/api/convenienceStore/supplier.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询供应商列表 +export function listSupplier(query) { + return request({ + url: '/business/convenience/supplier/list', + method: 'get', + params: query + }) +} + +// 查询供应商详细 +export function getSupplier(id) { + return request({ + url: '/business/convenience/supplier/' + id, + method: 'get' + }) +} + +// 新增供应商 +export function addSupplier(data) { + return request({ + url: '/business/convenience/supplier', + method: 'post', + data: data + }) +} + +// 修改供应商 +export function updateSupplier(data) { + return request({ + url: '/business/convenience/supplier', + method: 'put', + data: data + }) +} + +// 删除供应商 +export function delSupplier(id) { + return request({ + url: '/business/convenience/supplier/' + id, + method: 'delete' + }) +} diff --git a/fuintAdmin/src/views/convenienceStore/supplier.vue b/fuintAdmin/src/views/convenienceStore/supplier.vue new file mode 100644 index 000000000..5cd9a93e3 --- /dev/null +++ b/fuintAdmin/src/views/convenienceStore/supplier.vue @@ -0,0 +1,289 @@ + + + + + diff --git a/fuintAdmin/src/views/member/fixingLevel.vue b/fuintAdmin/src/views/member/fixingLevel.vue index a7f12e5d0..a337fa9cd 100644 --- a/fuintAdmin/src/views/member/fixingLevel.vue +++ b/fuintAdmin/src/views/member/fixingLevel.vue @@ -1271,7 +1271,7 @@ export default { // 删除按钮操作 handleDelete(row) { const name = row.name - this.$modal.confirm('确定删除"' + name + '"的会员信息?').then(function() { + this.$modal.confirm('确定删除"' + name + '"的固定等级信息?').then(function() { // return deleteMember(row.id); return delFixingLevel(row.id); }).then(() => { @@ -1282,7 +1282,7 @@ export default { // 删除按钮操作 handleDeleteMember(row) { const name = row.name - this.$modal.confirm('确定删除"' + name + '"的会员信息?').then(function() { + this.$modal.confirm('确定删除"' + name + '"的认证会员信息?').then(function() { // return deleteMember(row.id); return delCertifiedMember(row.id); }).then(() => { diff --git a/fuintAdmin/src/views/staff/list.vue b/fuintAdmin/src/views/staff/list.vue index 829d1b5a0..7babd57b8 100644 --- a/fuintAdmin/src/views/staff/list.vue +++ b/fuintAdmin/src/views/staff/list.vue @@ -848,7 +848,7 @@ export default { // 删除按钮操作 handleDelete(row) { const name = row.realName || this.id; - this.$modal.confirm('是否确认删除"' + name + '"的数据项?').then(function() { + this.$modal.confirm('是否确认删除"' + name + '"的员工信息?').then(function() { return delStaff(row.id); }).then(() => { this.getList(); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/CvsGoodsController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/CvsGoodsController.java index 152ac30a5..bfcf1bbf7 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/CvsGoodsController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/CvsGoodsController.java @@ -13,9 +13,7 @@ import org.springframework.web.bind.annotation.*; import java.util.List; /** - * @author :admin - * @date : 2023/10/16 - * 便利店商品管理 + * 便利店商品分类管理 controller层 */ @RestController @RequestMapping("/business/cvsGoods") @@ -24,7 +22,7 @@ public class CvsGoodsController extends BaseController { @Autowired private CvsGoodsService cvsGoodsService; - /**新增商品类别*/ + /**新增商品分类类别*/ @PostMapping("/addCvsGoods") public ResponseObject insertCvsGoods( @RequestBody CvsGoods goods){ int i = cvsGoodsService.insertCvsGoods(goods); @@ -36,9 +34,11 @@ public class CvsGoodsController extends BaseController { } /**分页查询*/ - @PostMapping("/selectTree") - private ResponseObject selectTree(@RequestBody CvsGoods goods){ - Page page =new Page<>(goods.getPageNum(),goods.getPageSize()); + @GetMapping("/selectTree") + private ResponseObject selectTree(CvsGoods goods, + @RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){ + Page page =new Page(pageNo,pageSize); IPage list = cvsGoodsService.selectTree(page,goods); return getSuccessResult(list); } @@ -58,7 +58,7 @@ public class CvsGoodsController extends BaseController { CvsGoods cvsGoods = cvsGoodsService.selectParentById(id); return getSuccessResult(cvsGoods); } - //删除 + //删除商品分类信息 @DeleteMapping("/{id}") public ResponseObject selectDeleteId(@PathVariable Integer id) { @@ -69,6 +69,11 @@ public class CvsGoodsController extends BaseController { } + /** + * 修改商品分类信息 + * @param goods + * @return + */ @PutMapping public ResponseObject edit(@Validated @RequestBody CvsGoods goods){ int row = cvsGoodsService.updateCvsGood(goods); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/LJGoodsController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/LJGoodsController.java new file mode 100644 index 000000000..14c4485f1 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/LJGoodsController.java @@ -0,0 +1,78 @@ +package com.fuint.business.convenienceSore.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fuint.business.convenienceSore.entity.LJGoods; +import com.fuint.business.convenienceSore.service.LJGoodsService; +import com.fuint.framework.web.BaseController; +import com.fuint.framework.web.ResponseObject; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +/** + * 商品信息 controller层 + */ +@RestController +@RequestMapping("/business/convenience/goods") +public class LJGoodsController extends BaseController { + @Autowired + private LJGoodsService goodsService; + + /** + * 根据条件查询商品信息 + * @param goods + * @param pageNo + * @param pageSize + * @return + */ + @GetMapping("/list") + public ResponseObject list(LJGoods goods, + @RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){ + Page page =new Page(pageNo,pageSize); + IPage list = goodsService.selectLJGoodsList(page,goods); + return getSuccessResult(list); + } + + /** + * 根据id查询商品信息 + * @param id + * @return + */ + @GetMapping("/{id}") + public ResponseObject staffInfo(@PathVariable Integer id){ + LJGoods goods = goodsService.selectLJGoodsById(id); + return getSuccessResult(goods); + } + + /** + * 删除商品信息 + * @return + */ + @DeleteMapping("/{id}") + public ResponseObject remove(@PathVariable Integer id){ + goodsService.deleteLJGoodsById(id); + return getSuccessResult("操作成功"); + } + + /** + * 添加商品信息 + * @param goods + * @return + */ + @PostMapping + public ResponseObject add(@Validated @RequestBody LJGoods goods){ + return getSuccessResult(goodsService.insertLJGoods(goods)); + } + + /** + * 修改商品信息 + * @param goods + * @return + */ + @PutMapping + public ResponseObject edit(@Validated @RequestBody LJGoods goods){ + return getSuccessResult(goodsService.updateLJGoods(goods)); + } +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/SupplierController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/SupplierController.java index 6c1d1b21e..b797a0861 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/SupplierController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/SupplierController.java @@ -10,6 +10,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +/** + * 供应商 controller层 + */ @RestController @RequestMapping("/business/convenience/supplier") public class SupplierController extends BaseController { @@ -33,7 +36,7 @@ public class SupplierController extends BaseController { } /** - * 根据id查询会员等级信息 + * 根据id查询供应商信息 * @param id * @return */ @@ -44,7 +47,7 @@ public class SupplierController extends BaseController { } /** - * 删除会员等级信息 + * 删除供应商信息 * @return */ @DeleteMapping("/{id}") @@ -54,7 +57,7 @@ public class SupplierController extends BaseController { } /** - * 添加会员等级信息 + * 添加供应商信息 * @param supplier * @return */ @@ -64,7 +67,7 @@ public class SupplierController extends BaseController { } /** - * 修改会员等级信息 + * 修改供应商信息 * @param supplier * @return */ diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/entity/LJGoods.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/entity/LJGoods.java index 1d8c5697d..338d44661 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/entity/LJGoods.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/entity/LJGoods.java @@ -105,6 +105,11 @@ public class LJGoods extends BaseEntity implements Serializable { */ @ApiModelProperty("状态:启用、禁用") private String status; + /** + * 是否在回收站:0不在回收站,1在回收站 + */ + @ApiModelProperty("是否在回收站:0不在回收站,1在回收站") + private String isRecovery; } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/LJGoodsMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/LJGoodsMapper.xml index 1c80c0053..bc7438810 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/LJGoodsMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/LJGoodsMapper.xml @@ -8,16 +8,28 @@ \ No newline at end of file diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/SupplierMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/SupplierMapper.xml index e1c3692eb..04505077f 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/SupplierMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/SupplierMapper.xml @@ -8,16 +8,16 @@ \ No newline at end of file diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/CvsGoodsService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/CvsGoodsService.java index e711a0a58..c0cc8c0c1 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/CvsGoodsService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/CvsGoodsService.java @@ -9,18 +9,18 @@ import io.swagger.models.auth.In; import java.util.List; /** - * 便利店商品信息 业务层 + * 便利店商品分类信息 业务层 */ public interface CvsGoodsService { /** - * 添加商品信息 + * 添加商品分类信息 * @param cvsGoods * @return */ int insertCvsGoods(CvsGoods cvsGoods); /** - * 根据条件分页查询商品信息 + * 根据条件分页查询商品分类信息 * @param page * @param goods * @return @@ -35,20 +35,20 @@ public interface CvsGoodsService { List selectCvsGoodsList(CvsGoods goods); /** - * 根据id查询商品信息 + * 根据id查询商品分类信息 * @param id * @return */ CvsGoods selectParentById(Integer id); /** - * 根据id删除商品信息 + * 根据id删除商品分类信息 * @param id */ void deleteByIdVo(Integer id); /** - * 修改商品信息 + * 修改商品分类信息 * @param goods */ int updateCvsGood(CvsGoods goods); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/LJGoodsService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/LJGoodsService.java index 8bc201e35..8e42e401d 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/LJGoodsService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/LJGoodsService.java @@ -4,36 +4,39 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.fuint.business.convenienceSore.entity.LJGoods; +/** + * 商品信息 业务层 + */ public interface LJGoodsService { /** - * 根据条件分页查询固定等级信息 + * 根据条件分页查询商品信息 * @param page * @return */ public IPage selectLJGoodsList(Page page, LJGoods goods); /** - * 根据id查询固定等级信息 + * 根据id查询商品信息 * @param id * @return */ public LJGoods selectLJGoodsById(int id); /** - * 根据id删除固定等级信息 + * 根据id删除商品信息 * @param id */ public void deleteLJGoodsById(Integer id); /** - * 增加固定等级信息 + * 增加商品信息 * @param goods * @return */ public int insertLJGoods(LJGoods goods); /** - * 修改固定等级信息 + * 修改商品信息 * @param goods * @return */ diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/CvsGoodsServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/CvsGoodsServiceImpl.java index ef2429fec..b7fe7955e 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/CvsGoodsServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/CvsGoodsServiceImpl.java @@ -19,14 +19,13 @@ import java.util.List; import java.util.stream.Collectors; /** - * @author :admin - * @date : 2023/10/16 + * 便利店商品分类信息 业务层 */ @Service public class CvsGoodsServiceImpl extends ServiceImpl implements CvsGoodsService { /** - * 添加商品信息 + * 添加商品分类信息 */ @Transactional public int insertCvsGoods( CvsGoods cvsGoods){ @@ -43,7 +42,7 @@ public class CvsGoodsServiceImpl extends ServiceImpl im } /** - * 根据条件分页查询商品信息 + * 根据条件分页查询商品分类信息 * @param page * @param g * @return @@ -122,7 +121,7 @@ public class CvsGoodsServiceImpl extends ServiceImpl im } /** - * 根据id删除商品信息 + * 根据id删除商品分类信息 * @param id */ @Override @@ -131,7 +130,7 @@ public class CvsGoodsServiceImpl extends ServiceImpl im } /** - * 修改商品信息 + * 修改商品分类信息 * @param goods */ @Override diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/LJGoodsServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/LJGoodsServiceImpl.java index 1d8502142..86d25c28d 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/LJGoodsServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/LJGoodsServiceImpl.java @@ -11,12 +11,12 @@ import com.fuint.common.util.TokenUtil; import org.springframework.stereotype.Service; /** - * 固定等级信息 业务层 + * 商品信息 业务层 */ @Service public class LJGoodsServiceImpl extends ServiceImpl implements LJGoodsService { /** - * 根据条件分页查询固定等级信息 + * 根据条件分页查询商品信息 * @param page * @return */ @@ -30,7 +30,7 @@ public class LJGoodsServiceImpl extends ServiceImpl impl } /** - * 根据id查询固定等级信息 + * 根据id查询商品信息 * @param id * @return */ @@ -40,7 +40,7 @@ public class LJGoodsServiceImpl extends ServiceImpl impl } /** - * 根据id删除固定等级信息 + * 根据id删除商品信息 * @param id */ @Override @@ -49,7 +49,7 @@ public class LJGoodsServiceImpl extends ServiceImpl impl } /** - * 增加固定等级信息 + * 增加商品信息 * @param goods * @return */ @@ -63,7 +63,7 @@ public class LJGoodsServiceImpl extends ServiceImpl impl } /** - * 修改固定等级信息 + * 修改商品信息 * @param goods * @return */