增加系统国家天假
This commit is contained in:
parent
0860b74d96
commit
3b57dba4dc
@ -79,6 +79,9 @@ public interface SysCountryCodeClientApi {
|
|||||||
ResultResponse<PageResult<SysCountryCodeDTO>> sysCountryCodePage(
|
ResultResponse<PageResult<SysCountryCodeDTO>> sysCountryCodePage(
|
||||||
@RequestBody SysCountryCodePageQryCmd query);
|
@RequestBody SysCountryCodePageQryCmd query);
|
||||||
|
|
||||||
@PostMapping("/updateCountryCode")
|
@PostMapping("/updateCountryCode")
|
||||||
ResultResponse<Void> updateCountryCode(@RequestBody SysCountryCodeCmd cmd);
|
ResultResponse<Void> updateCountryCode(@RequestBody SysCountryCodeCmd cmd);
|
||||||
}
|
|
||||||
|
@PostMapping("/addCountryCode")
|
||||||
|
ResultResponse<Void> addCountryCode(@RequestBody SysCountryCodeCmd cmd);
|
||||||
|
}
|
||||||
|
|||||||
@ -10,12 +10,13 @@ import com.red.circle.other.inner.model.cmd.sys.SysCountryCodePageQryCmd;
|
|||||||
import com.red.circle.other.inner.model.dto.sys.SysCountryCodeDTO;
|
import com.red.circle.other.inner.model.dto.sys.SysCountryCodeDTO;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.cache.annotation.CacheEvict;
|
import org.springframework.cache.annotation.CacheEvict;
|
||||||
import org.springframework.cache.annotation.Caching;
|
import org.springframework.cache.annotation.Caching;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -56,10 +57,26 @@ public class SysCountryCodeRestController extends BaseController {
|
|||||||
@CacheEvict(value = ControllerRedisKeyConstant.COUNTRY, key = "'"
|
@CacheEvict(value = ControllerRedisKeyConstant.COUNTRY, key = "'"
|
||||||
+ ControllerRedisKeyConstant.APP_COUNTRY_CODE + "'")
|
+ ControllerRedisKeyConstant.APP_COUNTRY_CODE + "'")
|
||||||
})
|
})
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public void updateCountryCode(@RequestBody SysCountryCodeCmd cmd) {
|
public void updateCountryCode(@RequestBody SysCountryCodeCmd cmd) {
|
||||||
cmd.setUpdateUser(cmd.getReqUserId());
|
cmd.setUpdateUser(cmd.getReqUserId());
|
||||||
sysCountryCodeService.updateCountryCode(cmd);
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@ -36,12 +36,17 @@ public class SysCountryCodeServiceImpl implements SysCountryCodeService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateCountryCode(SysCountryCodeCmd cmd) {
|
public void updateCountryCode(SysCountryCodeCmd cmd) {
|
||||||
countryCodeClient.updateCountryCode(cmd);
|
countryCodeClient.updateCountryCode(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResultResponse<SysCountryCodeDTO> getSysCountryCodeById(Long id) {
|
public void addCountryCode(SysCountryCodeCmd cmd) {
|
||||||
return countryCodeClient.getById(id);
|
countryCodeClient.addCountryCode(cmd);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResultResponse<SysCountryCodeDTO> getSysCountryCodeById(Long id) {
|
||||||
|
return countryCodeClient.getById(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,8 +22,10 @@ public interface SysCountryCodeService {
|
|||||||
|
|
||||||
PageResult<SysCountryCodeDTO> sysCountryCodePage(SysCountryCodePageQryCmd query);
|
PageResult<SysCountryCodeDTO> sysCountryCodePage(SysCountryCodePageQryCmd query);
|
||||||
|
|
||||||
void updateCountryCode(SysCountryCodeCmd cmd);
|
void updateCountryCode(SysCountryCodeCmd cmd);
|
||||||
|
|
||||||
ResultResponse<SysCountryCodeDTO> getSysCountryCodeById(Long id);
|
void addCountryCode(SysCountryCodeCmd cmd);
|
||||||
|
|
||||||
}
|
ResultResponse<SysCountryCodeDTO> getSysCountryCodeById(Long id);
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@ -63,8 +63,13 @@ public interface SysCountryCodeService extends BaseService<SysCountryCode> {
|
|||||||
*/
|
*/
|
||||||
PageResult<SysCountryCode> sysCountryCodePage(SysCountryCodePageQryCmd query);
|
PageResult<SysCountryCode> sysCountryCodePage(SysCountryCodePageQryCmd query);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑国家资料
|
* 编辑国家资料
|
||||||
*/
|
*/
|
||||||
void updateCountryCode(SysCountryCode sysCountryCode);
|
void updateCountryCode(SysCountryCode sysCountryCode);
|
||||||
}
|
|
||||||
|
/**
|
||||||
|
* 新增国家资料
|
||||||
|
*/
|
||||||
|
void addCountryCode(SysCountryCode sysCountryCode);
|
||||||
|
}
|
||||||
|
|||||||
@ -136,8 +136,13 @@ public class SysCountryCodeServiceImpl extends
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateCountryCode(SysCountryCode sysCountryCode) {
|
public void updateCountryCode(SysCountryCode sysCountryCode) {
|
||||||
ResponseAssert.isTrue(CommonErrorCode.UPDATE_FAILURE,
|
ResponseAssert.isTrue(CommonErrorCode.UPDATE_FAILURE,
|
||||||
updateSelectiveById(sysCountryCode));
|
updateSelectiveById(sysCountryCode));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
|
public void addCountryCode(SysCountryCode sysCountryCode) {
|
||||||
|
ResponseAssert.isTrue(CommonErrorCode.SAVE_FAILURE, save(sysCountryCode));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -71,8 +71,14 @@ public class SysCountryCodeClientEndpoint implements SysCountryCodeClientApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResultResponse<Void> updateCountryCode(SysCountryCodeCmd cmd) {
|
public ResultResponse<Void> updateCountryCode(SysCountryCodeCmd cmd) {
|
||||||
sysCountryCodeClientService.updateCountryCode(cmd);
|
sysCountryCodeClientService.updateCountryCode(cmd);
|
||||||
return ResultResponse.success();
|
return ResultResponse.success();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
|
public ResultResponse<Void> addCountryCode(SysCountryCodeCmd cmd) {
|
||||||
|
sysCountryCodeClientService.addCountryCode(cmd);
|
||||||
|
return ResultResponse.success();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -67,8 +67,13 @@ public interface SysCountryCodeClientService {
|
|||||||
*/
|
*/
|
||||||
PageResult<SysCountryCodeDTO> sysCountryCodePage(SysCountryCodePageQryCmd query);
|
PageResult<SysCountryCodeDTO> sysCountryCodePage(SysCountryCodePageQryCmd query);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑国家资料
|
* 编辑国家资料
|
||||||
*/
|
*/
|
||||||
void updateCountryCode(SysCountryCodeCmd dto);
|
void updateCountryCode(SysCountryCodeCmd dto);
|
||||||
}
|
|
||||||
|
/**
|
||||||
|
* 新增国家资料
|
||||||
|
*/
|
||||||
|
void addCountryCode(SysCountryCodeCmd dto);
|
||||||
|
}
|
||||||
|
|||||||
@ -72,7 +72,12 @@ public class SysCountryCodeClientServiceImpl implements SysCountryCodeClientServ
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateCountryCode(SysCountryCodeCmd dto) {
|
public void updateCountryCode(SysCountryCodeCmd dto) {
|
||||||
sysCountryCodeService.updateCountryCode(countryCodeInnerConvertor.toSysCountryCode(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