update 优化生成编码规则、Dubbo调用生成订单编码规则
parent
97d0d53509
commit
f24e2ecb97
@ -0,0 +1,17 @@
|
||||
package org.dromara.system.api;
|
||||
|
||||
/**
|
||||
* 编码规则服务
|
||||
*
|
||||
* @author Yinq
|
||||
*/
|
||||
public interface RemoteCodeRuleService {
|
||||
|
||||
/**
|
||||
* 通过编码规则编码获取编码
|
||||
* @param codeRuleCode 编码规则编码
|
||||
* @return currentCode
|
||||
*/
|
||||
String selectCodeRuleCode(String codeRuleCode);
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package org.dromara.system.dubbo;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.system.api.RemoteCodeRuleService;
|
||||
import org.dromara.system.domain.bo.SysCodeRuleBo;
|
||||
import org.dromara.system.service.ISysCodeRuleService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 编码规则服务
|
||||
*
|
||||
* @author Yinq
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
@DubboService
|
||||
public class RemoteCodeRuleServiceImpl implements RemoteCodeRuleService {
|
||||
|
||||
private final ISysCodeRuleService sysCodeRuleService;
|
||||
|
||||
/**
|
||||
* 通过编码规则编码获取编码
|
||||
* @param codeRuleCode 编码规则编码
|
||||
* @return currentCode
|
||||
*/
|
||||
@Override
|
||||
public String selectCodeRuleCode(String codeRuleCode) {
|
||||
SysCodeRuleBo bo = new SysCodeRuleBo();
|
||||
bo.setCodeRuleCode(codeRuleCode);
|
||||
return sysCodeRuleService.getRuleGenerateCode(bo);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue