|
|
@ -106,7 +106,8 @@ public class UdiProductServiceImpl implements UdiProductService {
|
|
|
|
public boolean insertUdiInfo(UdiProductEntity udiProductEntity) {
|
|
|
|
public boolean insertUdiInfo(UdiProductEntity udiProductEntity) {
|
|
|
|
if (udiProductEntity.getId() == null) {
|
|
|
|
if (udiProductEntity.getId() == null) {
|
|
|
|
udiProductEntity.setId(IdUtil.getSnowflakeNextId());
|
|
|
|
udiProductEntity.setId(IdUtil.getSnowflakeNextId());
|
|
|
|
if(StrUtil.isNotBlank(udiProductEntity.getCpmctymc())){
|
|
|
|
}
|
|
|
|
|
|
|
|
if(StrUtil.isNotBlank(udiProductEntity.getCpmctymc()) && StrUtil.isBlank(udiProductEntity.getPinyinInitial())){
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
String pinyin= PinyinUtils.converterToFirstSpell(udiProductEntity.getCpmctymc());
|
|
|
|
String pinyin= PinyinUtils.converterToFirstSpell(udiProductEntity.getCpmctymc());
|
|
|
|
udiProductEntity.setPinyinInitial(pinyin);
|
|
|
|
udiProductEntity.setPinyinInitial(pinyin);
|
|
|
@ -116,7 +117,6 @@ public class UdiProductServiceImpl implements UdiProductService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return udiProductDao.insertUdiInfo(udiProductEntity);
|
|
|
|
return udiProductDao.insertUdiInfo(udiProductEntity);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|