1
0

5 Commits

Author SHA1 Message Date
760f085d9c feat(web): 完成集成warm-flow 2024-12-26 22:28:30 +08:00
12cf45a106 feat(web): 尝试适配warm-flow 2024-12-26 18:10:45 +08:00
b774806e58 feat(web): 优化代码分层 2024-12-24 18:18:11 +08:00
bb9f87dbd2 fix(web):优化代码格式
- 修改了 visibleOn 属性的字符串格式,统一使用双引号
- 移除了不必要的反引号,简化了字符串表达式
2024-12-24 14:53:54 +08:00
381c23e94c feat(web): 增加标签展示 2024-12-24 10:07:57 +08:00
15 changed files with 130 additions and 71 deletions

View File

@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="RemoteRepositoriesConfiguration"> <component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository> <remote-repository>
<option name="id" value="mavenCentral" /> <option name="id" value="mavenCentral" />
<option name="name" value="mavenCentral" /> <option name="name" value="mavenCentral" />

View File

@@ -99,6 +99,16 @@ function detailForm() {
trimContents: true, trimContents: true,
minRows: 2, minRows: 2,
maxRows: 2, maxRows: 2,
maxLength: 100,
},
{
type: 'input-tag',
name: 'tags',
label: '标签',
max: 10,
maxTagLength: 10,
joinValues: false,
extractValue: true,
}, },
{ {
type: 'input-rich-text', type: 'input-rich-text',

View File

@@ -31,7 +31,7 @@ export function tabCheck() {
stringField('modifiedUsername', '最后操作人', 100), stringField('modifiedUsername', '最后操作人', 100),
operationField('操作', undefined, [ operationField('操作', undefined, [
{ {
visibleOn: `\${type === 'CONFIRMATION' && state === 'CHECKING'}`, visibleOn: "${type === 'CONFIRMATION' && state === 'CHECKING'}",
type: 'action', type: 'action',
label: '处理', label: '处理',
level: 'link', level: 'link',
@@ -58,14 +58,14 @@ export function tabCheck() {
), ),
}, },
{ {
visibleOn: `\${type === 'CONFIRMATION' && state !== NORMAL}`, visibleOn: "${type === 'CONFIRMATION' && state !== NORMAL}",
type: 'action', type: 'action',
label: '查看', label: '查看',
level: 'link', level: 'link',
...confirmationDetailDialog('parameters.confirmationId'), ...confirmationDetailDialog('parameters.confirmationId'),
}, },
{ {
visibleOn: `\${type === 'AUTHENTICATION' && state === 'CHECKING'}`, visibleOn: "${type === 'AUTHENTICATION' && state === 'CHECKING'}",
type: 'action', type: 'action',
label: '处理', label: '处理',
level: 'link', level: 'link',
@@ -92,14 +92,14 @@ export function tabCheck() {
), ),
}, },
{ {
visibleOn: `\${type === 'AUTHENTICATION' && state !== NORMAL}`, visibleOn: "${type === 'AUTHENTICATION' && state !== NORMAL}",
type: 'action', type: 'action',
label: '查看', label: '查看',
level: 'link', level: 'link',
...authenticationDetailDialog('parameters.authenticationId'), ...authenticationDetailDialog('parameters.authenticationId'),
}, },
{ {
visibleOn: `\${type === 'MARKET' && state === 'CHECKING'}`, visibleOn: "${type === 'MARKET' && state === 'CHECKING'}",
type: 'action', type: 'action',
label: '处理', label: '处理',
level: 'link', level: 'link',
@@ -126,7 +126,7 @@ export function tabCheck() {
), ),
}, },
{ {
visibleOn: `\${type === 'MARKET' && state !== NORMAL}`, visibleOn: "${type === 'MARKET' && state !== NORMAL}",
type: 'action', type: 'action',
label: '查看', label: '查看',
level: 'link', level: 'link',

View File

@@ -28,6 +28,16 @@
<groupId>com.blinkfox</groupId> <groupId>com.blinkfox</groupId>
<artifactId>fenix-spring-boot-starter</artifactId> <artifactId>fenix-spring-boot-starter</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.dromara.warm</groupId>
<artifactId>warm-flow-jpa-sb-starter</artifactId>
<version>1.3.6</version>
</dependency>
<dependency>
<groupId>org.dromara.warm</groupId>
<artifactId>warm-flow-plugin-ui-sb-web</artifactId>
<version>1.3.6</version>
</dependency>
<dependency> <dependency>
<groupId>org.hibernate</groupId> <groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId> <artifactId>hibernate-jpamodelgen</artifactId>

View File

@@ -4,10 +4,14 @@ import com.blinkfox.fenix.EnableFenix;
import com.eshore.gringotts.web.domain.entity.User; import com.eshore.gringotts.web.domain.entity.User;
import com.eshore.gringotts.web.domain.service.UserService; import com.eshore.gringotts.web.domain.service.UserService;
import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties; import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.dromara.warm.flow.core.service.DefService;
import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner; import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
@@ -21,7 +25,12 @@ import org.springframework.scheduling.annotation.EnableAsync;
* @author lanyuanxiaoyao * @author lanyuanxiaoyao
* @date 2024-11-14 * @date 2024-11-14
*/ */
@Slf4j
@SpringBootApplication(scanBasePackages = {"com.eshore.gringotts"}) @SpringBootApplication(scanBasePackages = {"com.eshore.gringotts"})
@EntityScan({
"com.eshore.gringotts.web.domain.entity",
"org.dromara.warm.flow.orm.entity"
})
@EnableFenix @EnableFenix
@EnableJpaAuditing @EnableJpaAuditing
@EnableAsync @EnableAsync
@@ -39,10 +48,15 @@ public class WebApplication implements ApplicationRunner {
SpringApplication.run(WebApplication.class, args); SpringApplication.run(WebApplication.class, args);
} }
@Resource
private DefService defService;
@Override @Override
public void run(ApplicationArguments args) throws Exception { public void run(ApplicationArguments args) throws Exception {
// 初始化系统管理员 // 初始化系统管理员
userService.initial(); userService.initial();
} }
@Bean @Bean

View File

@@ -30,6 +30,8 @@ public class SaTokenConfiguration implements WebMvcConfigurer {
.notMatch("/pages/**") .notMatch("/pages/**")
.notMatch("/user/**") .notMatch("/user/**")
.notMatch("/upload/download/**") .notMatch("/upload/download/**")
.notMatch("/warm-flow-ui/**")
.notMatch("/warm-flow/**")
.check(r -> { .check(r -> {
try { try {
StpUtil.checkLogin(); StpUtil.checkLogin();

View File

@@ -0,0 +1,34 @@
package com.eshore.gringotts.web.domain.base.controller;
import com.eshore.gringotts.web.configuration.amis.AmisResponse;
import com.eshore.gringotts.web.domain.base.entity.CheckingNeededEntity;
import com.eshore.gringotts.web.domain.base.service.CheckingService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
/**
* @author wn
* @version 20241224
*/
@Slf4j
public abstract class CheckingController<ENTITY extends CheckingNeededEntity, SAVE_ITEM, LIST_ITEM, DETAIL_ITEM> extends SimpleControllerSupport<ENTITY, SAVE_ITEM, LIST_ITEM, DETAIL_ITEM> {
private final CheckingService<ENTITY> checkingService;
public CheckingController(CheckingService<ENTITY> service) {
super(service);
this.checkingService = service;
}
@GetMapping("/submit/{id}")
public AmisResponse<Object> submit(@PathVariable Long id) throws Exception {
checkingService.submit(id);
return AmisResponse.responseSuccess();
}
@GetMapping("/retract/{id}")
public AmisResponse<Object> retract(@PathVariable Long id) throws Exception {
checkingService.retract(id);
return AmisResponse.responseSuccess();
}
}

View File

@@ -1,6 +1,10 @@
package com.eshore.gringotts.web.domain.base.service; package com.eshore.gringotts.web.domain.base.service;
import com.eshore.gringotts.web.domain.base.entity.LogicDeleteEntity;
import com.eshore.gringotts.web.domain.base.repository.SimpleRepository;
import com.eshore.gringotts.web.domain.entity.CheckOrder; import com.eshore.gringotts.web.domain.entity.CheckOrder;
import com.eshore.gringotts.web.domain.service.UserService;
import javax.persistence.EntityManager;
import org.eclipse.collections.api.map.ImmutableMap; import org.eclipse.collections.api.map.ImmutableMap;
/** /**
@@ -9,6 +13,16 @@ import org.eclipse.collections.api.map.ImmutableMap;
* @author lanyuanxiaoyao * @author lanyuanxiaoyao
* @date 2024-11-28 * @date 2024-11-28
*/ */
public interface CheckingService { public abstract class CheckingService<ENTITY extends LogicDeleteEntity> extends LogicDeleteService<ENTITY> {
void onChecked(CheckOrder order, CheckOrder.Operation operation, ImmutableMap<String, Object> parameters); public CheckingService(SimpleRepository<ENTITY, Long> repository, UserService userService, EntityManager manager) {
super(repository, userService, manager);
}
abstract public void submit(Long id) throws Exception;
abstract public void retract(Long id) throws Exception;
abstract public void onChecked(CheckOrder order, CheckOrder.Operation operation, ImmutableMap<String, Object> parameters);
abstract public ImmutableMap<String, Object> archive(ENTITY entity);
} }

View File

@@ -1,7 +1,6 @@
package com.eshore.gringotts.web.domain.controller; package com.eshore.gringotts.web.domain.controller;
import com.eshore.gringotts.web.configuration.amis.AmisResponse; import com.eshore.gringotts.web.domain.base.controller.CheckingController;
import com.eshore.gringotts.web.domain.base.controller.SimpleControllerSupport;
import com.eshore.gringotts.web.domain.base.entity.FileInfo; import com.eshore.gringotts.web.domain.base.entity.FileInfo;
import com.eshore.gringotts.web.domain.base.entity.SimpleListItem; import com.eshore.gringotts.web.domain.base.entity.SimpleListItem;
import com.eshore.gringotts.web.domain.base.entity.SimpleSaveItem; import com.eshore.gringotts.web.domain.base.entity.SimpleSaveItem;
@@ -9,7 +8,6 @@ import com.eshore.gringotts.web.domain.entity.Authentication;
import com.eshore.gringotts.web.domain.service.AuthenticationService; import com.eshore.gringotts.web.domain.service.AuthenticationService;
import com.eshore.gringotts.web.domain.service.DataFileService; import com.eshore.gringotts.web.domain.service.DataFileService;
import com.eshore.gringotts.web.domain.service.DataResourceService; import com.eshore.gringotts.web.domain.service.DataResourceService;
import com.fasterxml.jackson.core.JsonProcessingException;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
@@ -17,8 +15,6 @@ import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.eclipse.collections.api.factory.Sets; import org.eclipse.collections.api.factory.Sets;
import org.eclipse.collections.api.set.ImmutableSet; import org.eclipse.collections.api.set.ImmutableSet;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@@ -29,30 +25,16 @@ import org.springframework.web.bind.annotation.RestController;
@Slf4j @Slf4j
@RestController @RestController
@RequestMapping("authentication") @RequestMapping("authentication")
public class AuthenticationController extends SimpleControllerSupport<Authentication, AuthenticationController.SaveItem, AuthenticationController.ListItem, AuthenticationController.DetailItem> { public class AuthenticationController extends CheckingController<Authentication, AuthenticationController.SaveItem, AuthenticationController.ListItem, AuthenticationController.DetailItem> {
private final AuthenticationService authenticationService;
private final DataResourceService dataResourceService; private final DataResourceService dataResourceService;
private final DataFileService dataFileService; private final DataFileService dataFileService;
public AuthenticationController(AuthenticationService service, DataResourceService dataResourceService, DataFileService dataFileService) { public AuthenticationController(AuthenticationService service, DataResourceService dataResourceService, DataFileService dataFileService) {
super(service); super(service);
this.authenticationService = service;
this.dataResourceService = dataResourceService; this.dataResourceService = dataResourceService;
this.dataFileService = dataFileService; this.dataFileService = dataFileService;
} }
@GetMapping("/submit/{id}")
public AmisResponse<Object> submit(@PathVariable Long id) throws JsonProcessingException {
authenticationService.submit(id);
return AmisResponse.responseSuccess();
}
@GetMapping("/retract/{id}")
public AmisResponse<Object> retract(@PathVariable Long id) {
authenticationService.retract(id);
return AmisResponse.responseSuccess();
}
@Override @Override
protected Authentication fromSaveItem(SaveItem item) throws Exception { protected Authentication fromSaveItem(SaveItem item) throws Exception {
Authentication authentication = new Authentication(); Authentication authentication = new Authentication();

View File

@@ -1,7 +1,6 @@
package com.eshore.gringotts.web.domain.controller; package com.eshore.gringotts.web.domain.controller;
import com.eshore.gringotts.web.configuration.amis.AmisResponse; import com.eshore.gringotts.web.domain.base.controller.CheckingController;
import com.eshore.gringotts.web.domain.base.controller.SimpleControllerSupport;
import com.eshore.gringotts.web.domain.base.entity.FileInfo; import com.eshore.gringotts.web.domain.base.entity.FileInfo;
import com.eshore.gringotts.web.domain.base.entity.SimpleListItem; import com.eshore.gringotts.web.domain.base.entity.SimpleListItem;
import com.eshore.gringotts.web.domain.base.entity.SimpleSaveItem; import com.eshore.gringotts.web.domain.base.entity.SimpleSaveItem;
@@ -9,15 +8,12 @@ import com.eshore.gringotts.web.domain.entity.Confirmation;
import com.eshore.gringotts.web.domain.service.ConfirmationService; import com.eshore.gringotts.web.domain.service.ConfirmationService;
import com.eshore.gringotts.web.domain.service.DataFileService; import com.eshore.gringotts.web.domain.service.DataFileService;
import com.eshore.gringotts.web.domain.service.DataResourceService; import com.eshore.gringotts.web.domain.service.DataResourceService;
import com.fasterxml.jackson.core.JsonProcessingException;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.eclipse.collections.api.factory.Sets; import org.eclipse.collections.api.factory.Sets;
import org.eclipse.collections.api.set.ImmutableSet; import org.eclipse.collections.api.set.ImmutableSet;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@@ -28,30 +24,16 @@ import org.springframework.web.bind.annotation.RestController;
@Slf4j @Slf4j
@RestController @RestController
@RequestMapping("confirmation") @RequestMapping("confirmation")
public class ConfirmationController extends SimpleControllerSupport<Confirmation, ConfirmationController.SaveItem, ConfirmationController.ListItem, ConfirmationController.DetailItem> { public class ConfirmationController extends CheckingController<Confirmation, ConfirmationController.SaveItem, ConfirmationController.ListItem, ConfirmationController.DetailItem> {
private final ConfirmationService confirmationService;
private final DataResourceService dataResourceService; private final DataResourceService dataResourceService;
private final DataFileService dataFileService; private final DataFileService dataFileService;
public ConfirmationController(ConfirmationService service, ConfirmationService confirmationService, DataResourceService dataResourceService, DataFileService dataFileService) { public ConfirmationController(ConfirmationService service, DataResourceService dataResourceService, DataFileService dataFileService) {
super(service); super(service);
this.confirmationService = confirmationService;
this.dataResourceService = dataResourceService; this.dataResourceService = dataResourceService;
this.dataFileService = dataFileService; this.dataFileService = dataFileService;
} }
@GetMapping("/submit/{id}")
public AmisResponse<Object> submit(@PathVariable Long id) throws JsonProcessingException {
confirmationService.submit(id);
return AmisResponse.responseSuccess();
}
@GetMapping("/retract/{id}")
public AmisResponse<Object> retract(@PathVariable Long id) {
confirmationService.retract(id);
return AmisResponse.responseSuccess();
}
@Override @Override
protected Confirmation fromSaveItem(SaveItem item) throws Exception { protected Confirmation fromSaveItem(SaveItem item) throws Exception {
Confirmation confirmation = new Confirmation(); Confirmation confirmation = new Confirmation();

View File

@@ -3,21 +3,19 @@ package com.eshore.gringotts.web.domain.controller;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.eshore.gringotts.web.configuration.HostConfiguration; import com.eshore.gringotts.web.configuration.HostConfiguration;
import com.eshore.gringotts.web.configuration.amis.AmisResponse; import com.eshore.gringotts.web.configuration.amis.AmisResponse;
import com.eshore.gringotts.web.domain.base.controller.SimpleControllerSupport; import com.eshore.gringotts.web.domain.base.controller.CheckingController;
import com.eshore.gringotts.web.domain.base.entity.SimpleListItem; import com.eshore.gringotts.web.domain.base.entity.SimpleListItem;
import com.eshore.gringotts.web.domain.base.entity.SimpleSaveItem; import com.eshore.gringotts.web.domain.base.entity.SimpleSaveItem;
import com.eshore.gringotts.web.domain.entity.Ware; import com.eshore.gringotts.web.domain.entity.Ware;
import com.eshore.gringotts.web.domain.service.DataFileService; import com.eshore.gringotts.web.domain.service.DataFileService;
import com.eshore.gringotts.web.domain.service.DataResourceService; import com.eshore.gringotts.web.domain.service.DataResourceService;
import com.eshore.gringotts.web.domain.service.WareService; import com.eshore.gringotts.web.domain.service.WareService;
import com.fasterxml.jackson.core.JsonProcessingException;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.eclipse.collections.api.list.ImmutableList; import org.eclipse.collections.api.list.ImmutableList;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@@ -28,7 +26,7 @@ import org.springframework.web.bind.annotation.RestController;
@Slf4j @Slf4j
@RestController @RestController
@RequestMapping("ware") @RequestMapping("ware")
public class WareController extends SimpleControllerSupport<Ware, WareController.SaveItem, WareController.ListItem, WareController.DetailItem> { public class WareController extends CheckingController<Ware, WareController.SaveItem, WareController.ListItem, WareController.DetailItem> {
private final HostConfiguration hostConfiguration; private final HostConfiguration hostConfiguration;
private final WareService wareService; private final WareService wareService;
private final DataResourceService dataResourceService; private final DataResourceService dataResourceService;
@@ -47,18 +45,6 @@ public class WareController extends SimpleControllerSupport<Ware, WareController
return AmisResponse.responseSuccess(wareService.listPublic().collect(this::toListItem)); return AmisResponse.responseSuccess(wareService.listPublic().collect(this::toListItem));
} }
@GetMapping("/submit/{id}")
public AmisResponse<Object> submit(@PathVariable Long id) throws JsonProcessingException {
wareService.submit(id);
return AmisResponse.responseSuccess();
}
@GetMapping("/retract/{id}")
public AmisResponse<Object> retract(@PathVariable Long id) {
wareService.retract(id);
return AmisResponse.responseSuccess();
}
@Override @Override
protected Ware fromSaveItem(SaveItem saveItem) { protected Ware fromSaveItem(SaveItem saveItem) {
Ware ware = new Ware(); Ware ware = new Ware();

View File

@@ -4,7 +4,6 @@ import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.eshore.gringotts.web.domain.base.entity.CheckingNeededEntity; import com.eshore.gringotts.web.domain.base.entity.CheckingNeededEntity;
import com.eshore.gringotts.web.domain.base.service.CheckingService; import com.eshore.gringotts.web.domain.base.service.CheckingService;
import com.eshore.gringotts.web.domain.base.service.LogicDeleteService;
import com.eshore.gringotts.web.domain.entity.Authentication; import com.eshore.gringotts.web.domain.entity.Authentication;
import com.eshore.gringotts.web.domain.entity.Authentication_; import com.eshore.gringotts.web.domain.entity.Authentication_;
import com.eshore.gringotts.web.domain.entity.CheckOrder; import com.eshore.gringotts.web.domain.entity.CheckOrder;
@@ -33,7 +32,7 @@ import org.springframework.stereotype.Service;
*/ */
@Slf4j @Slf4j
@Service("com.eshore.gringotts.web.domain.service.AuthenticationService") @Service("com.eshore.gringotts.web.domain.service.AuthenticationService")
public class AuthenticationService extends LogicDeleteService<Authentication> implements CheckingService { public class AuthenticationService extends CheckingService<Authentication> {
private final AuthenticationRepository authenticationRepository; private final AuthenticationRepository authenticationRepository;
private final UserService userService; private final UserService userService;
private final CheckOrderService checkOrderService; private final CheckOrderService checkOrderService;
@@ -84,6 +83,7 @@ public class AuthenticationService extends LogicDeleteService<Authentication> im
} }
@Transactional(rollbackOn = Throwable.class) @Transactional(rollbackOn = Throwable.class)
@Override
public void submit(Long id) throws JsonProcessingException { public void submit(Long id) throws JsonProcessingException {
Authentication authentication = detailOrThrow(id); Authentication authentication = detailOrThrow(id);
authentication.setState(CheckingNeededEntity.State.OWNER_CHECKING); authentication.setState(CheckingNeededEntity.State.OWNER_CHECKING);
@@ -101,6 +101,7 @@ public class AuthenticationService extends LogicDeleteService<Authentication> im
} }
@Transactional(rollbackOn = Throwable.class) @Transactional(rollbackOn = Throwable.class)
@Override
public void retract(Long id) { public void retract(Long id) {
Authentication authentication = detailOrThrow(id); Authentication authentication = detailOrThrow(id);
authentication.setState(Authentication.State.DRAFT); authentication.setState(Authentication.State.DRAFT);
@@ -145,6 +146,11 @@ public class AuthenticationService extends LogicDeleteService<Authentication> im
checkOrderService.save(order); checkOrderService.save(order);
} }
@Override
public ImmutableMap<String, Object> archive(Authentication authentication) {
return null;
}
public static final class AuthenticationDuplicatedException extends RuntimeException { public static final class AuthenticationDuplicatedException extends RuntimeException {
public AuthenticationDuplicatedException() { public AuthenticationDuplicatedException() {
super("数据资源已绑定该账号的授权申请,无法再次申请"); super("数据资源已绑定该账号的授权申请,无法再次申请");

View File

@@ -4,7 +4,6 @@ import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.eshore.gringotts.web.domain.base.entity.CheckingNeededEntity; import com.eshore.gringotts.web.domain.base.entity.CheckingNeededEntity;
import com.eshore.gringotts.web.domain.base.service.CheckingService; import com.eshore.gringotts.web.domain.base.service.CheckingService;
import com.eshore.gringotts.web.domain.base.service.LogicDeleteService;
import com.eshore.gringotts.web.domain.entity.CheckOrder; import com.eshore.gringotts.web.domain.entity.CheckOrder;
import com.eshore.gringotts.web.domain.entity.CheckOrder_; import com.eshore.gringotts.web.domain.entity.CheckOrder_;
import com.eshore.gringotts.web.domain.entity.Confirmation; import com.eshore.gringotts.web.domain.entity.Confirmation;
@@ -35,7 +34,7 @@ import org.springframework.stereotype.Service;
*/ */
@Slf4j @Slf4j
@Service("com.eshore.gringotts.web.domain.service.ConfirmationService") @Service("com.eshore.gringotts.web.domain.service.ConfirmationService")
public class ConfirmationService extends LogicDeleteService<Confirmation> implements CheckingService { public class ConfirmationService extends CheckingService<Confirmation> {
private final ConfirmationRepository confirmationRepository; private final ConfirmationRepository confirmationRepository;
private final CheckOrderService checkOrderService; private final CheckOrderService checkOrderService;
private final ObjectMapper mapper; private final ObjectMapper mapper;
@@ -81,6 +80,7 @@ public class ConfirmationService extends LogicDeleteService<Confirmation> implem
} }
@Transactional(rollbackOn = Throwable.class) @Transactional(rollbackOn = Throwable.class)
@Override
public void submit(Long id) throws JsonProcessingException { public void submit(Long id) throws JsonProcessingException {
Confirmation confirmation = detailOrThrow(id); Confirmation confirmation = detailOrThrow(id);
confirmation.setState(Confirmation.State.CHECKING); confirmation.setState(Confirmation.State.CHECKING);
@@ -98,6 +98,7 @@ public class ConfirmationService extends LogicDeleteService<Confirmation> implem
} }
@Transactional(rollbackOn = Throwable.class) @Transactional(rollbackOn = Throwable.class)
@Override
public void retract(Long id) { public void retract(Long id) {
Confirmation confirmation = detailOrThrow(id); Confirmation confirmation = detailOrThrow(id);
confirmation.setState(CheckingNeededEntity.State.DRAFT); confirmation.setState(CheckingNeededEntity.State.DRAFT);
@@ -129,6 +130,11 @@ public class ConfirmationService extends LogicDeleteService<Confirmation> implem
} }
} }
@Override
public ImmutableMap<String, Object> archive(Confirmation confirmation) {
return null;
}
public static final class ConfirmationDuplicatedException extends RuntimeException { public static final class ConfirmationDuplicatedException extends RuntimeException {
public ConfirmationDuplicatedException() { public ConfirmationDuplicatedException() {
super("数据资源已绑定确权申请,无法再次申请"); super("数据资源已绑定确权申请,无法再次申请");

View File

@@ -2,7 +2,6 @@ package com.eshore.gringotts.web.domain.service;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.eshore.gringotts.web.domain.base.service.CheckingService; import com.eshore.gringotts.web.domain.base.service.CheckingService;
import com.eshore.gringotts.web.domain.base.service.LogicDeleteService;
import com.eshore.gringotts.web.domain.entity.CheckOrder; import com.eshore.gringotts.web.domain.entity.CheckOrder;
import com.eshore.gringotts.web.domain.entity.User; import com.eshore.gringotts.web.domain.entity.User;
import com.eshore.gringotts.web.domain.entity.Ware; import com.eshore.gringotts.web.domain.entity.Ware;
@@ -25,7 +24,7 @@ import org.springframework.stereotype.Service;
*/ */
@Slf4j @Slf4j
@Service("com.eshore.gringotts.web.domain.service.WareService") @Service("com.eshore.gringotts.web.domain.service.WareService")
public class WareService extends LogicDeleteService<Ware> implements CheckingService { public class WareService extends CheckingService<Ware> {
private final WareRepository wareRepository; private final WareRepository wareRepository;
private final CheckOrderService checkOrderService; private final CheckOrderService checkOrderService;
private final ObjectMapper mapper; private final ObjectMapper mapper;
@@ -64,7 +63,13 @@ public class WareService extends LogicDeleteService<Ware> implements CheckingSer
} }
} }
@Override
public ImmutableMap<String, Object> archive(Ware ware) {
return null;
}
@Transactional(rollbackOn = Throwable.class) @Transactional(rollbackOn = Throwable.class)
@Override
public void submit(Long id) throws JsonProcessingException { public void submit(Long id) throws JsonProcessingException {
Ware ware = detailOrThrow(id); Ware ware = detailOrThrow(id);
ware.setState(Ware.State.CHECKING); ware.setState(Ware.State.CHECKING);
@@ -82,6 +87,7 @@ public class WareService extends LogicDeleteService<Ware> implements CheckingSer
} }
@Transactional(rollbackOn = Throwable.class) @Transactional(rollbackOn = Throwable.class)
@Override
public void retract(Long id) { public void retract(Long id) {
Ware ware = detailOrThrow(id); Ware ware = detailOrThrow(id);
ware.setState(Ware.State.DRAFT); ware.setState(Ware.State.DRAFT);

View File

@@ -34,6 +34,8 @@ logging:
sdk: sdk:
eventsub: eventsub:
EventSubscribeImp: error EventSubscribeImp: error
warm-flow:
jpa_persistence_provider: org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider
--- ---
spring: spring: