Commit 2490b642 by 吴迪

【新增】首页接口提交

parent bae28f80
......@@ -4,10 +4,10 @@ import java.util.Arrays;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.office.modules.app.annotation.Login;
import io.office.modules.manage.entity.ShortCodeEntity;
import io.office.modules.manage.service.ShortCodeService;
import io.office.modules.manage.utils.IdKeysConstant;
import io.office.modules.manage.utils.IdWorkerUtils;
import io.office.modules.manage.vo.request.ShortCodeVo;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -90,12 +90,13 @@ public class ShortCodeController {
}
@Login
@RequestMapping("/api/getList")
// @RequiresPermissions("manage:shortcode:delete")
public R getList(){
public R getList(@RequestBody ShortCodeVo shortCodeVo){
System.out.println(IdWorkerUtils.getSEQByKey(IdKeysConstant.ID_SEQ_KEY));
return R.ok();
return R.ok().put("data",shortCodeService.getList(shortCodeVo));
}
......
......@@ -3,8 +3,11 @@ package io.office.modules.manage.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.office.modules.manage.entity.ShortCodeEntity;
import io.office.modules.manage.vo.request.ShortCodeVo;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* ${comments}
*
......@@ -14,5 +17,7 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface ShortCodeDao extends BaseMapper<ShortCodeEntity> {
List<ShortCodeVo> getList(ShortCodeVo shortCodeVo);
}
......@@ -3,6 +3,7 @@ package io.office.modules.manage.service;
import com.baomidou.mybatisplus.extension.service.IService;
import io.office.common.utils.PageUtils;
import io.office.modules.manage.entity.ShortCodeEntity;
import io.office.modules.manage.vo.request.ShortCodeVo;
import java.util.List;
......@@ -20,7 +21,7 @@ public interface ShortCodeService extends IService<ShortCodeEntity> {
PageUtils queryPage(Map<String, Object> params);
List<ShortCodeEntity> getList(ShortCodeEntity shortCodeEntity);
List<ShortCodeVo> getList(ShortCodeVo shortCodeVo);
}
......@@ -3,6 +3,7 @@ package io.office.modules.manage.service.impl;
import io.office.modules.manage.dao.ShortCodeDao;
import io.office.modules.manage.entity.ShortCodeEntity;
import io.office.modules.manage.service.ShortCodeService;
import io.office.modules.manage.vo.request.ShortCodeVo;
import org.springframework.stereotype.Service;
import java.util.List;
......@@ -30,10 +31,10 @@ public class ShortCodeServiceImpl extends ServiceImpl<ShortCodeDao, ShortCodeEnt
}
@Override
public List<ShortCodeEntity> getList(ShortCodeEntity shortCodeEntity) {
public List<ShortCodeVo> getList(ShortCodeVo shortCodeVo) {
return null;
return baseMapper.getList(shortCodeVo);
}
......
package io.office.modules.manage.vo.request;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
*
......@@ -14,11 +16,64 @@ import java.io.Serializable;
@Data
public class ShortCodeVo implements Serializable {
private static final long serialVersionUID = 1L;
private String captcha;
private String uuid;
private String shortCode;
private String firmName;
private String registerAddress;
@TableId
private Integer fId;
/**
* $column.comments
*/
/**
* $column.comments
*/
private Date loginDate;
/**
* $column.comments
*/
private String approveMan;
/**
* $column.comments
*/
private Date logoutDate;
/**
* $column.comments
*/
private String logoutFlag;
/**
* $column.comments
*/
private String produceName;
/**
* $column.comments
*/
private String brandName;
/**
* $column.comments
*/
private String produceStyle;
/**
* $column.comments
*/
private String producePack;
/**
* $column.comments
*/
private String memo;
/**
* $column.comments
*/
private String issueFlag;
/**
* $column.comments
*/
private Date issueDate;
private String fireName;
......
......@@ -9,6 +9,7 @@
package io.office.modules.sys.controller;
import io.office.common.utils.R;
import io.office.modules.app.annotation.Login;
import io.office.modules.sys.entity.SysUserEntity;
import io.office.modules.sys.form.SysLoginForm;
import io.office.modules.sys.service.SysCaptchaService;
......@@ -62,6 +63,7 @@ public class SysLoginController extends AbstractController {
/**
* 登录
*/
@Login
@PostMapping("/sys/login")
public Map<String, Object> login(@RequestBody SysLoginForm form)throws IOException {
/*boolean captcha = sysCaptchaService.validate(form.getUuid(), form.getCaptcha());
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="modules.manage.dao.ShortCodeDao">
<mapper namespace="io.office.modules.manage.dao.ShortCodeDao">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="io.office.modules.manage.entity.ShortCodeEntity" id="shortCodeMap">
......@@ -22,17 +22,17 @@
<select id="getList" parameterType="io.office.modules.manage.vo.request.ShortCodeVo" resultType="io.office.modules.manage.entity.ShortCodeEntity">
<select id="getList" parameterType="io.office.modules.manage.vo.request.ShortCodeVo" resultType="io.office.modules.manage.vo.request.ShortCodeVo">
select top 300 * from short_code a left join firm b on a.f_id=b.f_id
<where>
<if test="shortCode!=null and shortCode!=''">
a.short_code = #{shortCode}
</if>
<if test="firmName!=null and firmName!=''">
and b.firm_name like '%'#{firmName}'%'
and b.firm_name like concat(concat('%',#{firmName}),'%')
</if>
<if test="registerAddress!=null and registerAddress!=''">
and b.register_address like '%'#{registerAddress}'%'
and b.register_address like concat(concat('%',#{registerAddress}),'%')
</if>
</where>
......
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