Commit 7ba96686 authored by m1991's avatar m1991

资讯模块——邀请码过滤特殊字符功能功能修复

parent 77206465
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
<module>wisenergy-service</module> <module>wisenergy-service</module>
<!--<module>wisenergy-shiro</module>--> <!--<module>wisenergy-shiro</module>-->
<module>wisenergy-web-admin</module> <module>wisenergy-web-admin</module>
<module>wisenergy-system</module>
</modules> </modules>
<!--POM属性变量--> <!--POM属性变量-->
......
package cn.wisenergy.common.config;
/**
* Created by m1991 on 2021/3/10 17:27
*/
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.multipart.MultipartResolver;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
@Configuration
public class UploadConfig {
//显示声明CommonsMultipartResolver为mutipartResolver
@Bean(name = "multipartResolver")
public MultipartResolver multipartResolver() {
CommonsMultipartResolver resolver = new CommonsMultipartResolver();
resolver.setDefaultEncoding("UTF-8");
//resolveLazily属性启用是为了推迟文件解析,以在在UploadAction中捕获文件大小异常
resolver.setResolveLazily(true);
resolver.setMaxInMemorySize(40960);
//上传文件大小 5M 5*1024*1024
resolver.setMaxUploadSize(5 * 1024 * 1024);
return resolver;
}
}
package cn.wisenergy.mapper; //package cn.wisenergy.mapper;
//
//
import cn.wisenergy.model.app.SmsLog; //import cn.wisenergy.model.app.SmsLog;
import org.apache.ibatis.annotations.Param; //import org.apache.ibatis.annotations.Param;
//
import java.util.List; //import java.util.List;
import java.util.Map; //import java.util.Map;
//
public interface SmsLogMapper { //public interface SmsLogMapper {
//
public SmsLog getSmsLogById(@Param(value = "id") Long id); // public SmsLog getSmsLogById(@Param(value = "id") Long id);
//
public List<SmsLog> getSmsLogListByMap(Map<String, Object> param); // public List<SmsLog> getSmsLogListByMap(Map<String, Object> param);
//
public Integer getSmsLogCountByMap(Map<String, Object> param); // public Integer getSmsLogCountByMap(Map<String, Object> param);
//
public Integer insertSmsLog(SmsLog smsLog); // public Integer insertSmsLog(SmsLog smsLog);
//
public Integer updateSmsLog(SmsLog smsLog); // public Integer updateSmsLog(SmsLog smsLog);
//
public Integer deleteSmsLogById(@Param(value = "id") Long id); // public Integer deleteSmsLogById(@Param(value = "id") Long id);
//
public Integer batchDeleteSmsLog(Map<String, List<String>> params); // public Integer batchDeleteSmsLog(Map<String, List<String>> params);
//
} //}
This diff is collapsed.
package cn.wisenergy.service.app.impl; //package cn.wisenergy.service.app.impl;
//
import cn.wisenergy.mapper.SmsLogMapper; //import cn.wisenergy.mapper.SmsLogMapper;
import cn.wisenergy.model.app.SmsLog; //import cn.wisenergy.model.app.SmsLog;
import cn.wisenergy.service.app.SmsLogService; //import cn.wisenergy.service.app.SmsLogService;
import cn.wisenergy.model.app.Page; //import cn.wisenergy.model.app.Page;
import org.springframework.beans.factory.annotation.Autowired; //import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; //import org.springframework.stereotype.Service;
import java.util.Date; //import java.util.Date;
import java.util.List; //import java.util.List;
import java.util.Map; //import java.util.Map;
import java.util.ArrayList; //import java.util.ArrayList;
import java.util.HashMap; //import java.util.HashMap;
@Service //@Service
public class SmsLogServiceImpl implements SmsLogService { //public class SmsLogServiceImpl implements SmsLogService {
//
@Autowired // @Autowired
private SmsLogMapper smsLogMapper; // private SmsLogMapper smsLogMapper;
//
public SmsLog getSmsLogById(Long id){ // public SmsLog getSmsLogById(Long id){
return smsLogMapper.getSmsLogById(id); // return smsLogMapper.getSmsLogById(id);
} // }
//
public List<SmsLog> getSmsLogListByMap(Map<String,Object> param){ // public List<SmsLog> getSmsLogListByMap(Map<String,Object> param){
return smsLogMapper.getSmsLogListByMap(param); // return smsLogMapper.getSmsLogListByMap(param);
} // }
//
public Integer getSmsLogCountByMap(Map<String,Object> param){ // public Integer getSmsLogCountByMap(Map<String,Object> param){
return smsLogMapper.getSmsLogCountByMap(param); // return smsLogMapper.getSmsLogCountByMap(param);
} // }
//
public Integer qdtxAddSmsLog(SmsLog smsLog){ // public Integer qdtxAddSmsLog(SmsLog smsLog){
smsLog.setCreatdTime(new Date()); // smsLog.setCreatdTime(new Date());
return smsLogMapper.insertSmsLog(smsLog); // return smsLogMapper.insertSmsLog(smsLog);
} // }
//
public Integer qdtxModifySmsLog(SmsLog smsLog){ // public Integer qdtxModifySmsLog(SmsLog smsLog){
smsLog.setUpdatedTime(new Date()); // smsLog.setUpdatedTime(new Date());
return smsLogMapper.updateSmsLog(smsLog); // return smsLogMapper.updateSmsLog(smsLog);
} // }
//
public Integer qdtxDeleteSmsLogById(Long id){ // public Integer qdtxDeleteSmsLogById(Long id){
return smsLogMapper.deleteSmsLogById(id); // return smsLogMapper.deleteSmsLogById(id);
} // }
//
public Integer qdtxBatchDeleteSmsLog(String ids){ // public Integer qdtxBatchDeleteSmsLog(String ids){
Map<String,List<String>> param=new HashMap<String,List<String>>(); // Map<String,List<String>> param=new HashMap<String,List<String>>();
String[] paramArrays=ids.split(","); // String[] paramArrays=ids.split(",");
List<String> idList=new ArrayList<String>(); // List<String> idList=new ArrayList<String>();
for (String temp:paramArrays){ // for (String temp:paramArrays){
idList.add(temp); // idList.add(temp);
} // }
param.put("ids",idList); // param.put("ids",idList);
return smsLogMapper.batchDeleteSmsLog(param); // return smsLogMapper.batchDeleteSmsLog(param);
} // }
//
public Page<SmsLog> querySmsLogPageByMap(Map<String,Object> param,Integer pageNo,Integer pageSize){ // public Page<SmsLog> querySmsLogPageByMap(Map<String,Object> param,Integer pageNo,Integer pageSize){
Integer total = smsLogMapper.getSmsLogCountByMap(param); // Integer total = smsLogMapper.getSmsLogCountByMap(param);
Page page = new Page(pageNo, pageSize, total); // Page page = new Page(pageNo, pageSize, total);
param.put("beginPos", page.getBeginPos()); // param.put("beginPos", page.getBeginPos());
param.put("pageSize", page.getPageSize()); // param.put("pageSize", page.getPageSize());
List<SmsLog> smsLogList = smsLogMapper.getSmsLogListByMap(param); // List<SmsLog> smsLogList = smsLogMapper.getSmsLogListByMap(param);
page.setList(smsLogList); // page.setList(smsLogList);
return page; // return page;
} // }
//
//
@Override // @Override
public void sendMessage(String phone, Integer codeType, Long uId) { // public void sendMessage(String phone, Integer codeType, Long uId) {
//
} // }
} //}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment