Althars123 4 лет назад
Родитель
Сommit
f7b9dcd35f

+ 0 - 116
hzgzpt-admin/src/main/java/com/miaxis/app/controller/area/AreaCodeController.java

@@ -1,116 +0,0 @@
-package com.miaxis.app.controller.area;
-
-import com.miaxis.common.constant.Constants;
-import java.util.List;
-import io.swagger.annotations.*;
-import com.miaxis.common.core.domain.Response;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.bind.annotation.ModelAttribute;
-import com.miaxis.common.annotation.Log;
-import com.miaxis.common.core.controller.BaseController;
-import com.miaxis.common.enums.BusinessTypeEnum;
-import com.miaxis.app.area.domain.AreaCode;
-import com.miaxis.app.area.service.IAreaCodeService;
-import com.miaxis.common.utils.poi.ExcelUtil;
-import com.miaxis.common.core.page.ResponsePageInfo;
-
-/**
- * 【区域编码】Controller
- *
- * @author zhangbin
- * @date 2020-12-28
- */
-@RestController
-@RequestMapping("/area/code")
-@Api(tags={"【app-区域编码】"})
-public class AreaCodeController extends BaseController{
-    @Autowired
-    private IAreaCodeService areaCodeService;
-
-    /**
-     * 查询区域编码列表
-     */
-    //@PreAuthorize("@ss.hasPermi('area:code:list')")
-    @GetMapping("/list")
-    @ApiOperation("查询区域编码列表")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "pageNum",value = "当前页码" ,dataType = "int", paramType = "query", required = false),
-            @ApiImplicitParam(name = "pageSize",value = "每页数据量" , dataType = "int", paramType = "query", required = false),
-    })
-    public ResponsePageInfo<AreaCode> list(@ModelAttribute AreaCode areaCode){
-        startPage();
-        List<AreaCode> list = areaCodeService.selectAreaCodeList(areaCode);
-        return toResponsePageInfo(list);
-    }
-
-    /**
-     * 导出区域编码列表
-     */
-   // @PreAuthorize("@ss.hasPermi('area:code:export')")
-    @Log(title = "区域编码", businessType = BusinessTypeEnum.EXPORT)
-    @GetMapping("/export")
-    @ApiOperation("导出区域编码列表Excel")
-    public Response<String> export(@ModelAttribute AreaCode areaCode){
-        List<AreaCode> list = areaCodeService.selectAreaCodeList(areaCode);
-        ExcelUtil<AreaCode> util = new ExcelUtil<AreaCode>(AreaCode.class);
-        return util.exportExcel(list, "code");
-    }
-
-    /**
-     * 获取区域编码详细信息
-     */
-    //@PreAuthorize("@ss.hasPermi('area:code:query')")
-    @GetMapping(value = "/{code}")
-    @ApiOperation("获取区域编码详细信息")
-    public Response<AreaCode> getInfo(
-            @ApiParam(name = "code", value = "区域编码参数", required = true)
-            @PathVariable("code") String code
-    ){
-        return Response.success(areaCodeService.selectAreaCodeById(code));
-    }
-
-    /**
-     * 新增区域编码
-     */
-    //@PreAuthorize("@ss.hasPermi('area:code:add')")
-    @Log(title = "区域编码", businessType = BusinessTypeEnum.INSERT)
-    @PostMapping
-    @ApiOperation("新增区域编码")
-    public Response<Integer> add(@RequestBody AreaCode areaCode){
-        return toResponse(areaCodeService.insertAreaCode(areaCode));
-    }
-
-    /**
-     * 修改区域编码
-     */
-    //@PreAuthorize("@ss.hasPermi('area:code:edit')")
-    @Log(title = "区域编码", businessType = BusinessTypeEnum.UPDATE)
-    @PutMapping
-    @ApiOperation("修改区域编码")
-    public Response<Integer> edit(@RequestBody AreaCode areaCode){
-        return toResponse(areaCodeService.updateAreaCode(areaCode));
-    }
-
-    /**
-     * 删除区域编码
-     */
-    //@PreAuthorize("@ss.hasPermi('area:code:remove')")
-    @Log(title = "区域编码", businessType = BusinessTypeEnum.DELETE)
-	@DeleteMapping("/{codes}")
-    @ApiOperation("删除区域编码")
-    public  Response<Integer> remove(
-            @ApiParam(name = "codes", value = "区域编码ids参数", required = true)
-            @PathVariable String[] codes
-    ){
-        return toResponse(areaCodeService.deleteAreaCodeByIds(codes));
-    }
-}

+ 8 - 17
hzgzpt-admin/src/main/java/com/miaxis/app/controller/news/NewsInfoController.java

@@ -1,28 +1,19 @@
 package com.miaxis.app.controller.news;
 
-import java.util.List;
-
 import com.miaxis.app.news.domain.NewsInfo;
 import com.miaxis.app.news.service.INewsInfoService;
+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 com.miaxis.common.core.domain.Response;
-import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.bind.annotation.ModelAttribute;
-import com.miaxis.common.annotation.Log;
-import com.miaxis.common.core.controller.BaseController;
-import com.miaxis.common.enums.BusinessTypeEnum;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
 
 /**
  * 【新闻(首页资讯、通知、公告相关)】Controller
@@ -32,7 +23,7 @@ import com.miaxis.common.enums.BusinessTypeEnum;
  */
 @RestController
 @RequestMapping(Constants.OPEN_PREFIX+"/system/info")
-@Api(tags={"【新闻(首页资讯、通知、公告相关)】Controller"})
+@Api(tags={"【app-新闻(首页资讯、通知、公告相关)】"})
 public class NewsInfoController extends BaseController{
     @Autowired
     private INewsInfoService newsInfoService;

+ 1 - 3
hzgzpt-admin/src/main/java/com/miaxis/app/controller/user/UserInfoController.java

@@ -5,14 +5,12 @@ import com.miaxis.app.user.service.IUserInfoService;
 import com.miaxis.app.user.vo.UserVo;
 import com.miaxis.common.aliyunOSS.AliyunConfig;
 import com.miaxis.common.aliyunOSS.AliyunUpload;
-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.domain.entity.SysUser;
 import com.miaxis.common.core.domain.entity.UserInfo;
 import com.miaxis.common.core.page.ResponsePageInfo;
-import com.miaxis.common.enums.BusinessTypeEnum;
 import com.miaxis.common.utils.SecurityUtils;
 import io.swagger.annotations.*;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -34,7 +32,7 @@ import java.util.Map;
  */
 @RestController
 @RequestMapping(Constants.OPEN_PREFIX+"/user/info")
-@Api(tags={"【普通用户信息】Controller"})
+@Api(tags={"【app-普通用户信息】"})
 public class UserInfoController extends BaseController{
 
     @Autowired

+ 27 - 1
hzgzpt-admin/src/main/java/com/miaxis/system/controller/system/SysLoginController.java

@@ -1,5 +1,7 @@
 package com.miaxis.system.controller.system;
 
+import com.miaxis.app.sms.ISmsService;
+import com.miaxis.app.sms.domain.SmsParameter;
 import com.miaxis.common.core.domain.Response;
 import com.miaxis.common.core.domain.entity.SysMenu;
 import com.miaxis.common.core.domain.entity.SysUser;
@@ -17,6 +19,8 @@ import com.miaxis.system.dto.system.TokenDTO;
 import com.miaxis.system.dto.system.UserInfoDTO;
 import com.miaxis.system.service.ISysMenuService;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -48,6 +52,9 @@ public class SysLoginController
     @Autowired
     private TokenService tokenService;
 
+    @Autowired
+    private ISmsService smsService;
+
     /**
      * 登录方法 (含验证码)
      *
@@ -97,12 +104,31 @@ public class SysLoginController
         return Response.success(tokenDTO);
     }
 
+
+
+    /**
+     * 学员用户名密码登录方法
+     *
+     * @return 结果
+     */
+    @PostMapping("/login/studentMobileCode")
+    @ApiOperation("获取学员手机验证码")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mobile",value = "学员手机验证码" ,dataType = "int", paramType = "query", required = false)
+    })
+    public Response studentMobileCode(String mobile) {
+        SmsParameter smsParameter = new SmsParameter();
+        smsParameter.setPhone(mobile);
+        smsParameter.setType("login");
+        smsService.sendVerificationCode(smsParameter);
+        return Response.success();
+    }
     /**
      * 学员用户名密码登录方法
      *
      * @return 结果
      */
-    @PostMapping("/login/studentmobile")
+    @PostMapping("/login/studentMobile")
     @ApiOperation("学员手机验证码登录")
     public Response<TokenDTO> loginStudentmobile(@RequestBody LoginBodyMobleCode loginBodyMobleCode)
     {   TokenDTO tokenDTO = new TokenDTO();

+ 1 - 1
hzgzpt-common/src/main/java/com/miaxis/common/enums/StudentLoginTypeEnum.java

@@ -1,7 +1,7 @@
 package com.miaxis.common.enums;
 
 /**
- * 用户状态
+ * 用户登录类型
  *
  * @author miaxis
  */

+ 13 - 1
hzgzpt-framework/src/main/java/com/miaxis/framework/config/SecurityConfig.java

@@ -3,10 +3,13 @@ package com.miaxis.framework.config;
 import com.miaxis.framework.security.filter.JwtAuthenticationTokenFilter;
 import com.miaxis.framework.security.handle.AuthenticationEntryPointImpl;
 import com.miaxis.framework.security.handle.LogoutSuccessHandlerImpl;
+import com.miaxis.framework.security.provider.MobileCodeAuthenticationProvider;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Bean;
 import org.springframework.http.HttpMethod;
 import org.springframework.security.authentication.AuthenticationManager;
+import org.springframework.security.authentication.ProviderManager;
+import org.springframework.security.authentication.dao.DaoAuthenticationProvider;
 import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
 import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
 import org.springframework.security.config.annotation.web.builders.HttpSecurity;
@@ -18,6 +21,8 @@ import org.springframework.security.web.authentication.UsernamePasswordAuthentic
 import org.springframework.security.web.authentication.logout.LogoutFilter;
 import org.springframework.web.filter.CorsFilter;
 
+import java.util.Arrays;
+
 /**
  * spring security配置
  *
@@ -66,6 +71,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
     @Override
     public AuthenticationManager authenticationManagerBean() throws Exception
     {
+
         return super.authenticationManagerBean();
     }
 
@@ -99,7 +105,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
                 // 对于app 开放页面,允许任意访问
                 .antMatchers("/open/**").permitAll()
                 // 对于登录login 验证码captchaImage 允许匿名访问
-                .antMatchers("/login", "/login/noCode","/captchaImage","/login/studentpassword").anonymous()
+                .antMatchers("/login", "/login/noCode","/captchaImage","/login/studentpassword","/login/studentMobileCode","/login/studentMobile").anonymous()
                 .antMatchers(
                         HttpMethod.GET,
                         "/*.html",
@@ -143,6 +149,12 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
     @Override
     protected void configure(AuthenticationManagerBuilder auth) throws Exception
     {
+        DaoAuthenticationProvider daoAuthenticationProvider = new DaoAuthenticationProvider();
+        MobileCodeAuthenticationProvider mobileCodeAuthenticationProvider = new MobileCodeAuthenticationProvider();
+//        daoAuthenticationProvider.setUserDetailsService(userDetailsService);
+//        mobileCodeAuthenticationProvider.setUserDetailsService(userDetailsService);
+        //ProviderManager providerManager = new ProviderManager(Arrays.asList(mobileCodeAuthenticationProvider,daoAuthenticationProvider));
+        auth.authenticationProvider(mobileCodeAuthenticationProvider);
         auth.userDetailsService(userDetailsService).passwordEncoder(bCryptPasswordEncoder());
     }
 }

+ 1 - 0
hzgzpt-framework/src/main/java/com/miaxis/framework/web/exception/GlobalExceptionHandler.java

@@ -42,6 +42,7 @@ public class GlobalExceptionHandler
     @ExceptionHandler(CustomException.class)
     public Response businessException(CustomException e)
     {
+        log.error(e.getMessage(), e);
         if (StringUtils.isNull(e.getCode()))
         {
             return Response.error().setMsg((e.getMessage()));

+ 8 - 1
hzgzpt-framework/src/main/java/com/miaxis/framework/web/service/SysLoginService.java

@@ -9,6 +9,7 @@ import com.miaxis.common.exception.user.CaptchaException;
 import com.miaxis.common.exception.user.CaptchaExpireException;
 import com.miaxis.common.exception.user.UserPasswordNotMatchException;
 import com.miaxis.common.utils.MessageUtils;
+import com.miaxis.common.utils.RedisPrefixUtils;
 import com.miaxis.common.utils.ServletUtils;
 import com.miaxis.common.utils.StringUtils;
 import com.miaxis.framework.manager.AsyncManager;
@@ -38,6 +39,10 @@ public class SysLoginService
     @Resource
     private AuthenticationManager authenticationManager;
 
+//    @Resource
+//    private ProviderManager providerManager;
+
+
     @Autowired
     private RedisCache redisCache;
 
@@ -112,7 +117,7 @@ public class SysLoginService
         if (StringUtils.isEmpty(credential)){
             throw new CustomException("验证码不能为空");
         }
-        String cacheCode = (String) redisTemplate.opsForValue().get(Constants.SMS_LOGIN_CODE + principal);
+        String cacheCode = (String) redisTemplate.opsForValue().get(RedisPrefixUtils.smsRedisPrefix("login", principal));
         if (StringUtils.isEmpty(cacheCode)){
             throw new CustomException("验证码已过期,请重新发送");
         }else if (!credential.equals(cacheCode)){
@@ -124,6 +129,7 @@ public class SysLoginService
          Authentication authentication = null;
         try
         {
+
             // 该方法会去调用UserDetailsServiceImpl.loadUserByUsername
             authentication = authenticationManager
                     .authenticate(authenticationToken);
@@ -137,6 +143,7 @@ public class SysLoginService
             }
             else
             {
+                e.getStackTrace();
                 AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, e.getMessage()));
                 throw new CustomException(e.getMessage());
             }

+ 0 - 103
hzgzpt-service-app/src/main/java/com/miaxis/app/area/domain/AreaCode.java

@@ -1,103 +0,0 @@
-package com.miaxis.app.area.domain;
-
-import com.miaxis.common.core.domain.BaseBusinessEntity;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.miaxis.common.annotation.Excel;
-import com.miaxis.common.core.domain.BaseEntity;
-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;
-/**
- * 区域编码对象 area_code
- *
- * @author zhangbin
- * @date 2020-12-28
- */
-@Data
-@TableName("area_code")
-@ApiModel(value = "AreaCode", description = "区域编码对象 area_code")
-public class AreaCode extends BaseBusinessEntity {
-    private static final long serialVersionUID = 1L;
-
-    /** 区域编码 */
-    @Excel(name = "区域编码")
-    @TableField("code")
-    @ApiModelProperty(value = "区域编码")
-    private String code;
-
-    /** 区域名称 */
-    @Excel(name = "区域名称")
-    @TableField("name")
-    @ApiModelProperty(value = "区域名称")
-    private String name;
-
-    /** 类型 */
-    @Excel(name = "类型")
-    @TableField("type")
-    @ApiModelProperty(value = "类型")
-    private String type;
-
-    /** $column.columnComment */
-    @Excel(name = "类型")
-    @TableField("leaf")
-    @ApiModelProperty(value = "$column.columnComment")
-    private String leaf;
-
-    /** 父编码 */
-    @Excel(name = "父编码")
-    @TableField("parent_code")
-    @ApiModelProperty(value = "父编码")
-    private String parentCode;
-
-    public void setCode(String code){
-        this.code = code;
-    }
-
-    public String getCode(){
-        return code;
-    }
-    public void setName(String name){
-        this.name = name;
-    }
-
-    public String getName(){
-        return name;
-    }
-    public void setType(String type){
-        this.type = type;
-    }
-
-    public String getType(){
-        return type;
-    }
-    public void setLeaf(String leaf){
-        this.leaf = leaf;
-    }
-
-    public String getLeaf(){
-        return leaf;
-    }
-    public void setParentCode(String parentCode){
-        this.parentCode = parentCode;
-    }
-
-    public String getParentCode(){
-        return parentCode;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("code", getCode())
-            .append("name", getName())
-            .append("type", getType())
-            .append("leaf", getLeaf())
-            .append("parentCode", getParentCode())
-            .toString();
-    }
-}

+ 0 - 61
hzgzpt-service-app/src/main/java/com/miaxis/app/area/mapper/AreaCodeMapper.java

@@ -1,61 +0,0 @@
-package com.miaxis.app.area.mapper;
-
-import java.util.List;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.miaxis.app.area.domain.AreaCode;
-
-/**
- * 区域编码Mapper接口
- *
- * @author zhangbin
- * @date 2020-12-28
- */
-public interface AreaCodeMapper extends BaseMapper<AreaCode> {
-    /**
-     * 查询区域编码
-     *
-     * @param code 区域编码ID
-     * @return 区域编码
-     */
-    public AreaCode selectAreaCodeById(String code);
-
-    /**
-     * 查询区域编码列表
-     *
-     * @param areaCode 区域编码
-     * @return 区域编码集合
-     */
-    public List<AreaCode> selectAreaCodeList(AreaCode areaCode);
-
-    /**
-     * 新增区域编码
-     *
-     * @param areaCode 区域编码
-     * @return 结果
-     */
-    public int insertAreaCode(AreaCode areaCode);
-
-    /**
-     * 修改区域编码
-     *
-     * @param areaCode 区域编码
-     * @return 结果
-     */
-    public int updateAreaCode(AreaCode areaCode);
-
-    /**
-     * 删除区域编码
-     *
-     * @param code 区域编码ID
-     * @return 结果
-     */
-    public int deleteAreaCodeById(String code);
-
-    /**
-     * 批量删除区域编码
-     *
-     * @param codes 需要删除的数据ID
-     * @return 结果
-     */
-    public int deleteAreaCodeByIds(String[] codes);
-}

+ 0 - 61
hzgzpt-service-app/src/main/java/com/miaxis/app/area/service/IAreaCodeService.java

@@ -1,61 +0,0 @@
-package com.miaxis.app.area.service;
-
-import java.util.List;
-import com.miaxis.app.area.domain.AreaCode;
-import com.baomidou.mybatisplus.extension.service.IService;
-
-/**
- * 区域编码Service接口
- * 
- * @author zhangbin
- * @date 2020-12-28
- */
-public interface IAreaCodeService extends IService<AreaCode>{
-    /**
-     * 查询区域编码
-     * 
-     * @param code 区域编码ID
-     * @return 区域编码
-     */
-    public AreaCode selectAreaCodeById(String code);
-
-    /**
-     * 查询区域编码列表
-     * 
-     * @param areaCode 区域编码
-     * @return 区域编码集合
-     */
-    public List<AreaCode> selectAreaCodeList(AreaCode areaCode);
-
-    /**
-     * 新增区域编码
-     * 
-     * @param areaCode 区域编码
-     * @return 结果
-     */
-    public int insertAreaCode(AreaCode areaCode);
-
-    /**
-     * 修改区域编码
-     * 
-     * @param areaCode 区域编码
-     * @return 结果
-     */
-    public int updateAreaCode(AreaCode areaCode);
-
-    /**
-     * 批量删除区域编码
-     * 
-     * @param codes 需要删除的区域编码ID
-     * @return 结果
-     */
-    public int deleteAreaCodeByIds(String[] codes);
-
-    /**
-     * 删除区域编码信息
-     * 
-     * @param code 区域编码ID
-     * @return 结果
-     */
-    public int deleteAreaCodeById(String code);
-}

+ 0 - 87
hzgzpt-service-app/src/main/java/com/miaxis/app/area/service/impl/AreaCodeServiceImpl.java

@@ -1,87 +0,0 @@
-package com.miaxis.app.area.service.impl;
-
-import java.util.List;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.miaxis.app.area.mapper.AreaCodeMapper;
-import com.miaxis.app.area.domain.AreaCode;
-import com.miaxis.app.area.service.IAreaCodeService;
-
-/**
- * 区域编码Service业务层处理
- *
- * @author zhangbin
- * @date 2020-12-28
- */
-@Service
-public class AreaCodeServiceImpl extends ServiceImpl<AreaCodeMapper, AreaCode> implements IAreaCodeService {
-    @Autowired
-    private AreaCodeMapper areaCodeMapper;
-
-    /**
-     * 查询区域编码
-     *
-     * @param code 区域编码ID
-     * @return 区域编码
-     */
-    @Override
-    public AreaCode selectAreaCodeById(String code){
-        return areaCodeMapper.selectAreaCodeById(code);
-    }
-
-    /**
-     * 查询区域编码列表
-     *
-     * @param areaCode 区域编码
-     * @return 区域编码
-     */
-    @Override
-    public List<AreaCode> selectAreaCodeList(AreaCode areaCode){
-        return areaCodeMapper.selectAreaCodeList(areaCode);
-    }
-
-    /**
-     * 新增区域编码
-     *
-     * @param areaCode 区域编码
-     * @return 结果
-     */
-    @Override
-    public int insertAreaCode(AreaCode areaCode){
-        return areaCodeMapper.insertAreaCode(areaCode);
-    }
-
-    /**
-     * 修改区域编码
-     *
-     * @param areaCode 区域编码
-     * @return 结果
-     */
-    @Override
-    public int updateAreaCode(AreaCode areaCode){
-        return areaCodeMapper.updateAreaCode(areaCode);
-    }
-
-    /**
-     * 批量删除区域编码
-     *
-     * @param codes 需要删除的区域编码ID
-     * @return 结果
-     */
-    @Override
-    public int deleteAreaCodeByIds(String[] codes){
-        return areaCodeMapper.deleteAreaCodeByIds(codes);
-    }
-
-    /**
-     * 删除区域编码信息
-     *
-     * @param code 区域编码ID
-     * @return 结果
-     */
-    @Override
-    public int deleteAreaCodeById(String code){
-        return areaCodeMapper.deleteAreaCodeById(code);
-    }
-}

+ 0 - 75
hzgzpt-service-app/src/main/resources/mapper/area/AreaCodeMapper.xml

@@ -1,75 +0,0 @@
-<?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.miaxis.app.area.mapper.AreaCodeMapper">
-    
-    <resultMap type="AreaCode" id="AreaCodeResult">
-        <result property="code"    column="code"    />
-        <result property="name"    column="name"    />
-        <result property="type"    column="type"    />
-        <result property="leaf"    column="leaf"    />
-        <result property="parentCode"    column="parent_code"    />
-    </resultMap>
-
-    <sql id="selectAreaCodeVo">
-        select code, name, type, leaf, parent_code from area_code
-    </sql>
-
-    <select id="selectAreaCodeList" parameterType="AreaCode" resultMap="AreaCodeResult">
-        <include refid="selectAreaCodeVo"/>
-        <where>  
-            <if test="code != null  and code != ''"> and code = #{code}</if>
-            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
-            <if test="type != null  and type != ''"> and type = #{type}</if>
-            <if test="leaf != null  and leaf != ''"> and leaf = #{leaf}</if>
-            <if test="parentCode != null  and parentCode != ''"> and parent_code = #{parentCode}</if>
-        </where>
-    </select>
-    
-    <select id="selectAreaCodeById" parameterType="String" resultMap="AreaCodeResult">
-        <include refid="selectAreaCodeVo"/>
-        where code = #{code}
-    </select>
-        
-    <insert id="insertAreaCode" parameterType="AreaCode">
-        insert into area_code
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="code != null and code != ''">code,</if>
-            <if test="name != null">name,</if>
-            <if test="type != null">type,</if>
-            <if test="leaf != null">leaf,</if>
-            <if test="parentCode != null">parent_code,</if>
-         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="code != null and code != ''">#{code},</if>
-            <if test="name != null">#{name},</if>
-            <if test="type != null">#{type},</if>
-            <if test="leaf != null">#{leaf},</if>
-            <if test="parentCode != null">#{parentCode},</if>
-         </trim>
-    </insert>
-
-    <update id="updateAreaCode" parameterType="AreaCode">
-        update area_code
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="name != null">name = #{name},</if>
-            <if test="type != null">type = #{type},</if>
-            <if test="leaf != null">leaf = #{leaf},</if>
-            <if test="parentCode != null">parent_code = #{parentCode},</if>
-        </trim>
-        where code = #{code}
-    </update>
-
-    <delete id="deleteAreaCodeById" parameterType="String">
-        delete from area_code where code = #{code}
-    </delete>
-
-    <delete id="deleteAreaCodeByIds" parameterType="String">
-        delete from area_code where code in 
-        <foreach item="code" collection="array" open="(" separator="," close=")">
-            #{code}
-        </foreach>
-    </delete>
-    
-</mapper>