add 增加数据权限注入
This commit is contained in:
parent
4a1ff5a5ac
commit
85e9534fae
|
@ -1,9 +1,10 @@
|
||||||
package ${packageName}.bo;
|
package ${packageName}.bo;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -18,9 +19,15 @@ import ${import};
|
||||||
* @author ${author}
|
* @author ${author}
|
||||||
* @date ${datetime}
|
* @date ${datetime}
|
||||||
*/
|
*/
|
||||||
|
#if($table.crud || $table.sub)
|
||||||
|
#set($Entity="BaseEntity")
|
||||||
|
#elseif($table.tree)
|
||||||
|
#set($Entity="TreeEntity")
|
||||||
|
#end
|
||||||
@Data
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ApiModel("${functionName}分页查询对象")
|
@ApiModel("${functionName}分页查询对象")
|
||||||
public class ${ClassName}QueryBo {
|
public class ${ClassName}QueryBo extends ${Entity} {
|
||||||
|
|
||||||
/** 分页大小 */
|
/** 分页大小 */
|
||||||
@ApiModelProperty("分页大小")
|
@ApiModelProperty("分页大小")
|
||||||
|
@ -44,6 +51,4 @@ public class ${ClassName}QueryBo {
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
private Map<String, Object> params = new HashMap<>();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,7 @@ public class ${ClassName}ServiceImpl extends ServiceImpl<${ClassName}Mapper, ${C
|
||||||
#end
|
#end
|
||||||
lqw.$mpMethod($condition, ${ClassName}::get$AttrName, bo.get$AttrName());
|
lqw.$mpMethod($condition, ${ClassName}::get$AttrName, bo.get$AttrName());
|
||||||
#else
|
#else
|
||||||
|
lqw.apply(bo.getParams().get("dataScope") != null,bo.getParams().get("dataScope").toString());
|
||||||
Map<String, Object> params = bo.getParams();
|
Map<String, Object> params = bo.getParams();
|
||||||
if (params.get("begin$AttrName") != null && params.get("end$AttrName") != null) {
|
if (params.get("begin$AttrName") != null && params.get("end$AttrName") != null) {
|
||||||
lqw.between(${ClassName}::get$AttrName ,params.get("begin$AttrName"), params.get("end$AttrName"));
|
lqw.between(${ClassName}::get$AttrName ,params.get("begin$AttrName"), params.get("end$AttrName"));
|
||||||
|
|
Loading…
Reference in New Issue