Commit 2490b642 by 吴迪

【新增】首页接口提交

parent bae28f80
...@@ -4,10 +4,10 @@ import java.util.Arrays; ...@@ -4,10 +4,10 @@ import java.util.Arrays;
import java.util.Map; import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 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.entity.ShortCodeEntity;
import io.office.modules.manage.service.ShortCodeService; import io.office.modules.manage.service.ShortCodeService;
import io.office.modules.manage.utils.IdKeysConstant; import io.office.modules.manage.vo.request.ShortCodeVo;
import io.office.modules.manage.utils.IdWorkerUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -90,12 +90,13 @@ public class ShortCodeController { ...@@ -90,12 +90,13 @@ public class ShortCodeController {
} }
@Login
@RequestMapping("/api/getList") @RequestMapping("/api/getList")
// @RequiresPermissions("manage:shortcode:delete") // @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; ...@@ -3,8 +3,11 @@ package io.office.modules.manage.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.office.modules.manage.entity.ShortCodeEntity; import io.office.modules.manage.entity.ShortCodeEntity;
import io.office.modules.manage.vo.request.ShortCodeVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/** /**
* ${comments} * ${comments}
* *
...@@ -14,5 +17,7 @@ import org.apache.ibatis.annotations.Mapper; ...@@ -14,5 +17,7 @@ import org.apache.ibatis.annotations.Mapper;
*/ */
@Mapper @Mapper
public interface ShortCodeDao extends BaseMapper<ShortCodeEntity> { public interface ShortCodeDao extends BaseMapper<ShortCodeEntity> {
List<ShortCodeVo> getList(ShortCodeVo shortCodeVo);
} }
...@@ -3,6 +3,7 @@ package io.office.modules.manage.service; ...@@ -3,6 +3,7 @@ package io.office.modules.manage.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import io.office.common.utils.PageUtils; import io.office.common.utils.PageUtils;
import io.office.modules.manage.entity.ShortCodeEntity; import io.office.modules.manage.entity.ShortCodeEntity;
import io.office.modules.manage.vo.request.ShortCodeVo;
import java.util.List; import java.util.List;
...@@ -20,7 +21,7 @@ public interface ShortCodeService extends IService<ShortCodeEntity> { ...@@ -20,7 +21,7 @@ public interface ShortCodeService extends IService<ShortCodeEntity> {
PageUtils queryPage(Map<String, Object> params); 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; ...@@ -3,6 +3,7 @@ package io.office.modules.manage.service.impl;
import io.office.modules.manage.dao.ShortCodeDao; import io.office.modules.manage.dao.ShortCodeDao;
import io.office.modules.manage.entity.ShortCodeEntity; import io.office.modules.manage.entity.ShortCodeEntity;
import io.office.modules.manage.service.ShortCodeService; import io.office.modules.manage.service.ShortCodeService;
import io.office.modules.manage.vo.request.ShortCodeVo;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
...@@ -30,10 +31,10 @@ public class ShortCodeServiceImpl extends ServiceImpl<ShortCodeDao, ShortCodeEnt ...@@ -30,10 +31,10 @@ public class ShortCodeServiceImpl extends ServiceImpl<ShortCodeDao, ShortCodeEnt
} }
@Override @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; package io.office.modules.manage.vo.request;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
/** /**
* *
...@@ -14,11 +16,64 @@ import java.io.Serializable; ...@@ -14,11 +16,64 @@ import java.io.Serializable;
@Data @Data
public class ShortCodeVo implements Serializable { public class ShortCodeVo implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private String captcha;
private String uuid;
private String shortCode; private String shortCode;
private String firmName; private String firmName;
private String registerAddress; 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 @@ ...@@ -9,6 +9,7 @@
package io.office.modules.sys.controller; package io.office.modules.sys.controller;
import io.office.common.utils.R; 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.entity.SysUserEntity;
import io.office.modules.sys.form.SysLoginForm; import io.office.modules.sys.form.SysLoginForm;
import io.office.modules.sys.service.SysCaptchaService; import io.office.modules.sys.service.SysCaptchaService;
...@@ -62,6 +63,7 @@ public class SysLoginController extends AbstractController { ...@@ -62,6 +63,7 @@ public class SysLoginController extends AbstractController {
/** /**
* 登录 * 登录
*/ */
@Login
@PostMapping("/sys/login") @PostMapping("/sys/login")
public Map<String, Object> login(@RequestBody SysLoginForm form)throws IOException { public Map<String, Object> login(@RequestBody SysLoginForm form)throws IOException {
/*boolean captcha = sysCaptchaService.validate(form.getUuid(), form.getCaptcha()); /*boolean captcha = sysCaptchaService.validate(form.getUuid(), form.getCaptcha());
......
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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"> <resultMap type="io.office.modules.manage.entity.ShortCodeEntity" id="shortCodeMap">
...@@ -22,17 +22,17 @@ ...@@ -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 select top 300 * from short_code a left join firm b on a.f_id=b.f_id
<where> <where>
<if test="shortCode!=null and shortCode!=''"> <if test="shortCode!=null and shortCode!=''">
a.short_code = #{shortCode} a.short_code = #{shortCode}
</if> </if>
<if test="firmName!=null and firmName!=''"> <if test="firmName!=null and firmName!=''">
and b.firm_name like '%'#{firmName}'%' and b.firm_name like concat(concat('%',#{firmName}),'%')
</if> </if>
<if test="registerAddress!=null and registerAddress!=''"> <if test="registerAddress!=null and registerAddress!=''">
and b.register_address like '%'#{registerAddress}'%' and b.register_address like concat(concat('%',#{registerAddress}),'%')
</if> </if>
</where> </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