Commit b242d937 by zzrdark

1.fix设备模块

2.生产配置
parent 46500bff
...@@ -27,4 +27,20 @@ public class DevicesDto { ...@@ -27,4 +27,20 @@ public class DevicesDto {
* 部门Id * 部门Id
*/ */
private Long deptId; private Long deptId;
/**
* 渠道号 分割符号 ,
*/
private String channelNums;
/**
* 提示信息
*/
private String channelNumsMessage;
/**
* 名单规则
* 0:黑名单,1:白名单
*/
private Integer channelRules;
} }
...@@ -2,6 +2,8 @@ package com.mx.cneeds.common.vo; ...@@ -2,6 +2,8 @@ package com.mx.cneeds.common.vo;
import lombok.Data; import lombok.Data;
import java.util.List;
/** /**
* @ClassName DeviceChannelVo * @ClassName DeviceChannelVo
* @Author zzrdark * @Author zzrdark
...@@ -12,7 +14,7 @@ import lombok.Data; ...@@ -12,7 +14,7 @@ import lombok.Data;
public class DeviceChannelVo { public class DeviceChannelVo {
/** /**
* 渠道号 * 渠道号 分割符号 ,
*/ */
private String channelNums; private String channelNums;
...@@ -27,6 +29,11 @@ public class DeviceChannelVo { ...@@ -27,6 +29,11 @@ public class DeviceChannelVo {
*/ */
private Integer channelRules; private Integer channelRules;
/**
* 设备imeis
*/
private List<String> imeis;
public DeviceChannelVo(String channelNums, String channelNumsMessage, Integer channelRules) { public DeviceChannelVo(String channelNums, String channelNumsMessage, Integer channelRules) {
this.channelNums = channelNums; this.channelNums = channelNums;
this.channelNumsMessage = channelNumsMessage; this.channelNumsMessage = channelNumsMessage;
......
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/cneeds_server?useUnicode=true&characterEncoding=UTF-8&useSSL=false
password: cneeds!QAZ1qaz
username: root
eureka:
client:
service-url:
defaultZone: http://127.0.0.1:8761/eureka/
instance:
prefer-ip-address: true
ip-address: 192.168.2.244
\ No newline at end of file
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.2.244:3306/cneeds_server?useUnicode=true&characterEncoding=UTF-8&useSSL=false
password: cneeds!QAZ1qaz
username: root
eureka:
client:
service-url:
defaultZone: http://192.168.2.244:8761/eureka/
instance:
prefer-ip-address: true
ip-address: 192.168.2.244
\ No newline at end of file
spring: spring:
profiles: profiles:
active: dev active: prod
application: application:
name: cneeds-server-authorization name: cneeds-server-authorization
server: server:
......
...@@ -7,9 +7,10 @@ mvn clean package -Dmaven.test.skip=true -U ...@@ -7,9 +7,10 @@ mvn clean package -Dmaven.test.skip=true -U
#docker push hub.c.163.com/springcloud/eureka #docker push hub.c.163.com/springcloud/eureka
docker build -t zzrdark/eureka . # docker build -t zzrdark/eureka .
docker push zzrdark/eureka
# docker build -t 192.168.2.244:5000/eureka . # docker push zzrdark/eureka
# docker push 192.168.2.244:5000/eureka docker build -t 192.168.2.244:5000/springcloud_datashow .
\ No newline at end of file
docker push 192.168.2.244:5000/springcloud_datashow
\ No newline at end of file
...@@ -48,6 +48,9 @@ public interface DeviceClient { ...@@ -48,6 +48,9 @@ public interface DeviceClient {
@PostMapping("/device/info/importDevice") @PostMapping("/device/info/importDevice")
void importDevice(@RequestBody DevicesDto dto); void importDevice(@RequestBody DevicesDto dto);
@PostMapping("/device/info/updateDeviceChannelBatch")
void updateDeviceChannelBatch(@RequestBody DevicesDto dto);
@PostMapping("/device/info/updateDeviceSeriesBatch") @PostMapping("/device/info/updateDeviceSeriesBatch")
void updateDeviceSeriesBatch(@RequestBody DevicesDto dto); void updateDeviceSeriesBatch(@RequestBody DevicesDto dto);
......
...@@ -31,7 +31,7 @@ public class DeviceController { ...@@ -31,7 +31,7 @@ public class DeviceController {
private DeviceClient deviceClient; private DeviceClient deviceClient;
@GetMapping("/getChannel_nums") @GetMapping("/device/getChannel")
public R getChannel_nums(String imei){ public R getChannel_nums(String imei){
DeviceChannelVo channelVo = new DeviceChannelVo("123456,112233,654321", "提示的信息", 0); DeviceChannelVo channelVo = new DeviceChannelVo("123456,112233,654321", "提示的信息", 0);
...@@ -39,11 +39,11 @@ public class DeviceController { ...@@ -39,11 +39,11 @@ public class DeviceController {
return new R().put("data",channelVo); return new R().put("data",channelVo);
} }
@PostMapping("/saveChannel") @PostMapping("/device/saveChannel")
public R saveChannel_nums(DeviceChannelVo channelVo){ public R saveChannel_nums(DeviceChannelVo channelVo){
DevicesDto devicesDto = new DevicesDto(); DevicesDto devicesDto = new DevicesDto();
BeanUtils.copyProperties(channelVo,devicesDto); BeanUtils.copyProperties(channelVo,devicesDto);
deviceClient.updateDeviceSeriesBatch(devicesDto); deviceClient.updateDeviceChannelBatch(devicesDto);
return new R().put("data",channelVo); return new R().put("data",channelVo);
} }
......
eureka:
client:
service-url:
defaultZone: http://127.0.0.1:8761/eureka/
instance:
prefer-ip-address: true
spring: spring:
profiles: profiles:
active: dev active: prod
application: application:
name: cneeds-server-datashow name: cneeds-server-datashow
......
.pagination-container[data-v-f3b72548]{background:#fff;padding:32px 16px}.pagination-container.hidden[data-v-f3b72548]{display:none}.waves-ripple{position:absolute;border-radius:100%;background-color:rgba(0,0,0,.15);background-clip:padding-box;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transform:scale(0);transform:scale(0);opacity:1}.waves-ripple.z-active{opacity:0;-webkit-transform:scale(2);transform:scale(2);-webkit-transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out,-webkit-transform .6s ease-out}
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0b251b6b"],{aa98:function(e,n,t){"use strict";t.d(n,"b",(function(){return i})),t.d(n,"c",(function(){return c})),t.d(n,"e",(function(){return l})),t.d(n,"a",(function(){return s})),t.d(n,"d",(function(){return u}));t("55dd");var a=t("b775");function i(e){return Object(a["a"])({url:"/device/device/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function c(e){return Object(a["a"])({url:"/device/device/importDevice",method:"post",data:e})}function l(e){return Object(a["a"])({url:"/device/device/updateDeviceSeriesBatch",method:"post",data:e})}function s(e){return Object(a["a"])({url:"/device/device/delete",method:"post",data:{ids:e}})}function u(e){return Object(a["a"])({url:"/device/device/saveChannel",method:"post",data:e})}},ee85:function(e,n,t){"use strict";t.r(n);var a=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("el-container",[t("el-main",[t("el-form",{ref:"setChannel",attrs:{model:e.device,rules:e.rules,"label-width":"80px"}},[t("el-form-item",{attrs:{prop:"channelNumsMessage",label:"终端提示文字"}},[t("el-input",{model:{value:e.device.channelNumsMessage,callback:function(n){e.$set(e.device,"channelNumsMessage",n)},expression:"device.channelNumsMessage"}})],1),e._v(" "),t("el-form-item",{attrs:{prop:"channelRules",label:"规则"}},[t("el-select",{attrs:{placeholder:"选择"},model:{value:e.device.channelRules,callback:function(n){e.$set(e.device,"channelRules",n)},expression:"device.channelRules"}},[t("el-option",{attrs:{label:"黑名单",value:"0"}}),e._v(" "),t("el-option",{attrs:{label:"白名单",value:"1"}})],1)],1),e._v(" "),e._l(e.device.channelNums,(function(n,a){return t("el-form-item",{key:a,attrs:{label:"第"+(a+1)+"个渠道号: ",prop:"channelNums."+a+".value","label-width":"20"}},[t("el-row",[t("el-col",{attrs:{span:14}},[t("el-input",{model:{value:n.value,callback:function(t){e.$set(n,"value",t)},expression:"channelNum.value"}})],1),e._v(" "),t("el-col",{attrs:{span:5}},[t("el-button",{on:{click:function(t){return t.preventDefault(),e.removeChannelNums(n)}}},[e._v("\n 删除\n ")])],1)],1)],1)})),e._v(" "),t("el-form-item",[t("el-button",{on:{click:e.addChannelNums}},[e._v("新增渠道号")]),e._v(" "),t("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("修改")]),e._v(" "),t("el-button",{on:{click:e.toDeviceList}},[e._v("取消")])],1)],2)],1)],1)},i=[],c=(t("456d"),t("ac6a"),t("96cf"),t("3b8d")),l=t("aa98"),s={channelNumsMessage:"终端提示文字",channelRules:"规则"},u={data:function(){var e=function(e,n,t){void 0===n||null===n||0===n.length?t(new Error(s[e.field]+"必须填写")):t()};return{loading:!1,device:{channelNums:[{value:""}],channelNumsMessage:"",channelRules:"",imeis:[]},rules:{channelNumsMessage:[{validator:e}],channelRules:[{validator:e}]},selectSeriesOptions:[]}},mounted:function(){this.device.imeis=this.$route.query.imeis,this.getFormData()},methods:{getFormData:function(){var e=Object(c["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));function n(){return e.apply(this,arguments)}return n}(),setDefault:function(){this.$refs.device=[]},onSubmit:function(){var e=this;this.loading||(this.loading=!0,this.$refs.setChannel.validate((function(n,t){if(n){var a=e.device.channelNums;e.device.channelNums=[],a.forEach((function(n){e.device.channelNums.push(n.value)})),Object(l["d"])(e.device).then((function(n){var t=n.msg;e.$notify({title:"操作成功",message:t,type:"success",duration:2e3}),e.setDefault(),e.toDeviceList(),e.loading=!1})).catch((function(){e.loading=!1}))}else{var i=t[Object.keys(t)[0]][0].message;e.$message({message:i,type:"error"}),e.loading=!1}})))},toDeviceList:function(){this.$router.push({path:"/deviceManagement/device"})},addChannelNums:function(){this.device.channelNums.push({value:""})},removeChannelNums:function(e){var n=this.device.channelNums.indexOf(e);-1!==n&&this.device.channelNums.splice(n,1)}}},r=u,o=t("2877"),d=Object(o["a"])(r,a,i,!1,null,"6cae8d7a",null);n["default"]=d.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-113720ab"],{"1c64":function(e,t,n){},"1cc6":function(e,t,n){"use strict";var i=n("1c64"),a=n.n(i);a.a},"333d":function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"pagination-container",class:{hidden:e.hidden}},[n("el-pagination",e._b({attrs:{background:e.background,"current-page":e.currentPage,"page-size":e.pageSize,layout:e.layout,"page-sizes":e.pageSizes,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"update:pageSize":function(t){e.pageSize=t},"update:page-size":function(t){e.pageSize=t},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}},"el-pagination",e.$attrs,!1))],1)},a=[];n("c5f6");Math.easeInOutQuad=function(e,t,n,i){return e/=i/2,e<1?n/2*e*e+t:(e--,-n/2*(e*(e-2)-1)+t)};var o=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function r(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function l(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function c(e,t,n){var i=l(),a=e-i,c=20,s=0;t="undefined"===typeof t?500:t;var u=function e(){s+=c;var l=Math.easeInOutQuad(s,i,a,t);r(l),s<t?o(e):n&&"function"===typeof n&&n()};u()}var s={name:"Pagination",props:{total:{required:!0,type:Number},page:{type:Number,default:1},limit:{type:Number,default:20},pageSizes:{type:Array,default:function(){return[10,20,30,50]}},layout:{type:String,default:"total, sizes, prev, pager, next, jumper"},background:{type:Boolean,default:!0},autoScroll:{type:Boolean,default:!0},hidden:{type:Boolean,default:!1}},computed:{currentPage:{get:function(){return this.page},set:function(e){this.$emit("update:page",e)}},pageSize:{get:function(){return this.limit},set:function(e){this.$emit("update:limit",e)}}},methods:{handleSizeChange:function(e){this.$emit("pagination",{page:this.currentPage,limit:e}),this.autoScroll&&c(0,800)},handleCurrentChange:function(e){this.$emit("pagination",{page:e,limit:this.pageSize}),this.autoScroll&&c(0,800)}}},u=s,d=(n("1cc6"),n("2877")),p=Object(d["a"])(u,i,a,!1,null,"f3b72548",null);t["a"]=p.exports},"8d41":function(e,t,n){},aa98:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return o})),n.d(t,"e",(function(){return r})),n.d(t,"a",(function(){return l})),n.d(t,"d",(function(){return c}));n("55dd");var i=n("b775");function a(e){return Object(i["a"])({url:"/device/device/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function o(e){return Object(i["a"])({url:"/device/device/importDevice",method:"post",data:e})}function r(e){return Object(i["a"])({url:"/device/device/updateDeviceSeriesBatch",method:"post",data:e})}function l(e){return Object(i["a"])({url:"/device/device/delete",method:"post",data:{ids:e}})}function c(e){return Object(i["a"])({url:"/device/device/saveChannel",method:"post",data:e})}},c7a7:function(e,t,n){"use strict";n("8d41");var i="@@wavesContext";function a(e,t){function n(n){var i=Object.assign({},t.value),a=Object.assign({ele:e,type:"hit",color:"rgba(0, 0, 0, 0.15)"},i),o=a.ele;if(o){o.style.position="relative",o.style.overflow="hidden";var r=o.getBoundingClientRect(),l=o.querySelector(".waves-ripple");switch(l?l.className="waves-ripple":(l=document.createElement("span"),l.className="waves-ripple",l.style.height=l.style.width=Math.max(r.width,r.height)+"px",o.appendChild(l)),a.type){case"center":l.style.top=r.height/2-l.offsetHeight/2+"px",l.style.left=r.width/2-l.offsetWidth/2+"px";break;default:l.style.top=(n.pageY-r.top-l.offsetHeight/2-document.documentElement.scrollTop||document.body.scrollTop)+"px",l.style.left=(n.pageX-r.left-l.offsetWidth/2-document.documentElement.scrollLeft||document.body.scrollLeft)+"px"}return l.style.backgroundColor=a.color,l.className="waves-ripple z-active",!1}}return e[i]?e[i].removeHandle=n:e[i]={removeHandle:n},n}t["a"]={bind:function(e,t){e.addEventListener("click",a(e,t),!1)},update:function(e,t){e.removeEventListener("click",e[i].removeHandle,!1),e.addEventListener("click",a(e,t),!1)},unbind:function(e){e.removeEventListener("click",e[i].removeHandle,!1),e[i]=null,delete e[i]}}},dc86:function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-container",[n("el-header",[n("div",{staticStyle:{margin:"20px 0"}},[n("el-button",{on:{click:e.addPage}},[e._v("导入设备")]),e._v(" "),n("el-button",{on:{click:e.editSeriesPage}},[e._v("变更产品系列")]),e._v(" "),n("el-button",{on:{click:e.setChannelPage}},[e._v("适配配置")]),e._v(" "),n("el-button",{on:{click:e.deletePage}},[e._v("删除设备")])],1)]),e._v(" "),n("el-main",[n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],key:e.tableKey,staticStyle:{width:"100%"},attrs:{data:e.list,border:"",fit:"","highlight-current-row":"","default-sort":e.defaultSort},on:{"sort-change":e.sortChange,"selection-change":e.handleSelectionChange}},[n("el-table-column",{attrs:{type:"selection",width:"55"}}),e._v(" "),n("el-table-column",{attrs:{label:"设备ID",prop:"deviceId",sortable:"custom",align:"center",width:"80"}}),e._v(" "),n("el-table-column",{attrs:{label:"产品系列",prop:"seriesNum",width:"150",align:"center"}}),e._v(" "),n("el-table-column",{attrs:{label:"imei",prop:"imei",width:"150",align:"center"}}),e._v(" "),n("el-table-column",{attrs:{label:"创建时间",prop:"createTime",width:"100",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row.createTime;return[n("span",[e._v(e._s(e._f("timeFilter")(i)))])]}}])})],1),e._v(" "),n("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.listQuery.page,limit:e.listQuery.pageSize},on:{"update:page":function(t){return e.$set(e.listQuery,"page",t)},"update:limit":function(t){return e.$set(e.listQuery,"pageSize",t)},pagination:e.refresh}})],1)],1)},a=[],o=(n("ac6a"),n("333d")),r=n("c7a7"),l=n("ed08"),c=n("aa98"),s={components:{Pagination:o["a"]},directives:{waves:r["a"]},filters:{valueFilter:function(e){return e||"无"},timeFilter:function(e){return e?Object(l["d"])(e,"{y}-{m}-{d} {h}:{i}"):"无"}},data:function(){return{tableKey:0,listLoading:!0,listQuery:{},list:[],total:0,defaultSort:{},multipleSelection:[],device:{imei:""},deviceIds:[]}},created:function(){},mounted:function(){this.getList()},beforeRouteUpdate:function(e,t,n){if(e.path===t.path){var i=Object.assign({},e.query),a=Object.assign({},t.query);JSON.stringify(i)!==JSON.stringify(a)&&this.getList()}n()},methods:{handleSelectionChange:function(e){this.multipleSelection=e},sortChange:function(e){console.log("sortChange",e);var t=e.prop,n=e.order;this.sortBy(t,n)},sortBy:function(e,t){this.listQuery.sort="ascending"===t?"+".concat(e):"-".concat(e),this.handleFilter()},getList:function(){var e=this;this.listLoading=!0,Object(c["b"])(this.listQuery).then((function(t){var n=t.data,i=n.list,a=n.totalCount;e.list=i,e.total=a,e.listLoading=!1}))},addPage:function(){this.$router.push({path:"/deviceManagement/device/importDevice"})},editSeriesPage:function(){if(0!==this.multipleSelection.length){var e=[];this.multipleSelection.forEach((function(t){e.push(t.imei)})),this.$router.push({path:"/deviceManagement/device/editSeries",query:{imeis:e}})}else{var t="必须选一列";this.$message({message:t,type:"error"})}},setChannelPage:function(){if(0!==this.multipleSelection.length){var e=[];this.multipleSelection.forEach((function(t){e.push(t.imei)})),this.$router.push({path:"/deviceManagement/device/setChannelNum",query:{imeis:e}})}else{var t="必须选一列";this.$message({message:t,type:"error"})}},deletePage:function(){var e=this;if(0!==this.multipleSelection.length)this.multipleSelection.forEach((function(t){e.deviceIds.push(t.deviceId)})),Object(c["a"])(this.deviceIds).then((function(t){e.getList()})),this.deviceIds=[];else{var t="必须选一列";this.$message({message:t,type:"error"})}},refresh:function(){this.$router.push({path:"/deviceManagement/device",query:this.listQuery})},handleFilter:function(){console.log("handleFilter",this.listQuery),this.listQuery.page=1,this.refresh()}}},u=s,d=n("2877"),p=Object(d["a"])(u,i,a,!1,null,"387f23f8",null);t["default"]=p.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1d606ab9"],{"7d09":function(e,t,i){"use strict";i.d(t,"e",(function(){return r})),i.d(t,"a",(function(){return s})),i.d(t,"c",(function(){return a})),i.d(t,"b",(function(){return c})),i.d(t,"d",(function(){return o}));i("55dd");var n=i("b775");function r(e){return Object(n["a"])({url:"/device/series/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function s(e){return Object(n["a"])({url:"/device/series/add",method:"post",data:e})}function a(e){return Object(n["a"])({url:"/device/series/edit",method:"post",data:e})}function c(e){return Object(n["a"])({url:"/device/series/delete",method:"post",data:{ids:e}})}function o(){return Object(n["a"])({url:"/device/series/listAll",method:"post"})}},"8a03":function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-container",[i("el-main",[i("el-form",{ref:"editSeries",attrs:{model:e.device,rules:e.rules,"label-width":"80px"}},[i("el-form-item",{attrs:{prop:"seriesId",label:"所属系列"}},[i("el-select",{attrs:{placeholder:"请选择"},model:{value:e.device.seriesId,callback:function(t){e.$set(e.device,"seriesId",t)},expression:"device.seriesId"}},e._l(e.selectSeriesOptions,(function(e){return i("el-option",{key:e.seriesId,attrs:{label:e.seriesNum,value:e.seriesId}})})),1)],1),e._v(" "),i("el-form-item",[i("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("修改")]),e._v(" "),i("el-button",{on:{click:e.toDeviceList}},[e._v("取消")])],1)],1)],1)],1)},r=[],s=(i("ac6a"),i("456d"),i("96cf"),i("3b8d")),a=i("7d09"),c=i("aa98"),o={seriesId:"选择系列",imeis:"要选择设备"},u={data:function(){var e=function(e,t,i){void 0===t||null===t||0===t.length?i(new Error(o[e.field]+"必须填写")):i()};return{loading:!1,device:{seriesIdList:[],imeis:[]},rules:{seriesId:[{validator:e}],imeis:[{validator:e}]},selectSeriesOptions:[]}},mounted:function(){this.device.imeis=this.$route.query.imeis,this.getFormData()},methods:{getFormData:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.selectSeries();case 2:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),setDefault:function(){this.$refs.editSeries.resetFields()},onSubmit:function(){var e=this;this.loading||(this.loading=!0,this.$refs.editSeries.validate((function(t,i){if(t)Object(c["e"])(e.device).then((function(t){var i=t.msg;e.$notify({title:"操作成功",message:i,type:"success",duration:2e3}),e.setDefault(),e.toDeviceList(),e.loading=!1})).catch((function(){e.loading=!1}));else{var n=i[Object.keys(i)[0]][0].message;e.$message({message:n,type:"error"}),e.loading=!1}})))},toDeviceList:function(){this.$router.push({path:"/deviceManagement/device"})},selectSeries:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(a["d"])().then((function(e){var i=e.data;t.selectSeriesOptions=i}));case 2:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}(),handleChange:function(e){var t=e.length;t-=1,this.device.deptId=e[t]}}},d=u,l=i("2877"),f=Object(l["a"])(d,n,r,!1,null,"644ef19e",null);t["default"]=f.exports},aa98:function(e,t,i){"use strict";i.d(t,"b",(function(){return r})),i.d(t,"c",(function(){return s})),i.d(t,"e",(function(){return a})),i.d(t,"a",(function(){return c})),i.d(t,"d",(function(){return o}));i("55dd");var n=i("b775");function r(e){return Object(n["a"])({url:"/device/device/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function s(e){return Object(n["a"])({url:"/device/device/importDevice",method:"post",data:e})}function a(e){return Object(n["a"])({url:"/device/device/updateDeviceSeriesBatch",method:"post",data:e})}function c(e){return Object(n["a"])({url:"/device/device/delete",method:"post",data:{ids:e}})}function o(e){return Object(n["a"])({url:"/device/device/saveChannel",method:"post",data:e})}}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-47af9ee4"],{"544f":function(e,t,r){"use strict";r.r(t);var s=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-container",[r("el-main",[r("el-form",{ref:"editSeries",attrs:{model:e.series,rules:e.rules,"label-width":"80px"}},[r("el-form-item",{attrs:{prop:"seriesNum",label:"产品系列号"}},[r("el-input",{model:{value:e.series.seriesNum,callback:function(t){e.$set(e.series,"seriesNum",t)},expression:"series.seriesNum"}})],1),e._v(" "),r("el-form-item",{attrs:{prop:"remark",label:"产品系列详情:"}},[r("el-input",{model:{value:e.series.remark,callback:function(t){e.$set(e.series,"remark",t)},expression:"series.remark"}})],1),e._v(" "),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("修改")]),e._v(" "),r("el-button",{on:{click:e.toSeriesList}},[e._v("取消")])],1)],1)],1)],1)},i=[],n=(r("ac6a"),r("456d"),r("7d09")),a=r("ed08"),o={seriesNum:"系列号",remark:"描述"},u={data:function(){var e=function(e,t,r){0===t.length?r(new Error(o[e.field]+"必须填写")):r()};return{loading:!1,series:{seriesNum:"",remark:""},rules:{seriesNum:[{validator:e}],remark:[{validator:e}]}}},mounted:function(){this.series=this.$route.query.series},methods:{setDefault:function(){this.$refs.editSeries.resetFields()},onSubmit:function(){var e=this;this.loading||(this.loading=!0,this.$refs.editSeries.validate((function(t,r){if(t)e.series.createTime=Object(a["d"])(e.series.createTime,"{y}-{m}-{d} {h}:{i}:{s}"),Object(n["c"])(e.series).then((function(t){var r=t.msg;e.$notify({title:"操作成功",message:r,type:"success",duration:2e3}),e.loading=!1,e.setDefault(),e.toSeriesList()})).catch((function(){e.loading=!1}));else{var s=r[Object.keys(r)[0]][0].message;e.$message({message:s,type:"error"}),e.loading=!1}})))},handleChange:function(e){var t=e.length;t-=1,this.dept.parentId=e[t]},toSeriesList:function(){this.$router.push({path:"/configManagement/productSeries"})}}},c=u,l=r("2877"),d=Object(l["a"])(c,s,i,!1,null,"65e88b04",null);t["default"]=d.exports},"7d09":function(e,t,r){"use strict";r.d(t,"d",(function(){return i})),r.d(t,"a",(function(){return n})),r.d(t,"c",(function(){return a})),r.d(t,"b",(function(){return o}));r("55dd");var s=r("b775");function i(e){return Object(s["a"])({url:"/device/series/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function n(e){return Object(s["a"])({url:"/device/series/add",method:"post",data:e})}function a(e){return Object(s["a"])({url:"/device/series/edit",method:"post",data:e})}function o(e){return Object(s["a"])({url:"/device/series/delete",method:"post",data:{ids:e}})}}}]); (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-47af9ee4"],{"544f":function(e,t,r){"use strict";r.r(t);var s=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-container",[r("el-main",[r("el-form",{ref:"editSeries",attrs:{model:e.series,rules:e.rules,"label-width":"80px"}},[r("el-form-item",{attrs:{prop:"seriesNum",label:"产品系列号"}},[r("el-input",{model:{value:e.series.seriesNum,callback:function(t){e.$set(e.series,"seriesNum",t)},expression:"series.seriesNum"}})],1),e._v(" "),r("el-form-item",{attrs:{prop:"remark",label:"产品系列详情:"}},[r("el-input",{model:{value:e.series.remark,callback:function(t){e.$set(e.series,"remark",t)},expression:"series.remark"}})],1),e._v(" "),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("修改")]),e._v(" "),r("el-button",{on:{click:e.toSeriesList}},[e._v("取消")])],1)],1)],1)],1)},i=[],n=(r("ac6a"),r("456d"),r("7d09")),a=r("ed08"),o={seriesNum:"系列号",remark:"描述"},u={data:function(){var e=function(e,t,r){0===t.length?r(new Error(o[e.field]+"必须填写")):r()};return{loading:!1,series:{seriesNum:"",remark:""},rules:{seriesNum:[{validator:e}],remark:[{validator:e}]}}},mounted:function(){this.series=this.$route.query.series},methods:{setDefault:function(){this.$refs.editSeries.resetFields()},onSubmit:function(){var e=this;this.loading||(this.loading=!0,this.$refs.editSeries.validate((function(t,r){if(t)e.series.createTime=Object(a["d"])(e.series.createTime,"{y}-{m}-{d} {h}:{i}:{s}"),Object(n["c"])(e.series).then((function(t){var r=t.msg;e.$notify({title:"操作成功",message:r,type:"success",duration:2e3}),e.loading=!1,e.setDefault(),e.toSeriesList()})).catch((function(){e.loading=!1}));else{var s=r[Object.keys(r)[0]][0].message;e.$message({message:s,type:"error"}),e.loading=!1}})))},handleChange:function(e){var t=e.length;t-=1,this.dept.parentId=e[t]},toSeriesList:function(){this.$router.push({path:"/configManagement/productSeries"})}}},c=u,l=r("2877"),d=Object(l["a"])(c,s,i,!1,null,"65e88b04",null);t["default"]=d.exports},"7d09":function(e,t,r){"use strict";r.d(t,"e",(function(){return i})),r.d(t,"a",(function(){return n})),r.d(t,"c",(function(){return a})),r.d(t,"b",(function(){return o})),r.d(t,"d",(function(){return u}));r("55dd");var s=r("b775");function i(e){return Object(s["a"])({url:"/device/series/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function n(e){return Object(s["a"])({url:"/device/series/add",method:"post",data:e})}function a(e){return Object(s["a"])({url:"/device/series/edit",method:"post",data:e})}function o(e){return Object(s["a"])({url:"/device/series/delete",method:"post",data:{ids:e}})}function u(){return Object(s["a"])({url:"/device/series/listAll",method:"post"})}}}]);
\ No newline at end of file \ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-636f8118"],{"7d09":function(e,t,r){"use strict";r.d(t,"e",(function(){return i})),r.d(t,"a",(function(){return n})),r.d(t,"c",(function(){return a})),r.d(t,"b",(function(){return o})),r.d(t,"d",(function(){return u}));r("55dd");var s=r("b775");function i(e){return Object(s["a"])({url:"/device/series/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function n(e){return Object(s["a"])({url:"/device/series/add",method:"post",data:e})}function a(e){return Object(s["a"])({url:"/device/series/edit",method:"post",data:e})}function o(e){return Object(s["a"])({url:"/device/series/delete",method:"post",data:{ids:e}})}function u(){return Object(s["a"])({url:"/device/series/listAll",method:"post"})}},ff07:function(e,t,r){"use strict";r.r(t);var s=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-container",[r("el-main",[r("el-form",{ref:"addSeries",attrs:{model:e.series,rules:e.rules,"label-width":"80px"}},[r("el-form-item",{attrs:{prop:"seriesNum",label:"产品系列号"}},[r("el-input",{model:{value:e.series.seriesNum,callback:function(t){e.$set(e.series,"seriesNum",t)},expression:"series.seriesNum"}})],1),e._v(" "),r("el-form-item",{attrs:{prop:"remark",label:"产品系列详情:"}},[r("el-input",{model:{value:e.series.remark,callback:function(t){e.$set(e.series,"remark",t)},expression:"series.remark"}})],1),e._v(" "),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("添加")]),e._v(" "),r("el-button",{on:{click:e.toSeriesList}},[e._v("取消")])],1)],1)],1)],1)},i=[],n=(r("ac6a"),r("456d"),r("7d09")),a={seriesNum:"系列号",remark:"描述"},o={data:function(){var e=function(e,t,r){0===t.length?r(new Error(a[e.field]+"必须填写")):r()};return{loading:!1,series:{seriesNum:"",remark:""},rules:{seriesNum:[{validator:e}],remark:[{validator:e}]}}},mounted:function(){},methods:{setDefault:function(){this.$refs.addSeries.resetFields()},onSubmit:function(){var e=this;this.loading||(this.loading=!0,this.$refs.addSeries.validate((function(t,r){if(t)Object(n["a"])(e.series).then((function(t){var r=t.msg;e.$notify({title:"操作成功",message:r,type:"success",duration:2e3}),e.loading=!1,e.setDefault(),e.toSeriesList()})).catch((function(){e.loading=!1}));else{var s=r[Object.keys(r)[0]][0].message;e.$message({message:s,type:"error"}),e.loading=!1}})))},toSeriesList:function(){this.$router.push({path:"/configManagement/productSeries"})}}},u=o,l=r("2877"),c=Object(l["a"])(u,s,i,!1,null,"2984fed9",null);t["default"]=c.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-636f8118"],{"7d09":function(e,t,r){"use strict";r.d(t,"d",(function(){return i})),r.d(t,"a",(function(){return n})),r.d(t,"c",(function(){return a})),r.d(t,"b",(function(){return o}));r("55dd");var s=r("b775");function i(e){return Object(s["a"])({url:"/device/series/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function n(e){return Object(s["a"])({url:"/device/series/add",method:"post",data:e})}function a(e){return Object(s["a"])({url:"/device/series/edit",method:"post",data:e})}function o(e){return Object(s["a"])({url:"/device/series/delete",method:"post",data:{ids:e}})}},ff07:function(e,t,r){"use strict";r.r(t);var s=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-container",[r("el-main",[r("el-form",{ref:"addSeries",attrs:{model:e.series,rules:e.rules,"label-width":"80px"}},[r("el-form-item",{attrs:{prop:"seriesNum",label:"产品系列号"}},[r("el-input",{model:{value:e.series.seriesNum,callback:function(t){e.$set(e.series,"seriesNum",t)},expression:"series.seriesNum"}})],1),e._v(" "),r("el-form-item",{attrs:{prop:"remark",label:"产品系列详情:"}},[r("el-input",{model:{value:e.series.remark,callback:function(t){e.$set(e.series,"remark",t)},expression:"series.remark"}})],1),e._v(" "),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("添加")]),e._v(" "),r("el-button",{on:{click:e.toSeriesList}},[e._v("取消")])],1)],1)],1)],1)},i=[],n=(r("ac6a"),r("456d"),r("7d09")),a={seriesNum:"系列号",remark:"描述"},o={data:function(){var e=function(e,t,r){0===t.length?r(new Error(a[e.field]+"必须填写")):r()};return{loading:!1,series:{seriesNum:"",remark:""},rules:{seriesNum:[{validator:e}],remark:[{validator:e}]}}},mounted:function(){this.selectDeptParent()},methods:{setDefault:function(){this.$refs.addSeries.resetFields()},onSubmit:function(){var e=this;this.loading||(this.loading=!0,this.$refs.addSeries.validate((function(t,r){if(t)Object(n["a"])(e.series).then((function(t){var r=t.msg;e.$notify({title:"操作成功",message:r,type:"success",duration:2e3}),e.loading=!1,e.setDefault(),e.toSeriesList()})).catch((function(){e.loading=!1}));else{var s=r[Object.keys(r)[0]][0].message;e.$message({message:s,type:"error"}),e.loading=!1}})))},toSeriesList:function(){this.$router.push({path:"/configManagement/productSeries"})}}},u=o,l=r("2877"),c=Object(l["a"])(u,s,i,!1,null,"1cf0be8b",null);t["default"]=c.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-acf60ff8"],{"7d09":function(e,t,n){"use strict";n.d(t,"e",(function(){return r})),n.d(t,"a",(function(){return s})),n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return c})),n.d(t,"d",(function(){return o}));n("55dd");var i=n("b775");function r(e){return Object(i["a"])({url:"/device/series/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function s(e){return Object(i["a"])({url:"/device/series/add",method:"post",data:e})}function a(e){return Object(i["a"])({url:"/device/series/edit",method:"post",data:e})}function c(e){return Object(i["a"])({url:"/device/series/delete",method:"post",data:{ids:e}})}function o(){return Object(i["a"])({url:"/device/series/listAll",method:"post"})}},aa98:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return s})),n.d(t,"e",(function(){return a})),n.d(t,"a",(function(){return c})),n.d(t,"d",(function(){return o}));n("55dd");var i=n("b775");function r(e){return Object(i["a"])({url:"/device/device/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function s(e){return Object(i["a"])({url:"/device/device/importDevice",method:"post",data:e})}function a(e){return Object(i["a"])({url:"/device/device/updateDeviceSeriesBatch",method:"post",data:e})}function c(e){return Object(i["a"])({url:"/device/device/delete",method:"post",data:{ids:e}})}function o(e){return Object(i["a"])({url:"/device/device/saveChannel",method:"post",data:e})}},bf40:function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-container",[n("el-main",[n("el-form",{ref:"importDevice",attrs:{model:e.device,rules:e.rules,"label-width":"80px"}},[n("el-form-item",{attrs:{prop:"deptId",label:"所属部门"}},[n("el-cascader",{attrs:{"expand-trigger":"hover",options:e.options,"show-all-levels":!1,"change-on-select":""},on:{change:e.handleChange},model:{value:e.selectDeptParents,callback:function(t){e.selectDeptParents=t},expression:"selectDeptParents"}})],1),e._v(" "),n("el-form-item",{attrs:{prop:"seriesId",label:"所属系列"}},[n("el-select",{attrs:{placeholder:"请选择"},model:{value:e.device.seriesId,callback:function(t){e.$set(e.device,"seriesId",t)},expression:"device.seriesId"}},e._l(e.selectSeriesOptions,(function(e){return n("el-option",{key:e.seriesId,attrs:{label:e.seriesNum,value:e.seriesId}})})),1)],1),e._v(" "),e._l(e.device.imeis,(function(t,i){return n("el-form-item",{key:i,attrs:{label:"第"+(i+1)+"个imei: ",prop:"imeis."+i+".value","label-width":"20"}},[n("el-row",[n("el-col",{attrs:{span:14}},[n("el-input",{model:{value:t.value,callback:function(n){e.$set(t,"value",n)},expression:"imei.value"}})],1),e._v(" "),n("el-col",{attrs:{span:5}},[n("el-button",{on:{click:function(n){return n.preventDefault(),e.removeImeis(t)}}},[e._v("\n 删除\n ")])],1)],1)],1)})),e._v(" "),n("el-form-item",[n("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("添加")]),e._v(" "),n("el-button",{on:{click:e.addImeis}},[e._v("新增imei")]),e._v(" "),n("el-button",{on:{click:e.toDeviceList}},[e._v("取消")])],1)],2)],1)],1)},r=[],s=(n("456d"),n("ac6a"),n("96cf"),n("3b8d")),a=n("fe05"),c=n("7d09"),o=n("aa98"),u={deptId:"部门Id",seriesId:"系列号",imeis:"imeis"},d={data:function(){var e=function(e,t,n){void 0===t||null===t||0===t.length?n(new Error(u[e.field]+"必须填写")):n()};return{loading:!1,device:{deptIdList:[],seriesIdList:[],imeis:[{value:""}]},rules:{deptId:[{validator:e}],seriesId:[{validator:e}]},options:[],selectSeriesOptions:[],selectDeptParents:[],defaultProps:{children:"children",label:"label"}}},mounted:function(){this.getFormData()},methods:{getFormData:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.selectDeptParent();case 2:return e.next=4,this.selectSeries();case 4:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),setDefault:function(){this.$refs.device=[]},onSubmit:function(){var e=this;this.loading||(this.loading=!0,this.$refs.importDevice.validate((function(t,n){if(t){var i=e.device.imeis;e.device.imeis=[],i.forEach((function(t){e.device.imeis.push(t.value)})),Object(o["c"])(e.device).then((function(t){var n=t.msg;e.$notify({title:"操作成功",message:n,type:"success",duration:2e3}),e.setDefault(),e.toDeviceList(),e.loading=!1})).catch((function(t){console.log(t),e.loading=!1}))}else{var r=n[Object.keys(n)[0]][0].message;e.$message({message:r,type:"error"}),e.loading=!1}})))},toDeviceList:function(){this.$router.push({path:"/deviceManagement/device"})},selectSeries:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(c["d"])().then((function(e){var n=e.data;t.selectSeriesOptions=n}));case 2:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}(),selectDeptParent:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(a["e"])().then((function(e){var n=e.data;t.options=n}));case 2:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}(),handleChange:function(e){var t=e.length;t-=1,this.device.deptId=e[t]},addImeis:function(){this.device.imeis.push({value:""})},removeImeis:function(e){var t=this.device.imeis.indexOf(e);-1!==t&&this.device.imeis.splice(t,1)}}},l=d,p=n("2877"),f=Object(p["a"])(l,i,r,!1,null,"675253c4",null);t["default"]=f.exports},fe05:function(e,t,n){"use strict";n.d(t,"c",(function(){return r})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return a})),n.d(t,"a",(function(){return c})),n.d(t,"d",(function(){return o})),n.d(t,"b",(function(){return u}));n("55dd");var i=n("b775");function r(e){return Object(i["a"])({url:"/sys/dept/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function s(){return Object(i["a"])({url:"/sys/dept/listAll",method:"post"})}function a(){return Object(i["a"])({url:"/sys/dept/listAllTree",method:"post"})}function c(e){return Object(i["a"])({url:"/sys/dept/add",method:"post",data:e})}function o(e){return Object(i["a"])({url:"/sys/dept/edit",method:"post",data:e})}function u(e){return Object(i["a"])({url:"/sys/dept/delete",method:"post",data:{ids:e}})}}}]);
\ No newline at end of file
...@@ -2,14 +2,15 @@ ...@@ -2,14 +2,15 @@
mvn clean package -Dmaven.test.skip=true -U mvn clean package -Dmaven.test.skip=true -U
#docker build -t hub.c.163.com/springcloud/eureka . # docker build -t hub.c.163.com/springcloud/eureka .
#docker push hub.c.163.com/springcloud/eureka # docker push hub.c.163.com/springcloud/eureka
docker build -t zzrdark/eureka . # docker build -t zzrdark/springcloud_device .
docker push zzrdark/eureka
# docker build -t 192.168.2.244:5000/eureka . # docker push zzrdark/eureka
# docker push 192.168.2.244:5000/eureka docker build -t 192.168.2.244:5000/springcloud_device .
\ No newline at end of file
docker push 192.168.2.244:5000/springcloud_device
\ No newline at end of file
...@@ -122,4 +122,25 @@ public class DeviceInfoController { ...@@ -122,4 +122,25 @@ public class DeviceInfoController {
return R.ok(); return R.ok();
} }
/**
* 保存
*/
@RequestMapping("/updateDeviceChannelBatch")
public R updateDeviceChannelBatch(@RequestBody DevicesDto devicesDto){
List<DeviceInfoEntity> deviceInfoEntityList = new LinkedList<>();
if (devicesDto.getImeis() != null && devicesDto.getImeis().size() != 0) {
devicesDto.getImeis().forEach(str -> {
DeviceInfoEntity deviceInfoEntity = new DeviceInfoEntity();
deviceInfoEntity.setImei(str);
deviceInfoEntity.setChannelNums(devicesDto.getChannelNums());
deviceInfoEntity.setChannelNumsMessage(devicesDto.getChannelNumsMessage());
deviceInfoEntity.setChannelRules(devicesDto.getChannelRules());
deviceInfoEntityList.add(deviceInfoEntity);
});
}
deviceInfoService.updateBatchByImei(deviceInfoEntityList);
return R.ok();
}
} }
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/cneeds_server?useUnicode=true&characterEncoding=UTF-8&useSSL=false
password: cneeds!QAZ1qaz
username: root
eureka:
client:
service-url:
defaultZone: http://127.0.0.1:8761/eureka/
instance:
prefer-ip-address: true
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.2.244:3306/cneeds_server?useUnicode=true&characterEncoding=UTF-8&useSSL=false
password: cneeds!QAZ1qaz
username: root
# hikari:
# driver-class-name: com.mysql.jdbc.Driver
# url: jdbc:mysql://192.168.2.244:3306/cneeds_server?useUnicode=true&characterEncoding=UTF-8&useSSL=false
# username: root
# password: cneeds!QAZ1qaz
# datasource:
# type: com.alibaba.druid.pool.DruidDataSource
# druid:
# driver-class-name: com.mysql.jdbc.Driver
# url: jdbc:mysql://192.168.2.244:3306/cneeds_server?useUnicode=true&characterEncoding=UTF-8&useSSL=false
# username: root
# password: cneeds!QAZ1qaz
# initial-size: 10
# max-active: 100
# min-idle: 10
# max-wait: 60000
# pool-prepared-statements: true
# max-pool-prepared-statement-per-connection-size: 20
# time-between-eviction-runs-millis: 60000
# min-evictable-idle-time-millis: 300000
# #Oracle需要打开注释
# #validation-query: SELECT 1 FROM DUAL
# test-while-idle: true
# test-on-borrow: false
# test-on-return: false
# stat-view-servlet:
# enabled: true
# url-pattern: /druid/*
# #login-username: admin
# #login-password: admin
# filter:
# stat:
# log-slow-sql: true
# slow-sql-millis: 1000
# merge-sql: false
# wall:
# config:
# multi-statement-allow: true
eureka:
client:
service-url:
defaultZone: http://192.168.2.244:8761/eureka/
instance:
prefer-ip-address: true
# ip-address: 192.168.2.244
mybatis-plus:
mapper-locations: classpath:mapper/*.xml
#实体扫描,多个package用逗号或者分号分隔
typeAliasesPackage: com.mx.cneeds.server.entity
global-config:
#数据库相关配置
db-config:
#主键类型 AUTO:"数据库ID自增", INPUT:"用户输入ID", ID_WORKER:"全局唯一ID (数字类型唯一ID)", UUID:"全局唯一ID UUID";
id-type: AUTO
#字段策略 IGNORED:"忽略判断",NOT_NULL:"非 NULL 判断"),NOT_EMPTY:"非空判断"
field-strategy: NOT_NULL
#驼峰下划线转换
column-underline: true
logic-delete-value: -1
logic-not-delete-value: 0
banner: false
#原生配置
configuration:
map-underscore-to-camel-case: true
cache-enabled: false
call-setters-on-nulls: true
jdbc-type-for-null: 'null'
spring: spring:
profiles: profiles:
active: dev active: prod
application: application:
name: cneeds-server-device name: cneeds-server-device
...@@ -8,3 +8,27 @@ server: ...@@ -8,3 +8,27 @@ server:
port: 9002 port: 9002
servlet: servlet:
context-path: / context-path: /
mybatis-plus:
mapper-locations: classpath:mapper/*.xml
#实体扫描,多个package用逗号或者分号分隔
typeAliasesPackage: com.mx.cneeds.server.entity
global-config:
#数据库相关配置
db-config:
#主键类型 AUTO:"数据库ID自增", INPUT:"用户输入ID", ID_WORKER:"全局唯一ID (数字类型唯一ID)", UUID:"全局唯一ID UUID";
id-type: AUTO
#字段策略 IGNORED:"忽略判断",NOT_NULL:"非 NULL 判断"),NOT_EMPTY:"非空判断"
field-strategy: NOT_NULL
#驼峰下划线转换
column-underline: true
logic-delete-value: -1
logic-not-delete-value: 0
banner: false
#原生配置
configuration:
map-underscore-to-camel-case: true
cache-enabled: false
call-setters-on-nulls: true
jdbc-type-for-null: 'null'
\ No newline at end of file
eureka:
client:
service-url:
#defaultZone: http://eureka2:8762/eureka/
defaultZone: http://localhost:8761/eureka/
## 单机的时候开启
register-with-eureka: false
fetch-registry: 'false'

# server:
# enable-self-preservation: false
instance:
prefer-ip-address: true
eureka:
client:
service-url:
#defaultZone: http://eureka2:8762/eureka/
defaultZone: http://localhost:8761/eureka/
## 单机的时候开启
register-with-eureka: false
fetch-registry: 'false'

# server:
# enable-self-preservation: false
instance:
prefer-ip-address: true
ip-address: 192.168.2.244
\ No newline at end of file
eureka:
client:
service-url:
#defaultZone: http://eureka2:8762/eureka/
defaultZone: http://localhost:8761/eureka/
## 单机的时候开启
register-with-eureka: false
fetch-registry: 'false'

# server:
# enable-self-preservation: false
instance:
prefer-ip-address: true
spring: spring:
profiles: profiles:
active: dev active: prod
application: application:
name: cneeds-server-eureka name: cneeds-server-eureka
server: server:
......
...@@ -7,9 +7,9 @@ mvn clean package -Dmaven.test.skip=true -U ...@@ -7,9 +7,9 @@ mvn clean package -Dmaven.test.skip=true -U
#docker push hub.c.163.com/springcloud/eureka #docker push hub.c.163.com/springcloud/eureka
docker build -t zzrdark/eureka . #docker build -t zzrdark/eureka .
docker push zzrdark/eureka #docker push zzrdark/eureka
# docker build -t 192.168.2.244:5000/eureka . docker build -t 192.168.2.244:5000/springcloud_user .
# docker push 192.168.2.244:5000/eureka docker push 192.168.2.244:5000/springcloud_user
\ No newline at end of file \ No newline at end of file
...@@ -53,26 +53,5 @@ eureka: ...@@ -53,26 +53,5 @@ eureka:
ip-address: 192.168.2.244 ip-address: 192.168.2.244
mybatis-plus:
mapper-locations: classpath:mapper/*.xml
#实体扫描,多个package用逗号或者分号分隔
typeAliasesPackage: com.mx.cneeds.server.entity
global-config:
#数据库相关配置
db-config:
#主键类型 AUTO:"数据库ID自增", INPUT:"用户输入ID", ID_WORKER:"全局唯一ID (数字类型唯一ID)", UUID:"全局唯一ID UUID";
id-type: AUTO
#字段策略 IGNORED:"忽略判断",NOT_NULL:"非 NULL 判断"),NOT_EMPTY:"非空判断"
field-strategy: NOT_NULL
#驼峰下划线转换
column-underline: true
logic-delete-value: -1
logic-not-delete-value: 0
banner: false
#原生配置
configuration:
map-underscore-to-camel-case: true
cache-enabled: false
call-setters-on-nulls: true
jdbc-type-for-null: 'null'
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/cneeds_server?useUnicode=true&characterEncoding=UTF-8&useSSL=false
password: cneeds!QAZ1qaz
username: root
eureka:
client:
service-url:
defaultZone: http://127.0.0.1:8761/eureka/
instance:
prefer-ip-address: true
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.2.244:3306/cneeds_server?useUnicode=true&characterEncoding=UTF-8&useSSL=false
password: cneeds!QAZ1qaz
username: root
# hikari:
# driver-class-name: com.mysql.jdbc.Driver
# url: jdbc:mysql://192.168.2.244:3306/cneeds_server?useUnicode=true&characterEncoding=UTF-8&useSSL=false
# username: root
# password: cneeds!QAZ1qaz
# datasource:
# type: com.alibaba.druid.pool.DruidDataSource
# druid:
# driver-class-name: com.mysql.jdbc.Driver
# url: jdbc:mysql://192.168.2.244:3306/cneeds_server?useUnicode=true&characterEncoding=UTF-8&useSSL=false
# username: root
# password: cneeds!QAZ1qaz
# initial-size: 10
# max-active: 100
# min-idle: 10
# max-wait: 60000
# pool-prepared-statements: true
# max-pool-prepared-statement-per-connection-size: 20
# time-between-eviction-runs-millis: 60000
# min-evictable-idle-time-millis: 300000
# #Oracle需要打开注释
# #validation-query: SELECT 1 FROM DUAL
# test-while-idle: true
# test-on-borrow: false
# test-on-return: false
# stat-view-servlet:
# enabled: true
# url-pattern: /druid/*
# #login-username: admin
# #login-password: admin
# filter:
# stat:
# log-slow-sql: true
# slow-sql-millis: 1000
# merge-sql: false
# wall:
# config:
# multi-statement-allow: true
eureka:
client:
service-url:
defaultZone: http://192.168.2.244:8761/eureka/
instance:
prefer-ip-address: true
ip-address: 192.168.2.244
mybatis-plus:
mapper-locations: classpath:mapper/*.xml
#实体扫描,多个package用逗号或者分号分隔
typeAliasesPackage: com.mx.cneeds.server.entity
global-config:
#数据库相关配置
db-config:
#主键类型 AUTO:"数据库ID自增", INPUT:"用户输入ID", ID_WORKER:"全局唯一ID (数字类型唯一ID)", UUID:"全局唯一ID UUID";
id-type: AUTO
#字段策略 IGNORED:"忽略判断",NOT_NULL:"非 NULL 判断"),NOT_EMPTY:"非空判断"
field-strategy: NOT_NULL
#驼峰下划线转换
column-underline: true
logic-delete-value: -1
logic-not-delete-value: 0
banner: false
#原生配置
configuration:
map-underscore-to-camel-case: true
cache-enabled: false
call-setters-on-nulls: true
jdbc-type-for-null: 'null'
spring: spring:
profiles: profiles:
active: dev active: prod
application: application:
name: cneeds-server-user name: cneeds-server-user
...@@ -8,3 +8,26 @@ server: ...@@ -8,3 +8,26 @@ server:
port: 9001 port: 9001
servlet: servlet:
context-path: / context-path: /
mybatis-plus:
mapper-locations: classpath:mapper/*.xml
#实体扫描,多个package用逗号或者分号分隔
typeAliasesPackage: com.mx.cneeds.server.entity
global-config:
#数据库相关配置
db-config:
#主键类型 AUTO:"数据库ID自增", INPUT:"用户输入ID", ID_WORKER:"全局唯一ID (数字类型唯一ID)", UUID:"全局唯一ID UUID";
id-type: AUTO
#字段策略 IGNORED:"忽略判断",NOT_NULL:"非 NULL 判断"),NOT_EMPTY:"非空判断"
field-strategy: NOT_NULL
#驼峰下划线转换
column-underline: true
logic-delete-value: -1
logic-not-delete-value: 0
banner: false
#原生配置
configuration:
map-underscore-to-camel-case: true
cache-enabled: false
call-setters-on-nulls: true
jdbc-type-for-null: 'null'
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