增加系统国家天假
This commit is contained in:
parent
0860b74d96
commit
3b57dba4dc
@ -81,4 +81,7 @@ public interface SysCountryCodeClientApi {
|
||||
|
||||
@PostMapping("/updateCountryCode")
|
||||
ResultResponse<Void> updateCountryCode(@RequestBody SysCountryCodeCmd cmd);
|
||||
|
||||
@PostMapping("/addCountryCode")
|
||||
ResultResponse<Void> addCountryCode(@RequestBody SysCountryCodeCmd cmd);
|
||||
}
|
||||
|
||||
@ -13,6 +13,7 @@ import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.cache.annotation.Caching;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@ -62,4 +63,20 @@ public class SysCountryCodeRestController extends BaseController {
|
||||
sysCountryCodeService.updateCountryCode(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增国家列表.
|
||||
*/
|
||||
@Caching(evict = {
|
||||
@CacheEvict(value = ControllerRedisKeyConstant.COUNTRY, key = "'"
|
||||
+ ControllerRedisKeyConstant.COUNTRY_TOP_SIX + "'"),
|
||||
@CacheEvict(value = ControllerRedisKeyConstant.COUNTRY, key = "'"
|
||||
+ ControllerRedisKeyConstant.APP_COUNTRY_CODE + "'")
|
||||
})
|
||||
@PostMapping
|
||||
public void addCountryCode(@RequestBody SysCountryCodeCmd cmd) {
|
||||
cmd.setCreateUser(cmd.getReqUserId());
|
||||
cmd.setUpdateUser(cmd.getReqUserId());
|
||||
sysCountryCodeService.addCountryCode(cmd);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -40,6 +40,11 @@ public class SysCountryCodeServiceImpl implements SysCountryCodeService {
|
||||
countryCodeClient.updateCountryCode(cmd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCountryCode(SysCountryCodeCmd cmd) {
|
||||
countryCodeClient.addCountryCode(cmd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultResponse<SysCountryCodeDTO> getSysCountryCodeById(Long id) {
|
||||
return countryCodeClient.getById(id);
|
||||
|
||||
@ -24,6 +24,8 @@ public interface SysCountryCodeService {
|
||||
|
||||
void updateCountryCode(SysCountryCodeCmd cmd);
|
||||
|
||||
void addCountryCode(SysCountryCodeCmd cmd);
|
||||
|
||||
ResultResponse<SysCountryCodeDTO> getSysCountryCodeById(Long id);
|
||||
|
||||
}
|
||||
|
||||
@ -67,4 +67,9 @@ public interface SysCountryCodeService extends BaseService<SysCountryCode> {
|
||||
* 编辑国家资料
|
||||
*/
|
||||
void updateCountryCode(SysCountryCode sysCountryCode);
|
||||
|
||||
/**
|
||||
* 新增国家资料
|
||||
*/
|
||||
void addCountryCode(SysCountryCode sysCountryCode);
|
||||
}
|
||||
|
||||
@ -140,4 +140,9 @@ public class SysCountryCodeServiceImpl extends
|
||||
ResponseAssert.isTrue(CommonErrorCode.UPDATE_FAILURE,
|
||||
updateSelectiveById(sysCountryCode));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCountryCode(SysCountryCode sysCountryCode) {
|
||||
ResponseAssert.isTrue(CommonErrorCode.SAVE_FAILURE, save(sysCountryCode));
|
||||
}
|
||||
}
|
||||
|
||||
@ -75,4 +75,10 @@ public class SysCountryCodeClientEndpoint implements SysCountryCodeClientApi {
|
||||
sysCountryCodeClientService.updateCountryCode(cmd);
|
||||
return ResultResponse.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultResponse<Void> addCountryCode(SysCountryCodeCmd cmd) {
|
||||
sysCountryCodeClientService.addCountryCode(cmd);
|
||||
return ResultResponse.success();
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,4 +71,9 @@ public interface SysCountryCodeClientService {
|
||||
* 编辑国家资料
|
||||
*/
|
||||
void updateCountryCode(SysCountryCodeCmd dto);
|
||||
|
||||
/**
|
||||
* 新增国家资料
|
||||
*/
|
||||
void addCountryCode(SysCountryCodeCmd dto);
|
||||
}
|
||||
|
||||
@ -75,4 +75,9 @@ public class SysCountryCodeClientServiceImpl implements SysCountryCodeClientServ
|
||||
public void updateCountryCode(SysCountryCodeCmd dto) {
|
||||
sysCountryCodeService.updateCountryCode(countryCodeInnerConvertor.toSysCountryCode(dto));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCountryCode(SysCountryCodeCmd dto) {
|
||||
sysCountryCodeService.addCountryCode(countryCodeInnerConvertor.toSysCountryCode(dto));
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user