| | |
| | | } |
| | | @ApiOperation(value = "海诊商城-清空购物车") |
| | | @GetMapping(value = "/clear") |
| | | public void clearAll() { |
| | | public R clearAll() { |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | redisCache.deleteObject("shopCart:"+userId); |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "海诊商城-单删购物车") |
| | | @GetMapping(value = "/clearById") |
| | | public void clear(String id) { |
| | | public R clear(String id) { |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | List<ShoppingCartItem> cacheList = redisCache.getCacheList("shopCart:"+userId); |
| | | List<ShoppingCartItem> res = new ArrayList<>(); |
| | |
| | | if (!res.isEmpty()){ |
| | | redisCache.setCacheList("shopCart:"+userId, res); |
| | | } |
| | | |
| | | return R.ok(); |
| | | } |
| | | /** |
| | | * 海诊商城-加入购物车 |
| | |
| | | map.put("page", "pages/home/home"); |
| | | map.put("scene", "clinicId=" + crmClinic.getId()); |
| | | map.put("check_path", false); |
| | | map.put("env_version", "trial"); |
| | | HttpHeaders headers = new HttpHeaders(); |
| | | headers.setContentType(MediaType.APPLICATION_JSON); |
| | | HttpEntity requestEntity = new HttpEntity(map, headers); |
| | |
| | | </select> |
| | | <select id="pageShopList" resultType="com.ruoyi.system.vo.TErpGoodsVO"> |
| | | select t1.id,t1.cover,t1.goods_name,t1.low_purchase_quantity,t1.low_unit_id,t1.packing_unit_id, |
| | | t1.manufacturer,t1.sales_amount,t1.supplier_clinic_id,t2.supplier_name as supplier, |
| | | t1.manufacturer,t1.sales_amount,t1.supplier_clinic_id,t1.quasi_number,t1.clinic_purchase_price, |
| | | t2.supplier_name as supplier, |
| | | t3.unit_name as packingUnitName |
| | | from t_erp_goods t1 |
| | | left join t_crm_supplier t2 on t1.supplier_clinic_id = t2.id |
| | |
| | | </select> |
| | | <select id="pageShopListAll" resultType="com.ruoyi.system.vo.TErpGoodsVO"> |
| | | select t1.id,t1.cover,t1.goods_name,t1.low_purchase_quantity,t1.low_unit_id,t1.packing_unit_id, |
| | | t1.manufacturer,t1.sales_amount,t1.supplier_clinic_id,t2.supplier_name as supplier, |
| | | t1.manufacturer,t1.sales_amount,t1.supplier_clinic_id,t1.quasi_number,t1.clinic_purchase_price, |
| | | t2.supplier_name as supplier, |
| | | t3.unit_name as packingUnitName |
| | | from t_erp_goods t1 |
| | | left join t_crm_supplier t2 on t1.supplier_clinic_id = t2.id |