Commit 989ae640 by rongkailun

Merge remote-tracking branch 'origin/master'

parents b6909303 1e90dda6
......@@ -91,10 +91,13 @@ public class GLNController {
@PostMapping("/api/domesticCode")
public R domesticCode(@RequestBody DomesticCodeVo domesticCodeVo, HttpServletRequest request) {
/*
boolean captcha = sysCaptchaService.validate(domesticCodeVo.getUuid(), domesticCodeVo.getCaptcha());
if(!captcha){
return R.error("验证码不正确");
}
*/
SearchgtinlogEntity searchgtinlogEntity = new SearchgtinlogEntity();
......
package io.office.modules.manage.controller;
import java.util.Arrays;
import java.util.Map;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import io.office.modules.manage.entity.TimescodeRegiEntity;
import io.office.modules.manage.service.TimescodeRegiService;
import io.office.common.utils.PageUtils;
import io.office.common.utils.R;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* 验证码获取
*
* @author tgl
* @email
* @date 2021-12-07 16:52:34
*/
@RestController
@RequestMapping("/timescoderegi")
public class TimescodeRegiController {
@Autowired
private TimescodeRegiService timescodeRegiService;
/**
* 获取验证码
*/
@RequestMapping("/api/getVerificationCode")
// @RequiresPermissions("manage:timescoderegi:list")
public R getVerificationCode(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
String msg = timescodeRegiService.getVerificationCode(params,request,response);
return R.ok();
}
/**
* 列表
*/
@RequestMapping("/list")
// @RequiresPermissions("manage:timescoderegi:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = timescodeRegiService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{phone}")
// @RequiresPermissions("manage:timescoderegi:info")
public R info(@PathVariable("phone") String phone){
TimescodeRegiEntity timescodeRegi = timescodeRegiService.getById(phone);
return R.ok().put("timescodeRegi", timescodeRegi);
}
/**
* 保存
*/
@RequestMapping("/save")
// @RequiresPermissions("manage:timescoderegi:save")
public R save(@RequestBody TimescodeRegiEntity timescodeRegi){
timescodeRegiService.save(timescodeRegi);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
// @RequiresPermissions("manage:timescoderegi:update")
public R update(@RequestBody TimescodeRegiEntity timescodeRegi){
timescodeRegiService.updateById(timescodeRegi);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
// @RequiresPermissions("manage:timescoderegi:delete")
public R delete(@RequestBody String[] phones){
timescodeRegiService.removeByIds(Arrays.asList(phones));
return R.ok();
}
}
package io.office.modules.manage.controller;
import java.util.Arrays;
import java.util.Map;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import io.office.modules.manage.entity.TimescodeRegiIpEntity;
import io.office.modules.manage.service.TimescodeRegiIpService;
import io.office.common.utils.PageUtils;
import io.office.common.utils.R;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-07 17:34:57
*/
@RestController
@RequestMapping("/timescoderegiip")
public class TimescodeRegiIpController {
@Autowired
private TimescodeRegiIpService timescodeRegiIpService;
/**
* 列表
*/
@RequestMapping("/list")
// @RequiresPermissions("manage:timescoderegiip:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = timescodeRegiIpService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{ip}")
// @RequiresPermissions("manage:timescoderegiip:info")
public R info(@PathVariable("ip") String ip){
TimescodeRegiIpEntity timescodeRegiIp = timescodeRegiIpService.getById(ip);
return R.ok().put("timescodeRegiIp", timescodeRegiIp);
}
/**
* 保存
*/
@RequestMapping("/save")
// @RequiresPermissions("manage:timescoderegiip:save")
public R save(@RequestBody TimescodeRegiIpEntity timescodeRegiIp){
timescodeRegiIpService.save(timescodeRegiIp);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
// @RequiresPermissions("manage:timescoderegiip:update")
public R update(@RequestBody TimescodeRegiIpEntity timescodeRegiIp){
timescodeRegiIpService.updateById(timescodeRegiIp);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
// @RequiresPermissions("manage:timescoderegiip:delete")
public R delete(@RequestBody String[] ips){
timescodeRegiIpService.removeByIds(Arrays.asList(ips));
return R.ok();
}
}
package io.office.modules.manage.dao;
import io.office.modules.manage.entity.TimescodeRegiEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-07 16:52:34
*/
@Mapper
public interface TimescodeRegiDao extends BaseMapper<TimescodeRegiEntity> {
}
package io.office.modules.manage.dao;
import io.office.modules.manage.entity.TimescodeRegiIpEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-07 17:34:57
*/
@Mapper
public interface TimescodeRegiIpDao extends BaseMapper<TimescodeRegiIpEntity> {
}
package io.office.modules.manage.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 验证码实体
*
* @author tgl
* @email
* @date 2021-12-07 16:52:34
*/
@Data
@TableName("timescode_regi")
public class TimescodeRegiEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 手机号
*/
private String phone;
/**
* 时间
*/
private String date;
/**
*获取短信验证码次数
*/
private Integer times;
/**
* 输入短信验证码验证次数
*/
private Integer timesValidate;
public TimescodeRegiEntity() {
}
public TimescodeRegiEntity(String phone, String date, Integer times, Integer timesValidate) {
this.phone = phone;
this.date = date;
this.times = times;
this.timesValidate = timesValidate;
}
}
package io.office.modules.manage.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-07 17:34:57
*/
@Data
@TableName("timescode_regi_ip")
public class TimescodeRegiIpEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* $column.comments
*/
@TableId
private String ip;
/**
* $column.comments
*/
private String date;
/**
* $column.comments
*/
private Integer timesIp;
public TimescodeRegiIpEntity(String ip, String date, Integer timesIp) {
this.ip = ip;
this.date = date;
this.timesIp = timesIp;
}
}
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.TimescodeRegiIpEntity;
import java.util.Map;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-07 17:34:57
*/
public interface TimescodeRegiIpService extends IService<TimescodeRegiIpEntity> {
PageUtils queryPage(Map<String, Object> params);
}
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.TimescodeRegiEntity;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;
/**
* ${comments}
*
* @author tgl
* @email
* @date 2021-12-07 16:52:34
*/
public interface TimescodeRegiService extends IService<TimescodeRegiEntity> {
PageUtils queryPage(Map<String, Object> params);
String getVerificationCode(Map<String, Object> params, HttpServletRequest request, HttpServletResponse response);
}
package io.office.modules.manage.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.office.common.utils.PageUtils;
import io.office.common.utils.Query;
import io.office.modules.manage.dao.TimescodeRegiIpDao;
import io.office.modules.manage.entity.TimescodeRegiIpEntity;
import io.office.modules.manage.service.TimescodeRegiIpService;
@Service("timescodeRegiIpService")
public class TimescodeRegiIpServiceImpl extends ServiceImpl<TimescodeRegiIpDao, TimescodeRegiIpEntity> implements TimescodeRegiIpService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
IPage<TimescodeRegiIpEntity> page = this.page(
new Query<TimescodeRegiIpEntity>().getPage(params),
new QueryWrapper<TimescodeRegiIpEntity>()
);
return new PageUtils(page);
}
}
\ No newline at end of file
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