|
@@ -65,7 +65,7 @@ public class ProductInfoServiceImpl extends ServiceImpl<ProductInfoMapper, Produ
|
|
|
new SqlField("pi", ProductInfo::getCode),
|
|
|
new SqlField("pi", ProductInfo::getCustomCode)
|
|
|
);
|
|
|
- wrapper.eq("json_unquote(victoriatourist_json ->'$.lifeCycle')",dto.getLifeCycle());
|
|
|
+ wrapper.eq("json_unquote(victoriatourist_json ->'$.lifeCycle')", dto.getLifeCycle());
|
|
|
Page<ProductInfoVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
|
|
|
|
|
|
List<ProductInfoVo> records = page.getRecords();
|
|
@@ -95,6 +95,15 @@ public class ProductInfoServiceImpl extends ServiceImpl<ProductInfoMapper, Produ
|
|
|
record.setClassifyNameGroup(classifyNameGroup);
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ return page;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Page<ProductInfoVo> getPageByWdly(ProductInfoSelectDto dto) {
|
|
|
+ Page<ProductInfoVo> page = getPage(dto);
|
|
|
+ List<ProductInfoVo> records = page.getRecords();
|
|
|
//赋值维多利亚扩展部门名称
|
|
|
List<Long> ids = new ArrayList<>();
|
|
|
for (ProductInfoVo record : records) {
|
|
@@ -126,7 +135,6 @@ public class ProductInfoServiceImpl extends ServiceImpl<ProductInfoMapper, Produ
|
|
|
json.put("deptName", sysDeptMap.get(json.getLong("deptId")));
|
|
|
record.setVictoriatouristJson(json.toJSONString());
|
|
|
}
|
|
|
-
|
|
|
return page;
|
|
|
}
|
|
|
|
|
@@ -146,13 +154,19 @@ public class ProductInfoServiceImpl extends ServiceImpl<ProductInfoMapper, Produ
|
|
|
this.nameDuplication(ProductInfo::getName, productInfoDto.getName(), "产品名称重复");
|
|
|
this.save(productInfoDto);
|
|
|
ObsFileUtil.saveFile(productInfoDto.getFileList(), productInfoDto.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+ @DSTransactional
|
|
|
+ @Override
|
|
|
+ public void addByWdly(ProductInfoDto productInfoDto) {
|
|
|
//处理维多利亚扩展
|
|
|
String victoriatouristJson = productInfoDto.getVictoriatouristJson();
|
|
|
- if(ObjectUtil.isNotEmpty(victoriatouristJson)) {
|
|
|
+ if (ObjectUtil.isNotEmpty(victoriatouristJson)) {
|
|
|
JSONObject json = JSONObject.parseObject(victoriatouristJson);
|
|
|
json.put("deptId", SecurityUtils.getDeptId());
|
|
|
productInfoDto.setVictoriatouristJson(json.toJSONString());
|
|
|
}
|
|
|
+ add(productInfoDto);
|
|
|
}
|
|
|
|
|
|
@DSTransactional
|
|
@@ -200,4 +214,12 @@ public class ProductInfoServiceImpl extends ServiceImpl<ProductInfoMapper, Produ
|
|
|
// List<Object> read = ExcelUtil.read(file, Object.class);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void transfer(ProductInfoDto productInfoDto) {
|
|
|
+ ProductInfo productInfo = getById(productInfoDto.getId());
|
|
|
+ String victoriatouristJson = productInfo.getVictoriatouristJson();
|
|
|
+ JSONObject json = ObjectUtil.isNotEmpty(victoriatouristJson) ? JSONObject.parseObject(victoriatouristJson) : new JSONObject();
|
|
|
+ json.put("deptId", productInfoDto.getDeptId());
|
|
|
+ }
|
|
|
+
|
|
|
}
|