修改字典值逻辑.
This commit is contained in:
@@ -114,7 +114,7 @@ public class ${table.controllerName} {
|
||||
@Parameter(name = "idList", description = "idList", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('${package.ModuleName}:${typeHyphen}:delete')")
|
||||
public Integer batchDelete${type}(@RequestParam("idList") List<Long> idList) {
|
||||
return ${typeLower}Service.batchDelete${type}ByIdList(idList);
|
||||
return ${typeLower}Service.delete${type}ByIdList(idList);
|
||||
}
|
||||
|
||||
@OperatorLog(${type}OperatorType.EXPORT)
|
||||
|
||||
@@ -66,9 +66,9 @@ public class ${table.serviceImplName} implements ${table.serviceName} {
|
||||
|
||||
@Override
|
||||
public Integer update${type}ById(${type}UpdateRequest request) {
|
||||
log.info("${type}Service-update${type}ById id: {}, request: {}", request.getId(), JSON.toJSONString(request));
|
||||
// 查询
|
||||
Long id = Valid.notNull(request.getId(), ErrorMessage.ID_MISSING);
|
||||
log.info("${type}Service-update${type}ById id: {}, request: {}", id, JSON.toJSONString(request));
|
||||
// 查询
|
||||
${type}DO record = ${typeLower}DAO.selectById(id);
|
||||
Valid.notNull(record, ErrorMessage.DATA_ABSENT);
|
||||
// 转换
|
||||
@@ -191,10 +191,10 @@ public class ${table.serviceImplName} implements ${table.serviceName} {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer batchDelete${type}ByIdList(List<Long> idList) {
|
||||
log.info("${type}Service-batchDelete${type}ByIdList idList: {}", idList);
|
||||
public Integer delete${type}ByIdList(List<Long> idList) {
|
||||
log.info("${type}Service-delete${type}ByIdList idList: {}", idList);
|
||||
int effect = ${typeLower}DAO.deleteBatchIds(idList);
|
||||
log.info("${type}Service-batchDelete${type}ByIdList effect: {}", effect);
|
||||
log.info("${type}Service-delete${type}ByIdList effect: {}", effect);
|
||||
#if($cacheMeta.enableCache)
|
||||
// 删除缓存
|
||||
RedisMaps.delete(${type}CacheKeyDefine.${typeConst}, idList);
|
||||
|
||||
@@ -106,7 +106,7 @@ public interface ${table.serviceName} {
|
||||
* @param idList idList
|
||||
* @return effect
|
||||
*/
|
||||
Integer batchDelete${type}ByIdList(List<Long> idList);
|
||||
Integer delete${type}ByIdList(List<Long> idList);
|
||||
|
||||
/**
|
||||
* ${apiComment.deleteAll}
|
||||
|
||||
@@ -137,12 +137,12 @@ public class ${type}ApiImpl implements ${type}Api {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer batchDelete${type}ByIdList(List<Long> idList) {
|
||||
log.info("${type}Api.batchDelete${type}ByIdList idList: {}", idList);
|
||||
public Integer delete${type}ByIdList(List<Long> idList) {
|
||||
log.info("${type}Api.delete${type}ByIdList idList: {}", idList);
|
||||
Valid.notEmpty(idList, ErrorMessage.ID_MISSING);
|
||||
// 删除
|
||||
Integer effect = ${typeLower}Service.batchDelete${type}ByIdList(idList);
|
||||
log.info("${type}Api.batchDelete${type}ByIdList effect: {}", effect);
|
||||
Integer effect = ${typeLower}Service.delete${type}ByIdList(idList);
|
||||
log.info("${type}Api.delete${type}ByIdList effect: {}", effect);
|
||||
return effect;
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ public interface ${type}Api {
|
||||
* @param idList idList
|
||||
* @return effect
|
||||
*/
|
||||
Integer batchDelete${type}ByIdList(List<Long> idList);
|
||||
Integer delete${type}ByIdList(List<Long> idList);
|
||||
|
||||
/**
|
||||
* ${apiComment.deleteAll}
|
||||
|
||||
@@ -98,8 +98,8 @@ public class ${type}ApiImplTests extends BaseUnitTest {
|
||||
|
||||
@Test
|
||||
@Order(9)
|
||||
public void batchDelete${type}ByIdListTest() {
|
||||
Integer effect = ${typeLower}Api.batchDelete${type}ByIdList(Lists.of(lastId));
|
||||
public void delete${type}ByIdListTest() {
|
||||
Integer effect = ${typeLower}Api.delete${type}ByIdList(Lists.of(lastId));
|
||||
assertEquals(effect, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -109,8 +109,8 @@ public class ${type}ServiceImplTests extends BaseUnitTest {
|
||||
|
||||
@Test
|
||||
@Order(10)
|
||||
public void batchDelete${type}ByIdListTest() {
|
||||
Integer effect = ${typeLower}Service.batchDelete${type}ByIdList(Lists.of(lastId));
|
||||
public void delete${type}ByIdListTest() {
|
||||
Integer effect = ${typeLower}Service.delete${type}ByIdList(Lists.of(lastId));
|
||||
assertEquals(effect, 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user