提交 | 用户 | age
|
0081fa
|
1 |
package com.yc.layoutIcon.newLayout.mapper; |
X |
2 |
|
|
3 |
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
4 |
import com.yc.layoutIcon.newLayout.entity.LayoutTree; |
|
5 |
import org.apache.ibatis.annotations.Param; |
|
6 |
import org.apache.ibatis.annotations.Result; |
|
7 |
import org.apache.ibatis.annotations.Results; |
|
8 |
import org.apache.ibatis.annotations.Select; |
|
9 |
import org.mapstruct.Mapper; |
|
10 |
|
|
11 |
import java.util.List; |
|
12 |
|
|
13 |
/** |
|
14 |
* @USER: xinyb_ |
|
15 |
* @DATE: 2021-09-16 17:03 |
|
16 |
*/ |
|
17 |
@Mapper |
|
18 |
public interface LayoutTreeMapper extends BaseMapper<LayoutTree> { |
|
19 |
@Results( |
|
20 |
value = { |
|
21 |
@Result(column = "menuid", property = "id"), |
|
22 |
@Result(column = "menuname", property = "name"), |
|
23 |
@Result(column = "formid", property = "formId"), |
|
24 |
@Result(column = "formtype", property = "formType"), |
4c9281
|
25 |
// @Result(column = "parentmenu", property = "parentId"), |
X |
26 |
// @Result(column = "actived", property = "actived"), |
0081fa
|
27 |
@Result(column = "largimagepath", property = "largImagePath"), |
4c9281
|
28 |
// @Result(column = "appImagepath", property = "appImagePath"), |
0081fa
|
29 |
@Result(column = "checked", property = "checked") |
X |
30 |
} |
|
31 |
) |
4c9281
|
32 |
@Select("select u.menuid,u.menuname,u.formid,u.formtype,u.largimagepath,\n" + |
0081fa
|
33 |
"(case when a.menuid is null then 0 else 1 end) as checked from usermenu(#{userCode}) u left join \n" + |
4c9281
|
34 |
"_sysWebMenuAccess a on a.menuid=u.menuid and a.UserCode=#{userCode} where u.parentmenu=#{menuId} order by u.sortBy") |
0081fa
|
35 |
List<LayoutTree> getLayoutTree(@Param("userCode") String userCode, @Param("menuId") Integer menuId); |
X |
36 |
} |