Bladeren bron

Merge branch 'master' of ssh://192.168.8.213:10022/miaxis/hzgzpt

Althars123 4 jaren geleden
bovenliggende
commit
1df5c0dfb5

+ 10 - 29
hzgzpt-admin/src/main/java/com/miaxis/app/controller/school/SchoolRegionController.java

@@ -1,21 +1,17 @@
 package com.miaxis.app.controller.school;
 
 import com.miaxis.app.school.domain.SchoolRegion;
-import com.miaxis.app.school.dto.SchoolRegionDTO;
-import com.miaxis.app.school.dto.SchoolRegionVO;
 import com.miaxis.app.school.service.ISchoolRegionService;
-import com.miaxis.common.annotation.Log;
 import com.miaxis.common.constant.Constants;
 import com.miaxis.common.core.controller.BaseController;
 import com.miaxis.common.core.domain.Response;
 import com.miaxis.common.core.page.ResponsePageInfo;
-import com.miaxis.common.enums.BusinessTypeEnum;
 import com.miaxis.common.utils.poi.ExcelUtil;
 import io.swagger.annotations.*;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.Arrays;
 import java.util.List;
 
 /**
@@ -28,6 +24,7 @@ import java.util.List;
 @RequestMapping(Constants.OPEN_PREFIX+"/school/region")
 @Api(tags={"【app-驾校训练场】"})
 public class SchoolRegionController extends BaseController{
+
     @Autowired
     private ISchoolRegionService schoolRegionService;
 
@@ -42,34 +39,18 @@ public class SchoolRegionController extends BaseController{
     })
     public ResponsePageInfo<SchoolRegion> list(@ModelAttribute SchoolRegion schoolRegion){
         startPage();
-        List<SchoolRegion> list = schoolRegionService.selectSchoolRegionList(schoolRegion);
-        return toResponsePageInfo(list);
-    }
-
-    /**
-     * 查询驾校训练场列表(图片距离)
-     */
-    @GetMapping("/urllist")
-    @ApiOperation("查询驾校训练场列表(图片距离)")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "pageNum",value = "当前页码" ,dataType = "int", paramType = "query", required = false),
-            @ApiImplicitParam(name = "pageSize",value = "每页数据量" , dataType = "int", paramType = "query", required = false),
-    })
-    public ResponsePageInfo<SchoolRegionVO> list(@ModelAttribute SchoolRegionDTO schoolRegionDTO){
-        startPage();
-        List<SchoolRegionVO> list = schoolRegionService.selectSchoolRegionUrlList(schoolRegionDTO);
+        List<SchoolRegion> list = schoolRegionService.queryList(schoolRegion);
         return toResponsePageInfo(list);
     }
 
-
     /**
      * 导出驾校训练场列表
      */
     @GetMapping("/export")
     @ApiOperation("导出驾校训练场列表Excel")
     public Response<String> export(@ModelAttribute SchoolRegion schoolRegion){
-        List<SchoolRegion> list = schoolRegionService.selectSchoolRegionList(schoolRegion);
-        ExcelUtil<SchoolRegion> util = new ExcelUtil<SchoolRegion>(SchoolRegion.class);
+        List<SchoolRegion> list = schoolRegionService.queryList(schoolRegion);
+        ExcelUtil<SchoolRegion> util = new ExcelUtil<>(SchoolRegion.class);
         return util.exportExcel(list, "region");
     }
 
@@ -82,7 +63,7 @@ public class SchoolRegionController extends BaseController{
             @ApiParam(name = "id", value = "驾校训练场参数", required = true)
             @PathVariable("id") Long id
     ){
-        return Response.success(schoolRegionService.selectSchoolRegionById(id));
+        return Response.success(schoolRegionService.getById(id));
     }
 
     /**
@@ -91,7 +72,7 @@ public class SchoolRegionController extends BaseController{
     @PostMapping
     @ApiOperation("新增驾校训练场")
     public Response<Integer> add(@RequestBody SchoolRegion schoolRegion){
-        return toResponse(schoolRegionService.insertSchoolRegion(schoolRegion));
+        return toResponse(schoolRegionService.save(schoolRegion) ? 1 : 0);
     }
 
     /**
@@ -100,18 +81,18 @@ public class SchoolRegionController extends BaseController{
     @PutMapping
     @ApiOperation("修改驾校训练场")
     public Response<Integer> edit(@RequestBody SchoolRegion schoolRegion){
-        return toResponse(schoolRegionService.updateSchoolRegion(schoolRegion));
+        return toResponse(schoolRegionService.updateById(schoolRegion) ? 1 : 0);
     }
 
     /**
      * 删除驾校训练场
      */
-	@DeleteMapping("/{ids}")
+    @DeleteMapping("/{ids}")
     @ApiOperation("删除驾校训练场")
     public  Response<Integer> remove(
             @ApiParam(name = "ids", value = "驾校训练场ids参数", required = true)
             @PathVariable Long[] ids
     ){
-        return toResponse(schoolRegionService.deleteSchoolRegionByIds(ids));
+        return toResponse(schoolRegionService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
     }
 }

+ 17 - 148
hzgzpt-service-app/src/main/java/com/miaxis/app/school/domain/SchoolRegion.java

@@ -1,29 +1,27 @@
 package com.miaxis.app.school.domain;
 
-import java.math.BigDecimal;
-
-import com.miaxis.common.core.domain.BaseBusinessEntity;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.miaxis.common.annotation.Excel;
-import com.miaxis.common.core.domain.BaseEntity;
+import com.miaxis.common.core.domain.BaseBusinessEntity;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
 import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
 /**
  * 驾校训练场对象 school_region
  *
  * @author zhangbin
- * @date 2020-12-28
+ * @date 2021-01-14
  */
 @Data
 @TableName("school_region")
 @ApiModel(value = "SchoolRegion", description = "驾校训练场对象 school_region")
-public class SchoolRegion extends BaseBusinessEntity {
+public class SchoolRegion extends BaseBusinessEntity{
     private static final long serialVersionUID = 1L;
 
     /** $column.columnComment */
@@ -103,6 +101,13 @@ public class SchoolRegion extends BaseBusinessEntity {
     @ApiModelProperty(value = "审核状态: 0:待审核 1:同意启用 2:不同意启用")
     private Long flag;
 
+    /** $column.columnComment */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "${column.columnComment}", width = 30, dateFormat = "yyyy-MM-dd")
+    @TableField("audit_date")
+    @ApiModelProperty(value = "$column.columnComment")
+    private Date auditDate;
+
     /** 区县编号 */
     @Excel(name = "区县编号")
     @TableField("area_code")
@@ -121,140 +126,4 @@ public class SchoolRegion extends BaseBusinessEntity {
     @ApiModelProperty(value = "纬度")
     private BigDecimal poiLat;
 
-    public void setId(Long id){
-        this.id = id;
-    }
-
-    public Long getId(){
-        return id;
-    }
-    public void setInscode(String inscode){
-        this.inscode = inscode;
-    }
-
-    public String getInscode(){
-        return inscode;
-    }
-    public void setSeq(String seq){
-        this.seq = seq;
-    }
-
-    public String getSeq(){
-        return seq;
-    }
-    public void setName(String name){
-        this.name = name;
-    }
-
-    public String getName(){
-        return name;
-    }
-    public void setAddress(String address){
-        this.address = address;
-    }
-
-    public String getAddress(){
-        return address;
-    }
-    public void setArea(Long area){
-        this.area = area;
-    }
-
-    public Long getArea(){
-        return area;
-    }
-    public void setType(Long type){
-        this.type = type;
-    }
-
-    public Long getType(){
-        return type;
-    }
-    public void setVehicletype(String vehicletype){
-        this.vehicletype = vehicletype;
-    }
-
-    public String getVehicletype(){
-        return vehicletype;
-    }
-    public void setPolygon(String polygon){
-        this.polygon = polygon;
-    }
-
-    public String getPolygon(){
-        return polygon;
-    }
-    public void setTotalvehnum(Long totalvehnum){
-        this.totalvehnum = totalvehnum;
-    }
-
-    public Long getTotalvehnum(){
-        return totalvehnum;
-    }
-    public void setCurvehnum(Long curvehnum){
-        this.curvehnum = curvehnum;
-    }
-
-    public Long getCurvehnum(){
-        return curvehnum;
-    }
-    public void setStatus(Long status){
-        this.status = status;
-    }
-
-    public Long getStatus(){
-        return status;
-    }
-    public void setFlag(Long flag){
-        this.flag = flag;
-    }
-
-    public Long getFlag(){
-        return flag;
-    }
-    public void setAreaCode(String areaCode){
-        this.areaCode = areaCode;
-    }
-
-    public String getAreaCode(){
-        return areaCode;
-    }
-    public void setPoiLon(BigDecimal poiLon){
-        this.poiLon = poiLon;
-    }
-
-    public BigDecimal getPoiLon(){
-        return poiLon;
-    }
-    public void setPoiLat(BigDecimal poiLat){
-        this.poiLat = poiLat;
-    }
-
-    public BigDecimal getPoiLat(){
-        return poiLat;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("inscode", getInscode())
-            .append("seq", getSeq())
-            .append("name", getName())
-            .append("address", getAddress())
-            .append("area", getArea())
-            .append("type", getType())
-            .append("vehicletype", getVehicletype())
-            .append("polygon", getPolygon())
-            .append("totalvehnum", getTotalvehnum())
-            .append("curvehnum", getCurvehnum())
-            .append("status", getStatus())
-            .append("flag", getFlag())
-            .append("areaCode", getAreaCode())
-            .append("poiLon", getPoiLon())
-            .append("poiLat", getPoiLat())
-            .append("createTime", getCreateTime())
-            .append("updateTime", getUpdateTime())
-            .toString();
-    }
 }

+ 0 - 56
hzgzpt-service-app/src/main/java/com/miaxis/app/school/mapper/SchoolRegionMapper.java

@@ -1,10 +1,7 @@
 package com.miaxis.app.school.mapper;
 
-import java.util.List;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.miaxis.app.school.domain.SchoolRegion;
-import com.miaxis.app.school.dto.SchoolRegionDTO;
-import com.miaxis.app.school.dto.SchoolRegionVO;
 
 /**
  * 驾校训练场Mapper接口
@@ -13,58 +10,5 @@ import com.miaxis.app.school.dto.SchoolRegionVO;
  * @date 2020-12-28
  */
 public interface SchoolRegionMapper extends BaseMapper<SchoolRegion> {
-    /**
-     * 查询驾校训练场
-     *
-     * @param id 驾校训练场ID
-     * @return 驾校训练场
-     */
-    public SchoolRegion selectSchoolRegionById(Long id);
 
-    /**
-     * 查询驾校训练场列表
-     *
-     * @param schoolRegion 驾校训练场
-     * @return 驾校训练场集合
-     */
-    public List<SchoolRegion> selectSchoolRegionList(SchoolRegion schoolRegion);
-
-    /**
-     * 新增驾校训练场
-     *
-     * @param schoolRegion 驾校训练场
-     * @return 结果
-     */
-    public int insertSchoolRegion(SchoolRegion schoolRegion);
-
-    /**
-     * 修改驾校训练场
-     *
-     * @param schoolRegion 驾校训练场
-     * @return 结果
-     */
-    public int updateSchoolRegion(SchoolRegion schoolRegion);
-
-    /**
-     * 删除驾校训练场
-     *
-     * @param id 驾校训练场ID
-     * @return 结果
-     */
-    public int deleteSchoolRegionById(Long id);
-
-    /**
-     * 批量删除驾校训练场
-     *
-     * @param ids 需要删除的数据ID
-     * @return 结果
-     */
-    public int deleteSchoolRegionByIds(Long[] ids);
-
-    /**
-     * 查询驾校训练场列表(图片距离)
-     * @param schoolRegionDTO
-     * @return
-     */
-    List<SchoolRegionVO> selectSchoolRegionUrlList(SchoolRegionDTO schoolRegionDTO);
 }

+ 5 - 55
hzgzpt-service-app/src/main/java/com/miaxis/app/school/service/ISchoolRegionService.java

@@ -1,10 +1,9 @@
 package com.miaxis.app.school.service;
 
-import java.util.List;
-import com.miaxis.app.school.domain.SchoolRegion;
 import com.baomidou.mybatisplus.extension.service.IService;
-import com.miaxis.app.school.dto.SchoolRegionDTO;
-import com.miaxis.app.school.dto.SchoolRegionVO;
+import com.miaxis.app.school.domain.SchoolRegion;
+
+import java.util.List;
 
 /**
  * 驾校训练场Service接口
@@ -13,58 +12,9 @@ import com.miaxis.app.school.dto.SchoolRegionVO;
  * @date 2020-12-28
  */
 public interface ISchoolRegionService extends IService<SchoolRegion>{
-    /**
-     * 查询驾校训练场
-     * 
-     * @param id 驾校训练场ID
-     * @return 驾校训练场
-     */
-    public SchoolRegion selectSchoolRegionById(Long id);
-
-    /**
-     * 查询驾校训练场列表
-     * 
-     * @param schoolRegion 驾校训练场
-     * @return 驾校训练场集合
-     */
-    public List<SchoolRegion> selectSchoolRegionList(SchoolRegion schoolRegion);
-
-    /**
-     * 新增驾校训练场
-     * 
-     * @param schoolRegion 驾校训练场
-     * @return 结果
-     */
-    public int insertSchoolRegion(SchoolRegion schoolRegion);
-
-    /**
-     * 修改驾校训练场
-     * 
-     * @param schoolRegion 驾校训练场
-     * @return 结果
-     */
-    public int updateSchoolRegion(SchoolRegion schoolRegion);
-
-    /**
-     * 批量删除驾校训练场
-     * 
-     * @param ids 需要删除的驾校训练场ID
-     * @return 结果
-     */
-    public int deleteSchoolRegionByIds(Long[] ids);
-
-    /**
-     * 删除驾校训练场信息
-     * 
-     * @param id 驾校训练场ID
-     * @return 结果
-     */
-    public int deleteSchoolRegionById(Long id);
 
     /**
-     *
-     * @param schoolRegionDTO
-     * @return
+     * 查询列表
      */
-    public List<SchoolRegionVO> selectSchoolRegionUrlList(SchoolRegionDTO schoolRegionDTO);
+    List<SchoolRegion> queryList(SchoolRegion schoolRegion);
 }

+ 59 - 82
hzgzpt-service-app/src/main/java/com/miaxis/app/school/service/impl/SchoolRegionServiceImpl.java

@@ -1,17 +1,17 @@
 package com.miaxis.app.school.service.impl;
 
-import java.util.List;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.miaxis.app.school.domain.SchoolRegion;
-import com.miaxis.app.school.dto.SchoolRegionDTO;
-import com.miaxis.app.school.dto.SchoolRegionVO;
 import com.miaxis.app.school.mapper.SchoolRegionMapper;
-import com.miaxis.app.school.domain.SchoolRegion;
 import com.miaxis.app.school.service.ISchoolRegionService;
-import com.miaxis.common.utils.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
+import java.util.List;
+
 /**
  * 驾校训练场Service业务层处理
  *
@@ -20,84 +20,61 @@ import org.springframework.stereotype.Service;
  */
 @Service
 public class SchoolRegionServiceImpl extends ServiceImpl<SchoolRegionMapper, SchoolRegion> implements ISchoolRegionService {
-    @Autowired
-    private SchoolRegionMapper schoolRegionMapper;
-
-    /**
-     * 查询驾校训练场
-     *
-     * @param id 驾校训练场ID
-     * @return 驾校训练场
-     */
-    @Override
-    public SchoolRegion selectSchoolRegionById(Long id){
-        return schoolRegionMapper.selectSchoolRegionById(id);
-    }
-
-    /**
-     * 查询驾校训练场列表
-     *
-     * @param schoolRegion 驾校训练场
-     * @return 驾校训练场
-     */
-    @Override
-    public List<SchoolRegion> selectSchoolRegionList(SchoolRegion schoolRegion){
-        return schoolRegionMapper.selectSchoolRegionList(schoolRegion);
-    }
 
-    /**
-     * 新增驾校训练场
-     *
-     * @param schoolRegion 驾校训练场
-     * @return 结果
-     */
-    @Override
-    public int insertSchoolRegion(SchoolRegion schoolRegion){
-        schoolRegion.setCreateTime(DateUtils.getNowDate());
-        return schoolRegionMapper.insertSchoolRegion(schoolRegion);
-    }
-
-    /**
-     * 修改驾校训练场
-     *
-     * @param schoolRegion 驾校训练场
-     * @return 结果
-     */
-    @Override
-    public int updateSchoolRegion(SchoolRegion schoolRegion){
-        schoolRegion.setUpdateTime(DateUtils.getNowDate());
-        return schoolRegionMapper.updateSchoolRegion(schoolRegion);
-    }
-
-    /**
-     * 批量删除驾校训练场
-     *
-     * @param ids 需要删除的驾校训练场ID
-     * @return 结果
-     */
-    @Override
-    public int deleteSchoolRegionByIds(Long[] ids){
-        return schoolRegionMapper.deleteSchoolRegionByIds(ids);
-    }
-
-    /**
-     * 删除驾校训练场信息
-     *
-     * @param id 驾校训练场ID
-     * @return 结果
-     */
-    @Override
-    public int deleteSchoolRegionById(Long id){
-        return schoolRegionMapper.deleteSchoolRegionById(id);
-    }
+    @Resource
+    private SchoolRegionMapper schoolRegionMapper;
 
-    /**
-     * 查询驾校训练场列表(图片距离)
-     * @param schoolRegionDTO
-     * @return
-     */
     @Override
-    public List<SchoolRegionVO> selectSchoolRegionUrlList(SchoolRegionDTO schoolRegionDTO) {
-        return schoolRegionMapper.selectSchoolRegionUrlList(schoolRegionDTO);
+    public List<SchoolRegion> queryList(SchoolRegion schoolRegion) {
+        LambdaQueryWrapper<SchoolRegion> lqw = Wrappers.lambdaQuery();
+        if (StringUtils.isNotBlank(schoolRegion.getInscode())){
+            lqw.eq(SchoolRegion::getInscode ,schoolRegion.getInscode());
+        }
+        if (StringUtils.isNotBlank(schoolRegion.getSeq())){
+            lqw.eq(SchoolRegion::getSeq ,schoolRegion.getSeq());
+        }
+        if (StringUtils.isNotBlank(schoolRegion.getName())){
+            lqw.like(SchoolRegion::getName ,schoolRegion.getName());
+        }
+        if (StringUtils.isNotBlank(schoolRegion.getAddress())){
+            lqw.eq(SchoolRegion::getAddress ,schoolRegion.getAddress());
+        }
+        if (schoolRegion.getArea() != null){
+            lqw.eq(SchoolRegion::getArea ,schoolRegion.getArea());
+        }
+        if (schoolRegion.getType() != null){
+            lqw.eq(SchoolRegion::getType ,schoolRegion.getType());
+        }
+        if (StringUtils.isNotBlank(schoolRegion.getVehicletype())){
+            lqw.eq(SchoolRegion::getVehicletype ,schoolRegion.getVehicletype());
+        }
+        if (StringUtils.isNotBlank(schoolRegion.getPolygon())){
+            lqw.eq(SchoolRegion::getPolygon ,schoolRegion.getPolygon());
+        }
+        if (schoolRegion.getTotalvehnum() != null){
+            lqw.eq(SchoolRegion::getTotalvehnum ,schoolRegion.getTotalvehnum());
+        }
+        if (schoolRegion.getCurvehnum() != null){
+            lqw.eq(SchoolRegion::getCurvehnum ,schoolRegion.getCurvehnum());
+        }
+        if (schoolRegion.getStatus() != null){
+            lqw.eq(SchoolRegion::getStatus ,schoolRegion.getStatus());
+        }
+        if (schoolRegion.getFlag() != null){
+            lqw.eq(SchoolRegion::getFlag ,schoolRegion.getFlag());
+        }
+        if (schoolRegion.getAuditDate() != null){
+            lqw.eq(SchoolRegion::getAuditDate ,schoolRegion.getAuditDate());
+        }
+        if (StringUtils.isNotBlank(schoolRegion.getAreaCode())){
+            lqw.eq(SchoolRegion::getAreaCode ,schoolRegion.getAreaCode());
+        }
+        if (schoolRegion.getPoiLon() != null){
+            lqw.eq(SchoolRegion::getPoiLon ,schoolRegion.getPoiLon());
+        }
+        if (schoolRegion.getPoiLat() != null){
+            lqw.eq(SchoolRegion::getPoiLat ,schoolRegion.getPoiLat());
+        }
+        return this.list(lqw);
     }
 }

+ 2 - 124
hzgzpt-service-app/src/main/resources/mapper/school/SchoolRegionMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.miaxis.app.school.mapper.SchoolRegionMapper">
-    
+
     <resultMap type="SchoolRegion" id="SchoolRegionResult">
         <result property="id"    column="id"    />
         <result property="inscode"    column="inscode"    />
@@ -18,134 +18,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="curvehnum"    column="curvehnum"    />
         <result property="status"    column="status"    />
         <result property="flag"    column="flag"    />
+        <result property="auditDate"    column="audit_date"    />
         <result property="areaCode"    column="area_code"    />
         <result property="poiLon"    column="poi_lon"    />
         <result property="poiLat"    column="poi_lat"    />
         <result property="createTime"    column="create_time"    />
         <result property="updateTime"    column="update_time"    />
     </resultMap>
-
-    <select id="selectSchoolRegionUrlList" parameterType="com.miaxis.app.school.dto.SchoolRegionDTO" resultType="com.miaxis.app.school.dto.SchoolRegionVO">
-        SELECT sr.id,sr.NAME region_name,s.NAME school_name,sr.address,sr.create_time,sr.update_time,sr.poi_lon lon,sr.poi_lat lat,
-        sr.area,sr.type,sr.vehicletype,sr.totalvehnum,sr.curvehnum,sr.poi_lon,sr.poi_lat,sri.url,
-        (2 * 6378.137 * ASIN(SQRT(POW( SIN( PI( ) * ( #{lon}- sr.poi_lon ) / 360 ), 2 ) + COS( PI( ) * 30.186584 / 180 ) * COS( #{lat} * PI( ) / 180 ) * POW( SIN( PI( ) * ( #{lat}- sr.poi_lat ) / 360 ), 2 )) ) ) AS distance
-        FROM school_region sr
-        left JOIN school_info s ON sr.inscode = s.inscode
-        left join school_region_images sri on sr.id = sri. region_id
-        <where>
-            <if test="areaCode != null  and areaCode != ''"> and area_code = #{areaCode}</if>
-        </where>
-        order by distance desc
-    </select>
-
-
-    <sql id="selectSchoolRegionVo">
-        select id, inscode, seq, name, address, area, type, vehicletype, polygon, totalvehnum, curvehnum, status, flag, area_code, poi_lon, poi_lat, create_time, update_time from school_region
-    </sql>
-
-    <select id="selectSchoolRegionList" parameterType="SchoolRegion" resultMap="SchoolRegionResult">
-        <include refid="selectSchoolRegionVo"/>
-        <where>  
-            <if test="inscode != null  and inscode != ''"> and inscode = #{inscode}</if>
-            <if test="seq != null  and seq != ''"> and seq = #{seq}</if>
-            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
-            <if test="address != null  and address != ''"> and address = #{address}</if>
-            <if test="area != null "> and area = #{area}</if>
-            <if test="type != null "> and type = #{type}</if>
-            <if test="vehicletype != null  and vehicletype != ''"> and vehicletype = #{vehicletype}</if>
-            <if test="polygon != null  and polygon != ''"> and polygon = #{polygon}</if>
-            <if test="totalvehnum != null "> and totalvehnum = #{totalvehnum}</if>
-            <if test="curvehnum != null "> and curvehnum = #{curvehnum}</if>
-            <if test="status != null "> and status = #{status}</if>
-            <if test="flag != null "> and flag = #{flag}</if>
-            <if test="areaCode != null  and areaCode != ''"> and area_code = #{areaCode}</if>
-            <if test="poiLon != null "> and poi_lon = #{poiLon}</if>
-            <if test="poiLat != null "> and poi_lat = #{poiLat}</if>
-        </where>
-    </select>
-    
-    <select id="selectSchoolRegionById" parameterType="Long" resultMap="SchoolRegionResult">
-        <include refid="selectSchoolRegionVo"/>
-        where id = #{id}
-    </select>
-        
-    <insert id="insertSchoolRegion" parameterType="SchoolRegion">
-        insert into school_region
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id != null">id,</if>
-            <if test="inscode != null">inscode,</if>
-            <if test="seq != null">seq,</if>
-            <if test="name != null">name,</if>
-            <if test="address != null">address,</if>
-            <if test="area != null">area,</if>
-            <if test="type != null">type,</if>
-            <if test="vehicletype != null">vehicletype,</if>
-            <if test="polygon != null">polygon,</if>
-            <if test="totalvehnum != null">totalvehnum,</if>
-            <if test="curvehnum != null">curvehnum,</if>
-            <if test="status != null">status,</if>
-            <if test="flag != null">flag,</if>
-            <if test="areaCode != null">area_code,</if>
-            <if test="poiLon != null">poi_lon,</if>
-            <if test="poiLat != null">poi_lat,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="updateTime != null">update_time,</if>
-         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="id != null">#{id},</if>
-            <if test="inscode != null">#{inscode},</if>
-            <if test="seq != null">#{seq},</if>
-            <if test="name != null">#{name},</if>
-            <if test="address != null">#{address},</if>
-            <if test="area != null">#{area},</if>
-            <if test="type != null">#{type},</if>
-            <if test="vehicletype != null">#{vehicletype},</if>
-            <if test="polygon != null">#{polygon},</if>
-            <if test="totalvehnum != null">#{totalvehnum},</if>
-            <if test="curvehnum != null">#{curvehnum},</if>
-            <if test="status != null">#{status},</if>
-            <if test="flag != null">#{flag},</if>
-            <if test="areaCode != null">#{areaCode},</if>
-            <if test="poiLon != null">#{poiLon},</if>
-            <if test="poiLat != null">#{poiLat},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="updateTime != null">#{updateTime},</if>
-         </trim>
-    </insert>
-
-    <update id="updateSchoolRegion" parameterType="SchoolRegion">
-        update school_region
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="inscode != null">inscode = #{inscode},</if>
-            <if test="seq != null">seq = #{seq},</if>
-            <if test="name != null">name = #{name},</if>
-            <if test="address != null">address = #{address},</if>
-            <if test="area != null">area = #{area},</if>
-            <if test="type != null">type = #{type},</if>
-            <if test="vehicletype != null">vehicletype = #{vehicletype},</if>
-            <if test="polygon != null">polygon = #{polygon},</if>
-            <if test="totalvehnum != null">totalvehnum = #{totalvehnum},</if>
-            <if test="curvehnum != null">curvehnum = #{curvehnum},</if>
-            <if test="status != null">status = #{status},</if>
-            <if test="flag != null">flag = #{flag},</if>
-            <if test="areaCode != null">area_code = #{areaCode},</if>
-            <if test="poiLon != null">poi_lon = #{poiLon},</if>
-            <if test="poiLat != null">poi_lat = #{poiLat},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="updateTime != null">update_time = #{updateTime},</if>
-        </trim>
-        where id = #{id}
-    </update>
-
-    <delete id="deleteSchoolRegionById" parameterType="Long">
-        delete from school_region where id = #{id}
-    </delete>
-
-    <delete id="deleteSchoolRegionByIds" parameterType="String">
-        delete from school_region where id in 
-        <foreach item="id" collection="array" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </delete>
     
 </mapper>

+ 1 - 1
hzgzpt-service-app/src/main/resources/mapper/user/UserRegisterMapper.xml

@@ -2,7 +2,7 @@
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.miaxis.system.mapper.UserRegisterMapper">
+<mapper namespace="com.miaxis.app.user.mapper.UserRegisterMapper">
     
     <resultMap type="UserRegister" id="UserRegisterResult">
         <result property="id"    column="id"    />