update
This commit is contained in:
parent
ee639e7f4a
commit
9161f7357e
@ -13,6 +13,7 @@ import com.lovenav.entity.UrlList;
|
||||
import com.lovenav.service.UrlCateListService;
|
||||
import com.lovenav.service.UrlListService;
|
||||
import com.lovenav.vo.CateAndUrl;
|
||||
import io.swagger.models.auth.In;
|
||||
import org.apache.poi.hssf.usermodel.HSSFCell;
|
||||
import org.apache.poi.hssf.usermodel.HSSFRow;
|
||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||
@ -182,6 +183,7 @@ public class UrlAndCateController {
|
||||
List<UrlList> urlLists = urlListService.selectUrListByNeedLogin();
|
||||
List<CateAndUrl> cateAndUrlList = new ArrayList<>();
|
||||
Set<String> parentSet = new HashSet<>();
|
||||
List<Integer> integers = new ArrayList<>();
|
||||
for( int i = 0 ; i < urlLists.size() ; i++)
|
||||
{
|
||||
String parentString = urlCateListService.selectUrListCateByUrlCateId(urlLists.get(i).getCateId());
|
||||
@ -194,8 +196,13 @@ public class UrlAndCateController {
|
||||
parentSet.add(parent);
|
||||
}
|
||||
}
|
||||
|
||||
for (String str : parentSet) {
|
||||
for(String str : parentSet)
|
||||
{
|
||||
integers.add(Integer.valueOf(str));
|
||||
}
|
||||
Collections.sort(integers);
|
||||
for (Integer str : integers) {
|
||||
System.out.println(str);
|
||||
UrlCateList urlCateList =urlCateListService.selectByPrimaryKey(Integer.valueOf(str));
|
||||
CateAndUrl cateAndUrl = new CateAndUrl();
|
||||
cateAndUrl.setFloder("true");
|
||||
@ -463,7 +470,6 @@ public class UrlAndCateController {
|
||||
String parentString = urlCateListService.selectUrListCateByUrlCateId(urlLists.get(i).getCateId());
|
||||
if(parentString == null) continue;
|
||||
String [] parentList = parentString.split(",");
|
||||
System.out.println(parentString);
|
||||
for(String parent : parentList)
|
||||
{
|
||||
if(parent.equals("0")){
|
||||
@ -472,7 +478,10 @@ public class UrlAndCateController {
|
||||
parentSet.add(parent);
|
||||
}
|
||||
}
|
||||
for (String str : parentSet) {
|
||||
List<String> ls=Arrays.asList(parentSet.toArray(new String[0]));
|
||||
Collections.sort(ls);
|
||||
for (String str : ls) {
|
||||
System.out.println(str);
|
||||
UrlCateList urlCateList =urlCateListService.selectByPrimaryKey(Integer.valueOf(str));
|
||||
CateAndUrl cateAndUrl = new CateAndUrl();
|
||||
cateAndUrl.setFloder("true");
|
||||
@ -506,7 +515,7 @@ public class UrlAndCateController {
|
||||
cateAndUrl.setIsEncrypt(urlList.getIsEncrypt());
|
||||
int flag =0 ;
|
||||
for(CateAndUrl cateAndUrl1 : cateAndUrlList){
|
||||
if(String.valueOf(cateAndUrl.getParentId()).equals(cateAndUrl1.getCateId()+""))
|
||||
if(String.valueOf(urlList.getCateId()).equals(cateAndUrl1.getCateId()+""))
|
||||
{
|
||||
flag = 1;
|
||||
cateAndUrl1.getChildUC().add(cateAndUrl);
|
||||
|
@ -60,5 +60,6 @@ public class QRCServiceImpl implements QRCService{
|
||||
String base64 = QRCodeUtil.ImageToBase64(url_wait);
|
||||
return JSON.toJSONString(base64);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from ln_url_cate_list
|
||||
where user_id = #{userId,jdbcType=INTEGER}
|
||||
where user_id = #{userId,jdbcType=INTEGER} order by id
|
||||
</select>
|
||||
|
||||
<select id="selectCateByNameAnduserId" resultMap="BaseResultMap">
|
||||
|
Loading…
Reference in New Issue
Block a user