| | |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.ShoppingGoods; |
| | | import com.matrix.system.hive.bean.ShoppingGoodsCategory; |
| | | import com.matrix.system.hive.bean.ShoppingGoodsCategory2; |
| | | import com.matrix.system.hive.bean.SysOrder; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import com.matrix.system.hive.pojo.ShoppingCarItem; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | }) |
| | | @GetMapping(value = "/findShoppingGoodsType") |
| | | public AjaxResult findShoppingGoodsType() { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | |
| | | ShoppingGoodsCategory category = new ShoppingGoodsCategory(); |
| | | category.setShopId(user.getShopId()); |
| | | return AjaxResult.buildSuccessInstance(shoppingGoodsCategoryService.findByModel(category)); |
| | | List<ShoppingGoodsCategory2> list=new ArrayList<>(); |
| | | ShoppingGoodsCategory2 jjcp=new ShoppingGoodsCategory2(); |
| | | jjcp.setId("家居产品"); |
| | | jjcp.setName("家居产品"); |
| | | jjcp.setParentId(0L); |
| | | ShoppingGoodsCategory2 xm=new ShoppingGoodsCategory2(); |
| | | xm.setId("项目"); |
| | | xm.setName("项目"); |
| | | xm.setParentId(0L); |
| | | ShoppingGoodsCategory2 tc=new ShoppingGoodsCategory2(); |
| | | tc.setId("套餐"); |
| | | tc.setName("套餐"); |
| | | tc.setParentId(0L); |
| | | ShoppingGoodsCategory2 czk=new ShoppingGoodsCategory2(); |
| | | czk.setId("充值卡"); |
| | | czk.setName("充值卡"); |
| | | czk.setParentId(0L); |
| | | return AjaxResult.buildSuccessInstance(Arrays.asList(jjcp,xm,tc,czk)); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取商品列表", notes = "获取商品列表") |
| | |
| | | }) |
| | | @PostMapping(value = "/findShoppingGoods") |
| | | public AjaxResult findShoppingGoods(@RequestBody @Validated ShoppingGoodsListDto shoppingGoodsListDto) { |
| | | |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | shoppingGoodsListDto.setShopId(user.getShopId()); |
| | | return AjaxResult.buildSuccessInstance(shoppingGoodsService.findShoppingGoodsListForApi(shoppingGoodsListDto), shoppingGoodsService.findShoppingGoodsListTotalForApi(shoppingGoodsListDto)); |
| | | } |
| | | |