加 rz_flag 字段到用户查询结果
parent
8a3302637b
commit
48189e0d80
|
|
@ -14,6 +14,7 @@ import com.zcloud.basic.info.dto.clientobject.ImgFilesInfoCO;
|
|||
import com.zcloud.basic.info.persistence.dataobject.ImgFilesDO;
|
||||
import com.zcloud.basic.info.persistence.repository.ImgFilesRepository;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.math3.analysis.function.Sin;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
|
@ -31,15 +32,18 @@ import java.util.List;
|
|||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
@Slf4j
|
||||
public class ImgFilesAddExe {
|
||||
private final ImgFilesGateway imgFilesGateway;
|
||||
private final ImgFilesCoConvertor imgFilesCoConvertor;
|
||||
private final ImgFilesRepository imgFilesRepository;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public SingleResponse<ImgFilesCO> execute(ImgFilesAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
Long tenantId = ssoUser.getTenantId();
|
||||
Long tenantId = 1L;
|
||||
if (ssoUser != null && ssoUser.getTenantId() != null){
|
||||
tenantId = ssoUser.getTenantId();
|
||||
}
|
||||
ImgFilesE imgFilesE = new ImgFilesE();
|
||||
BeanUtils.copyProperties(cmd, imgFilesE);
|
||||
boolean res = false;
|
||||
|
|
@ -49,6 +53,7 @@ public class ImgFilesAddExe {
|
|||
imgFilesCO.setFilePath(filePath);
|
||||
res = true;
|
||||
} catch (Exception e) {
|
||||
log.error("保存失败", e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (!res) {
|
||||
|
|
@ -60,7 +65,10 @@ public class ImgFilesAddExe {
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
public SingleResponse<ImgFilesInfoCO> batchExecute(ImgFilesAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
Long tenantId = ssoUser.getTenantId();
|
||||
Long tenantId = 1L;
|
||||
if (ssoUser != null && ssoUser.getTenantId() != null){
|
||||
tenantId = ssoUser.getTenantId();
|
||||
}
|
||||
ImgFilesE imgFilesE = new ImgFilesE();
|
||||
BeanUtils.copyProperties(cmd, imgFilesE);
|
||||
boolean res = false;
|
||||
|
|
@ -74,6 +82,7 @@ public class ImgFilesAddExe {
|
|||
imgFilesCO.setForeignKey(imgFilesE.getForeignKey());
|
||||
res = true;
|
||||
} catch (Exception e) {
|
||||
log.error("保存失败", e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (!res) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue