高级筛选新增类型,自定义筛选新增类型

pull/1/head
DELL 2 years ago
parent 0367629dea
commit 54ac08208e

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -19,10 +19,7 @@ import cn.jyjz.xiaoyao.ocr.service.OcrUsersearchService;
import cn.jyjz.xiaoyao.ocr.service.OcrUsersearchchildService;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.*;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -71,6 +68,7 @@ public class OcrUsersearchController extends BaseController{
@GetMapping(value = "/list")
public ResultVo<IPage<OcrUsersearch>> queryPageList(@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
@RequestParam(name="type") @ApiParam(value = "类型(首页为0终审为1)", required = true) Integer type,
HttpServletRequest request) {
//获取当前登录人
UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(request));
@ -93,6 +91,7 @@ public class OcrUsersearchController extends BaseController{
queryWrapper.eq("USERID",userToken.getUserid());
queryWrapper.eq("TENANTID",tenantId);
queryWrapper.eq("TYPE",type);
queryWrapper.orderByDesc(Arrays.asList("IZTOP","REORDER"));
IPage<OcrUsersearch> pageList = ocrUsersearchService.selectSearchListPage(paramterPage, queryWrapper);
@ -133,7 +132,8 @@ public class OcrUsersearchController extends BaseController{
ocrUsersearch.setCreatetime(System.currentTimeMillis());
ocrUsersearch.setCreateby(userToken.getLoginname());
ocrUsersearch.setTenantid(Long.parseLong(tenantId));
ocrUsersearch.setReorder(this.ocrUsersearchService.getReorder(ocrUsersearch.getUserid()));
ocrUsersearch.setReorder(this.ocrUsersearchService.getReorder(ocrUsersearch.getUserid(),ocrUsersearch.getType()));
ocrUsersearch.setType(ocrUsersearch.getType());
if(null != ocrUsersearch.getId()){
this.ocrUsersearchService.removeByIds(ocrUsersearch.getId().toString());
}

@ -28,7 +28,6 @@ import java.util.stream.Stream;
import java.util.stream.Collectors;
@Data
@Builder
@NoArgsConstructor
@ -84,6 +83,10 @@ public class OcrUsersearch implements BaseDto,java.io.Serializable {
@TableField(value = "IZTOP")
private Integer iztop;
@Schema(description = "类型首页为0终审为1")
@TableField(value = "TYPE")
private Integer type;
@TableField(exist = false)
private List<OcrUsersearchchild> ocrUsersearchchildList;
@ -104,9 +107,11 @@ public class OcrUsersearch implements BaseDto,java.io.Serializable {
new SimpleEntry<>("USERID", "userid"),
new SimpleEntry<>("SEARCHNAME", "searchname"),
new SimpleEntry<>("REORDER", "reorder"),
new SimpleEntry<>("IZTOP","iztop")
new SimpleEntry<>("IZTOP", "iztop"),
new SimpleEntry<>("TYPE", "type")
)
.collect(Collectors.toMap(SimpleEntry::getKey, SimpleEntry::getValue));
@Override
public String getQueryFiled(String filedname) {
String obj = null;

@ -28,7 +28,7 @@ public interface OcrUsersearchService extends BaseService<OcrUsersearch> {
* @param userid
* @return
*/
public int getReorder(Long userid);
public int getReorder(Long userid,Integer type);
/**
* id

@ -51,9 +51,10 @@ public class OcrUsersearchServiceImpl extends BaseServiceImpl<OcrUsersearchMybat
* @param userid
* @return
*/
public int getReorder(Long userid){
public int getReorder(Long userid,Integer type){
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("USERID",userid);
queryWrapper.eq("TYPE",type);
queryWrapper.orderByDesc("REORDER");
List<OcrUsersearch> list = this.ocrusersearchmybatisdao.selectList(queryWrapper);

@ -12,6 +12,7 @@
<result column="SEARCHNAME" property="searchname" jdbcType="VARCHAR"/>
<result column="REORDER" property="reorder" jdbcType="INTEGER"/>
<result column="IZTOP" property="iztop" jdbcType="INTEGER"/>
<result column="TYPE" property="type" jdbcType="INTEGER"/>
</resultMap>
<sql id="Base_Column_List">
ID AS id,

Loading…
Cancel
Save