feat: 增加sim卡基础功能接口
parent
6e43331548
commit
d010a3a792
@ -0,0 +1,49 @@
|
|||||||
|
package com.shxy.xymanager_admin.controller;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.shxy.xymanager_common.annotation.Log;
|
||||||
|
import com.shxy.xymanager_common.base.BaseController;
|
||||||
|
import com.shxy.xymanager_common.base.ResponseReult;
|
||||||
|
import com.shxy.xymanager_common.entity.SimInfo;
|
||||||
|
import com.shxy.xymanager_service.service.SimService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@Api(tags = {"sim卡相关接口"})
|
||||||
|
@RequestMapping("sim")
|
||||||
|
@Slf4j
|
||||||
|
public class SimController extends BaseController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
SimService service;
|
||||||
|
|
||||||
|
@PostMapping("importSim")
|
||||||
|
@ApiOperation("导入sim")
|
||||||
|
public ResponseReult<String> importSim(@RequestParam("file") MultipartFile file,
|
||||||
|
@RequestParam(value = "type", required = true) Integer type) throws Exception {
|
||||||
|
if (file != null && file.getInputStream() != null) {
|
||||||
|
|
||||||
|
return ResponseReult.success("OK");
|
||||||
|
} else {
|
||||||
|
return ResponseReult.fail("缺少上传文件");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("list")
|
||||||
|
@ApiOperation("查询sim卡")
|
||||||
|
@Log(title = "查询sim卡", type = "查询")
|
||||||
|
public ResponseReult<PageInfo<SimInfo>> list(Integer type, Integer pageNum, Integer pageSize) {
|
||||||
|
pageNum = this.initPageNum(pageNum);
|
||||||
|
pageSize = this.initPageSize(pageSize);
|
||||||
|
PageInfo<SimInfo> result = service.list(type, pageNum, pageSize);
|
||||||
|
return ResponseReult.success(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,135 @@
|
|||||||
|
package com.shxy.xymanager_common.entity;
|
||||||
|
|
||||||
|
public class SimInfo {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* This field was generated by MyBatis Generator.
|
||||||
|
* This field corresponds to the database column sim_info.iccid
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
private String iccid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* This field was generated by MyBatis Generator.
|
||||||
|
* This field corresponds to the database column sim_info.msisdn
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
private String msisdn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* This field was generated by MyBatis Generator.
|
||||||
|
* This field corresponds to the database column sim_info.imsi
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
private String imsi;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* This field was generated by MyBatis Generator.
|
||||||
|
* This field corresponds to the database column sim_info.type
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method returns the value of the database column sim_info.iccid
|
||||||
|
*
|
||||||
|
* @return the value of sim_info.iccid
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
public String getIccid() {
|
||||||
|
return iccid;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method sets the value of the database column sim_info.iccid
|
||||||
|
*
|
||||||
|
* @param iccid the value for sim_info.iccid
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
public void setIccid(String iccid) {
|
||||||
|
this.iccid = iccid;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method returns the value of the database column sim_info.msisdn
|
||||||
|
*
|
||||||
|
* @return the value of sim_info.msisdn
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
public String getMsisdn() {
|
||||||
|
return msisdn;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method sets the value of the database column sim_info.msisdn
|
||||||
|
*
|
||||||
|
* @param msisdn the value for sim_info.msisdn
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
public void setMsisdn(String msisdn) {
|
||||||
|
this.msisdn = msisdn;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method returns the value of the database column sim_info.imsi
|
||||||
|
*
|
||||||
|
* @return the value of sim_info.imsi
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
public String getImsi() {
|
||||||
|
return imsi;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method sets the value of the database column sim_info.imsi
|
||||||
|
*
|
||||||
|
* @param imsi the value for sim_info.imsi
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
public void setImsi(String imsi) {
|
||||||
|
this.imsi = imsi;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method returns the value of the database column sim_info.type
|
||||||
|
*
|
||||||
|
* @return the value of sim_info.type
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
public Integer getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method sets the value of the database column sim_info.type
|
||||||
|
*
|
||||||
|
* @param type the value for sim_info.type
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
public void setType(Integer type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,571 @@
|
|||||||
|
package com.shxy.xymanager_common.entity;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class SimInfoExample {
|
||||||
|
/**
|
||||||
|
* This field was generated by MyBatis Generator.
|
||||||
|
* This field corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
protected String orderByClause;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This field was generated by MyBatis Generator.
|
||||||
|
* This field corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
protected boolean distinct;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This field was generated by MyBatis Generator.
|
||||||
|
* This field corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
protected List<Criteria> oredCriteria;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
public SimInfoExample() {
|
||||||
|
oredCriteria = new ArrayList<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
public void setOrderByClause(String orderByClause) {
|
||||||
|
this.orderByClause = orderByClause;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
public String getOrderByClause() {
|
||||||
|
return orderByClause;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
public void setDistinct(boolean distinct) {
|
||||||
|
this.distinct = distinct;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
public boolean isDistinct() {
|
||||||
|
return distinct;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
public List<Criteria> getOredCriteria() {
|
||||||
|
return oredCriteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
public void or(Criteria criteria) {
|
||||||
|
oredCriteria.add(criteria);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
public Criteria or() {
|
||||||
|
Criteria criteria = createCriteriaInternal();
|
||||||
|
oredCriteria.add(criteria);
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
public Criteria createCriteria() {
|
||||||
|
Criteria criteria = createCriteriaInternal();
|
||||||
|
if (oredCriteria.size() == 0) {
|
||||||
|
oredCriteria.add(criteria);
|
||||||
|
}
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
protected Criteria createCriteriaInternal() {
|
||||||
|
Criteria criteria = new Criteria();
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
public void clear() {
|
||||||
|
oredCriteria.clear();
|
||||||
|
orderByClause = null;
|
||||||
|
distinct = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class was generated by MyBatis Generator.
|
||||||
|
* This class corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
protected abstract static class GeneratedCriteria {
|
||||||
|
protected List<Criterion> criteria;
|
||||||
|
|
||||||
|
protected GeneratedCriteria() {
|
||||||
|
super();
|
||||||
|
criteria = new ArrayList<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isValid() {
|
||||||
|
return criteria.size() > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Criterion> getAllCriteria() {
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Criterion> getCriteria() {
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addCriterion(String condition) {
|
||||||
|
if (condition == null) {
|
||||||
|
throw new RuntimeException("Value for condition cannot be null");
|
||||||
|
}
|
||||||
|
criteria.add(new Criterion(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addCriterion(String condition, Object value, String property) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||||
|
}
|
||||||
|
criteria.add(new Criterion(condition, value));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||||
|
if (value1 == null || value2 == null) {
|
||||||
|
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||||
|
}
|
||||||
|
criteria.add(new Criterion(condition, value1, value2));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIccidIsNull() {
|
||||||
|
addCriterion("iccid is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIccidIsNotNull() {
|
||||||
|
addCriterion("iccid is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIccidEqualTo(String value) {
|
||||||
|
addCriterion("iccid =", value, "iccid");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIccidNotEqualTo(String value) {
|
||||||
|
addCriterion("iccid <>", value, "iccid");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIccidGreaterThan(String value) {
|
||||||
|
addCriterion("iccid >", value, "iccid");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIccidGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("iccid >=", value, "iccid");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIccidLessThan(String value) {
|
||||||
|
addCriterion("iccid <", value, "iccid");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIccidLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("iccid <=", value, "iccid");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIccidLike(String value) {
|
||||||
|
addCriterion("iccid like", value, "iccid");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIccidNotLike(String value) {
|
||||||
|
addCriterion("iccid not like", value, "iccid");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIccidIn(List<String> values) {
|
||||||
|
addCriterion("iccid in", values, "iccid");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIccidNotIn(List<String> values) {
|
||||||
|
addCriterion("iccid not in", values, "iccid");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIccidBetween(String value1, String value2) {
|
||||||
|
addCriterion("iccid between", value1, value2, "iccid");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIccidNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("iccid not between", value1, value2, "iccid");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMsisdnIsNull() {
|
||||||
|
addCriterion("msisdn is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMsisdnIsNotNull() {
|
||||||
|
addCriterion("msisdn is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMsisdnEqualTo(String value) {
|
||||||
|
addCriterion("msisdn =", value, "msisdn");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMsisdnNotEqualTo(String value) {
|
||||||
|
addCriterion("msisdn <>", value, "msisdn");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMsisdnGreaterThan(String value) {
|
||||||
|
addCriterion("msisdn >", value, "msisdn");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMsisdnGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("msisdn >=", value, "msisdn");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMsisdnLessThan(String value) {
|
||||||
|
addCriterion("msisdn <", value, "msisdn");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMsisdnLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("msisdn <=", value, "msisdn");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMsisdnLike(String value) {
|
||||||
|
addCriterion("msisdn like", value, "msisdn");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMsisdnNotLike(String value) {
|
||||||
|
addCriterion("msisdn not like", value, "msisdn");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMsisdnIn(List<String> values) {
|
||||||
|
addCriterion("msisdn in", values, "msisdn");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMsisdnNotIn(List<String> values) {
|
||||||
|
addCriterion("msisdn not in", values, "msisdn");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMsisdnBetween(String value1, String value2) {
|
||||||
|
addCriterion("msisdn between", value1, value2, "msisdn");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMsisdnNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("msisdn not between", value1, value2, "msisdn");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andImsiIsNull() {
|
||||||
|
addCriterion("imsi is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andImsiIsNotNull() {
|
||||||
|
addCriterion("imsi is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andImsiEqualTo(String value) {
|
||||||
|
addCriterion("imsi =", value, "imsi");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andImsiNotEqualTo(String value) {
|
||||||
|
addCriterion("imsi <>", value, "imsi");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andImsiGreaterThan(String value) {
|
||||||
|
addCriterion("imsi >", value, "imsi");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andImsiGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("imsi >=", value, "imsi");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andImsiLessThan(String value) {
|
||||||
|
addCriterion("imsi <", value, "imsi");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andImsiLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("imsi <=", value, "imsi");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andImsiLike(String value) {
|
||||||
|
addCriterion("imsi like", value, "imsi");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andImsiNotLike(String value) {
|
||||||
|
addCriterion("imsi not like", value, "imsi");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andImsiIn(List<String> values) {
|
||||||
|
addCriterion("imsi in", values, "imsi");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andImsiNotIn(List<String> values) {
|
||||||
|
addCriterion("imsi not in", values, "imsi");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andImsiBetween(String value1, String value2) {
|
||||||
|
addCriterion("imsi between", value1, value2, "imsi");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andImsiNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("imsi not between", value1, value2, "imsi");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTypeIsNull() {
|
||||||
|
addCriterion("`type` is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTypeIsNotNull() {
|
||||||
|
addCriterion("`type` is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTypeEqualTo(Integer value) {
|
||||||
|
addCriterion("`type` =", value, "type");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTypeNotEqualTo(Integer value) {
|
||||||
|
addCriterion("`type` <>", value, "type");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTypeGreaterThan(Integer value) {
|
||||||
|
addCriterion("`type` >", value, "type");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
|
||||||
|
addCriterion("`type` >=", value, "type");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTypeLessThan(Integer value) {
|
||||||
|
addCriterion("`type` <", value, "type");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTypeLessThanOrEqualTo(Integer value) {
|
||||||
|
addCriterion("`type` <=", value, "type");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTypeIn(List<Integer> values) {
|
||||||
|
addCriterion("`type` in", values, "type");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTypeNotIn(List<Integer> values) {
|
||||||
|
addCriterion("`type` not in", values, "type");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTypeBetween(Integer value1, Integer value2) {
|
||||||
|
addCriterion("`type` between", value1, value2, "type");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTypeNotBetween(Integer value1, Integer value2) {
|
||||||
|
addCriterion("`type` not between", value1, value2, "type");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class was generated by MyBatis Generator.
|
||||||
|
* This class corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated do_not_delete_during_merge
|
||||||
|
*/
|
||||||
|
public static class Criteria extends GeneratedCriteria {
|
||||||
|
protected Criteria() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class was generated by MyBatis Generator.
|
||||||
|
* This class corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
public static class Criterion {
|
||||||
|
private String condition;
|
||||||
|
|
||||||
|
private Object value;
|
||||||
|
|
||||||
|
private Object secondValue;
|
||||||
|
|
||||||
|
private boolean noValue;
|
||||||
|
|
||||||
|
private boolean singleValue;
|
||||||
|
|
||||||
|
private boolean betweenValue;
|
||||||
|
|
||||||
|
private boolean listValue;
|
||||||
|
|
||||||
|
private String typeHandler;
|
||||||
|
|
||||||
|
public String getCondition() {
|
||||||
|
return condition;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getSecondValue() {
|
||||||
|
return secondValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isNoValue() {
|
||||||
|
return noValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSingleValue() {
|
||||||
|
return singleValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isBetweenValue() {
|
||||||
|
return betweenValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isListValue() {
|
||||||
|
return listValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTypeHandler() {
|
||||||
|
return typeHandler;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition) {
|
||||||
|
super();
|
||||||
|
this.condition = condition;
|
||||||
|
this.typeHandler = null;
|
||||||
|
this.noValue = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value, String typeHandler) {
|
||||||
|
super();
|
||||||
|
this.condition = condition;
|
||||||
|
this.value = value;
|
||||||
|
this.typeHandler = typeHandler;
|
||||||
|
if (value instanceof List<?>) {
|
||||||
|
this.listValue = true;
|
||||||
|
} else {
|
||||||
|
this.singleValue = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value) {
|
||||||
|
this(condition, value, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||||
|
super();
|
||||||
|
this.condition = condition;
|
||||||
|
this.value = value;
|
||||||
|
this.secondValue = secondValue;
|
||||||
|
this.typeHandler = typeHandler;
|
||||||
|
this.betweenValue = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value, Object secondValue) {
|
||||||
|
this(condition, value, secondValue, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,97 @@
|
|||||||
|
package com.shxy.xymanager_dao.dao;
|
||||||
|
|
||||||
|
import com.shxy.xymanager_common.entity.SimInfo;
|
||||||
|
import com.shxy.xymanager_common.entity.SimInfoExample;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface SimInfoMapper {
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
long countByExample(SimInfoExample example);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
int deleteByExample(SimInfoExample example);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
int deleteByPrimaryKey(String iccid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
int insert(SimInfo row);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
int insertSelective(SimInfo row);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
List<SimInfo> selectByExample(SimInfoExample example);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
SimInfo selectByPrimaryKey(String iccid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
int updateByExampleSelective(@Param("row") SimInfo row, @Param("example") SimInfoExample example);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
int updateByExample(@Param("row") SimInfo row, @Param("example") SimInfoExample example);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
int updateByPrimaryKeySelective(SimInfo row);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method was generated by MyBatis Generator.
|
||||||
|
* This method corresponds to the database table sim_info
|
||||||
|
*
|
||||||
|
* @mbg.generated
|
||||||
|
*/
|
||||||
|
int updateByPrimaryKey(SimInfo row);
|
||||||
|
}
|
@ -0,0 +1,256 @@
|
|||||||
|
<?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="com.shxy.xymanager_dao.dao.SimInfoMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.shxy.xymanager_common.entity.SimInfo">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||||||
|
-->
|
||||||
|
<id column="iccid" jdbcType="VARCHAR" property="iccid" />
|
||||||
|
<result column="msisdn" jdbcType="VARCHAR" property="msisdn" />
|
||||||
|
<result column="imsi" jdbcType="VARCHAR" property="imsi" />
|
||||||
|
<result column="type" jdbcType="INTEGER" property="type" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Example_Where_Clause">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||||||
|
-->
|
||||||
|
<where>
|
||||||
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Update_By_Example_Where_Clause">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||||||
|
-->
|
||||||
|
<where>
|
||||||
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||||||
|
-->
|
||||||
|
iccid, msisdn, imsi, `type`
|
||||||
|
</sql>
|
||||||
|
<select id="selectByExample" parameterType="com.shxy.xymanager_common.entity.SimInfoExample" resultMap="BaseResultMap">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||||||
|
-->
|
||||||
|
select
|
||||||
|
<if test="distinct">
|
||||||
|
distinct
|
||||||
|
</if>
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from sim_info
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
<if test="orderByClause != null">
|
||||||
|
order by ${orderByClause}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||||||
|
-->
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from sim_info
|
||||||
|
where iccid = #{iccid,jdbcType=VARCHAR}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||||||
|
-->
|
||||||
|
delete from sim_info
|
||||||
|
where iccid = #{iccid,jdbcType=VARCHAR}
|
||||||
|
</delete>
|
||||||
|
<delete id="deleteByExample" parameterType="com.shxy.xymanager_common.entity.SimInfoExample">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||||||
|
-->
|
||||||
|
delete from sim_info
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" parameterType="com.shxy.xymanager_common.entity.SimInfo">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||||||
|
-->
|
||||||
|
insert into sim_info (iccid, msisdn, imsi,
|
||||||
|
`type`)
|
||||||
|
values (#{iccid,jdbcType=VARCHAR}, #{msisdn,jdbcType=VARCHAR}, #{imsi,jdbcType=VARCHAR},
|
||||||
|
#{type,jdbcType=INTEGER})
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" parameterType="com.shxy.xymanager_common.entity.SimInfo">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||||||
|
-->
|
||||||
|
insert into sim_info
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="iccid != null">
|
||||||
|
iccid,
|
||||||
|
</if>
|
||||||
|
<if test="msisdn != null">
|
||||||
|
msisdn,
|
||||||
|
</if>
|
||||||
|
<if test="imsi != null">
|
||||||
|
imsi,
|
||||||
|
</if>
|
||||||
|
<if test="type != null">
|
||||||
|
`type`,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="iccid != null">
|
||||||
|
#{iccid,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="msisdn != null">
|
||||||
|
#{msisdn,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="imsi != null">
|
||||||
|
#{imsi,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="type != null">
|
||||||
|
#{type,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<select id="countByExample" parameterType="com.shxy.xymanager_common.entity.SimInfoExample" resultType="java.lang.Long">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||||||
|
-->
|
||||||
|
select count(*) from sim_info
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<update id="updateByExampleSelective" parameterType="map">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||||||
|
-->
|
||||||
|
update sim_info
|
||||||
|
<set>
|
||||||
|
<if test="row.iccid != null">
|
||||||
|
iccid = #{row.iccid,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="row.msisdn != null">
|
||||||
|
msisdn = #{row.msisdn,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="row.imsi != null">
|
||||||
|
imsi = #{row.imsi,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="row.type != null">
|
||||||
|
`type` = #{row.type,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
<if test="example != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByExample" parameterType="map">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||||||
|
-->
|
||||||
|
update sim_info
|
||||||
|
set iccid = #{row.iccid,jdbcType=VARCHAR},
|
||||||
|
msisdn = #{row.msisdn,jdbcType=VARCHAR},
|
||||||
|
imsi = #{row.imsi,jdbcType=VARCHAR},
|
||||||
|
`type` = #{row.type,jdbcType=INTEGER}
|
||||||
|
<if test="example != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.shxy.xymanager_common.entity.SimInfo">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||||||
|
-->
|
||||||
|
update sim_info
|
||||||
|
<set>
|
||||||
|
<if test="msisdn != null">
|
||||||
|
msisdn = #{msisdn,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="imsi != null">
|
||||||
|
imsi = #{imsi,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="type != null">
|
||||||
|
`type` = #{type,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where iccid = #{iccid,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="com.shxy.xymanager_common.entity.SimInfo">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||||||
|
-->
|
||||||
|
update sim_info
|
||||||
|
set msisdn = #{msisdn,jdbcType=VARCHAR},
|
||||||
|
imsi = #{imsi,jdbcType=VARCHAR},
|
||||||
|
`type` = #{type,jdbcType=INTEGER}
|
||||||
|
where iccid = #{iccid,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
@ -0,0 +1,44 @@
|
|||||||
|
package com.shxy.xymanager_service.impl;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.shxy.xymanager_common.entity.SimInfo;
|
||||||
|
import com.shxy.xymanager_common.entity.SimInfoExample;
|
||||||
|
import com.shxy.xymanager_dao.dao.SimInfoMapper;
|
||||||
|
import com.shxy.xymanager_service.service.SimService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class SimServiceImpl implements SimService {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
SimInfoMapper simInfoMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addOrUpdate(SimInfo item) {
|
||||||
|
SimInfo sim = simInfoMapper.selectByPrimaryKey(item.getIccid());
|
||||||
|
if (sim != null) {
|
||||||
|
simInfoMapper.updateByPrimaryKey(item);
|
||||||
|
} else {
|
||||||
|
simInfoMapper.insert(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageInfo<SimInfo> list(Integer type, Integer pageNum, Integer pageSize) {
|
||||||
|
SimInfoExample example = new SimInfoExample();
|
||||||
|
SimInfoExample.Criteria criteria = example.createCriteria();
|
||||||
|
if (type != null) {
|
||||||
|
criteria.andTypeEqualTo(type);
|
||||||
|
}
|
||||||
|
PageHelper.startPage(pageNum, pageSize);
|
||||||
|
List<SimInfo> list = simInfoMapper.selectByExample(example);
|
||||||
|
return new PageInfo<>(list);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
package com.shxy.xymanager_service.service;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.shxy.xymanager_common.entity.SimInfo;
|
||||||
|
|
||||||
|
public interface SimService {
|
||||||
|
|
||||||
|
void addOrUpdate(SimInfo item);
|
||||||
|
|
||||||
|
PageInfo<SimInfo> list(Integer type, Integer pageNum, Integer pageSize);
|
||||||
|
}
|
Loading…
Reference in New Issue