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

Merge remote-tracking branch 'origin/master'

parents 523023f9 0c976ebc
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
</div> </div>
</template> </template>
<script> <script>
import { mapState } from "vuex"; import { mapState } from "vuex";
import storage from "@/utils/js/Storage"; import storage from "@/utils/js/Storage";
import { export2Excel } from "@/utils/js/exportExcel"; import { export2Excel } from "@/utils/js/exportExcel";
...@@ -100,7 +100,7 @@ export default { ...@@ -100,7 +100,7 @@ export default {
title: "取件人联系电话", title: "取件人联系电话",
dataIndex: "phone", dataIndex: "phone",
width: 150, width: 150,
customRender: (text) => text.phone || "--", customRender: (text) => text || "--",
}, },
{ {
title: "取件码", title: "取件码",
...@@ -298,5 +298,4 @@ export default { ...@@ -298,5 +298,4 @@ export default {
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped></style>
</style>
\ No newline at end of file
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</div> </div>
</template> </template>
<script> <script>
import { mapState } from "vuex"; import { mapState } from "vuex";
import storage from "@/utils/js/Storage"; import storage from "@/utils/js/Storage";
import { export2Excel } from "@/utils/js/exportExcel"; import { export2Excel } from "@/utils/js/exportExcel";
...@@ -40,7 +40,7 @@ const tHeader = [ ...@@ -40,7 +40,7 @@ const tHeader = [
"箱号", "箱号",
"联系电话", "联系电话",
"取件时间", "取件时间",
"邮递员", "操作人身份",
"存件时间", "存件时间",
]; // 导出的表头名信息 ]; // 导出的表头名信息
const filterVal = [ const filterVal = [
...@@ -51,9 +51,14 @@ const filterVal = [ ...@@ -51,9 +51,14 @@ const filterVal = [
"boxNo", "boxNo",
"phone", "phone",
"update_time", "update_time",
"courier", "userType",
"create_time", "create_time",
]; // 导出的表头字段名,需要导出表格字段名 ]; // 导出的表头字段名,需要导出表格字段名
let userType = {
1: "用户",
2: "管理员",
3: "邮递员",
};
export default { export default {
components: {}, components: {},
data() { data() {
...@@ -83,7 +88,7 @@ export default { ...@@ -83,7 +88,7 @@ export default {
title: "联系电话", title: "联系电话",
dataIndex: "phone", dataIndex: "phone",
width: 150, width: 150,
customRender: (text) => text.phone || "--", customRender: (text) => text || "--",
}, },
{ {
title: "取件方式", title: "取件方式",
...@@ -122,9 +127,11 @@ export default { ...@@ -122,9 +127,11 @@ export default {
}, },
{ {
title: "操作人身份", title: "操作人身份",
dataIndex: "courier", dataIndex: "userType",
width: 150, width: 150,
customRender: (text) => text || "--", customRender: (text) => {
return this.userType[text];
},
}, },
{ {
title: "存件时间", title: "存件时间",
...@@ -136,6 +143,7 @@ export default { ...@@ -136,6 +143,7 @@ export default {
return { return {
baseurl: process.env.VUE_APP_API_PHP_URL, baseurl: process.env.VUE_APP_API_PHP_URL,
siteId: storage.get(2, "siteId"), siteId: storage.get(2, "siteId"),
userType,
columns, columns,
tHeader, tHeader,
filterVal, filterVal,
...@@ -242,11 +250,8 @@ export default { ...@@ -242,11 +250,8 @@ export default {
// 深度克隆避免影响页面表格展示 // 深度克隆避免影响页面表格展示
let data = this.$_.cloneDeep(this.excelData); let data = this.$_.cloneDeep(this.excelData);
for (let item of data) { for (let item of data) {
Object.keys(obj).forEach((key) => { item.type = obj[item.type];
if (item.type == key) { item.userType = this.userType[item.userType];
item.type = obj[key];
}
});
} }
export2Excel( export2Excel(
this.tHeader, this.tHeader,
...@@ -261,11 +266,8 @@ export default { ...@@ -261,11 +266,8 @@ export default {
return; return;
} }
for (let item of data) { for (let item of data) {
Object.keys(obj).forEach((key) => { item.type = obj[item.type];
if (item.type == key) { item.userType = this.userType[item.userType];
item.type = obj[key];
}
});
} }
export2Excel( export2Excel(
this.tHeader, this.tHeader,
...@@ -306,5 +308,4 @@ export default { ...@@ -306,5 +308,4 @@ export default {
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped></style>
</style>
\ No newline at end of file
...@@ -318,6 +318,7 @@ public class PageEventServiceImpl extends AbstractCRUDServiceImpl<PageEventDao, ...@@ -318,6 +318,7 @@ public class PageEventServiceImpl extends AbstractCRUDServiceImpl<PageEventDao,
} }
} }
for (Map.Entry<String, List<String>> entry : group.entrySet()) { for (Map.Entry<String, List<String>> entry : group.entrySet()) {
PageCensusPdu query = new PageCensusPdu(); PageCensusPdu query = new PageCensusPdu();
query.setDeviceNumList(entry.getValue()); query.setDeviceNumList(entry.getValue());
List<PageEventCensusVo> list = dao.getPageClickEventCensus(query); List<PageEventCensusVo> list = dao.getPageClickEventCensus(query);
...@@ -329,6 +330,12 @@ public class PageEventServiceImpl extends AbstractCRUDServiceImpl<PageEventDao, ...@@ -329,6 +330,12 @@ public class PageEventServiceImpl extends AbstractCRUDServiceImpl<PageEventDao,
List<PageEventCensusVo> listDay = dao.getPageClickEventCensus(query); List<PageEventCensusVo> listDay = dao.getPageClickEventCensus(query);
if(CollectionUtils.isNotEmpty(listDay)) { if(CollectionUtils.isNotEmpty(listDay)) {
cacheService.hset(RedisKey.KEY_DEVICE_EVENT_CLICK_CACHE_DAY, entry.getKey(), listDay.get(0)); cacheService.hset(RedisKey.KEY_DEVICE_EVENT_CLICK_CACHE_DAY, entry.getKey(), listDay.get(0));
}else {
PageEventCensusVo init = new PageEventCensusVo();
init.setTotal(0);
init.setEventCode("Click");
init.setEventName("点击");
cacheService.hset(RedisKey.KEY_DEVICE_EVENT_CLICK_CACHE_DAY, entry.getKey(), init);
} }
} }
} }
......
...@@ -357,4 +357,17 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic ...@@ -357,4 +357,17 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
return Rest.fail("初始化用户数据异常!"); return Rest.fail("初始化用户数据异常!");
} }
} }
@PostMapping(value = "gust")
@UnAuth
public Rest<String> guestUser(@RequestBody UserEntity user) {
try {
service.save(user);
return Rest.ok("添加用户成功!");
} catch (Exception e) {
log.error("添加用户错误", e);
return Rest.fail("添加用户异常!");
}
}
} }
\ No newline at end of file
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