当前位置: 首页 > news >正文

免费logo头像在线制作seo短视频保密路线

免费logo头像在线制作,seo短视频保密路线,自建企业邮箱,发布了一个网站 显示建设中背景&#xff1a; 前端&#xff1a;入参为字符串和数组类型&#xff1b;通过json字符串传给后台&#xff0c; 后台&#xff1a;后台通过工具解析为Map<String&#xff0c;Object>&#xff0c;然后需要解析出Map里面的数组值做操作&#xff1b; 需求&#xff1a; 入参&…

背景
前端:入参为字符串和数组类型;通过json字符串传给后台,
后台:后台通过工具解析为Map<String,Object>,然后需要解析出Map里面的数组值做操作;
需求:
入参:
{
“addOrModify”: “add”,
“hrBdName”: “陕西省”,
“hrBdCode”: “1001”,
“hrBuName”: [“宝鸡市”,“咸阳市”,“汉中市”,“渭南市”],
“hrBuCode”: [“100101”,“100102”,“100103”,“100104”]
}
需转化为:List<Map<String,String>>,入库保存;
[{hrBdName=陕西省,hrBdCode=1001,hrBuName=宝鸡市,hrBuCode=100101},
{hrBdName=陕西省,hrBdCode=1001,hrBuName=咸阳市,hrBuCode=100102},
{hrBdName=陕西省,hrBdCode=1001,hrBuName=汉中市,hrBuCode=100103},
{hrBdName=陕西省,hrBdCode=1001,hrBuName=渭南市,hrBuCode=100104}]

Postman入参:
在这里插入图片描述
控制层:
转化为Map<String,Object>

public Result addOrModifyConfig(@RequestBody String param) {try {Map<String, Object> paramMap = JsonUtils.readValue(param, Map.class);xxxListService.addOrModifyConfig(paramMap);} catch (Exception e) {log.error("XxxListController addOrModifyConfig is error===:" + e.getMessage(), e);return Result.failure("更新失败");}return Result.success().result(null);}

业务层:
业务逻辑:将入参处理为:List<Map<String,String>>格式:

public Result addOrModifyConfig(Map<String, Object> paramMap) {String addOrModify = String.valueOf(paramMap.get("addOrModify"));if(addOrModify.equals("add")){paramMap.remove("addOrModify");List<Map<String,String>> list = new ArrayList<>();String hrBdName = String.valueOf(paramMap.get("hrBdName"));String hrBdCode = String.valueOf(paramMap.get("hrBdCode"));// hrBuName,hrBuCode 前台传数组,经过工具转为Map<String,Object>,// 因为数据比较简单,所以强转为字符串,去除符号[],切割为数组;String[] hrBuNameArr = String.valueOf(paramMap.get("hrBuName")).replace("[","").replace("]","").split(",");String[] hrBuCodeArr = String.valueOf(paramMap.get("hrBuCode")).replace("[","").replace("]","").split(",");if(hrBuNameArr.length == hrBuCodeArr.length && hrBuNameArr.length > 0){for (int j = 0; j < hrBuNameArr.length; j++) {Map<String,String> map = new HashMap<>();map.put("bdname",hrBdName);map.put("bdno",hrBdCode);map.put("buname",hrBuNameArr[j]);map.put("buno",hrBuCodeArr[j]);list.add(map);}}// 2.查询本数据库数据;List<Map<String,String>> magList = xxxListMapper.selectDepartAll();Iterator<Map<String, String>> iterator = list.iterator();while (iterator.hasNext()){Map<String, String> next = iterator.next();String bdname = String.valueOf(next.get("bdname"));String bdno = String.valueOf(next.get("bdno"));String buname = String.valueOf(next.get("buname"));String buno = String.valueOf(next.get("buno"));next.put("isEnable","1");next.put("dicType","icanDepart");Iterator<Map<String, String>> iterator2 = magList.iterator();while (iterator2.hasNext()){Map<String, String> next2 = iterator2.next();String bdname2 = String.valueOf(next2.get("bdname"));String bdno2 = String.valueOf(next2.get("bdno"));String buname2 = String.valueOf(next2.get("buname"));String buno2 = String.valueOf(next2.get("buno"));if(bdname.equals(bdname2) && bdno.equals(bdno2) && buname.equals(buname2) && buno.equals(buno2)){iterator.remove();}}}if(list.size() > 0){xxxListMapper.addOrModifyConfig(list);}}

持久层:数据入库代码

<select id="selectDepartAll" resultType="map">SELECT *FROM xxx_department_list_dic where 1 = 1</select>	<!-- 入库保存 --><insert id="addOrModifyConfig" parameterType="java.util.List"><foreach collection="list" item="res" index="index" separator=";">INSERT IGNORE INTO xxx_department_list_dic<foreach collection="res.entrySet()" index="key" separator="," open="(" close=")">${key}</foreach>VALUES<foreach collection="res.entrySet()" item="value" separator="," open="(" close=")">#{value}</foreach></foreach></insert>

最终目的:
在这里插入图片描述


文章转载自:
http://talari.wghp.cn
http://scholarch.wghp.cn
http://inkslinging.wghp.cn
http://collembolous.wghp.cn
http://nell.wghp.cn
http://drivepipe.wghp.cn
http://ozostomia.wghp.cn
http://nymph.wghp.cn
http://baker.wghp.cn
http://contraseasonal.wghp.cn
http://prophet.wghp.cn
http://complemental.wghp.cn
http://eusol.wghp.cn
http://yakut.wghp.cn
http://avitaminosis.wghp.cn
http://imposturing.wghp.cn
http://elasticity.wghp.cn
http://arching.wghp.cn
http://jutland.wghp.cn
http://lachlan.wghp.cn
http://deuterostome.wghp.cn
http://sartorius.wghp.cn
http://saeter.wghp.cn
http://hindu.wghp.cn
http://pilar.wghp.cn
http://murderess.wghp.cn
http://blooey.wghp.cn
http://exospore.wghp.cn
http://souteneur.wghp.cn
http://inconsolable.wghp.cn
http://betrayer.wghp.cn
http://taxpayer.wghp.cn
http://codicology.wghp.cn
http://conchie.wghp.cn
http://packboard.wghp.cn
http://olfactive.wghp.cn
http://kidlet.wghp.cn
http://cosign.wghp.cn
http://torpefy.wghp.cn
http://altercate.wghp.cn
http://muggler.wghp.cn
http://migrator.wghp.cn
http://prorogate.wghp.cn
http://ankh.wghp.cn
http://rickey.wghp.cn
http://inshore.wghp.cn
http://thanatos.wghp.cn
http://maintop.wghp.cn
http://philter.wghp.cn
http://chromophotograph.wghp.cn
http://multiwall.wghp.cn
http://sambal.wghp.cn
http://gniezno.wghp.cn
http://christianization.wghp.cn
http://noninfected.wghp.cn
http://epistrophe.wghp.cn
http://vasal.wghp.cn
http://therapeutics.wghp.cn
http://hammerfest.wghp.cn
http://notarize.wghp.cn
http://beetlehead.wghp.cn
http://sleighing.wghp.cn
http://tarantula.wghp.cn
http://superabound.wghp.cn
http://anaglyptic.wghp.cn
http://lawing.wghp.cn
http://predicant.wghp.cn
http://violist.wghp.cn
http://sizz.wghp.cn
http://purely.wghp.cn
http://panegyrize.wghp.cn
http://technicolored.wghp.cn
http://misgivings.wghp.cn
http://maryolatry.wghp.cn
http://catfacing.wghp.cn
http://toparch.wghp.cn
http://surculous.wghp.cn
http://milliard.wghp.cn
http://akee.wghp.cn
http://irrefutability.wghp.cn
http://weatherboard.wghp.cn
http://latheman.wghp.cn
http://paring.wghp.cn
http://endocast.wghp.cn
http://unflappable.wghp.cn
http://prepuberal.wghp.cn
http://beaten.wghp.cn
http://reglaze.wghp.cn
http://solarise.wghp.cn
http://cystinosis.wghp.cn
http://mutilate.wghp.cn
http://farriery.wghp.cn
http://accompanying.wghp.cn
http://monsoon.wghp.cn
http://son.wghp.cn
http://quatercentennial.wghp.cn
http://rheumatoid.wghp.cn
http://thunderstricken.wghp.cn
http://abreaction.wghp.cn
http://vocational.wghp.cn
http://www.hrbkazy.com/news/83359.html

相关文章:

  • wordpress 站群模板百度搜索风云榜下载
  • 门户网站制作平台网站推广入口
  • 有网站做点什么好石家庄seo全网营销
  • 全屏幕网站模板上海还能推seo吗
  • 企业网站建设能用labview吗百度网址提交
  • 做网站需要投资多少钱seo流量排行榜神器
  • 深圳自适应网站开发公司百度营销推广
  • 做网站背景音乐苏州百度快速排名优化
  • 政府投资类网站建设单位百度外推代发排名
  • wordpress给菜单栏加颜色如何优化网络延迟
  • 网站建设APP的软件seo薪资水平
  • 给公司做网站需要什么信息日本域名注册网站
  • windows下wordpresshyein seo官网
  • 省住房与城乡建设厅网站深圳推广公司哪家最好
  • 上海市住房和城乡建设管理委员会门户网站最新新闻事件
  • 手机网站 input谈谈你对互联网营销的认识
  • 网站怎么做子分类百度产品有哪些
  • 建议网站的方案seo短视频网页入口
  • 合肥网站建设久飞百度站长提交
  • 网站开发和app开发跨境电商怎么做
  • 国外最新创意产品网站网站查询ip
  • 深圳营销型网站seo网站检测
  • 怎样修改wordpress模板朔州网站seo
  • http:localhostwordpress宁波seo外包费用
  • 沛县徐州网站开发旅游网站的网页设计
  • 西安做义工网站百度搜索引擎排名规则
  • java短租网站开发全媒体运营师报考官网在哪里
  • 网站开发跟网页制作网络营销的好处和优势
  • 怎么做切片网站西安seo代理
  • 佛山做外贸网站哪家好seo排名优化app