|
@@ -40,12 +40,8 @@ public class JnbQuotationsServiceImpl implements IJnbQuotationsService {
|
|
|
* @return 行情
|
|
|
*/
|
|
|
@Override
|
|
|
- public JnbQuotations selectJnbQuotationsById(Long id,Integer type) {
|
|
|
+ public JnbQuotations selectJnbQuotationsById(Long id) {
|
|
|
JnbQuotations jnbQuotations = jnbQuotationsMapper.selectJnbQuotationsById(id);
|
|
|
- String s =jnbHighServerImgMapper.selectAll(id,type);
|
|
|
- if (null != s) {
|
|
|
- jnbQuotations.setImgUrlList(jnbHighServerImgMapper.selectAll(id,type));
|
|
|
- }
|
|
|
return jnbQuotations;
|
|
|
}
|
|
|
|
|
@@ -75,22 +71,6 @@ public class JnbQuotationsServiceImpl implements IJnbQuotationsService {
|
|
|
jnbQuotations.setCreateBy(SecurityUtils.getUserId().toString());
|
|
|
jnbQuotations.setCreateTime(DateUtils.getNowDate());
|
|
|
int insert = jnbQuotationsMapper.insertJnbQuotations(jnbQuotations);
|
|
|
- if (insert > 0) {
|
|
|
- List<String> imgUrlList = Arrays.asList(jnbQuotations.getImgUrlList().split(","));
|
|
|
- if (!ObjectUtils.isEmpty(imgUrlList)) {
|
|
|
- List<JnbHighServerImg> imgList = new ArrayList<>();
|
|
|
- imgUrlList.forEach(a -> {
|
|
|
- JnbHighServerImg serverImg = new JnbHighServerImg();
|
|
|
- serverImg.setCreateBy(String.valueOf(SecurityUtils.getUserId()));
|
|
|
- serverImg.setCreateTime(DateUtils.getNowDate());
|
|
|
- serverImg.setServerId(jnbQuotations.getId());
|
|
|
- serverImg.setImgUrl(a);
|
|
|
- serverImg.setType(13);
|
|
|
- imgList.add(serverImg);
|
|
|
- });
|
|
|
- jnbHighServerImgMapper.saveJnbHighServerImg(imgList);
|
|
|
- }
|
|
|
- }
|
|
|
return insert;
|
|
|
}
|
|
|
|
|
@@ -104,28 +84,9 @@ public class JnbQuotationsServiceImpl implements IJnbQuotationsService {
|
|
|
public int updateJnbQuotations(JnbQuotations jnbQuotations) {
|
|
|
jnbQuotations.setUpdateBy(SecurityUtils.getUsername());
|
|
|
jnbQuotations.setUpdateTime(DateUtils.getNowDate());
|
|
|
- img(jnbQuotations.getImgUrlList(), jnbHighServerImgMapper, jnbQuotations.getId(), jnbQuotations);
|
|
|
return jnbQuotationsMapper.updateJnbQuotations(jnbQuotations);
|
|
|
}
|
|
|
|
|
|
- public static void img(String imgUrlList2, JnbHighServerImgMapper jnbHighServerImgMapper, Long id, JnbQuotations jnbQuotations) {
|
|
|
- List<String> imgUrlList = Arrays.asList(imgUrlList2.split(","));
|
|
|
- if (!ObjectUtils.isEmpty(imgUrlList)) {
|
|
|
- List<JnbHighServerImg> imgList = new ArrayList<>();
|
|
|
- jnbHighServerImgMapper.deleteJnbHighServerByServerId(id,13);
|
|
|
- imgUrlList.forEach(a -> {
|
|
|
- JnbHighServerImg serverImg = new JnbHighServerImg();
|
|
|
- serverImg.setCreateBy(String.valueOf(SecurityUtils.getUserId()));
|
|
|
- serverImg.setCreateTime(DateUtils.getNowDate());
|
|
|
- serverImg.setServerId(id);
|
|
|
- serverImg.setImgUrl(a);
|
|
|
- serverImg.setType(13);
|
|
|
- imgList.add(serverImg);
|
|
|
- });
|
|
|
- jnbHighServerImgMapper.saveJnbHighServerImg(imgList);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 批量删除行情
|
|
|
*
|
|
@@ -134,11 +95,8 @@ public class JnbQuotationsServiceImpl implements IJnbQuotationsService {
|
|
|
*/
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public int deleteJnbQuotationsByIds(Long[] ids,Integer type) {
|
|
|
+ public int deleteJnbQuotationsByIds(Long[] ids) {
|
|
|
int i = jnbQuotationsMapper.deleteJnbQuotationsByIds(ids);
|
|
|
- if (i > 0) {
|
|
|
- jnbHighServerImgMapper.deleteJnbHighServerByServerIds(ids,type);
|
|
|
- }
|
|
|
return i;
|
|
|
}
|
|
|
|