mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
完善
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
package cn.lihongjie.coal.base.mapper;
|
||||
|
||||
import cn.lihongjie.coal.dictionary.entity.DictionaryEntity;
|
||||
import cn.lihongjie.coal.dictionary.entity.DictionaryItemEntity;
|
||||
import cn.lihongjie.coal.base.dto.BaseDto;
|
||||
import cn.lihongjie.coal.base.entity.BaseEntity;
|
||||
import cn.lihongjie.coal.coalInfo.entity.CoalInfoEntity;
|
||||
import cn.lihongjie.coal.dictionary.entity.DictionaryEntity;
|
||||
import cn.lihongjie.coal.dictionary.entity.DictionaryItemEntity;
|
||||
import cn.lihongjie.coal.organization.entity.OrganizationEntity;
|
||||
import cn.lihongjie.coal.permission.entity.PermissionEntity;
|
||||
import cn.lihongjie.coal.resource.entity.ResourceEntity;
|
||||
@@ -141,7 +142,17 @@ public interface CommonMapper {
|
||||
return e;
|
||||
|
||||
}
|
||||
public default CoalInfoEntity createCoalInfo(String id) {
|
||||
|
||||
if (StringUtils.isEmpty(id)) {
|
||||
|
||||
return null;
|
||||
}
|
||||
CoalInfoEntity e = new CoalInfoEntity();
|
||||
e.setId(id);
|
||||
return e;
|
||||
|
||||
}
|
||||
public default String toString(Object o) {
|
||||
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ public class CoalInfoService extends BaseService<CoalInfoEntity, CoalInfoReposit
|
||||
|
||||
public CoalInfoDto update(UpdateCoalInfoDto request) {
|
||||
CoalInfoEntity entity = this.repository.get(request.getId());
|
||||
Double old = request.getInitPrice();
|
||||
Double old = entity.getInitPrice();
|
||||
this.mapper.updateEntity(entity, request);
|
||||
|
||||
this.repository.save(entity);
|
||||
|
||||
Reference in New Issue
Block a user