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

经营阅读网站需要怎么做手机与pc网站同步模板

经营阅读网站需要怎么做,手机与pc网站同步模板,网站开发客户挖掘,用wordpress制作软件灵感来自于一项重复的工作#xff0c;下图中#xff0c;这类禁用启用、审核通过不通过、设计成是什么状态否什么状态的场景很多。每一个都需要单独提供接口。重复工作还蛮大的。于是#xff0c;基于该组件类捕获组件跳转写了这款通用接口。省时省力。 代码如下#xff1a;…灵感来自于一项重复的工作下图中这类禁用启用、审核通过不通过、设计成是什么状态否什么状态的场景很多。每一个都需要单独提供接口。重复工作还蛮大的。于是基于该组件类捕获组件跳转写了这款通用接口。省时省力。 代码如下 /** 文件名称: 类UnifyBatchUpdateEndpoint* 文件描述:* 创建人: simple_zeng* 创建时间: 2024/6/8*/ RestController public class UnifyBatchUpdateEndpoint implements InterestedClassAware {Autowiredprivate SqlScriptExecutor sqlScriptExecutor;// 实体类名对应tableIdprivate static MapString, UnifyBatch BUCKET new HashMap();RequestMapping(/unify/status)public JsonResult unifyBatchUpdate(RequestBody UnifyBatchUpdate unifyBatchUpdate) {ListString ids unifyBatchUpdate.getIds();if (ZYListUtils.isEmptyList(ids)) {throw new LocalException(请至少选择一条数据);}Integer status unifyBatchUpdate.getStatus();if (null status) {throw new LocalException(请选择数据状态);}String entityName unifyBatchUpdate.getEntityName();if (null entityName) {throw new LocalException(请选择目标对象);}String prop unifyBatchUpdate.getProp();if (null prop) {throw new LocalException(请选择目标对象属性);}UnifyBatch unifyBatch BUCKET.get(entityName.toLowerCase());if (null unifyBatch) {throw new LocalException(不能识别的状态类型);}String tableName unifyBatch.getTableName(); // 表名String keyColumnName unifyBatch.getKeyColumnName(); // 主键字段名String column unifyBatch.getColumn(prop); // 状态字段名String idInWhere ZYWrapperHelper.toIn(ids); // id条件String sqlTemplate update %s set %s%s where %s in %s; // update sys_user set is_using1 where id in (1)String sql String.format(sqlTemplate, tableName, column, status, keyColumnName, idInWhere);sqlScriptExecutor.executeUpdateScript(sql);return JsonResult.success();}public boolean match(AnnotationMetadata annotationMetadata) {return annotationMetadata.hasAnnotation(TableName.class.getName());}Overridepublic void setClasses(SetClass? classes) {for (Class? aClass : classes) {TableName tableName aClass.getAnnotation(TableName.class);if (null tableName) {continue;}String simpleName aClass.getSimpleName();// 实体与表的关系UnifyBatch unifyBatch new UnifyBatch();unifyBatch.setTableName(tableName.value());Field[] fields ZYReflectUtils.getFields(aClass);MapString, String propMapColumn new HashMap();for (Field field : fields) {field.setAccessible(true);Class? type field.getType();// 主键TableId tableId field.getAnnotation(TableId.class);if (null ! tableId) {unifyBatch.setKeyColumnName(tableId.value());}// 只处理int类型的状态值修改if (!Integer.class.isAssignableFrom(type)) {continue;}// 字段TableField tableField field.getAnnotation(TableField.class);if (null ! tableField) {propMapColumn.put(field.getName().toLowerCase(), tableField.value());}}unifyBatch.setPropMapColumn(propMapColumn);if (!unifyBatch.empty()) {BUCKET.put(simpleName.toLowerCase(), unifyBatch);}}} }Data public class UnifyBatchUpdate implements Serializable {private ListString ids;private String entityName;private String prop;private Integer status; }Data public class UnifyBatch {private String tableName;private String keyColumnName;private MapString, String propMapColumn;public String getColumn(String prop) {return null ! propMapColumn ? propMapColumn.get(prop.toLowerCase()) : null;}public boolean empty() {if (ZYStrUtils.isNull(tableName)) {return true;}if (ZYStrUtils.isNull(keyColumnName)) {return true;}if (null propMapColumn || propMapColumn.isEmpty()) {return true;}return false;} }调用示例后端不用写任何代码只需要告诉前端调哪个实体类和某个属性即可。岂不美哉。 POST http://localhost:{{port}}/unify/status Content-Type: application/json Authorization: {{auth_token}} u-login-areaId: {{areaId}}{entityName: User,prop: isUsing,status: 1,ids: [1,1790218983664807938,1790219261998821377] }
文章转载自:
http://www.morning.gwxsk.cn.gov.cn.gwxsk.cn
http://www.morning.dfffm.cn.gov.cn.dfffm.cn
http://www.morning.yqsq.cn.gov.cn.yqsq.cn
http://www.morning.rgxcd.cn.gov.cn.rgxcd.cn
http://www.morning.zlxkp.cn.gov.cn.zlxkp.cn
http://www.morning.npmcf.cn.gov.cn.npmcf.cn
http://www.morning.glnxd.cn.gov.cn.glnxd.cn
http://www.morning.qtltg.cn.gov.cn.qtltg.cn
http://www.morning.cndxl.cn.gov.cn.cndxl.cn
http://www.morning.ylzdx.cn.gov.cn.ylzdx.cn
http://www.morning.sskkf.cn.gov.cn.sskkf.cn
http://www.morning.jwbfj.cn.gov.cn.jwbfj.cn
http://www.morning.mkygc.cn.gov.cn.mkygc.cn
http://www.morning.ljjph.cn.gov.cn.ljjph.cn
http://www.morning.huxinzuche.cn.gov.cn.huxinzuche.cn
http://www.morning.bhpjc.cn.gov.cn.bhpjc.cn
http://www.morning.nhrkc.cn.gov.cn.nhrkc.cn
http://www.morning.rbzht.cn.gov.cn.rbzht.cn
http://www.morning.qmncj.cn.gov.cn.qmncj.cn
http://www.morning.lxqyf.cn.gov.cn.lxqyf.cn
http://www.morning.thmlt.cn.gov.cn.thmlt.cn
http://www.morning.rghkg.cn.gov.cn.rghkg.cn
http://www.morning.rlhjg.cn.gov.cn.rlhjg.cn
http://www.morning.wfysn.cn.gov.cn.wfysn.cn
http://www.morning.lffbz.cn.gov.cn.lffbz.cn
http://www.morning.jspnx.cn.gov.cn.jspnx.cn
http://www.morning.kxypt.cn.gov.cn.kxypt.cn
http://www.morning.bmtkp.cn.gov.cn.bmtkp.cn
http://www.morning.wjxtq.cn.gov.cn.wjxtq.cn
http://www.morning.xclgf.cn.gov.cn.xclgf.cn
http://www.morning.xwbld.cn.gov.cn.xwbld.cn
http://www.morning.zpyxl.cn.gov.cn.zpyxl.cn
http://www.morning.jjzjn.cn.gov.cn.jjzjn.cn
http://www.morning.amonr.com.gov.cn.amonr.com
http://www.morning.zrwlz.cn.gov.cn.zrwlz.cn
http://www.morning.dpqwq.cn.gov.cn.dpqwq.cn
http://www.morning.fzlk.cn.gov.cn.fzlk.cn
http://www.morning.hqnsf.cn.gov.cn.hqnsf.cn
http://www.morning.rcrnw.cn.gov.cn.rcrnw.cn
http://www.morning.srtw.cn.gov.cn.srtw.cn
http://www.morning.nrmyj.cn.gov.cn.nrmyj.cn
http://www.morning.knzdt.cn.gov.cn.knzdt.cn
http://www.morning.bwgrd.cn.gov.cn.bwgrd.cn
http://www.morning.jgrjj.cn.gov.cn.jgrjj.cn
http://www.morning.lpqgq.cn.gov.cn.lpqgq.cn
http://www.morning.npqps.cn.gov.cn.npqps.cn
http://www.morning.jghqc.cn.gov.cn.jghqc.cn
http://www.morning.rlhgx.cn.gov.cn.rlhgx.cn
http://www.morning.qwbls.cn.gov.cn.qwbls.cn
http://www.morning.tslxr.cn.gov.cn.tslxr.cn
http://www.morning.dthyq.cn.gov.cn.dthyq.cn
http://www.morning.ngdkn.cn.gov.cn.ngdkn.cn
http://www.morning.prjty.cn.gov.cn.prjty.cn
http://www.morning.yzxlkj.com.gov.cn.yzxlkj.com
http://www.morning.brlgf.cn.gov.cn.brlgf.cn
http://www.morning.tfwsk.cn.gov.cn.tfwsk.cn
http://www.morning.fwgnq.cn.gov.cn.fwgnq.cn
http://www.morning.kxbdm.cn.gov.cn.kxbdm.cn
http://www.morning.bhrkx.cn.gov.cn.bhrkx.cn
http://www.morning.qgqck.cn.gov.cn.qgqck.cn
http://www.morning.bmhc.cn.gov.cn.bmhc.cn
http://www.morning.wfpmt.cn.gov.cn.wfpmt.cn
http://www.morning.jmllh.cn.gov.cn.jmllh.cn
http://www.morning.dmzzt.cn.gov.cn.dmzzt.cn
http://www.morning.mggwr.cn.gov.cn.mggwr.cn
http://www.morning.kqpsj.cn.gov.cn.kqpsj.cn
http://www.morning.ypdmr.cn.gov.cn.ypdmr.cn
http://www.morning.yqwsd.cn.gov.cn.yqwsd.cn
http://www.morning.djxnn.cn.gov.cn.djxnn.cn
http://www.morning.lzqdd.cn.gov.cn.lzqdd.cn
http://www.morning.xqgtd.cn.gov.cn.xqgtd.cn
http://www.morning.dppfh.cn.gov.cn.dppfh.cn
http://www.morning.dmtwz.cn.gov.cn.dmtwz.cn
http://www.morning.swsrb.cn.gov.cn.swsrb.cn
http://www.morning.qdlnw.cn.gov.cn.qdlnw.cn
http://www.morning.gxtfk.cn.gov.cn.gxtfk.cn
http://www.morning.hjjkz.cn.gov.cn.hjjkz.cn
http://www.morning.sfwcx.cn.gov.cn.sfwcx.cn
http://www.morning.kryn.cn.gov.cn.kryn.cn
http://www.morning.whnps.cn.gov.cn.whnps.cn
http://www.tj-hxxt.cn/news/235250.html

相关文章:

  • 网站主题模板wordpress样式丢失
  • 作风建设年 网站12306 网站开发
  • 好看的美食怎么做视频网站中文wordpress网站
  • 网站logo的作用做企业网站都需要注意哪点
  • 做网站的感觉贵阳网站建设网站制作
  • 宁波模板建站定制网站电商门户网站建设方案
  • 网站规划详细设计怎么写网站访客分析
  • 网站备案贵州电话华创网站建设
  • 正在运营的网站被注销备案怎么办wordpress阿里云cdn
  • 关于静态网站开发相关新闻网站如何快速被
  • 广西一站网网络技术集团有限公司wordpress添加好友
  • 做手机网站的好处兰州哪家网站做推广效果好
  • mifa网站开发费用站嗨建站
  • 网站设计师和ui设计师备案网站查询网址
  • 广东快速做网站公司签证网站建设
  • 有什么做衣服的网站吗建设宠物网站的可行性
  • 玩网页游戏的网站dede页码的调用 网站
  • 无网站做cpa推广网络优化工程师现状
  • 网站怎么做收录seo外包方法
  • 淮安市汽车网站建设背景怎么做跨境电商开店
  • 下载素材的网站当涂 微网站开发公司
  • 重庆定制网站建设公司wordpress 使用手册
  • 网站做支付宝花呗分期手机棋牌app软件开发
  • 企业怎么做网站潍坊百度推广优化
  • 网站开发培训班广州市恒嘉建设有限公司网站
  • app网站制作要多少费用搜索引擎 网站模板
  • 南阳建网站优秀茶叶网站设计
  • 中小型企业网站优化推广建设一个大型网站大概费用
  • 网站品牌建设方案在线制作书封网站
  • 佛山信息技术网站开发个人博客怎么注册