Compare commits
237 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1c11e6d23e | |||
| 599a64a9f6 | |||
| 0bb857f53f | |||
| 7793e8c88d | |||
| 3fbec6b4c6 | |||
| 0fda3429cc | |||
| 1c8e088942 | |||
| ee4a2d3a6f | |||
| f0ce87c78e | |||
| ff2d598fa8 | |||
| e8c072e906 | |||
| fbcae73292 | |||
| 404064f4c2 | |||
| bab3008b67 | |||
| 4454a63465 | |||
| 0d58584b13 | |||
| dd0c96a79e | |||
| eada1643a6 | |||
| e210eddad0 | |||
| 8abb1262c6 | |||
| 3279044126 | |||
| 037f9f70b4 | |||
| 95ec63a3a2 | |||
| 90315b979f | |||
| feacac879a | |||
| ed5e357dff | |||
| 25e02c2dd1 | |||
| 565fb70b1b | |||
| f4ab420e95 | |||
| e1d7d4eabf | |||
| 48802a666b | |||
| 194290bb49 | |||
| 588eeb616f | |||
| 989fb77f4d | |||
| 4e9ac87d9b | |||
| a19f94ccb1 | |||
| 0f342b87f2 | |||
| 35d3c3248c | |||
| 93066d08f1 | |||
| 98180bda0b | |||
| 52bb53001b | |||
| 7f7c29150c | |||
| c4fa0dbbd6 | |||
| d7158d2e34 | |||
| 56f237e7bc | |||
| cdeeef7b86 | |||
| f833a26698 | |||
| 4ccc4f5a2c | |||
| 92b94fc3fa | |||
| ceccc58be9 | |||
| c3e72256ef | |||
| 2ed1fba191 | |||
| 39a58bf52b | |||
| a9858a0213 | |||
| ff0aed0ad8 | |||
| 485b405434 | |||
| af5038775f | |||
| 42167683e9 | |||
| 45762c4bff | |||
| 25ac606130 | |||
| 3943334324 | |||
| f8a699ed59 | |||
| 04b0966998 | |||
| 8fb45b9bf9 | |||
| 5eed3c89d4 | |||
| 392f0546f6 | |||
| 39b2347df0 | |||
| 8f174491eb | |||
| 5148464bea | |||
| c25d5a81ce | |||
| dd418b8f75 | |||
| 863e9dcab1 | |||
| 2d498ea8ef | |||
| 76a6a232b4 | |||
| 2cf86c2dec | |||
| 808649c2ec | |||
| 92e5ccdff9 | |||
| 29b4552e26 | |||
| efe4d0124c | |||
| e7fa450f1c | |||
| 877c33e74a | |||
| ec42344101 | |||
| 98e98e1ffc | |||
| 197bd7d683 | |||
| d493ebc20e | |||
| eaa44aab1a | |||
| a6fb1c21b4 | |||
| 1a9375086c | |||
| 1b5de183bd | |||
| 53cc5a0d76 | |||
| e97416feeb | |||
| 1754272f7f | |||
| 968c27c237 | |||
| 367236a02b | |||
| fa5166b145 | |||
| ad54a11aae | |||
| a049277ea0 | |||
| 06a34dd59a | |||
| 6151ed58fe | |||
| f4d33560b4 | |||
| f124a08377 | |||
| 31a28b418d | |||
| ff7be4b8ae | |||
| f5af7f93fc | |||
| 197c6272f9 | |||
| 41b339e825 | |||
| 45a4166b0b | |||
| e3741192c4 | |||
| 600135e196 | |||
| ac908a133a | |||
| 4cc4c58470 | |||
| c8e912f378 | |||
| 5ef7e407ac | |||
| ff43646921 | |||
| b775bf9184 | |||
| bfae893862 | |||
| c934bcb9dc | |||
| 3e5e9c265e | |||
| f581602691 | |||
| 4abdfe4ee8 | |||
| f0d897222f | |||
| c504daf333 | |||
| 119c39ece8 | |||
| bb2bccf92c | |||
| a68e1de1d4 | |||
| 198479f091 | |||
| eed931c65b | |||
| f8c4c1177b | |||
| fd2fd5c899 | |||
| 36982e053e | |||
| 03a475d1c9 | |||
| 4b13a8c0d3 | |||
| 5259e85f98 | |||
| 8a8c13d9e3 | |||
| 31c3b52963 | |||
| 471244b8e6 | |||
| 4d2649d5e9 | |||
| beb42524dc | |||
| 58d75735d6 | |||
| 6604eb70cb | |||
| 874e5da9af | |||
| 73f030e222 | |||
| e1d983f0ad | |||
| 538ced5cd2 | |||
| 14ad8988e7 | |||
| 1b27a1c58d | |||
| cad18ed55c | |||
| 7d3fb8d322 | |||
| 6885640533 | |||
| 76e4b86357 | |||
| 311a82a32f | |||
| 3c067f4233 | |||
| f16582a5db | |||
| 6b4785b006 | |||
| 072bf26b12 | |||
| 21ae722873 | |||
| 4e77bd61b8 | |||
| bc26ada1f6 | |||
| 6dfadcec94 | |||
| d2600ed52e | |||
| f0c1967f7a | |||
| 142f2414a9 | |||
| 5562e14ca5 | |||
| fe80681e2e | |||
| 3ba8cd9d3e | |||
| 2aa0fd027a | |||
| 675b55baa5 | |||
| 00956c1ca5 | |||
| 767d9ae343 | |||
| bb9f905303 | |||
| 534eae1a56 | |||
| be821d0265 | |||
| 286180258f | |||
| afddad1926 | |||
| 97ecfa3c79 | |||
| 76b378d205 | |||
| 99af352328 | |||
| c6736d120d | |||
| 951050da3d | |||
| e5c22d51f4 | |||
| f0237085ed | |||
| 453aba2930 | |||
| f74de955c5 | |||
| a8fce86d84 | |||
| 5b7be1a41c | |||
| dffed92a76 | |||
| cfc0f6fcbc | |||
| 47b8f474a9 | |||
| 663f4689a7 | |||
| 3a30209005 | |||
| 4d9b91501e | |||
| dc7431daaf | |||
| 1a5d5e3550 | |||
| c7ab97f948 | |||
| 1a841f3f85 | |||
| 704b9df74d | |||
| 61228d9c35 | |||
| 37d6173697 | |||
| eade3040d2 | |||
| 9eafc6bac5 | |||
| bde21f33c7 | |||
| 6f186ea197 | |||
| 45498067a6 | |||
| 0c4467ea4f | |||
| 0f0f4e048c | |||
| 7253649412 | |||
| c9790a76e1 | |||
| 4a11ac1867 | |||
| 4efd79c180 | |||
| 5fa1877072 | |||
| 3d63719719 | |||
| 2275668d43 | |||
| 18af66e858 | |||
| 65f3031a70 | |||
| e624d14abb | |||
| f524928b5a | |||
| b94da3f38a | |||
| fcec279495 | |||
| a2cda4e494 | |||
| 0ac51a5119 | |||
| 1ae6a7a0aa | |||
| 4699a7a90c | |||
| 8f4c981cb5 | |||
| 338758884c | |||
| 5e2e83bc24 | |||
| 99ec09fe04 | |||
| 61e1614c62 | |||
| e100c95d3b | |||
| a5871fb9b0 | |||
| 4563779ce3 | |||
| fca7eeec37 | |||
| 11943acfb8 | |||
| 527c83e677 | |||
| f1204cf2d0 | |||
| b8406deda7 | |||
| 36d27edefe | |||
| 0e1ef491e2 |
@ -467,6 +467,11 @@ public class AccountController {
|
|||||||
return accountUserBaseService.saveBatchAccountInfo(accountUserInfoList);
|
return accountUserBaseService.saveBatchAccountInfo(accountUserInfoList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/saveBatchAccountUserLogin", method = RequestMethod.POST)
|
||||||
|
public ThirdApiRes saveBatchAccountUserLogin(@RequestBody List<AccountUserLogin> accountUserLoginList) {
|
||||||
|
return accountUserBaseService.saveBatchAccountUserLogin(accountUserLoginList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value = "/findOneAccountUserBase", method = RequestMethod.POST)
|
@RequestMapping(value = "/findOneAccountUserBase", method = RequestMethod.POST)
|
||||||
public AccountUserBase findOneAccountUserBase(@RequestBody AccountUserBase accountUserBase) {
|
public AccountUserBase findOneAccountUserBase(@RequestBody AccountUserBase accountUserBase) {
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import com.suisung.mall.common.api.CommonResult;
|
|||||||
import com.suisung.mall.common.domain.UserDto;
|
import com.suisung.mall.common.domain.UserDto;
|
||||||
import com.suisung.mall.common.modules.account.AccountUserBase;
|
import com.suisung.mall.common.modules.account.AccountUserBase;
|
||||||
import com.suisung.mall.common.modules.account.AccountUserInfo;
|
import com.suisung.mall.common.modules.account.AccountUserInfo;
|
||||||
|
import com.suisung.mall.common.modules.account.AccountUserLogin;
|
||||||
import com.suisung.mall.common.pojo.req.WxUserInfoReq;
|
import com.suisung.mall.common.pojo.req.WxUserInfoReq;
|
||||||
import com.suisung.mall.common.pojo.res.ThirdApiRes;
|
import com.suisung.mall.common.pojo.res.ThirdApiRes;
|
||||||
import com.suisung.mall.core.web.service.IBaseService;
|
import com.suisung.mall.core.web.service.IBaseService;
|
||||||
@ -296,4 +297,11 @@ public interface AccountUserBaseService extends IBaseService<AccountUserBase> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
ThirdApiRes saveBatchAccountInfo(List<AccountUserInfo> accountUserInfoList);
|
ThirdApiRes saveBatchAccountInfo(List<AccountUserInfo> accountUserInfoList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量保存accountInfo
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ThirdApiRes saveBatchAccountUserLogin(List<AccountUserLogin> accountUserLoginList);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3803,6 +3803,23 @@ public class AccountUserBaseServiceImpl extends BaseServiceImpl<AccountUserBaseM
|
|||||||
return new ThirdApiRes().fail(250, "保存异常");
|
return new ThirdApiRes().fail(250, "保存异常");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ThirdApiRes saveBatchAccountUserLogin(List<AccountUserLogin> accountUserLoginList) {
|
||||||
|
boolean result = false;
|
||||||
|
if (!accountUserLoginList.isEmpty()) {
|
||||||
|
try {
|
||||||
|
result = accountUserLoginService.saveBatch(accountUserLoginList, accountUserLoginList.size());
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException("保存AccountUserLogin报错:" + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (result) {
|
||||||
|
return new ThirdApiRes().success("成功");
|
||||||
|
}
|
||||||
|
return new ThirdApiRes().fail(250, "保存异常");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查并修复商户店铺信息
|
* 检查并修复商户店铺信息
|
||||||
* 重要(补偿机制),检查修复商户入驻店铺信息(商家账号关联入驻店铺Id,给商家账户创立公司员工账号和权限)
|
* 重要(补偿机制),检查修复商户入驻店铺信息(商家账号关联入驻店铺Id,给商家账户创立公司员工账号和权限)
|
||||||
|
|||||||
@ -278,6 +278,15 @@ public interface AccountService {
|
|||||||
@PostMapping(value = "/admin/account/accountController/saveBatchAccountInfo")
|
@PostMapping(value = "/admin/account/accountController/saveBatchAccountInfo")
|
||||||
ThirdApiRes saveBatchAccountInfo(@RequestBody List<AccountUserInfo> accountUserInfoList);
|
ThirdApiRes saveBatchAccountInfo(@RequestBody List<AccountUserInfo> accountUserInfoList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量保存accountUserLogin
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/admin/account/accountController/saveBatchAccountUserLogin")
|
||||||
|
ThirdApiRes saveBatchAccountUserLogin(@RequestBody List<AccountUserLogin> accountUserLoginList);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量保存accountInfo
|
* 批量保存accountInfo
|
||||||
*
|
*
|
||||||
|
|||||||
@ -63,7 +63,7 @@ public class ShopBaseProductCategoryController {
|
|||||||
public CommonResult getList(ShopBaseProductCategory category) {
|
public CommonResult getList(ShopBaseProductCategory category) {
|
||||||
QueryWrapper<ShopBaseProductCategory> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<ShopBaseProductCategory> queryWrapper = new QueryWrapper<>();
|
||||||
new FilterUtils<ShopBaseProductCategory>().applyStoreFilter(queryWrapper);
|
new FilterUtils<ShopBaseProductCategory>().applyStoreFilter(queryWrapper);
|
||||||
queryWrapper.eq("category_is_enable", 1);
|
//queryWrapper.eq("category_is_enable", 1);
|
||||||
Integer category_parent_id = category.getCategory_parent_id();
|
Integer category_parent_id = category.getCategory_parent_id();
|
||||||
if (category_parent_id == null) category_parent_id = 0;
|
if (category_parent_id == null) category_parent_id = 0;
|
||||||
return CommonResult.success(shopBaseProductCategoryService.getCategoryTree(queryWrapper, category_parent_id));
|
return CommonResult.success(shopBaseProductCategoryService.getCategoryTree(queryWrapper, category_parent_id));
|
||||||
|
|||||||
@ -253,9 +253,17 @@ public class ShopOrderReturnServiceImpl extends BaseServiceImpl<ShopOrderReturnM
|
|||||||
public List<Map<String, Object>> statisticCount(Date end, int days) {
|
public List<Map<String, Object>> statisticCount(Date end, int days) {
|
||||||
Integer store_id = Convert.toInt(getCurrentUser().getStore_id());
|
Integer store_id = Convert.toInt(getCurrentUser().getStore_id());
|
||||||
if (ObjectUtil.isNotNull(store_id)) {
|
if (ObjectUtil.isNotNull(store_id)) {
|
||||||
return shopOrderReturnMapper.statisticCountSeller(end, days, store_id);
|
List<Map<String, Object>> mapList= shopOrderReturnMapper.statisticCountSeller(end, days, store_id);
|
||||||
|
if(null==mapList){
|
||||||
|
mapList=new ArrayList<>();
|
||||||
|
}
|
||||||
|
return mapList;
|
||||||
}
|
}
|
||||||
return shopOrderReturnMapper.statisticCount(end, days);
|
List<Map<String, Object>> statisticList=shopOrderReturnMapper.statisticCount(end, days);
|
||||||
|
if(null==statisticList){
|
||||||
|
statisticList=new ArrayList<>();
|
||||||
|
}
|
||||||
|
return statisticList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -540,6 +540,7 @@ public class ShopPageAppController extends BaseControllerImpl {
|
|||||||
editShopPageApp.setApp_market_images(shopPageApp.getApp_market_images());
|
editShopPageApp.setApp_market_images(shopPageApp.getApp_market_images());
|
||||||
editShopPageApp.setTpl_image(shopPageApp.getTpl_image());
|
editShopPageApp.setTpl_image(shopPageApp.getTpl_image());
|
||||||
editShopPageApp.setApp_industry(shopPageApp.getApp_industry());
|
editShopPageApp.setApp_industry(shopPageApp.getApp_industry());
|
||||||
|
editShopPageApp.setApp_is_use(0);
|
||||||
shopPageAppService.edit(editShopPageApp);
|
shopPageAppService.edit(editShopPageApp);
|
||||||
return CommonResult.success();
|
return CommonResult.success();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1124,6 +1124,7 @@ public class ShopPageAppServiceImpl extends BaseServiceImpl<ShopPageAppMapper, S
|
|||||||
shopPageApp.setApp_code("[]");
|
shopPageApp.setApp_code("[]");
|
||||||
shopPageApp.setTpl_id(107);
|
shopPageApp.setTpl_id(107);
|
||||||
shopPageApp.setTpl_image("");
|
shopPageApp.setTpl_image("");
|
||||||
|
shopPageApp.setTpl_image("https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/media/media/store/1002812/20251216/37ef9e9b7b5943e7aa26a5d82c20f09a.png");
|
||||||
shopPageApp.setStore_id(Integer.valueOf(userDto.getStore_id()));
|
shopPageApp.setStore_id(Integer.valueOf(userDto.getStore_id()));
|
||||||
shopPageApp.setUser_id(userDto.getId());
|
shopPageApp.setUser_id(userDto.getId());
|
||||||
shopPageApp.setSubsite_id(0);
|
shopPageApp.setSubsite_id(0);
|
||||||
@ -1133,7 +1134,7 @@ public class ShopPageAppServiceImpl extends BaseServiceImpl<ShopPageAppMapper, S
|
|||||||
shopPageApp.setApp_member_center("");
|
shopPageApp.setApp_member_center("");
|
||||||
shopPageApp.setApp_industry(appIndustry);
|
shopPageApp.setApp_industry(appIndustry);
|
||||||
shopPageAppService.save(shopPageApp);
|
shopPageAppService.save(shopPageApp);
|
||||||
return CommonResult.success();
|
return CommonResult.success(shopPageApp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1133,6 +1133,12 @@ public class ShopProductItemServiceImpl extends BaseServiceImpl<ShopProductItemM
|
|||||||
param.put("product_state_id", product_state_id);
|
param.put("product_state_id", product_state_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//商品货号
|
||||||
|
String item_number = getParameter("item_number");
|
||||||
|
if (CheckUtil.isNotEmpty(item_number)) {
|
||||||
|
param.put("item_number", item_number);
|
||||||
|
}
|
||||||
|
|
||||||
// 不查询edu 数据
|
// 不查询edu 数据
|
||||||
if (!accountBaseConfigService.getConfig("edu_enable", false)) {
|
if (!accountBaseConfigService.getConfig("edu_enable", false)) {
|
||||||
param.put("edu_enable", false);
|
param.put("edu_enable", false);
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package com.suisung.mall.shop.sync.controller;
|
package com.suisung.mall.shop.sync.controller;
|
||||||
|
|
||||||
import com.suisung.mall.common.api.CommonResult;
|
import com.suisung.mall.common.api.CommonResult;
|
||||||
|
import com.suisung.mall.common.exception.ApiException;
|
||||||
import com.suisung.mall.common.service.impl.BaseControllerImpl;
|
import com.suisung.mall.common.service.impl.BaseControllerImpl;
|
||||||
import com.suisung.mall.shop.sync.service.ShopSyncImportService;
|
import com.suisung.mall.shop.sync.service.ShopSyncImportService;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@ -79,6 +80,9 @@ public class ShopSyncImportController extends BaseControllerImpl {
|
|||||||
@ApiOperation(value = "商品数据导入", notes = "分类数据导入")
|
@ApiOperation(value = "商品数据导入", notes = "分类数据导入")
|
||||||
@RequestMapping(value = "/shopImportData", method = RequestMethod.POST)
|
@RequestMapping(value = "/shopImportData", method = RequestMethod.POST)
|
||||||
public CommonResult shopImportData(@RequestParam("file") MultipartFile file,@RequestParam("storeId")String storeId) {
|
public CommonResult shopImportData(@RequestParam("file") MultipartFile file,@RequestParam("storeId")String storeId) {
|
||||||
|
if(!shopSyncImportService.checkIsPlate()){
|
||||||
|
throw new ApiException("用户无权限");
|
||||||
|
}
|
||||||
shopSyncImportService.importShopsData(file,storeId);
|
shopSyncImportService.importShopsData(file,storeId);
|
||||||
return CommonResult.success("服务器正则处理文件,稍后查看商品列表");
|
return CommonResult.success("服务器正则处理文件,稍后查看商品列表");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,7 +38,7 @@ public class SxCategoryModelExcel {
|
|||||||
@ExcelProperty(value = "第二级分类", index =2)
|
@ExcelProperty(value = "第二级分类", index =2)
|
||||||
private String second_category_name;
|
private String second_category_name;
|
||||||
|
|
||||||
@ApiModelProperty(value = "品牌名称")
|
// @ApiModelProperty(value = "品牌名称")
|
||||||
@ExcelProperty(value = "品牌名称", index =3)
|
// @ExcelProperty(value = "品牌名称", index =3)
|
||||||
private String brandName;
|
// private String brandName;
|
||||||
}
|
}
|
||||||
@ -27,4 +27,6 @@ public interface ShopSyncImportService{
|
|||||||
|
|
||||||
// 导入商品Excel数据
|
// 导入商品Excel数据
|
||||||
void importShopsData(MultipartFile file,String storeId);
|
void importShopsData(MultipartFile file,String storeId);
|
||||||
|
|
||||||
|
boolean checkIsPlate();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,11 +6,13 @@ import com.alibaba.excel.EasyExcel;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.suisung.mall.common.api.CommonResult;
|
import com.suisung.mall.common.api.CommonResult;
|
||||||
|
import com.suisung.mall.common.domain.UserDto;
|
||||||
import com.suisung.mall.common.enums.DicEnum;
|
import com.suisung.mall.common.enums.DicEnum;
|
||||||
import com.suisung.mall.common.exception.ApiException;
|
import com.suisung.mall.common.exception.ApiException;
|
||||||
import com.suisung.mall.common.modules.base.ShopBaseProductBrand;
|
import com.suisung.mall.common.modules.base.ShopBaseProductBrand;
|
||||||
import com.suisung.mall.common.modules.base.ShopBaseProductCategory;
|
import com.suisung.mall.common.modules.base.ShopBaseProductCategory;
|
||||||
import com.suisung.mall.common.modules.sync.StoreDbConfig;
|
import com.suisung.mall.common.modules.sync.StoreDbConfig;
|
||||||
|
import com.suisung.mall.common.utils.ContextUtil;
|
||||||
import com.suisung.mall.shop.base.service.ShopBaseProductBrandService;
|
import com.suisung.mall.shop.base.service.ShopBaseProductBrandService;
|
||||||
import com.suisung.mall.shop.base.service.ShopBaseProductCategoryService;
|
import com.suisung.mall.shop.base.service.ShopBaseProductCategoryService;
|
||||||
import com.suisung.mall.shop.number.service.ShopNumberSeqService;
|
import com.suisung.mall.shop.number.service.ShopNumberSeqService;
|
||||||
@ -110,6 +112,9 @@ public class ShopSyncImportServiceImpl implements ShopSyncImportService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CommonResult importBrandData(MultipartFile file,String storeId) {
|
public CommonResult importBrandData(MultipartFile file,String storeId) {
|
||||||
|
if(!checkIsPlate()){
|
||||||
|
throw new ApiException("用户无权限");
|
||||||
|
}
|
||||||
String fileName = storeUploadedFile(file);
|
String fileName = storeUploadedFile(file);
|
||||||
try {
|
try {
|
||||||
List<BrandModelExcel> excelList = readBrandExcelData(fileName);
|
List<BrandModelExcel> excelList = readBrandExcelData(fileName);
|
||||||
@ -133,6 +138,9 @@ public class ShopSyncImportServiceImpl implements ShopSyncImportService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CommonResult importCategoryData(MultipartFile file,String storeId) {
|
public CommonResult importCategoryData(MultipartFile file,String storeId) {
|
||||||
|
if(!checkIsPlate()){
|
||||||
|
throw new ApiException("用户无权限");
|
||||||
|
}
|
||||||
String fileName = storeUploadedFile(file);
|
String fileName = storeUploadedFile(file);
|
||||||
try {
|
try {
|
||||||
List<SxCategoryModelExcel> excelList = readCategoryExcelData(fileName);
|
List<SxCategoryModelExcel> excelList = readCategoryExcelData(fileName);
|
||||||
@ -244,6 +252,16 @@ public class ShopSyncImportServiceImpl implements ShopSyncImportService {
|
|||||||
private void initData(String storeId){
|
private void initData(String storeId){
|
||||||
shopBaseProductCategoryService.getCategoryListByStoreId(storeId);
|
shopBaseProductCategoryService.getCategoryListByStoreId(storeId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断是否平台
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean checkIsPlate(){
|
||||||
|
UserDto userDto= ContextUtil.getCurrentUser();
|
||||||
|
assert userDto != null;
|
||||||
|
return 9 == userDto.getRole_id();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -22,6 +22,7 @@ import com.suisung.mall.common.feignService.AccountService;
|
|||||||
import com.suisung.mall.common.feignService.PayService;
|
import com.suisung.mall.common.feignService.PayService;
|
||||||
import com.suisung.mall.common.modules.account.AccountUserBase;
|
import com.suisung.mall.common.modules.account.AccountUserBase;
|
||||||
import com.suisung.mall.common.modules.account.AccountUserInfo;
|
import com.suisung.mall.common.modules.account.AccountUserInfo;
|
||||||
|
import com.suisung.mall.common.modules.account.AccountUserLogin;
|
||||||
import com.suisung.mall.common.modules.base.ShopBaseProductBrand;
|
import com.suisung.mall.common.modules.base.ShopBaseProductBrand;
|
||||||
import com.suisung.mall.common.modules.base.ShopBaseProductCategory;
|
import com.suisung.mall.common.modules.base.ShopBaseProductCategory;
|
||||||
import com.suisung.mall.common.modules.base.ShopBaseProductSpec;
|
import com.suisung.mall.common.modules.base.ShopBaseProductSpec;
|
||||||
@ -41,6 +42,8 @@ import com.suisung.mall.common.utils.DateTimeUtils;
|
|||||||
import com.suisung.mall.common.utils.I18nUtil;
|
import com.suisung.mall.common.utils.I18nUtil;
|
||||||
import com.suisung.mall.common.utils.StringUtils;
|
import com.suisung.mall.common.utils.StringUtils;
|
||||||
import com.suisung.mall.common.utils.phone.PhoneNumberUtils;
|
import com.suisung.mall.common.utils.phone.PhoneNumberUtils;
|
||||||
|
import com.suisung.mall.core.consts.ConstantRedis;
|
||||||
|
import com.suisung.mall.core.web.service.RedisService;
|
||||||
import com.suisung.mall.shop.base.service.ShopBaseProductBrandService;
|
import com.suisung.mall.shop.base.service.ShopBaseProductBrandService;
|
||||||
import com.suisung.mall.shop.base.service.ShopBaseProductCategoryService;
|
import com.suisung.mall.shop.base.service.ShopBaseProductCategoryService;
|
||||||
import com.suisung.mall.shop.base.service.ShopBaseProductSpecService;
|
import com.suisung.mall.shop.base.service.ShopBaseProductSpecService;
|
||||||
@ -102,9 +105,12 @@ public abstract class SyncBaseThirdSxAbstract{
|
|||||||
@Autowired
|
@Autowired
|
||||||
private LibraryProductService libraryProductService;
|
private LibraryProductService libraryProductService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RedisService redisService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public static final Set<String> FORBID_CATEGORY= Collections.unmodifiableSet(new HashSet<>(
|
public static final Set<String> FORBID_CATEGORY= Collections.unmodifiableSet(new HashSet<>(
|
||||||
Arrays.asList("香烟类","香烟","烟类", "烟")
|
Arrays.asList("香烟类","香烟","烟类", "烟","烟草")
|
||||||
));
|
));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -141,6 +147,16 @@ public abstract class SyncBaseThirdSxAbstract{
|
|||||||
}
|
}
|
||||||
List<ShopBaseProductType> productTypeList = new ArrayList<>();
|
List<ShopBaseProductType> productTypeList = new ArrayList<>();
|
||||||
Map<String,String> productTypeListMap=new HashMap<>();
|
Map<String,String> productTypeListMap=new HashMap<>();
|
||||||
|
//JSONObject o = (JSONObject) categoryListJSON.get(0);
|
||||||
|
// String brandName=o.getStr("brandName","其它品牌");
|
||||||
|
QueryWrapper<ShopBaseProductBrand> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("store_id",Integer.valueOf(storeId));
|
||||||
|
//queryWrapper.in("brand_name",Arrays.asList(brandName.split(",")));
|
||||||
|
// queryWrapper.eq("brand_name",brandName);
|
||||||
|
List<ShopBaseProductBrand> shopBaseProductBrands=productBrandService.list(queryWrapper);
|
||||||
|
String brandIds=shopBaseProductBrands.stream()
|
||||||
|
.map(shopBaseProductBrand -> String.valueOf(shopBaseProductBrand.getBrand_id()))
|
||||||
|
.collect(Collectors.joining(","));
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
String categoryName=list.get(i).getCategory_name();
|
String categoryName=list.get(i).getCategory_name();
|
||||||
if(StringUtils.isNotEmpty(getForbidCategory(categoryName))){
|
if(StringUtils.isNotEmpty(getForbidCategory(categoryName))){
|
||||||
@ -155,15 +171,7 @@ public abstract class SyncBaseThirdSxAbstract{
|
|||||||
ShopBaseProductType productType=new ShopBaseProductType();
|
ShopBaseProductType productType=new ShopBaseProductType();
|
||||||
productType.setType_is_draft(1);//发布
|
productType.setType_is_draft(1);//发布
|
||||||
productType.setStore_id(Integer.valueOf(storeId));
|
productType.setStore_id(Integer.valueOf(storeId));
|
||||||
String brandName=o.getStr("brandName","其它品牌");
|
|
||||||
QueryWrapper<ShopBaseProductBrand> queryWrapper = new QueryWrapper<>();
|
|
||||||
queryWrapper.eq("store_id",Integer.valueOf(storeId));
|
|
||||||
queryWrapper.in("brand_name",Arrays.asList(brandName.split(",")));
|
|
||||||
// queryWrapper.eq("brand_name",brandName);
|
|
||||||
List<ShopBaseProductBrand> shopBaseProductBrands=productBrandService.list(queryWrapper);
|
|
||||||
String brandIds=shopBaseProductBrands.stream()
|
|
||||||
.map(shopBaseProductBrand -> String.valueOf(shopBaseProductBrand.getBrand_id()))
|
|
||||||
.collect(Collectors.joining(","));
|
|
||||||
if (o != null) {
|
if (o != null) {
|
||||||
// 重要:分类类型处理(强调共性)
|
// 重要:分类类型处理(强调共性)
|
||||||
Integer typeId = 1001;
|
Integer typeId = 1001;
|
||||||
@ -601,6 +609,8 @@ public abstract class SyncBaseThirdSxAbstract{
|
|||||||
List<AccountUserBase> addAccountUserBases=new ArrayList<>();
|
List<AccountUserBase> addAccountUserBases=new ArrayList<>();
|
||||||
List<AccountUserInfo> addAcountUserInfo=new ArrayList<>();
|
List<AccountUserInfo> addAcountUserInfo=new ArrayList<>();
|
||||||
List<PayUserResource> addPayUserResource=new ArrayList<>();
|
List<PayUserResource> addPayUserResource=new ArrayList<>();
|
||||||
|
List<AccountUserLogin> accountUserLogins=new ArrayList<>();
|
||||||
|
Date today=new Date();
|
||||||
for (int i = 0; i < accountBaseIds.size(); i++) {
|
for (int i = 0; i < accountBaseIds.size(); i++) {
|
||||||
// account_user_base
|
// account_user_base
|
||||||
SyncThirdMemberReq syncThirdMemberReq=addMemberList.get(i);
|
SyncThirdMemberReq syncThirdMemberReq=addMemberList.get(i);
|
||||||
@ -641,6 +651,14 @@ public abstract class SyncBaseThirdSxAbstract{
|
|||||||
accountUserInfo.setUser_birthday(DateTimeUtils.parseDate(syncThirdMemberReq.getUser_birthday(), "yyyy-MM-dd"));
|
accountUserInfo.setUser_birthday(DateTimeUtils.parseDate(syncThirdMemberReq.getUser_birthday(), "yyyy-MM-dd"));
|
||||||
}
|
}
|
||||||
addAcountUserInfo.add(accountUserInfo);
|
addAcountUserInfo.add(accountUserInfo);
|
||||||
|
|
||||||
|
//account
|
||||||
|
AccountUserLogin accountUserLogin = new AccountUserLogin();
|
||||||
|
accountUserLogin.setUser_id(userId);
|
||||||
|
accountUserLogin.setUser_active_time(today);
|
||||||
|
accountUserLogin.setUser_reg_date(today);
|
||||||
|
accountUserLogin.setUser_reg_time(today.getTime());
|
||||||
|
accountUserLogins.add(accountUserLogin);
|
||||||
if (syncThirdMemberReq.getUser_money() != null || syncThirdMemberReq.getUser_points() != null) {
|
if (syncThirdMemberReq.getUser_money() != null || syncThirdMemberReq.getUser_points() != null) {
|
||||||
// pay_user_resource 用户支付资源,积分,余额
|
// pay_user_resource 用户支付资源,积分,余额
|
||||||
PayUserResource payUserResource = new PayUserResource();
|
PayUserResource payUserResource = new PayUserResource();
|
||||||
@ -666,13 +684,18 @@ public abstract class SyncBaseThirdSxAbstract{
|
|||||||
throw new ApiException(ResultCode.FAILED,"addAcountUserInfo保存异常");
|
throw new ApiException(ResultCode.FAILED,"addAcountUserInfo保存异常");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!addPayUserResource.isEmpty()){
|
if(!addPayUserResource.isEmpty()){
|
||||||
ThirdApiRes thirdApiRes= payService.saveBatchPayUserResources(addPayUserResource);
|
ThirdApiRes thirdApiRes= payService.saveBatchPayUserResources(addPayUserResource);
|
||||||
if(thirdApiRes.getError_code()!=0){
|
if(thirdApiRes.getError_code()!=0){
|
||||||
throw new ApiException(ResultCode.FAILED);
|
throw new ApiException(ResultCode.FAILED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(!accountUserLogins.isEmpty()){
|
||||||
|
ThirdApiRes thirdApiRes= accountService.saveBatchAccountUserLogin(accountUserLogins);
|
||||||
|
if(thirdApiRes.getError_code()!=0){
|
||||||
|
throw new ApiException(ResultCode.FAILED,"accountUserLogin保存异常");
|
||||||
|
}
|
||||||
|
}
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -877,7 +900,6 @@ public abstract class SyncBaseThirdSxAbstract{
|
|||||||
shopProductIndex.setProduct_sale_time(currentDate.getTime());
|
shopProductIndex.setProduct_sale_time(currentDate.getTime());
|
||||||
shopProductIndex.setStore_category_ids(""); // 店铺分类编号(DOT)
|
shopProductIndex.setStore_category_ids(""); // 店铺分类编号(DOT)
|
||||||
shopProductIndex.setProduct_tags("");// 商品标签(DOT)
|
shopProductIndex.setProduct_tags("");// 商品标签(DOT)
|
||||||
shopProductIndex.setBrand_id(0);
|
|
||||||
shopProductIndex.setProduct_name(productName); // 产品名称:店铺平台先在对用表中检索后通过id检索,检索使用
|
shopProductIndex.setProduct_name(productName); // 产品名称:店铺平台先在对用表中检索后通过id检索,检索使用
|
||||||
shopProductIndex.setProduct_name_index(productName); // 名称索引关键字(DOT)
|
shopProductIndex.setProduct_name_index(productName); // 名称索引关键字(DOT)
|
||||||
shopProductIndex.setCategory_id(categoryId); // 商品分类
|
shopProductIndex.setCategory_id(categoryId); // 商品分类
|
||||||
@ -1098,7 +1120,7 @@ public abstract class SyncBaseThirdSxAbstract{
|
|||||||
}
|
}
|
||||||
// spec_id++;
|
// spec_id++;
|
||||||
}
|
}
|
||||||
|
List<String> shopBaseProductTypeReidisKeyList=new ArrayList<>();
|
||||||
if(!insertShopBaseProductSpecList.isEmpty()){
|
if(!insertShopBaseProductSpecList.isEmpty()){
|
||||||
List<Integer> specIdList=shopNumberSeqService.getBatchSpecId(insertShopBaseProductSpecList.size());
|
List<Integer> specIdList=shopNumberSeqService.getBatchSpecId(insertShopBaseProductSpecList.size());
|
||||||
for(int i=0;i<specIdList.size();i++){
|
for(int i=0;i<specIdList.size();i++){
|
||||||
@ -1108,6 +1130,7 @@ public abstract class SyncBaseThirdSxAbstract{
|
|||||||
if((shopBaseProductType.getType_name()+"规格").equals(insertShopBaseProductSpecList.get(finalI).getSpec_name())){
|
if((shopBaseProductType.getType_name()+"规格").equals(insertShopBaseProductSpecList.get(finalI).getSpec_name())){
|
||||||
shopBaseProductType.setType_spec_ids(String.valueOf(finalSpec_id));
|
shopBaseProductType.setType_spec_ids(String.valueOf(finalSpec_id));
|
||||||
}
|
}
|
||||||
|
shopBaseProductTypeReidisKeyList.add(ConstantRedis.Cache_NameSpace + "shop_base_product_type:" +shopBaseProductType.getType_id());
|
||||||
});
|
});
|
||||||
insertShopBaseProductSpecList.get(i).setSpec_id(finalSpec_id);
|
insertShopBaseProductSpecList.get(i).setSpec_id(finalSpec_id);
|
||||||
}
|
}
|
||||||
@ -1122,6 +1145,9 @@ public abstract class SyncBaseThirdSxAbstract{
|
|||||||
if(CollectionUtil.isNotEmpty(shopBaseProductTypes)){
|
if(CollectionUtil.isNotEmpty(shopBaseProductTypes)){
|
||||||
productTypeService.updateBatchById(shopBaseProductTypes,shopBaseProductTypes.size());
|
productTypeService.updateBatchById(shopBaseProductTypes,shopBaseProductTypes.size());
|
||||||
}
|
}
|
||||||
|
if(!shopBaseProductTypeReidisKeyList.isEmpty()){//删除缓存
|
||||||
|
redisService.del(shopBaseProductTypeReidisKeyList);
|
||||||
|
}
|
||||||
productCategoryService.clearCategoryCache(storeId);
|
productCategoryService.clearCategoryCache(storeId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -140,7 +140,7 @@ public class SyncShopImageServiceImpl implements SyncShopImageService {
|
|||||||
while (index<3){
|
while (index<3){
|
||||||
try {
|
try {
|
||||||
List<ImageMappingDto> imageMappingDtos=CovertToShopProductImage(list);//调用es排除异常重新连接
|
List<ImageMappingDto> imageMappingDtos=CovertToShopProductImage(list);//调用es排除异常重新连接
|
||||||
syncBatchShopImage(imageMappingDtos);
|
syncBatchShopImage(imageMappingDtos,StateCode.PRODUCT_STATE_OFF_THE_SHELF);
|
||||||
success.getAndIncrement();
|
success.getAndIncrement();
|
||||||
message= "成功" + finalI;
|
message= "成功" + finalI;
|
||||||
break;
|
break;
|
||||||
@ -163,7 +163,7 @@ public class SyncShopImageServiceImpl implements SyncShopImageService {
|
|||||||
final int finalI = i;
|
final int finalI = i;
|
||||||
futures.add(executor.submit(() -> {
|
futures.add(executor.submit(() -> {
|
||||||
try {
|
try {
|
||||||
syncBatchShopImage(imageMappingDtos);
|
syncBatchShopImage(imageMappingDtos,StateCode.PRODUCT_STATE_NORMAL);
|
||||||
success.getAndIncrement();
|
success.getAndIncrement();
|
||||||
return "图库匹配成功" + finalI;
|
return "图库匹配成功" + finalI;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@ -192,7 +192,7 @@ public class SyncShopImageServiceImpl implements SyncShopImageService {
|
|||||||
* 把匹配的数据更新到商品的图库表
|
* 把匹配的数据更新到商品的图库表
|
||||||
* @param imageMappingDtos
|
* @param imageMappingDtos
|
||||||
*/
|
*/
|
||||||
private void syncBatchShopImage(List<ImageMappingDto> imageMappingDtos){
|
private void syncBatchShopImage(List<ImageMappingDto> imageMappingDtos,int product_state_id){
|
||||||
if(CollectionUtil.isEmpty(imageMappingDtos)){
|
if(CollectionUtil.isEmpty(imageMappingDtos)){
|
||||||
log.info("没有匹配到图库");
|
log.info("没有匹配到图库");
|
||||||
return;
|
return;
|
||||||
@ -223,14 +223,14 @@ public class SyncShopImageServiceImpl implements SyncShopImageService {
|
|||||||
shopProductImageList.add(shopProductImage);
|
shopProductImageList.add(shopProductImage);
|
||||||
shopProductBase.setProduct_id(imageMappingDto.getProductId());
|
shopProductBase.setProduct_id(imageMappingDto.getProductId());
|
||||||
shopProductBase.setProduct_image(thumb);
|
shopProductBase.setProduct_image(thumb);
|
||||||
shopProductBase.setProduct_state_id(StateCode.PRODUCT_STATE_OFF_THE_SHELF);
|
shopProductBase.setProduct_state_id(product_state_id);
|
||||||
shopProductBaseList.add(shopProductBase);
|
shopProductBaseList.add(shopProductBase);
|
||||||
shopProductItem.setProduct_id(imageMappingDto.getProductId());
|
shopProductItem.setProduct_id(imageMappingDto.getProductId());
|
||||||
shopProductItem.setItem_enable(StateCode.PRODUCT_STATE_NORMAL);
|
shopProductItem.setItem_enable(StateCode.PRODUCT_STATE_NORMAL);
|
||||||
shopProductItemList.add(shopProductItem);
|
shopProductItemList.add(shopProductItem);
|
||||||
ShopProductIndex shopProductIndex=new ShopProductIndex();
|
ShopProductIndex shopProductIndex=new ShopProductIndex();
|
||||||
shopProductIndex.setProduct_id(imageMappingDto.getProductId());
|
shopProductIndex.setProduct_id(imageMappingDto.getProductId());
|
||||||
shopProductIndex.setProduct_state_id(StateCode.PRODUCT_STATE_OFF_THE_SHELF);
|
shopProductIndex.setProduct_state_id(product_state_id);
|
||||||
shopProductIndexList.add(shopProductIndex);
|
shopProductIndexList.add(shopProductIndex);
|
||||||
}
|
}
|
||||||
synchronized (this){
|
synchronized (this){
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import com.suisung.mall.common.api.ResultCode;
|
|||||||
import com.suisung.mall.common.api.StateCode;
|
import com.suisung.mall.common.api.StateCode;
|
||||||
import com.suisung.mall.common.constant.CommonConstant;
|
import com.suisung.mall.common.constant.CommonConstant;
|
||||||
import com.suisung.mall.common.domain.UserDto;
|
import com.suisung.mall.common.domain.UserDto;
|
||||||
|
import com.suisung.mall.common.enums.DicEnum;
|
||||||
import com.suisung.mall.common.exception.ApiException;
|
import com.suisung.mall.common.exception.ApiException;
|
||||||
import com.suisung.mall.common.exception.ApiUserException;
|
import com.suisung.mall.common.exception.ApiUserException;
|
||||||
import com.suisung.mall.common.feignService.AccountService;
|
import com.suisung.mall.common.feignService.AccountService;
|
||||||
@ -38,6 +39,7 @@ import com.suisung.mall.common.service.MessageService;
|
|||||||
import com.suisung.mall.common.utils.CheckUtil;
|
import com.suisung.mall.common.utils.CheckUtil;
|
||||||
import com.suisung.mall.common.utils.I18nUtil;
|
import com.suisung.mall.common.utils.I18nUtil;
|
||||||
import com.suisung.mall.common.utils.StringUtils;
|
import com.suisung.mall.common.utils.StringUtils;
|
||||||
|
import com.suisung.mall.core.web.service.RedisService;
|
||||||
import com.suisung.mall.core.web.service.impl.BaseServiceImpl;
|
import com.suisung.mall.core.web.service.impl.BaseServiceImpl;
|
||||||
import com.suisung.mall.shop.base.service.AccountBaseConfigService;
|
import com.suisung.mall.shop.base.service.AccountBaseConfigService;
|
||||||
import com.suisung.mall.shop.base.service.ShopBaseStateCodeService;
|
import com.suisung.mall.shop.base.service.ShopBaseStateCodeService;
|
||||||
@ -50,6 +52,7 @@ import com.suisung.mall.shop.product.pojo.vo.FixOrderVo;
|
|||||||
import com.suisung.mall.shop.product.pojo.vo.ProductVo;
|
import com.suisung.mall.shop.product.pojo.vo.ProductVo;
|
||||||
import com.suisung.mall.shop.product.service.*;
|
import com.suisung.mall.shop.product.service.*;
|
||||||
import com.suisung.mall.shop.store.service.*;
|
import com.suisung.mall.shop.store.service.*;
|
||||||
|
import com.suisung.mall.shop.sync.keymanage.RedisKey;
|
||||||
import com.suisung.mall.shop.user.mapper.ShopUserCartMapper;
|
import com.suisung.mall.shop.user.mapper.ShopUserCartMapper;
|
||||||
import com.suisung.mall.shop.user.service.ShopUserCartService;
|
import com.suisung.mall.shop.user.service.ShopUserCartService;
|
||||||
import com.suisung.mall.shop.user.service.ShopUserDeliveryAddressService;
|
import com.suisung.mall.shop.user.service.ShopUserDeliveryAddressService;
|
||||||
@ -157,6 +160,12 @@ public class ShopUserCartServiceImpl extends BaseServiceImpl<ShopUserCartMapper,
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ShopStoreSameCityTransportBaseService shopStoreSameCityTransportBaseService;
|
private ShopStoreSameCityTransportBaseService shopStoreSameCityTransportBaseService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RedisService redisService;
|
||||||
|
|
||||||
|
// @Autowired
|
||||||
|
// private ShopStoreMemberService shopStoreMemberService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public Map getLists(Integer store_id, Integer chain_id, Integer page, Integer rows) {
|
public Map getLists(Integer store_id, Integer chain_id, Integer page, Integer rows) {
|
||||||
@ -270,9 +279,18 @@ public class ShopUserCartServiceImpl extends BaseServiceImpl<ShopUserCartMapper,
|
|||||||
|
|
||||||
if (ObjectUtil.equal(cart.getUser_id(), user_id)) {
|
if (ObjectUtil.equal(cart.getUser_id(), user_id)) {
|
||||||
cart.setCart_quantity(cart_quantity);
|
cart.setCart_quantity(cart_quantity);
|
||||||
|
int i=0;
|
||||||
if (!edit(cart)) {
|
while (i<3){
|
||||||
throw new ApiException(ResultCode.FAILED);
|
boolean result=edit(cart);
|
||||||
|
if (!result) {
|
||||||
|
i++;
|
||||||
|
if(i==3){
|
||||||
|
throw new ApiException(ResultCode.FAILED);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
logger.info("重试成功,跳出");
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QueryWrapper<ShopUserCart> userCartQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<ShopUserCart> userCartQueryWrapper = new QueryWrapper<>();
|
||||||
@ -403,6 +421,10 @@ public class ShopUserCartServiceImpl extends BaseServiceImpl<ShopUserCartMapper,
|
|||||||
throw new ApiException(ResultCode.NEED_LOGIN);
|
throw new ApiException(ResultCode.NEED_LOGIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//购物车控制活动的商品数量 todo
|
||||||
|
// if(null!=activity_id&&0!=activity_id){
|
||||||
|
// checkActivity(activity_id,user_id);
|
||||||
|
// }
|
||||||
data.put("item_id", item_id);
|
data.put("item_id", item_id);
|
||||||
data.put("cart_quantity", cart_quantity >= 0 ? Math.max(1, cart_quantity) : Math.min(-1, cart_quantity)); // 购买商品数量
|
data.put("cart_quantity", cart_quantity >= 0 ? Math.max(1, cart_quantity) : Math.min(-1, cart_quantity)); // 购买商品数量
|
||||||
data.put("cart_type", cart_type);
|
data.put("cart_type", cart_type);
|
||||||
|
|||||||
@ -42,13 +42,14 @@
|
|||||||
from
|
from
|
||||||
(
|
(
|
||||||
SELECT
|
SELECT
|
||||||
ROW_NUMBER() over(partition by t.product_name order by t.id) rn,t.*
|
ROW_NUMBER() over(partition by t.product_number order by t.id) rn,t.*
|
||||||
from
|
from
|
||||||
(
|
(
|
||||||
SELECT
|
SELECT
|
||||||
spi.product_image_id,
|
spi.product_image_id,
|
||||||
spi.product_id,
|
spi.product_id,
|
||||||
spi.product_name,
|
spi.product_name,
|
||||||
|
spi.product_number,
|
||||||
spi.store_id,
|
spi.store_id,
|
||||||
lpi. merged_image_url,
|
lpi. merged_image_url,
|
||||||
lp.thumb,
|
lp.thumb,
|
||||||
@ -74,11 +75,12 @@
|
|||||||
lp.id = lpi.product_id
|
lp.id = lpi.product_id
|
||||||
WHERE
|
WHERE
|
||||||
spi.product_from = '1005'
|
spi.product_from = '1005'
|
||||||
|
AND spi.store_id=#{storeId}
|
||||||
AND spi.item_image_default = '1'
|
AND spi.item_image_default = '1'
|
||||||
<![CDATA[ AND lp.barcode <> '' ]]>)t
|
<![CDATA[ AND lp.barcode <> '' ]]>)t
|
||||||
)temp
|
)temp
|
||||||
where
|
where
|
||||||
temp.rn = 1 and temp.store_id=#{storeId}
|
temp.rn = 1
|
||||||
)tt
|
)tt
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -93,13 +95,14 @@
|
|||||||
from
|
from
|
||||||
(
|
(
|
||||||
SELECT
|
SELECT
|
||||||
ROW_NUMBER() over(partition by t.product_name order by t.id) rn,t.*
|
ROW_NUMBER() over(partition by t.product_number order by t.id) rn,t.*
|
||||||
from
|
from
|
||||||
(
|
(
|
||||||
SELECT
|
SELECT
|
||||||
spi.product_image_id,
|
spi.product_image_id,
|
||||||
spi.product_id,
|
spi.product_id,
|
||||||
spi.product_name,
|
spi.product_name,
|
||||||
|
spi.product_number,
|
||||||
spi.store_id,
|
spi.store_id,
|
||||||
lpi. merged_image_url,
|
lpi. merged_image_url,
|
||||||
lp.thumb,
|
lp.thumb,
|
||||||
@ -125,11 +128,12 @@
|
|||||||
lp.id = lpi.product_id
|
lp.id = lpi.product_id
|
||||||
WHERE
|
WHERE
|
||||||
spi.product_from = '1005'
|
spi.product_from = '1005'
|
||||||
|
AND spi.store_id=#{storeId}
|
||||||
AND spi.item_image_default = '1'
|
AND spi.item_image_default = '1'
|
||||||
<![CDATA[ AND lp.barcode <> '' ]]>)t
|
<![CDATA[ AND lp.barcode <> '' ]]>)t
|
||||||
)temp
|
)temp
|
||||||
where
|
where
|
||||||
temp.rn = 1 and temp.store_id=#{storeId} limit #{offset},#{limit}
|
temp.rn = 1 limit #{offset},#{limit}
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="mappingByProductShortNameCount" resultType="java.lang.Integer">
|
<select id="mappingByProductShortNameCount" resultType="java.lang.Integer">
|
||||||
|
|||||||
@ -66,6 +66,9 @@
|
|||||||
AND b.product_state_id = #{param.product_state_id}
|
AND b.product_state_id = #{param.product_state_id}
|
||||||
AND i.item_enable = #{param.product_state_id}
|
AND i.item_enable = #{param.product_state_id}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="param.item_number != null and param.item_number !=''">
|
||||||
|
AND i.item_number = #{param.item_number}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
<choose>
|
<choose>
|
||||||
<when test="param.sidx != null and param.sord != null">
|
<when test="param.sidx != null and param.sord != null">
|
||||||
|
|||||||
@ -18047,7 +18047,7 @@
|
|||||||
}) : $[_x41903[2030]][_x41903[4089]](__(_x41903[4558]))) : 3 == l[_x41903[4522]] || 4 == l[_x41903[4522]] || 6 == l[_x41903[4522]] || 7 == l[_x41903[4522]] || 14 == l[_x41903[4522]] || 17 == l[_x41903[4522]] ? ($[_x41903[39]](l[_x41903[4520]], function(e, t) {
|
}) : $[_x41903[2030]][_x41903[4089]](__(_x41903[4558]))) : 3 == l[_x41903[4522]] || 4 == l[_x41903[4522]] || 6 == l[_x41903[4522]] || 7 == l[_x41903[4522]] || 14 == l[_x41903[4522]] || 17 == l[_x41903[4522]] ? ($[_x41903[39]](l[_x41903[4520]], function(e, t) {
|
||||||
t[_x41903[124]] == l[_x41903[4500]] && (t[_x41903[4559]] = s[_x41903[124]],
|
t[_x41903[124]] == l[_x41903[4500]] && (t[_x41903[4559]] = s[_x41903[124]],
|
||||||
t[_x41903[184]] = s[_x41903[184]], t[_x41903[4560]] = s[_x41903[4560]],
|
t[_x41903[184]] = s[_x41903[184]], t[_x41903[4560]] = s[_x41903[4560]],
|
||||||
l.listType==1?t[_x41903[2345]] = s[_x41903[2345]]: "",
|
(l.listType==1||l.listType==12||l.listType==13||l.listType==14||l.listType==15)?t[_x41903[2345]] = s[_x41903[2345]]: "",
|
||||||
t[_x41903[4561]] = s[_x41903[4561]],
|
t[_x41903[4561]] = s[_x41903[4561]],
|
||||||
t[_x41903[4562]] = s[_x41903[4562]], t[_x41903[4563]] = s[_x41903[4563]],
|
t[_x41903[4562]] = s[_x41903[4562]], t[_x41903[4563]] = s[_x41903[4563]],
|
||||||
t[_x41903[4554]] = s[_x41903[4554]], t[_x41903[4557]] = s[_x41903[4557]],
|
t[_x41903[4554]] = s[_x41903[4554]], t[_x41903[4557]] = s[_x41903[4557]],
|
||||||
@ -18070,7 +18070,7 @@
|
|||||||
l[_x41903[4519]][_x41903[4560]] = s[_x41903[4560]],
|
l[_x41903[4519]][_x41903[4560]] = s[_x41903[4560]],
|
||||||
//console.log("listType"+l.listType),
|
//console.log("listType"+l.listType),
|
||||||
//l[_x41903[4519]][_x41903[2345]] = s[_x41903[2345]],
|
//l[_x41903[4519]][_x41903[2345]] = s[_x41903[2345]],
|
||||||
l.listType==1? l[_x41903[4519]][_x41903[2345]] = s[_x41903[2345]]: "",
|
(l.listType==1||l.listType==12||l.listType==13||l.listType==14||l.listType==15)? l[_x41903[4519]][_x41903[2345]] = s[_x41903[2345]]: "",
|
||||||
l[_x41903[4519]][_x41903[4561]] = s[_x41903[4561]],
|
l[_x41903[4519]][_x41903[4561]] = s[_x41903[4561]],
|
||||||
l[_x41903[4519]][_x41903[4562]] = s[_x41903[4562]],
|
l[_x41903[4519]][_x41903[4562]] = s[_x41903[4562]],
|
||||||
l[_x41903[4519]][_x41903[4563]] = s[_x41903[4563]],
|
l[_x41903[4519]][_x41903[4563]] = s[_x41903[4563]],
|
||||||
@ -18081,14 +18081,14 @@
|
|||||||
publicFun[_x41903[3948]](l[_x41903[820]], l[_x41903[4500]], l[_x41903[4519]])) : 16 == l[_x41903[4522]] ? ($[_x41903[39]](l[_x41903[4520]], function(e, t) {
|
publicFun[_x41903[3948]](l[_x41903[820]], l[_x41903[4500]], l[_x41903[4519]])) : 16 == l[_x41903[4522]] ? ($[_x41903[39]](l[_x41903[4520]], function(e, t) {
|
||||||
t[_x41903[124]] == l[_x41903[4500]] && (t[_x41903[4559]] = s[_x41903[124]],
|
t[_x41903[124]] == l[_x41903[4500]] && (t[_x41903[4559]] = s[_x41903[124]],
|
||||||
t[_x41903[184]] = s[_x41903[184]], t[_x41903[4560]] = s[_x41903[4560]],
|
t[_x41903[184]] = s[_x41903[184]], t[_x41903[4560]] = s[_x41903[4560]],
|
||||||
l.listType==1?t[_x41903[2345]] = s[_x41903[2345]]: "", t[_x41903[4567]] = s[_x41903[4567]],
|
(l.listType==1||l.listType==12||l.listType==13||l.listType==14||l.listType==15)?t[_x41903[2345]] = s[_x41903[2345]]: "", t[_x41903[4567]] = s[_x41903[4567]],
|
||||||
t[_x41903[4568]] = s[_x41903[4568]], t[_x41903[4569]] = s[_x41903[4569]],
|
t[_x41903[4568]] = s[_x41903[4568]], t[_x41903[4569]] = s[_x41903[4569]],
|
||||||
t[_x41903[4570]] = s[_x41903[4570]], t[_x41903[4571]] = s[_x41903[4571]],
|
t[_x41903[4570]] = s[_x41903[4570]], t[_x41903[4571]] = s[_x41903[4571]],
|
||||||
t[_x41903[4572]] = s[_x41903[4572]]);
|
t[_x41903[4572]] = s[_x41903[4572]]);
|
||||||
}), publicFun[_x41903[3948]](l[_x41903[820]], l[_x41903[4500]], l[_x41903[4520]])) : (l[_x41903[4519]][_x41903[4559]] = s[_x41903[124]],
|
}), publicFun[_x41903[3948]](l[_x41903[820]], l[_x41903[4500]], l[_x41903[4520]])) : (l[_x41903[4519]][_x41903[4559]] = s[_x41903[124]],
|
||||||
l[_x41903[4519]][_x41903[184]] = s[_x41903[184]],
|
l[_x41903[4519]][_x41903[184]] = s[_x41903[184]],
|
||||||
l[_x41903[4519]][_x41903[4560]] = s[_x41903[4560]],
|
l[_x41903[4519]][_x41903[4560]] = s[_x41903[4560]],
|
||||||
l.listType==1? l[_x41903[4519]][_x41903[2345]] = s[_x41903[2345]]: "",
|
(l.listType==1||l.listType==12||l.listType==13||l.listType==14||l.listType==15)? l[_x41903[4519]][_x41903[2345]] = s[_x41903[2345]]: "",
|
||||||
l[_x41903[4519]][_x41903[4561]] = s[_x41903[4561]],
|
l[_x41903[4519]][_x41903[4561]] = s[_x41903[4561]],
|
||||||
l[_x41903[4519]][_x41903[4562]] = s[_x41903[4562]],
|
l[_x41903[4519]][_x41903[4562]] = s[_x41903[4562]],
|
||||||
l[_x41903[4519]][_x41903[4563]] = s[_x41903[184]],
|
l[_x41903[4519]][_x41903[4563]] = s[_x41903[184]],
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user