初始化项目
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package com.jeesite.modules.biz.dao;
|
||||
|
||||
import com.jeesite.common.dao.CrudDao;
|
||||
import com.jeesite.common.mybatis.annotation.MyBatisDao;
|
||||
import com.jeesite.modules.biz.entity.MyAreaSource;
|
||||
|
||||
/**
|
||||
* 区域信息 DAO 接口
|
||||
* @author gaoxq
|
||||
* @version 2026-03-21
|
||||
*/
|
||||
@MyBatisDao(dataSourceName="work")
|
||||
public interface MyAreaSourceDao extends CrudDao<MyAreaSource> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.jeesite.modules.biz.dao;
|
||||
|
||||
import com.jeesite.common.dao.CrudDao;
|
||||
import com.jeesite.common.mybatis.annotation.MyBatisDao;
|
||||
import com.jeesite.modules.biz.entity.MyCities;
|
||||
|
||||
/**
|
||||
* 城市信息 DAO 接口
|
||||
* @author gaoxq
|
||||
* @version 2026-03-21
|
||||
*/
|
||||
@MyBatisDao(dataSourceName="work")
|
||||
public interface MyCitiesDao extends CrudDao<MyCities> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.jeesite.modules.biz.dao;
|
||||
|
||||
import com.jeesite.common.dao.CrudDao;
|
||||
import com.jeesite.common.mybatis.annotation.MyBatisDao;
|
||||
import com.jeesite.modules.biz.entity.MyProvince;
|
||||
|
||||
/**
|
||||
* 省份信息 DAO 接口
|
||||
* @author gaoxq
|
||||
* @version 2026-03-21
|
||||
*/
|
||||
@MyBatisDao(dataSourceName="work")
|
||||
public interface MyProvinceDao extends CrudDao<MyProvince> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.jeesite.modules.biz.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
import com.jeesite.common.entity.DataEntity;
|
||||
import com.jeesite.common.mybatis.annotation.Column;
|
||||
import com.jeesite.common.mybatis.annotation.Table;
|
||||
import com.jeesite.common.mybatis.mapper.query.QueryType;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 区域信息 Entity
|
||||
*
|
||||
* @author gaoxq
|
||||
* @version 2026-03-21
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name = "my_area_source", alias = "a", label = "区域信息", columns = {
|
||||
@Column(name = "create_time", attrName = "createTime", label = "记录时间", isUpdate = false, isUpdateForce = true),
|
||||
@Column(name = "area_id", attrName = "areaId", label = "唯一编号", isPK = true),
|
||||
@Column(name = "area_code", attrName = "areaCode", label = "区域编号"),
|
||||
@Column(name = "area_name", attrName = "areaName", label = "区域名称", queryType = QueryType.LIKE),
|
||||
@Column(name = "p_area_code", attrName = "pareaCode", label = "上级编码"),
|
||||
@Column(name = "area_level", attrName = "areaLevel", label = "区域级别"),
|
||||
@Column(name = "tree_name", attrName = "treeName", label = "树形名称", isQuery = false),
|
||||
@Column(name = "update_time", attrName = "updateTime", label = "更新时间", isQuery = false, isUpdateForce = true),
|
||||
@Column(name = "ustatus", attrName = "ustatus", label = "状态"),
|
||||
}, orderBy = "a.create_time DESC"
|
||||
)
|
||||
@Data
|
||||
public class MyAreaSource extends DataEntity<MyAreaSource> implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
private Date createTime; // 记录时间
|
||||
private String areaId; // 唯一编号
|
||||
private String areaCode; // 区域编号
|
||||
private String areaName; // 区域名称
|
||||
private String pareaCode; // 上级编码
|
||||
private Integer areaLevel; // 区域级别
|
||||
private String treeName; // 树形名称
|
||||
private Date updateTime; // 更新时间
|
||||
private String ustatus; // 状态
|
||||
|
||||
public MyAreaSource() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public MyAreaSource(String id) {
|
||||
super(id);
|
||||
}
|
||||
|
||||
public Date getCreateTime_gte() {
|
||||
return sqlMap.getWhere().getValue("create_time", QueryType.GTE);
|
||||
}
|
||||
|
||||
public void setCreateTime_gte(Date createTime) {
|
||||
sqlMap.getWhere().and("create_time", QueryType.GTE, createTime);
|
||||
}
|
||||
|
||||
public Date getCreateTime_lte() {
|
||||
return sqlMap.getWhere().getValue("create_time", QueryType.LTE);
|
||||
}
|
||||
|
||||
public void setCreateTime_lte(Date createTime) {
|
||||
sqlMap.getWhere().and("create_time", QueryType.LTE, createTime);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.jeesite.modules.biz.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.jeesite.common.mybatis.annotation.JoinTable;
|
||||
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
|
||||
|
||||
import com.jeesite.common.entity.DataEntity;
|
||||
import com.jeesite.common.mybatis.annotation.Column;
|
||||
import com.jeesite.common.mybatis.annotation.Table;
|
||||
import com.jeesite.common.mybatis.mapper.query.QueryType;
|
||||
import com.jeesite.common.utils.excel.annotation.ExcelField;
|
||||
import com.jeesite.common.utils.excel.annotation.ExcelField.Align;
|
||||
import com.jeesite.common.utils.excel.annotation.ExcelFields;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 城市信息 Entity
|
||||
*
|
||||
* @author gaoxq
|
||||
* @version 2026-03-21
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name = "my_cities", alias = "a", label = "城市信息", columns = {
|
||||
@Column(name = "city_id", attrName = "cityId", label = "唯一主键", isPK = true),
|
||||
@Column(name = "create_time", attrName = "createTime", label = "记录时间", isUpdate = false, isUpdateForce = true),
|
||||
@Column(name = "province_code", attrName = "provinceCode", label = "省份编码"),
|
||||
@Column(name = "city_code", attrName = "cityCode", label = "市区编码", isQuery = false),
|
||||
@Column(name = "city_name", attrName = "cityName", label = "市区名称", queryType = QueryType.LIKE),
|
||||
@Column(name = "area_code", attrName = "areaCode", label = "市区区号"),
|
||||
@Column(name = "area_type", attrName = "areaType", label = "市区级别"),
|
||||
@Column(name = "update_time", attrName = "updateTime", label = "更新时间", isQuery = false, isUpdateForce = true),
|
||||
@Column(name = "ustatus", attrName = "ustatus", label = "状态"),
|
||||
}, joinTable = {
|
||||
@JoinTable(type = Type.LEFT_JOIN, entity = MyProvince.class, alias = "b",
|
||||
on = "a.province_code = b.province_code", attrName = "this",
|
||||
columns = {
|
||||
@Column(name = "province_name", attrName = "provinceName", label = "省份名称"),
|
||||
}),
|
||||
}, orderBy = "a.create_time DESC"
|
||||
)
|
||||
@Data
|
||||
public class MyCities extends DataEntity<MyCities> implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String cityId; // 唯一主键
|
||||
private Date createTime; // 记录时间
|
||||
private String provinceCode; // 省份编码
|
||||
private String cityCode; // 市区编码
|
||||
private String cityName; // 市区名称
|
||||
private String areaCode; // 市区区号
|
||||
private String areaType; // 市区级别
|
||||
private Date updateTime; // 更新时间
|
||||
private String ustatus; // 状态
|
||||
|
||||
private String provinceName;
|
||||
|
||||
@ExcelFields({
|
||||
@ExcelField(title = "唯一主键", attrName = "cityId", align = Align.CENTER, sort = 10),
|
||||
@ExcelField(title = "记录时间", attrName = "createTime", align = Align.CENTER, sort = 20, dataFormat = "yyyy-MM-dd hh:mm"),
|
||||
@ExcelField(title = "省份名称", attrName = "provinceName", align = Align.CENTER, sort = 30),
|
||||
@ExcelField(title = "省份编码", attrName = "provinceCode", align = Align.CENTER, sort = 30),
|
||||
@ExcelField(title = "市区编码", attrName = "cityCode", align = Align.CENTER, sort = 40),
|
||||
@ExcelField(title = "市区名称", attrName = "cityName", align = Align.CENTER, sort = 50),
|
||||
@ExcelField(title = "市区区号", attrName = "areaCode", align = Align.CENTER, sort = 60),
|
||||
@ExcelField(title = "市区级别", attrName = "areaType", align = Align.CENTER, sort = 70),
|
||||
@ExcelField(title = "更新时间", attrName = "updateTime", align = Align.CENTER, sort = 80, dataFormat = "yyyy-MM-dd hh:mm"),
|
||||
@ExcelField(title = "状态", attrName = "ustatus", dictType = "biz_status", align = Align.CENTER, sort = 90),
|
||||
})
|
||||
public MyCities() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public MyCities(String id) {
|
||||
super(id);
|
||||
}
|
||||
|
||||
public Date getCreateTime_gte() {
|
||||
return sqlMap.getWhere().getValue("create_time", QueryType.GTE);
|
||||
}
|
||||
|
||||
public void setCreateTime_gte(Date createTime) {
|
||||
sqlMap.getWhere().and("create_time", QueryType.GTE, createTime);
|
||||
}
|
||||
|
||||
public Date getCreateTime_lte() {
|
||||
return sqlMap.getWhere().getValue("create_time", QueryType.LTE);
|
||||
}
|
||||
|
||||
public void setCreateTime_lte(Date createTime) {
|
||||
sqlMap.getWhere().and("create_time", QueryType.LTE, createTime);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.jeesite.modules.biz.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.jeesite.common.mybatis.annotation.JoinTable;
|
||||
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
import com.jeesite.common.entity.DataEntity;
|
||||
import com.jeesite.common.mybatis.annotation.Column;
|
||||
import com.jeesite.common.mybatis.annotation.Table;
|
||||
import com.jeesite.common.mybatis.mapper.query.QueryType;
|
||||
import com.jeesite.common.utils.excel.annotation.ExcelField;
|
||||
import com.jeesite.common.utils.excel.annotation.ExcelField.Align;
|
||||
import com.jeesite.common.utils.excel.annotation.ExcelFields;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 省份信息 Entity
|
||||
*
|
||||
* @author gaoxq
|
||||
* @version 2026-03-21
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name = "my_province", alias = "a", label = "省份信息", columns = {
|
||||
@Column(name = "province_id", attrName = "provinceId", label = "唯一主键", isPK = true),
|
||||
@Column(name = "create_time", attrName = "createTime", label = "记录时间", isUpdate = false, isQuery = false, isUpdateForce = true),
|
||||
@Column(name = "province_name", attrName = "provinceName", label = "省份名称", queryType = QueryType.LIKE),
|
||||
@Column(name = "province_code", attrName = "provinceCode", label = "省份编码"),
|
||||
@Column(name = "sorting", attrName = "sorting", label = "省份序号", isQuery = false),
|
||||
@Column(name = "ustatus", attrName = "ustatus", label = "状态"),
|
||||
@Column(name = "update_time", attrName = "updateTime", label = "更新时间", isQuery = false, isUpdateForce = true),
|
||||
}, orderBy = "a.create_time DESC"
|
||||
)
|
||||
@Data
|
||||
public class MyProvince extends DataEntity<MyProvince> implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String provinceId; // 唯一主键
|
||||
private Date createTime; // 记录时间
|
||||
private String provinceName; // 省份名称
|
||||
private String provinceCode; // 省份编码
|
||||
private Integer sorting; // 省份序号
|
||||
private String ustatus; // 状态
|
||||
private Date updateTime; // 更新时间
|
||||
|
||||
@ExcelFields({
|
||||
@ExcelField(title = "唯一主键", attrName = "provinceId", align = Align.CENTER, sort = 10),
|
||||
@ExcelField(title = "记录时间", attrName = "createTime", align = Align.CENTER, sort = 20, dataFormat = "yyyy-MM-dd hh:mm"),
|
||||
@ExcelField(title = "省份名称", attrName = "provinceName", align = Align.CENTER, sort = 30),
|
||||
@ExcelField(title = "省份编码", attrName = "provinceCode", align = Align.CENTER, sort = 40),
|
||||
@ExcelField(title = "省份序号", attrName = "sorting", align = Align.CENTER, sort = 50),
|
||||
@ExcelField(title = "状态", attrName = "ustatus", dictType = "biz_status", align = Align.CENTER, sort = 60),
|
||||
@ExcelField(title = "更新时间", attrName = "updateTime", align = Align.CENTER, sort = 70, dataFormat = "yyyy-MM-dd hh:mm"),
|
||||
})
|
||||
public MyProvince() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public MyProvince(String id) {
|
||||
super(id);
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,7 @@ import java.io.Serial;
|
||||
@Column(name="remark", attrName="remark", label="说明描述", isQuery=false),
|
||||
@Column(name="ustatus", attrName="ustatus", label="状态"),
|
||||
@Column(name="update_time", attrName="updateTime", label="更新时间", isInsert=false, isQuery=false, isUpdateForce=true),
|
||||
}, orderBy="a.screen_id DESC"
|
||||
}, orderBy="a.create_time DESC"
|
||||
)
|
||||
@Data
|
||||
public class MyScreenInfo extends DataEntity<MyScreenInfo> implements Serializable {
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.jeesite.modules.biz.service;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.jeesite.common.entity.Page;
|
||||
import com.jeesite.common.service.CrudService;
|
||||
import com.jeesite.modules.biz.entity.MyAreaSource;
|
||||
import com.jeesite.modules.biz.dao.MyAreaSourceDao;
|
||||
|
||||
/**
|
||||
* 区域信息 Service
|
||||
* @author gaoxq
|
||||
* @version 2026-03-21
|
||||
*/
|
||||
@Service
|
||||
public class MyAreaSourceService extends CrudService<MyAreaSourceDao, MyAreaSource> {
|
||||
|
||||
/**
|
||||
* 获取单条数据
|
||||
* @param myAreaSource 主键
|
||||
*/
|
||||
@Override
|
||||
public MyAreaSource get(MyAreaSource myAreaSource) {
|
||||
return super.get(myAreaSource);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param myAreaSource 查询条件
|
||||
* @param myAreaSource page 分页对象
|
||||
*/
|
||||
@Override
|
||||
public Page<MyAreaSource> findPage(MyAreaSource myAreaSource) {
|
||||
return super.findPage(myAreaSource);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
* @param myAreaSource 查询条件
|
||||
*/
|
||||
@Override
|
||||
public List<MyAreaSource> findList(MyAreaSource myAreaSource) {
|
||||
return super.findList(myAreaSource);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据(插入或更新)
|
||||
* @param myAreaSource 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void save(MyAreaSource myAreaSource) {
|
||||
super.save(myAreaSource);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新状态
|
||||
* @param myAreaSource 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateStatus(MyAreaSource myAreaSource) {
|
||||
super.updateStatus(myAreaSource);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param myAreaSource 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void delete(MyAreaSource myAreaSource) {
|
||||
myAreaSource.sqlMap().markIdDelete(); // 逻辑删除时标记ID值
|
||||
super.delete(myAreaSource);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
package com.jeesite.modules.biz.service;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.jeesite.common.entity.Page;
|
||||
import com.jeesite.common.service.CrudService;
|
||||
import com.jeesite.modules.biz.entity.MyCities;
|
||||
import com.jeesite.modules.biz.dao.MyCitiesDao;
|
||||
import com.jeesite.common.service.ServiceException;
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.validator.ValidatorUtils;
|
||||
import com.jeesite.common.utils.excel.ExcelImport;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import jakarta.validation.ConstraintViolation;
|
||||
import jakarta.validation.ConstraintViolationException;
|
||||
|
||||
/**
|
||||
* 城市信息 Service
|
||||
* @author gaoxq
|
||||
* @version 2026-03-21
|
||||
*/
|
||||
@Service
|
||||
public class MyCitiesService extends CrudService<MyCitiesDao, MyCities> {
|
||||
|
||||
/**
|
||||
* 获取单条数据
|
||||
* @param myCities 主键
|
||||
*/
|
||||
@Override
|
||||
public MyCities get(MyCities myCities) {
|
||||
return super.get(myCities);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param myCities 查询条件
|
||||
* @param myCities page 分页对象
|
||||
*/
|
||||
@Override
|
||||
public Page<MyCities> findPage(MyCities myCities) {
|
||||
return super.findPage(myCities);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
* @param myCities 查询条件
|
||||
*/
|
||||
@Override
|
||||
public List<MyCities> findList(MyCities myCities) {
|
||||
return super.findList(myCities);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据(插入或更新)
|
||||
* @param myCities 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void save(MyCities myCities) {
|
||||
super.save(myCities);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入数据
|
||||
* @param file 导入的数据文件
|
||||
*/
|
||||
@Transactional
|
||||
public String importData(MultipartFile file) {
|
||||
if (file == null){
|
||||
throw new ServiceException(text("请选择导入的数据文件!"));
|
||||
}
|
||||
int successNum = 0; int failureNum = 0;
|
||||
StringBuilder successMsg = new StringBuilder();
|
||||
StringBuilder failureMsg = new StringBuilder();
|
||||
try(ExcelImport ei = new ExcelImport(file, 2, 0)){
|
||||
List<MyCities> list = ei.getDataList(MyCities.class);
|
||||
for (MyCities myCities : list) {
|
||||
try{
|
||||
ValidatorUtils.validateWithException(myCities);
|
||||
this.save(myCities);
|
||||
successNum++;
|
||||
successMsg.append("<br/>" + successNum + "、编号 " + myCities.getId() + " 导入成功");
|
||||
} catch (Exception e) {
|
||||
failureNum++;
|
||||
String msg = "<br/>" + failureNum + "、编号 " + myCities.getId() + " 导入失败:";
|
||||
if (e instanceof ConstraintViolationException){
|
||||
ConstraintViolationException cve = (ConstraintViolationException)e;
|
||||
for (ConstraintViolation<?> violation : cve.getConstraintViolations()) {
|
||||
msg += Global.getText(violation.getMessage()) + " ("+violation.getPropertyPath()+")";
|
||||
}
|
||||
}else{
|
||||
msg += e.getMessage();
|
||||
}
|
||||
failureMsg.append(msg);
|
||||
logger.error(msg, e);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage(), e);
|
||||
failureMsg.append(e.getMessage());
|
||||
return failureMsg.toString();
|
||||
}
|
||||
if (failureNum > 0) {
|
||||
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
|
||||
throw new ServiceException(failureMsg.toString());
|
||||
}else{
|
||||
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
|
||||
}
|
||||
return successMsg.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新状态
|
||||
* @param myCities 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateStatus(MyCities myCities) {
|
||||
super.updateStatus(myCities);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param myCities 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void delete(MyCities myCities) {
|
||||
super.delete(myCities);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
package com.jeesite.modules.biz.service;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.jeesite.common.entity.Page;
|
||||
import com.jeesite.common.service.CrudService;
|
||||
import com.jeesite.modules.biz.entity.MyProvince;
|
||||
import com.jeesite.modules.biz.dao.MyProvinceDao;
|
||||
import com.jeesite.common.service.ServiceException;
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.validator.ValidatorUtils;
|
||||
import com.jeesite.common.utils.excel.ExcelImport;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import jakarta.validation.ConstraintViolation;
|
||||
import jakarta.validation.ConstraintViolationException;
|
||||
|
||||
/**
|
||||
* 省份信息 Service
|
||||
* @author gaoxq
|
||||
* @version 2026-03-21
|
||||
*/
|
||||
@Service
|
||||
public class MyProvinceService extends CrudService<MyProvinceDao, MyProvince> {
|
||||
|
||||
/**
|
||||
* 获取单条数据
|
||||
* @param myProvince 主键
|
||||
*/
|
||||
@Override
|
||||
public MyProvince get(MyProvince myProvince) {
|
||||
return super.get(myProvince);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param myProvince 查询条件
|
||||
* @param myProvince page 分页对象
|
||||
*/
|
||||
@Override
|
||||
public Page<MyProvince> findPage(MyProvince myProvince) {
|
||||
return super.findPage(myProvince);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
* @param myProvince 查询条件
|
||||
*/
|
||||
@Override
|
||||
public List<MyProvince> findList(MyProvince myProvince) {
|
||||
return super.findList(myProvince);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据(插入或更新)
|
||||
* @param myProvince 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void save(MyProvince myProvince) {
|
||||
super.save(myProvince);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入数据
|
||||
* @param file 导入的数据文件
|
||||
*/
|
||||
@Transactional
|
||||
public String importData(MultipartFile file) {
|
||||
if (file == null){
|
||||
throw new ServiceException(text("请选择导入的数据文件!"));
|
||||
}
|
||||
int successNum = 0; int failureNum = 0;
|
||||
StringBuilder successMsg = new StringBuilder();
|
||||
StringBuilder failureMsg = new StringBuilder();
|
||||
try(ExcelImport ei = new ExcelImport(file, 2, 0)){
|
||||
List<MyProvince> list = ei.getDataList(MyProvince.class);
|
||||
for (MyProvince myProvince : list) {
|
||||
try{
|
||||
ValidatorUtils.validateWithException(myProvince);
|
||||
this.save(myProvince);
|
||||
successNum++;
|
||||
successMsg.append("<br/>" + successNum + "、编号 " + myProvince.getId() + " 导入成功");
|
||||
} catch (Exception e) {
|
||||
failureNum++;
|
||||
String msg = "<br/>" + failureNum + "、编号 " + myProvince.getId() + " 导入失败:";
|
||||
if (e instanceof ConstraintViolationException){
|
||||
ConstraintViolationException cve = (ConstraintViolationException)e;
|
||||
for (ConstraintViolation<?> violation : cve.getConstraintViolations()) {
|
||||
msg += Global.getText(violation.getMessage()) + " ("+violation.getPropertyPath()+")";
|
||||
}
|
||||
}else{
|
||||
msg += e.getMessage();
|
||||
}
|
||||
failureMsg.append(msg);
|
||||
logger.error(msg, e);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage(), e);
|
||||
failureMsg.append(e.getMessage());
|
||||
return failureMsg.toString();
|
||||
}
|
||||
if (failureNum > 0) {
|
||||
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
|
||||
throw new ServiceException(failureMsg.toString());
|
||||
}else{
|
||||
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
|
||||
}
|
||||
return successMsg.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新状态
|
||||
* @param myProvince 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateStatus(MyProvince myProvince) {
|
||||
super.updateStatus(myProvince);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param myProvince 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void delete(MyProvince myProvince) {
|
||||
super.delete(myProvince);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
package com.jeesite.modules.biz.web;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.entity.Page;
|
||||
import com.jeesite.common.web.BaseController;
|
||||
import com.jeesite.modules.biz.entity.MyAreaSource;
|
||||
import com.jeesite.modules.biz.service.MyAreaSourceService;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 区域信息 Controller
|
||||
*
|
||||
* @author gaoxq
|
||||
* @version 2026-03-21
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/biz/myAreaSource")
|
||||
public class MyAreaSourceController extends BaseController {
|
||||
|
||||
private final MyAreaSourceService myAreaSourceService;
|
||||
|
||||
public MyAreaSourceController(MyAreaSourceService myAreaSourceService) {
|
||||
this.myAreaSourceService = myAreaSourceService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
@ModelAttribute
|
||||
public MyAreaSource get(String areaId, boolean isNewRecord) {
|
||||
return myAreaSourceService.get(areaId, isNewRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
@RequiresPermissions("biz:myAreaSource:view")
|
||||
@RequestMapping(value = {"list", ""})
|
||||
public String list(MyAreaSource myAreaSource, Model model) {
|
||||
model.addAttribute("myAreaSource", myAreaSource);
|
||||
return "modules/biz/myAreaSourceList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
*/
|
||||
@RequiresPermissions("biz:myAreaSource:view")
|
||||
@RequestMapping(value = "listData")
|
||||
@ResponseBody
|
||||
public Page<MyAreaSource> listData(MyAreaSource myAreaSource, HttpServletRequest request, HttpServletResponse response) {
|
||||
myAreaSource.setPage(new Page<>(request, response));
|
||||
Page<MyAreaSource> page = myAreaSourceService.findPage(myAreaSource);
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看编辑表单
|
||||
*/
|
||||
@RequiresPermissions("biz:myAreaSource:view")
|
||||
@RequestMapping(value = "form")
|
||||
public String form(MyAreaSource myAreaSource, Model model) {
|
||||
model.addAttribute("myAreaSource", myAreaSource);
|
||||
return "modules/biz/myAreaSourceForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据
|
||||
*/
|
||||
@RequiresPermissions("biz:myAreaSource:edit")
|
||||
@PostMapping(value = "save")
|
||||
@ResponseBody
|
||||
public String save(@Validated MyAreaSource myAreaSource) {
|
||||
myAreaSourceService.save(myAreaSource);
|
||||
return renderResult(Global.TRUE, text("保存区域成功!"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*/
|
||||
@RequiresPermissions("biz:myAreaSource:edit")
|
||||
@RequestMapping(value = "delete")
|
||||
@ResponseBody
|
||||
public String delete(MyAreaSource myAreaSource) {
|
||||
myAreaSourceService.delete(myAreaSource);
|
||||
return renderResult(Global.TRUE, text("删除区域成功!"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 树形结构
|
||||
*/
|
||||
@RequestMapping(value = "treeData")
|
||||
@ResponseBody
|
||||
public List<Map<String, Object>> treeAreasData(MyAreaSource myAreaSource) {
|
||||
List<Map<String, Object>> treeData = new ArrayList<>();
|
||||
List<MyAreaSource> areaSourceList = myAreaSourceService.findList(myAreaSource);
|
||||
Map<String, Map<String, Object>> nodeMap = new HashMap<>();
|
||||
for (MyAreaSource area : areaSourceList) {
|
||||
Map<String, Object> node = new HashMap<>();
|
||||
node.put("id", area.getAreaCode());
|
||||
node.put("name", area.getAreaName());
|
||||
node.put("disabled", false);
|
||||
node.put("children", new ArrayList<Map<String, Object>>());
|
||||
nodeMap.put(area.getAreaCode(), node);
|
||||
}
|
||||
for (MyAreaSource area : areaSourceList) {
|
||||
Map<String, Object> currentNode = nodeMap.get(area.getAreaCode());
|
||||
String parentCode = area.getPareaCode(); // 当前节点的父编码
|
||||
if (nodeMap.containsKey(parentCode)) {
|
||||
Map<String, Object> parentNode = nodeMap.get(parentCode);
|
||||
List<Map<String, Object>> children = (List<Map<String, Object>>) parentNode.get("children");
|
||||
children.add(currentNode);
|
||||
} else {
|
||||
if (parentCode.equals("0")) {
|
||||
treeData.add(currentNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
return treeData;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
package com.jeesite.modules.biz.web;
|
||||
|
||||
import java.util.List;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.collect.ListUtils;
|
||||
import com.jeesite.common.entity.Page;
|
||||
import com.jeesite.common.lang.DateUtils;
|
||||
import com.jeesite.common.utils.excel.ExcelExport;
|
||||
import com.jeesite.common.utils.excel.annotation.ExcelField.Type;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import com.jeesite.common.web.BaseController;
|
||||
import com.jeesite.modules.biz.entity.MyCities;
|
||||
import com.jeesite.modules.biz.service.MyCitiesService;
|
||||
|
||||
/**
|
||||
* 城市信息 Controller
|
||||
* @author gaoxq
|
||||
* @version 2026-03-21
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/biz/myCities")
|
||||
public class MyCitiesController extends BaseController {
|
||||
|
||||
private final MyCitiesService myCitiesService;
|
||||
|
||||
public MyCitiesController(MyCitiesService myCitiesService) {
|
||||
this.myCitiesService = myCitiesService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
@ModelAttribute
|
||||
public MyCities get(String cityId, boolean isNewRecord) {
|
||||
return myCitiesService.get(cityId, isNewRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
@RequiresPermissions("biz:myCities:view")
|
||||
@RequestMapping(value = {"list", ""})
|
||||
public String list(MyCities myCities, Model model) {
|
||||
model.addAttribute("myCities", myCities);
|
||||
return "modules/biz/myCitiesList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
*/
|
||||
@RequiresPermissions("biz:myCities:view")
|
||||
@RequestMapping(value = "listData")
|
||||
@ResponseBody
|
||||
public Page<MyCities> listData(MyCities myCities, HttpServletRequest request, HttpServletResponse response) {
|
||||
myCities.setPage(new Page<>(request, response));
|
||||
Page<MyCities> page = myCitiesService.findPage(myCities);
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看编辑表单
|
||||
*/
|
||||
@RequiresPermissions("biz:myCities:view")
|
||||
@RequestMapping(value = "form")
|
||||
public String form(MyCities myCities, Model model) {
|
||||
model.addAttribute("myCities", myCities);
|
||||
return "modules/biz/myCitiesForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据
|
||||
*/
|
||||
@RequiresPermissions("biz:myCities:edit")
|
||||
@PostMapping(value = "save")
|
||||
@ResponseBody
|
||||
public String save(@Validated MyCities myCities) {
|
||||
myCitiesService.save(myCities);
|
||||
return renderResult(Global.TRUE, text("保存城市成功!"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
*/
|
||||
@RequiresPermissions("biz:myCities:view")
|
||||
@RequestMapping(value = "exportData")
|
||||
public void exportData(MyCities myCities, HttpServletResponse response) {
|
||||
List<MyCities> list = myCitiesService.findList(myCities);
|
||||
String fileName = "城市" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
|
||||
try(ExcelExport ee = new ExcelExport("城市", MyCities.class)){
|
||||
ee.setDataList(list).write(response, fileName);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载模板
|
||||
*/
|
||||
@RequiresPermissions("biz:myCities:view")
|
||||
@RequestMapping(value = "importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
MyCities myCities = new MyCities();
|
||||
List<MyCities> list = ListUtils.newArrayList(myCities);
|
||||
String fileName = "城市模板.xlsx";
|
||||
try(ExcelExport ee = new ExcelExport("城市", MyCities.class, Type.IMPORT)){
|
||||
ee.setDataList(list).write(response, fileName);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入数据
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequiresPermissions("biz:myCities:edit")
|
||||
@PostMapping(value = "importData")
|
||||
public String importData(MultipartFile file) {
|
||||
try {
|
||||
String message = myCitiesService.importData(file);
|
||||
return renderResult(Global.TRUE, "posfull:"+message);
|
||||
} catch (Exception ex) {
|
||||
return renderResult(Global.FALSE, "posfull:"+ex.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*/
|
||||
@RequiresPermissions("biz:myCities:edit")
|
||||
@RequestMapping(value = "delete")
|
||||
@ResponseBody
|
||||
public String delete(MyCities myCities) {
|
||||
myCitiesService.delete(myCities);
|
||||
return renderResult(Global.TRUE, text("删除城市成功!"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
package com.jeesite.modules.biz.web;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.collect.ListUtils;
|
||||
import com.jeesite.common.entity.Page;
|
||||
import com.jeesite.common.lang.DateUtils;
|
||||
import com.jeesite.common.utils.excel.ExcelExport;
|
||||
import com.jeesite.common.utils.excel.annotation.ExcelField.Type;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import com.jeesite.common.web.BaseController;
|
||||
import com.jeesite.modules.biz.entity.MyProvince;
|
||||
import com.jeesite.modules.biz.service.MyProvinceService;
|
||||
|
||||
/**
|
||||
* 省份信息 Controller
|
||||
*
|
||||
* @author gaoxq
|
||||
* @version 2026-03-21
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/biz/myProvince")
|
||||
public class MyProvinceController extends BaseController {
|
||||
|
||||
private final MyProvinceService myProvinceService;
|
||||
|
||||
public MyProvinceController(MyProvinceService myProvinceService) {
|
||||
this.myProvinceService = myProvinceService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
@ModelAttribute
|
||||
public MyProvince get(String provinceId, boolean isNewRecord) {
|
||||
return myProvinceService.get(provinceId, isNewRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
@RequiresPermissions("biz:myProvince:view")
|
||||
@RequestMapping(value = {"list", ""})
|
||||
public String list(MyProvince myProvince, Model model) {
|
||||
model.addAttribute("myProvince", myProvince);
|
||||
return "modules/biz/myProvinceList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
*/
|
||||
@RequiresPermissions("biz:myProvince:view")
|
||||
@RequestMapping(value = "listData")
|
||||
@ResponseBody
|
||||
public Page<MyProvince> listData(MyProvince myProvince, HttpServletRequest request, HttpServletResponse response) {
|
||||
myProvince.setPage(new Page<>(request, response));
|
||||
Page<MyProvince> page = myProvinceService.findPage(myProvince);
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看编辑表单
|
||||
*/
|
||||
@RequiresPermissions("biz:myProvince:view")
|
||||
@RequestMapping(value = "form")
|
||||
public String form(MyProvince myProvince, Model model) {
|
||||
model.addAttribute("myProvince", myProvince);
|
||||
return "modules/biz/myProvinceForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据
|
||||
*/
|
||||
@RequiresPermissions("biz:myProvince:edit")
|
||||
@PostMapping(value = "save")
|
||||
@ResponseBody
|
||||
public String save(@Validated MyProvince myProvince) {
|
||||
myProvinceService.save(myProvince);
|
||||
return renderResult(Global.TRUE, text("保存省份成功!"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
*/
|
||||
@RequiresPermissions("biz:myProvince:view")
|
||||
@RequestMapping(value = "exportData")
|
||||
public void exportData(MyProvince myProvince, HttpServletResponse response) {
|
||||
List<MyProvince> list = myProvinceService.findList(myProvince);
|
||||
String fileName = "省份" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
|
||||
try (ExcelExport ee = new ExcelExport("省份", MyProvince.class)) {
|
||||
ee.setDataList(list).write(response, fileName);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载模板
|
||||
*/
|
||||
@RequiresPermissions("biz:myProvince:view")
|
||||
@RequestMapping(value = "importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
MyProvince myProvince = new MyProvince();
|
||||
List<MyProvince> list = ListUtils.newArrayList(myProvince);
|
||||
String fileName = "省份模板.xlsx";
|
||||
try (ExcelExport ee = new ExcelExport("省份", MyProvince.class, Type.IMPORT)) {
|
||||
ee.setDataList(list).write(response, fileName);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入数据
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequiresPermissions("biz:myProvince:edit")
|
||||
@PostMapping(value = "importData")
|
||||
public String importData(MultipartFile file) {
|
||||
try {
|
||||
String message = myProvinceService.importData(file);
|
||||
return renderResult(Global.TRUE, "posfull:" + message);
|
||||
} catch (Exception ex) {
|
||||
return renderResult(Global.FALSE, "posfull:" + ex.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*/
|
||||
@RequiresPermissions("biz:myProvince:edit")
|
||||
@RequestMapping(value = "delete")
|
||||
@ResponseBody
|
||||
public String delete(MyProvince myProvince) {
|
||||
myProvinceService.delete(myProvince);
|
||||
return renderResult(Global.TRUE, text("删除省份成功!"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表数据
|
||||
*/
|
||||
@RequestMapping(value = "listAll")
|
||||
@ResponseBody
|
||||
public List<MyProvince> listAll(MyProvince myProvince) {
|
||||
return myProvinceService.findList(myProvince);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?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.jeesite.modules.biz.dao.MyAreaSourceDao">
|
||||
|
||||
<!-- 查询数据
|
||||
<select id="findList" resultType="MyAreaSource">
|
||||
SELECT ${sqlMap.column.toSql()}
|
||||
FROM ${sqlMap.table.toSql()}
|
||||
<where>
|
||||
${sqlMap.where.toSql()}
|
||||
</where>
|
||||
ORDER BY ${sqlMap.order.toSql()}
|
||||
</select> -->
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?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.jeesite.modules.biz.dao.MyCitiesDao">
|
||||
|
||||
<!-- 查询数据
|
||||
<select id="findList" resultType="MyCities">
|
||||
SELECT ${sqlMap.column.toSql()}
|
||||
FROM ${sqlMap.table.toSql()}
|
||||
<where>
|
||||
${sqlMap.where.toSql()}
|
||||
</where>
|
||||
ORDER BY ${sqlMap.order.toSql()}
|
||||
</select> -->
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?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.jeesite.modules.biz.dao.MyProvinceDao">
|
||||
|
||||
<!-- 查询数据
|
||||
<select id="findList" resultType="MyProvince">
|
||||
SELECT ${sqlMap.column.toSql()}
|
||||
FROM ${sqlMap.table.toSql()}
|
||||
<where>
|
||||
${sqlMap.where.toSql()}
|
||||
</where>
|
||||
ORDER BY ${sqlMap.order.toSql()}
|
||||
</select> -->
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user