Commit dde01f6e authored by 赵啸非's avatar 赵啸非

统计部门入驻事项

parent 0c722e91
...@@ -47,17 +47,6 @@ public class FilterConfig { ...@@ -47,17 +47,6 @@ public class FilterConfig {
return registration; return registration;
} }
@SuppressWarnings({"rawtypes", "unchecked"})
/* @Bean
public FilterRegistrationBean someFilterRegistration() {
FilterRegistrationBean registration = new FilterRegistrationBean();
registration.setFilter(new RepeatableFilter());
registration.addUrlPatterns("/*");
registration.setName("repeatableFilter");
registration.setOrder(FilterRegistrationBean.LOWEST_PRECEDENCE);
return registration;
}*/
@Bean @Bean
public FilterRegistrationBean requestReplaceFilterRegistration() { public FilterRegistrationBean requestReplaceFilterRegistration() {
FilterRegistrationBean registrationBean = new FilterRegistrationBean(); FilterRegistrationBean registrationBean = new FilterRegistrationBean();
......
...@@ -3,17 +3,13 @@ package com.mortals.xhx.busiz.web; ...@@ -3,17 +3,13 @@ package com.mortals.xhx.busiz.web;
import cn.hutool.core.codec.Base64; import cn.hutool.core.codec.Base64;
import cn.hutool.http.HttpUtil; import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.mortals.framework.annotation.TokenBucketLimit;
import com.mortals.framework.annotation.UnAuth; import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo; import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.ParamDto; import com.mortals.framework.model.ParamDto;
import com.mortals.framework.model.Result; import com.mortals.framework.model.Result;
import com.mortals.framework.web.BaseJsonBodyController;
import com.mortals.xhx.common.code.DxTypeEnum;
import com.mortals.xhx.common.code.SourceEnum; import com.mortals.xhx.common.code.SourceEnum;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.keys.RedisCacheKeys;
import com.mortals.xhx.module.business.model.BusinessMatterEntity; import com.mortals.xhx.module.business.model.BusinessMatterEntity;
import com.mortals.xhx.module.business.model.BusinessMatterQuery; import com.mortals.xhx.module.business.model.BusinessMatterQuery;
import com.mortals.xhx.module.business.service.BusinessMatterService; import com.mortals.xhx.module.business.service.BusinessMatterService;
...@@ -22,7 +18,6 @@ import com.mortals.xhx.module.dept.model.DeptQuery; ...@@ -22,7 +18,6 @@ import com.mortals.xhx.module.dept.model.DeptQuery;
import com.mortals.xhx.module.dept.service.DeptService; import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.matter.model.MatterEntity; import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.matter.model.MatterQuery; import com.mortals.xhx.module.matter.model.MatterQuery;
import com.mortals.xhx.module.matter.model.vo.MatterInfo;
import com.mortals.xhx.module.matter.service.MatterService; import com.mortals.xhx.module.matter.service.MatterService;
import com.mortals.xhx.module.site.model.SiteEntity; import com.mortals.xhx.module.site.model.SiteEntity;
import com.mortals.xhx.module.site.model.SiteMatterEntity; import com.mortals.xhx.module.site.model.SiteMatterEntity;
...@@ -30,11 +25,12 @@ import com.mortals.xhx.module.site.model.SiteMatterQuery; ...@@ -30,11 +25,12 @@ import com.mortals.xhx.module.site.model.SiteMatterQuery;
import com.mortals.xhx.module.site.service.SiteMatterService; import com.mortals.xhx.module.site.service.SiteMatterService;
import com.mortals.xhx.module.site.service.SiteThemeMatterService; import com.mortals.xhx.module.site.service.SiteThemeMatterService;
import com.mortals.xhx.module.site.service.SiteThemeService; import com.mortals.xhx.module.site.service.SiteThemeService;
import com.mortals.xhx.module.window.model.*; import com.mortals.xhx.module.window.model.WindowEntity;
import com.mortals.xhx.module.window.service.WindowBusinessService; import com.mortals.xhx.module.window.model.WindowMatterEntity;
import com.mortals.xhx.module.window.model.WindowMatterQuery;
import com.mortals.xhx.module.window.model.WindowQuery;
import com.mortals.xhx.module.window.service.WindowMatterService; import com.mortals.xhx.module.window.service.WindowMatterService;
import com.mortals.xhx.module.window.service.WindowService; import com.mortals.xhx.module.window.service.WindowService;
import lombok.extern.apachecommons.CommonsLog;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.http.HttpResponse; import org.apache.http.HttpResponse;
import org.apache.http.client.CookieStore; import org.apache.http.client.CookieStore;
...@@ -51,12 +47,12 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -51,12 +47,12 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.*; import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static com.mortals.framework.ap.SysConstains.MESSAGE_INFO;
import static com.mortals.framework.ap.SysConstains.PAGEINFO_KEY;
/** /**
* 测试接口 * 测试接口
* *
...@@ -86,6 +82,8 @@ public class DemoWebApiController { ...@@ -86,6 +82,8 @@ public class DemoWebApiController {
private BusinessMatterService businessMatterService; private BusinessMatterService businessMatterService;
@PostMapping(value = "testGov") @PostMapping(value = "testGov")
@UnAuth @UnAuth
public Rest<String> testGov(@RequestBody MatterQuery query) { public Rest<String> testGov(@RequestBody MatterQuery query) {
...@@ -324,6 +322,23 @@ public class DemoWebApiController { ...@@ -324,6 +322,23 @@ public class DemoWebApiController {
} }
@PostMapping(value = "limit")
@UnAuth
@TokenBucketLimit
public Rest<String> limit() {
log.info("limit in");
try {
String tableName="mortals_sys_area";
//CacheDataUtil.getInstance().getBaseData()
return Rest.ok();
} catch (Exception e) {
log.error("异常:", e.getMessage());
return Rest.fail(e.getMessage());
}
}
public static void main(String[] args) { public static void main(String[] args) {
System.out.println(1001 / 500); System.out.println(1001 / 500);
......
...@@ -6,6 +6,7 @@ import com.mortals.framework.service.ICacheService; ...@@ -6,6 +6,7 @@ import com.mortals.framework.service.ICacheService;
import com.mortals.framework.service.ITask; import com.mortals.framework.service.ITask;
import com.mortals.framework.service.ITaskExcuteService; import com.mortals.framework.service.ITaskExcuteService;
import com.mortals.xhx.common.code.SourceEnum; import com.mortals.xhx.common.code.SourceEnum;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.keys.RedisCacheKeys; import com.mortals.xhx.common.keys.RedisCacheKeys;
import com.mortals.xhx.module.dept.model.DeptEntity; import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.model.DeptQuery; import com.mortals.xhx.module.dept.model.DeptQuery;
...@@ -40,6 +41,8 @@ public class StatSiteDeptMatterTaskImpl implements ITaskExcuteService { ...@@ -40,6 +41,8 @@ public class StatSiteDeptMatterTaskImpl implements ITaskExcuteService {
@Autowired @Autowired
private ICacheService cacheService; private ICacheService cacheService;
@Autowired
private SiteMatterService siteMatterService;
@Autowired @Autowired
private SiteThemeService siteThemeService; private SiteThemeService siteThemeService;
...@@ -62,6 +65,15 @@ public class StatSiteDeptMatterTaskImpl implements ITaskExcuteService { ...@@ -62,6 +65,15 @@ public class StatSiteDeptMatterTaskImpl implements ITaskExcuteService {
DeptEntity deptQuery = new DeptEntity(); DeptEntity deptQuery = new DeptEntity();
deptQuery.setTotal(total); deptQuery.setTotal(total);
deptQuery.setUpdateTime(new Date()); deptQuery.setUpdateTime(new Date());
//统计入驻事项
SiteMatterQuery siteMatterQuery = new SiteMatterQuery();
siteMatterQuery.setDeptName(deptEntity.getDeptNumber());
siteMatterQuery.setSource(SourceEnum.政务网.getValue());
siteMatterQuery.setHallCheckIn(YesNoEnum.YES.getValue());
int incount = siteMatterService.count(siteMatterQuery, null);
deptQuery.setInNum(incount);
DeptEntity condition = new DeptEntity(); DeptEntity condition = new DeptEntity();
condition.setId(deptEntity.getId()); condition.setId(deptEntity.getId());
deptService.getDao().update(deptQuery, condition); deptService.getDao().update(deptQuery, condition);
...@@ -72,7 +84,7 @@ public class StatSiteDeptMatterTaskImpl implements ITaskExcuteService { ...@@ -72,7 +84,7 @@ public class StatSiteDeptMatterTaskImpl implements ITaskExcuteService {
Map<String, List<SiteThemeEntity>> collect = siteThemeService.find(new SiteThemeQuery()) Map<String, List<SiteThemeEntity>> collect = siteThemeService.find(new SiteThemeQuery())
.parallelStream() .parallelStream()
.collect(Collectors.groupingBy(x -> x.getSiteId() + "_" + x.getUserType() + "_" + x.getThemeCode() .collect(Collectors.groupingBy(x -> x.getSiteId() + "_" + x.getUserType() + "_" + x.getThemeCode()
)); ));
Iterator<Map.Entry<String, List<SiteThemeEntity>>> iterator = collect.entrySet().iterator(); Iterator<Map.Entry<String, List<SiteThemeEntity>>> iterator = collect.entrySet().iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
Map.Entry<String, List<SiteThemeEntity>> next = iterator.next(); Map.Entry<String, List<SiteThemeEntity>> next = iterator.next();
......
package com.mortals.xhx.module.dept.model; package com.mortals.xhx.module.dept.model;
import java.util.List; import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.mortals.framework.annotation.Excel; import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.dept.model.vo.DeptVo; import com.mortals.xhx.module.dept.model.vo.DeptVo;
import lombok.Data;
/** /**
* 部门实体对象 * 部门实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-03-06 * @date 2024-04-24
*/ */
@Data
public class DeptEntity extends DeptVo { public class DeptEntity extends DeptVo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -44,7 +46,6 @@ public class DeptEntity extends DeptVo { ...@@ -44,7 +46,6 @@ public class DeptEntity extends DeptVo {
/** /**
* 部门电话 * 部门电话
*/ */
@JsonInclude(JsonInclude.Include.ALWAYS)
private String deptTelphone; private String deptTelphone;
/** /**
* 部门编号 * 部门编号
...@@ -90,266 +91,10 @@ public class DeptEntity extends DeptVo { ...@@ -90,266 +91,10 @@ public class DeptEntity extends DeptVo {
* 关联事项数量 * 关联事项数量
*/ */
private Integer total; private Integer total;
public DeptEntity(){}
/**
* 获取 从政务系统来的部门id
* @return String
*/
public String getTid(){
return tid;
}
/**
* 设置 从政务系统来的部门id
* @param tid
*/
public void setTid(String tid){
this.tid = tid;
}
/**
* 获取 从政务系统来的部门name
* @return String
*/
public String getTname(){
return tname;
}
/**
* 设置 从政务系统来的部门name
* @param tname
*/
public void setTname(String tname){
this.tname = tname;
}
/**
* 获取 部门名称
* @return String
*/
public String getName(){
return name;
}
/**
* 设置 部门名称
* @param name
*/
public void setName(String name){
this.name = name;
}
/**
* 获取 从政务系统来的别名
* @return String
*/
public String getSimpleName(){
return simpleName;
}
/**
* 设置 从政务系统来的别名
* @param simpleName
*/
public void setSimpleName(String simpleName){
this.simpleName = simpleName;
}
/**
* 获取 站点ID
* @return Long
*/
public Long getSiteId(){
return siteId;
}
/**
* 设置 站点ID
* @param siteId
*/
public void setSiteId(Long siteId){
this.siteId = siteId;
}
/**
* 获取 部门简称
* @return String
*/
public String getDeptAbb(){
return deptAbb;
}
/**
* 设置 部门简称
* @param deptAbb
*/
public void setDeptAbb(String deptAbb){
this.deptAbb = deptAbb;
}
/**
* 获取 部门电话
* @return String
*/
public String getDeptTelphone(){
return deptTelphone;
}
/**
* 设置 部门电话
* @param deptTelphone
*/
public void setDeptTelphone(String deptTelphone){
this.deptTelphone = deptTelphone;
}
/**
* 获取 部门编号
* @return String
*/
public String getDeptNumber(){
return deptNumber;
}
/**
* 设置 部门编号
* @param deptNumber
*/
public void setDeptNumber(String deptNumber){
this.deptNumber = deptNumber;
}
/**
* 获取 填单机展示 (0.否,1.是)
* @return Integer
*/
public Integer getIsAutotable(){
return isAutotable;
}
/**
* 设置 填单机展示 (0.否,1.是)
* @param isAutotable
*/
public void setIsAutotable(Integer isAutotable){
this.isAutotable = isAutotable;
}
/**
* 获取 预约展示 (0.否,1.是)
* @return Integer
*/
public Integer getIsOrder(){
return isOrder;
}
/**
* 设置 预约展示 (0.否,1.是)
* @param isOrder
*/
public void setIsOrder(Integer isOrder){
this.isOrder = isOrder;
}
/**
* 获取 背靠背展示 (0.否,1.是)
* @return Integer
*/
public Integer getIsBkb(){
return isBkb;
}
/** /**
* 设置 背靠背展示 (0.否,1.是) * 入驻事项数量
* @param isBkb
*/ */
public void setIsBkb(Integer isBkb){ private Integer inNum;
this.isBkb = isBkb;
}
/**
* 获取 办事指南展示 (0.否,1.是)
* @return Integer
*/
public Integer getIsWorkGuide(){
return isWorkGuide;
}
/**
* 设置 办事指南展示 (0.否,1.是)
* @param isWorkGuide
*/
public void setIsWorkGuide(Integer isWorkGuide){
this.isWorkGuide = isWorkGuide;
}
/**
* 获取 是否使用 (0.否,1.是)
* @return Integer
*/
public Integer getUsValid(){
return usValid;
}
/**
* 设置 是否使用 (0.否,1.是)
* @param usValid
*/
public void setUsValid(Integer usValid){
this.usValid = usValid;
}
/**
* 获取 部门电话是否展示 (0.否,1.是)
* @return Integer
*/
public Integer getIsSecphone(){
return isSecphone;
}
/**
* 设置 部门电话是否展示 (0.否,1.是)
* @param isSecphone
*/
public void setIsSecphone(Integer isSecphone){
this.isSecphone = isSecphone;
}
/**
* 获取 是否展示英文 (0.否,1.是)
* @return Integer
*/
public Integer getIsEnglish(){
return isEnglish;
}
/**
* 设置 是否展示英文 (0.否,1.是)
* @param isEnglish
*/
public void setIsEnglish(Integer isEnglish){
this.isEnglish = isEnglish;
}
/**
* 获取 排序
* @return Integer
*/
public Integer getSort(){
return sort;
}
/**
* 设置 排序
* @param sort
*/
public void setSort(Integer sort){
this.sort = sort;
}
/**
* 获取 部门来源
* @return Integer
*/
public Integer getSource(){
return source;
}
/**
* 设置 部门来源
* @param source
*/
public void setSource(Integer source){
this.source = source;
}
/**
* 获取 关联事项数量
* @return Integer
*/
public Integer getTotal(){
return total;
}
/**
* 设置 关联事项数量
* @param total
*/
public void setTotal(Integer total){
this.total = total;
}
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
...@@ -366,65 +111,25 @@ public class DeptEntity extends DeptVo { ...@@ -366,65 +111,25 @@ public class DeptEntity extends DeptVo {
return false; return false;
} }
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",tid:").append(getTid());
sb.append(",tname:").append(getTname());
sb.append(",name:").append(getName());
sb.append(",simpleName:").append(getSimpleName());
sb.append(",siteId:").append(getSiteId());
sb.append(",deptAbb:").append(getDeptAbb());
sb.append(",deptTelphone:").append(getDeptTelphone());
sb.append(",deptNumber:").append(getDeptNumber());
sb.append(",isAutotable:").append(getIsAutotable());
sb.append(",isOrder:").append(getIsOrder());
sb.append(",isBkb:").append(getIsBkb());
sb.append(",isWorkGuide:").append(getIsWorkGuide());
sb.append(",usValid:").append(getUsValid());
sb.append(",isSecphone:").append(getIsSecphone());
sb.append(",isEnglish:").append(getIsEnglish());
sb.append(",sort:").append(getSort());
sb.append(",source:").append(getSource());
sb.append(",total:").append(getTotal());
return sb.toString();
}
public void initAttrValue(){ public void initAttrValue(){
this.tid = "";
this.tid = null;
this.tname = ""; this.tname = "";
this.name = ""; this.name = "";
this.simpleName = ""; this.simpleName = "";
this.siteId = null; this.siteId = null;
this.deptAbb = ""; this.deptAbb = "";
this.deptTelphone = ""; this.deptTelphone = "";
this.deptNumber = ""; this.deptNumber = "";
this.isAutotable = 1; this.isAutotable = 1;
this.isOrder = 1; this.isOrder = 1;
this.isBkb = 1; this.isBkb = 1;
this.isWorkGuide = 1; this.isWorkGuide = 1;
this.usValid = 1; this.usValid = 1;
this.isSecphone = 1; this.isSecphone = 1;
this.isEnglish = 1; this.isEnglish = 1;
this.sort = 0; this.sort = 0;
this.source = 0; this.source = 0;
this.total = 0; this.total = 0;
this.inNum = 0;
} }
} }
\ No newline at end of file
...@@ -51,4 +51,12 @@ public class DeptVo extends BaseEntityLong { ...@@ -51,4 +51,12 @@ public class DeptVo extends BaseEntityLong {
/** 开始 关联事项数量 */ /** 开始 关联事项数量 */
private Integer totalStart; private Integer totalStart;
/**
* 大厅事项入驻(0.否,1.是)
*/
private Integer hallCheckIn;
/** 开始 入驻事项数量 */
private Integer inNumStart;
} }
\ No newline at end of file
...@@ -73,6 +73,11 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic ...@@ -73,6 +73,11 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic
//过滤部门事项数据为0的部门 //过滤部门事项数据为0的部门
query.setTotalStart(1); query.setTotalStart(1);
} }
if (!ObjectUtils.isEmpty(query.getHallCheckIn()) && YesNoEnum.YES.getValue() == query.getHallCheckIn()) {
//过滤部门事项数据为0的部门
query.setInNumStart(1);
}
super.doListBefore(query, model, context); super.doListBefore(query, model, context);
} }
...@@ -176,10 +181,6 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic ...@@ -176,10 +181,6 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic
*/ */
@Override @Override
protected void saveBefore(DeptEntity entity, Map<String, Object> model, Context context) throws AppException { protected void saveBefore(DeptEntity entity, Map<String, Object> model, Context context) throws AppException {
// DeptEntity deptEntity = this.service.selectOne(new DeptQuery().deptNumber(entity.getDeptNumber()));
// if(!ObjectUtils.isEmpty(deptEntity)){
// throw new AppException("部门编码已存在!");
// }
if (entity.newEntity()) { if (entity.newEntity()) {
entity.setSource(SourceEnum.自定义.getValue()); entity.setSource(SourceEnum.自定义.getValue());
......
...@@ -130,10 +130,10 @@ public class MatterExtServiceImpl extends AbstractCRUDServiceImpl<MatterExtDao, ...@@ -130,10 +130,10 @@ public class MatterExtServiceImpl extends AbstractCRUDServiceImpl<MatterExtDao,
for (MatterEntity matterEntity : matterList) { for (MatterEntity matterEntity : matterList) {
Rest<String> rest = matterService.buildMatterDetail(matterEntity, null); Rest<String> rest = matterService.buildMatterDetail(matterEntity, null);
if (rest.getCode() == YesNoEnum.YES.getValue()) { if (rest.getCode() == YesNoEnum.YES.getValue()) {
// log.info("更新详细事项==>{},id===>{},localVersion===>{}", matterEntity.getMatterName(),matterEntity.getId(),matterEntity.getMatterEdition()); // log.info("更新详细事项==>{},id===>{},localVersion===>{}", matterEntity.getMatterName(),matterEntity.getId(),matterEntity.getMatterEdition());
//matterEntity.setUrl(null); //matterEntity.setUrl(null);
matterEntity.setUpdateTime(new Date()); matterEntity.setUpdateTime(new Date());
matterService.update(matterEntity, null); matterService.update(matterEntity, null);
} }
} }
return Rest.ok(); return Rest.ok();
......
...@@ -1063,7 +1063,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter ...@@ -1063,7 +1063,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
if (matterEditionLocal >= matterEditionRemote) { if (matterEditionLocal >= matterEditionRemote) {
//bool = true; //bool = true;
msg = "本地事项版本大于等于远端,不需要更新!!"; msg = "本地事项版本大于等于远端,不需要更新!!";
break; // break;
// return Rest.fail("本地事项版本大于等于远端,不需要更新!"); // return Rest.fail("本地事项版本大于等于远端,不需要更新!");
} }
...@@ -1240,8 +1240,6 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter ...@@ -1240,8 +1240,6 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
private void savebaseInfo(MatterEntity matterEntity, Map<String, String> baseInfoMap, Setting baseInfoSetting) { private void savebaseInfo(MatterEntity matterEntity, Map<String, String> baseInfoMap, Setting baseInfoSetting) {
//Map<String, String> baseInfoMap = MatterDetailHtmlParseUtil.getbaseInfoMapByHtml(dom); //Map<String, String> baseInfoMap = MatterDetailHtmlParseUtil.getbaseInfoMapByHtml(dom);
List<MatterExtEntity> matterExtEntities = new ArrayList<>();
long sortN = 1;
for (Map.Entry<String, String> m : baseInfoMap.entrySet()) { for (Map.Entry<String, String> m : baseInfoMap.entrySet()) {
String value = baseInfoSetting.getOrDefault(m.getKey(), ""); String value = baseInfoSetting.getOrDefault(m.getKey(), "");
if (!ObjectUtils.isEmpty(value)) { if (!ObjectUtils.isEmpty(value)) {
......
...@@ -28,4 +28,6 @@ public class SkinBaseVo extends BaseEntityLong { ...@@ -28,4 +28,6 @@ public class SkinBaseVo extends BaseEntityLong {
private String localZipPath; private String localZipPath;
private String prependPath;
} }
\ No newline at end of file
...@@ -229,7 +229,7 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk ...@@ -229,7 +229,7 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk
InputStream inputStream = new ByteArrayInputStream(sw.toString().getBytes(Constant.UTF8)); InputStream inputStream = new ByteArrayInputStream(sw.toString().getBytes(Constant.UTF8));
MultipartFile file = getMultipartFile(inputStream, "file.css"); MultipartFile file = getMultipartFile(inputStream, "file.css");
String filePath = uploadService.saveFileUpload(file, "/file/fileupload", context.getUser()); String filePath = uploadService.saveFileUpload(file, "/file/fileupload/skin", context.getUser());
entity.setCssFilePath(filePath); entity.setCssFilePath(filePath);
} catch (Exception e) { } catch (Exception e) {
...@@ -380,6 +380,12 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk ...@@ -380,6 +380,12 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk
if (!ObjectUtils.isEmpty(skinBaseEntity.getPreviewImagePath())) { if (!ObjectUtils.isEmpty(skinBaseEntity.getPreviewImagePath())) {
skinBaseEntity.setPreviewImagePath(StrUtil.prependIfMissing(skinBaseEntity.getPreviewImagePath(), "/")); skinBaseEntity.setPreviewImagePath(StrUtil.prependIfMissing(skinBaseEntity.getPreviewImagePath(), "/"));
} }
if(!ObjectUtils.isEmpty(query.getPrependPath())){
}
} }
this.getDao().updateBatch(skinBaseEntities); this.getDao().updateBatch(skinBaseEntities);
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
"baseUrl": "https://192.168.0.98:31071/base" "baseUrl": "https://192.168.0.98:31071/base"
}, },
"base-test1": { "base-test-remote": {
"baseUrl": "http://8.136.255.30:11071/base" "baseUrl": "http://8.136.255.30:11071/base"
}, },
......
...@@ -16,16 +16,17 @@ Content-Type: application/json ...@@ -16,16 +16,17 @@ Content-Type: application/json
###基础事项列表 ###基础事项列表
POST {{baseUrl}}/matter/list POST {{baseUrl}}/site/matter/list
Content-Type: application/json Content-Type: application/json
{ {
"siteId": 1 "siteId": 1,
"hallCheckIn":1
} }
###基础事项列表 ###基础事项列表
POST {{baseUrl}}/matter/list POST {{baseUrl}}/site/matter/list
Content-Type: application/json Content-Type: application/json
{ {
......
...@@ -192,16 +192,6 @@ Content-Type: application/json ...@@ -192,16 +192,6 @@ Content-Type: application/json
"body":"{\"accountId\":\"1018145\"}" "body":"{\"accountId\":\"1018145\"}"
} }
###短信设置编辑
GET {{baseUrl}}/sms/set/edit?id={{SmsSet_id}}
Accept: application/json
###短信设置删除
GET {{baseUrl}}/sms/set/delete?id={{SmsSet_id}}
Accept: application/json
###同步数据 ###同步数据
GET {{baseUrl}}/test/syncMatter GET {{baseUrl}}/test/syncMatter
Accept: application/json Accept: application/json
...@@ -255,4 +245,11 @@ Content-Type: application/json ...@@ -255,4 +245,11 @@ Content-Type: application/json
"content": "9LXYEcq8GbYv0USImvQzNsAyhv5739qBNC7qCES1qCGDgdx24J+Ut4aVsKzkW0sRiqI9hg/NJAQEiTEz05QldexZUFmLPiZ1ODPf4wMA2WU=", "content": "9LXYEcq8GbYv0USImvQzNsAyhv5739qBNC7qCES1qCGDgdx24J+Ut4aVsKzkW0sRiqI9hg/NJAQEiTEz05QldexZUFmLPiZ1ODPf4wMA2WU=",
"key": "i70x15Dy19C020Ry", "key": "i70x15Dy19C020Ry",
"password": "i70x15Dy19C020Ry" "password": "i70x15Dy19C020Ry"
} }
\ No newline at end of file
###limit
POST {{baseUrl}}/test/limit
Content-Type: application/json
{}
\ No newline at end of file
...@@ -3,7 +3,7 @@ POST {{baseUrl}}/workman/doLogin ...@@ -3,7 +3,7 @@ POST {{baseUrl}}/workman/doLogin
Content-Type: application/json Content-Type: application/json
{ {
"loginName":"zengxia", "loginName":"yangying",
"loginPwd":"123", "loginPwd":"123",
"siteId": 1 "siteId": 1
} }
......
...@@ -6,6 +6,7 @@ import com.mortals.xhx.base.login.service.GifSecurityImage; ...@@ -6,6 +6,7 @@ import com.mortals.xhx.base.login.service.GifSecurityImage;
import com.mortals.xhx.base.system.valid.model.ValidCodeEntity; import com.mortals.xhx.base.system.valid.model.ValidCodeEntity;
import com.mortals.xhx.base.system.valid.service.ValidCodeService; import com.mortals.xhx.base.system.valid.service.ValidCodeService;
import com.mortals.xhx.base.system.valid.web.ValidCodeForm; import com.mortals.xhx.base.system.valid.web.ValidCodeForm;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -18,48 +19,48 @@ import java.awt.image.BufferedImage; ...@@ -18,48 +19,48 @@ import java.awt.image.BufferedImage;
@RestController @RestController
@RequestMapping("securitycode") @RequestMapping("securitycode")
public class SecurityCodeController public class SecurityCodeController
extends BaseCRUDJsonController<ValidCodeService, ValidCodeForm, ValidCodeEntity, Long> { extends BaseCRUDJsonController<ValidCodeService, ValidCodeForm, ValidCodeEntity, Long> {
@Autowired @Autowired
private ValidCodeService validCodeService; private ValidCodeService validCodeService;
@RequestMapping("createCode") @RequestMapping("createCode")
public void createCode(HttpServletRequest request, HttpServletResponse response) { public void createCode(HttpServletRequest request, HttpServletResponse response) {
// 获取默认难度和长度的验证码 // 获取默认难度和长度的验证码
String securityCode = validCodeService.createImageValidCode(request.getParameter("mark"),super.getRequestIP(request)); String securityCode = validCodeService.createImageValidCode(request.getParameter("mark"), super.getRequestIP(request));
// int imageType = ParamUtil.getInt("securityImage", 1); // int imageType = ParamUtil.getInt("securityImage", 1);
int imageType = 0; int imageType = 0;
switch (imageType) { switch (imageType) {
case 1: case 1:
BufferedImage image = SecurityImage.createImage(securityCode); BufferedImage image = SecurityImage.createImage(securityCode);
super.doResponseImage(response, image); super.doResponseImage(response, image);
break; break;
default: default:
// 默认图验 // 默认图验
byte[] content = GifSecurityImage.createGifImage(securityCode); byte[] content = GifSecurityImage.createGifImage(securityCode);
doResponseGif(response, content); doResponseGif(response, content);
break; break;
} }
// // 获取默认难度和长度的验证码 // // 获取默认难度和长度的验证码
// String securityCode = // String securityCode =
// validCodeService.createImageValidCode(request.getSession().getId(), // validCodeService.createImageValidCode(request.getSession().getId(),
// super.getRequestIP(request)); // super.getRequestIP(request));
// BufferedImage image = SecurityImage.createImage(securityCode); // BufferedImage image = SecurityImage.createImage(securityCode);
// super.doResponseImage(response, image); // super.doResponseImage(response, image);
} }
protected void doResponseGif(HttpServletResponse response, byte[] content) { protected void doResponseGif(HttpServletResponse response, byte[] content) {
try { try {
response.setHeader("Pragma", "No-cache"); response.setHeader("Pragma", "No-cache");
response.setHeader("Cache-Control", "No-cache"); response.setHeader("Cache-Control", "No-cache");
response.setDateHeader("Expires", 0); response.setDateHeader("Expires", 0);
response.setContentType("image/gif"); response.setContentType("image/gif");
IOUtils.write(content, response.getOutputStream()); IOUtils.write(content, response.getOutputStream());
} catch (Exception e) { } catch (Exception e) {
log.error("验证码图片传输异常-->" + e.getMessage()); log.error("验证码图片传输异常-->" + e.getMessage());
} }
} }
} }
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