Commit 2ef68131 by 吴迪

【新增】修改注册注销

parent fe0e9419
......@@ -46,17 +46,18 @@ public class EanUpcServiceImpl extends ServiceImpl<EanUpcDao, EanUpcEntity> impl
List<EanUpcEntityVo> eanUpcTopList = new ArrayList<>();
EanUpcEntity eanUpcEntity = new EanUpcEntity();
eanUpcEntity.setLogoutFlag("1");
List<EanUpcEntityVo> eanUpcTop1 = this.baseMapper.getEanUpcTop(eanUpcEntity);
if(CollectionUtils.isNotEmpty(eanUpcTop1)) {
eanUpcTopList.addAll(eanUpcTop1);
}
eanUpcEntity.setLogoutFlag("0");
List<EanUpcEntityVo> eanUpcTop = this.baseMapper.getEanUpcTop(eanUpcEntity);
if(CollectionUtils.isNotEmpty(eanUpcTop)) {
eanUpcTopList.addAll(eanUpcTop);
}
eanUpcEntity.setLogoutFlag("1");
List<EanUpcEntityVo> eanUpcTop1 = this.baseMapper.getEanUpcTop(eanUpcEntity);
if(CollectionUtils.isNotEmpty(eanUpcTop1)) {
eanUpcTopList.addAll(eanUpcTop1);
}
return eanUpcTopList;
}
......
......@@ -61,6 +61,8 @@ public class TransferController {
private PolicyService policyService;
@Autowired
private KnowledgeinfoService knowledgeinfoService;
@Autowired
private DocService docService;
@RequestMapping("/api/indexCarouselManage")
// @RequiresPermissions("generator:topicnews:list")
......@@ -1407,6 +1409,50 @@ public class TransferController {
}
@RequestMapping("/api/doc")
// @RequiresPermissions("generator:topicnews:list")
public R doc() {
QueryWrapper<DocEntity> indexCarouselManageEntityQueryWrapper = new QueryWrapper<>();
int count = docService.count(indexCarouselManageEntityQueryWrapper);
if (count > 0) {
boolean flag = true;
int n = 1;
while (flag) {
int limit = 10;
int pages = 0;
if ((count % limit) == 0) {
pages = (count / limit);
} else {
pages = (count / limit) + 1;
}
if (n <= pages) {
IPage<DocEntity> pageData = docService.page(new Page(n, limit), indexCarouselManageEntityQueryWrapper);
if (CollectionUtils.isNotEmpty(pageData.getRecords())) {
for (DocEntity docEntity : pageData.getRecords()) {
//如果不为空
if (StringUtils.isNotBlank(docEntity.getDocfile())) {
//处理图片
docEntity.setDocfile(fileRequestPrefix + "manage/down/" + docEntity.getDocfile());
//修改
UpdateWrapper<DocEntity> updateWrapper = new UpdateWrapper();
updateWrapper.eq("id", docEntity.getId());
docService.update(docEntity, updateWrapper);
}
}
n = n + 1;
}
} else {
flag = false;
}
}
}
return R.ok().put("data", null);
}
public static void main(String[] args) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment