diff --git a/ant-design-vue-jeecg/src/views/system/UserList.vue b/ant-design-vue-jeecg/src/views/system/UserList.vue index 97de99b..624fc8c 100644 --- a/ant-design-vue-jeecg/src/views/system/UserList.vue +++ b/ant-design-vue-jeecg/src/views/system/UserList.vue @@ -22,8 +22,6 @@ </a-select> </a-form-item> </a-col> - - <template v-if="toggleSearchStatus"> <a-col :md="6" :sm="8"> <a-form-item label="真实名字"> @@ -58,7 +56,6 @@ </a> </span> </a-col> - </a-row> </a-form> </div> @@ -106,6 +103,7 @@ </div> <a-table + :scroll="{x: 1200}" ref="table" bordered size="middle" @@ -117,7 +115,7 @@ :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"> - <template slot="avatarslot" slot-scope="text, record, index"> + <template slot="avatarslot" slot-scope="text, record"> <div class="anty-img-wrap"> <a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user"/> </div> @@ -240,7 +238,7 @@ export default { { title: '头像', align: "center", - width: 120, + width: 100, dataIndex: 'avatar', scopedSlots: {customRender: "avatarslot"} }, @@ -273,7 +271,6 @@ export default { { title: '负责部门', align: "center", - width: 180, dataIndex: 'departIds_dictText' }, { @@ -285,9 +282,10 @@ export default { { title: '操作', dataIndex: 'action', + fixed: 'right', scopedSlots: {customRender: 'action'}, align: "center", - width: 170 + width: 150 } ], diff --git a/huaheng-wms-core/src/main/java/org/jeecg/JeecgSystemApplication.java b/huaheng-wms-core/src/main/java/org/jeecg/JeecgSystemApplication.java index 2d47fc7..c6b2cb4 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/JeecgSystemApplication.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/JeecgSystemApplication.java @@ -1,10 +1,15 @@ package org.jeecg; +import java.net.Inet4Address; +import java.net.Inet6Address; import java.net.InetAddress; import java.net.NetworkInterface; +import java.net.SocketException; import java.net.UnknownHostException; import java.util.Enumeration; +import javax.transaction.SystemException; + import org.jeecg.common.util.oConvertUtils; import org.springframework.boot.SpringApplication; //import org.springframework.boot.autoconfigure.EnableAutoConfiguration; @@ -32,7 +37,7 @@ public class JeecgSystemApplication extends SpringBootServletInitializer { return application.sources(JeecgSystemApplication.class); } - public static void main(String[] args) throws UnknownHostException { + public static void main(String[] args) throws SystemException, UnknownHostException { ConfigurableApplicationContext application = SpringApplication.run(JeecgSystemApplication.class, args); Environment env = application.getEnvironment(); String ip = getLocalHostExactAddress().getHostAddress(); @@ -46,40 +51,29 @@ public class JeecgSystemApplication extends SpringBootServletInitializer { + "WEB External: \thttp://" + ip + ":" + port + path + "/index.html\n\t" + "API External: \thttp://" + ip + ":" + port + path + "/\n\n\t" + "Swagger文档: \thttp://" + ip + ":" + port + path + "/doc.html\n\n\t" - + "The following profiles are active: " + profiles + "\n" + + "The following profiles are active: [" + profiles + "]\n" + "----------------------------------------------------------"); } - + public static InetAddress getLocalHostExactAddress() { try { - InetAddress candidateAddress = null; + InetAddress inetAddress = null; Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces(); while (networkInterfaces.hasMoreElements()) { - NetworkInterface iface = networkInterfaces.nextElement(); - // 该网卡接口下的ip会有多个,也需要一个个的遍历,找到自己所需要的 - for (Enumeration<InetAddress> inetAddrs = iface.getInetAddresses(); inetAddrs.hasMoreElements();) { - InetAddress inetAddr = inetAddrs.nextElement(); - // 排除loopback回环类型地址(不管是IPv4还是IPv6 只要是回环地址都会返回true) - if (!inetAddr.isLoopbackAddress()) { - if (inetAddr.isSiteLocalAddress()) { - // 如果是site-local地址,就是它了 就是我们要找的 - // ~~~~~~~~~~~~~绝大部分情况下都会在此处返回你的ip地址值~~~~~~~~~~~~~ - return inetAddr; - } - - // 若不是site-local地址 那就记录下该地址当作候选 - if (candidateAddress == null) { - candidateAddress = inetAddr; - } - + NetworkInterface netInterface = networkInterfaces.nextElement(); + // System.out.println(netInterface.getName()); + Enumeration<InetAddress> addresses = netInterface.getInetAddresses(); + while (addresses.hasMoreElements()) { + InetAddress ipTmp = addresses.nextElement(); + if (ipTmp != null && ipTmp instanceof Inet4Address && ipTmp.isSiteLocalAddress() && !ipTmp.isLoopbackAddress() + && ipTmp.getHostAddress().indexOf(":") == -1) { + inetAddress = ipTmp; } } } - - // 如果出去loopback回环地之外无其它地址了,那就回退到原始方案吧 - return candidateAddress == null ? InetAddress.getLocalHost() : candidateAddress; - } catch (Exception e) { + return inetAddress == null ? InetAddress.getLocalHost() : inetAddress; + } catch (SocketException | UnknownHostException e) { e.printStackTrace(); } return null; diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/mapper/xml/LocationMapper.xml b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/mapper/xml/LocationMapper.xml index 9d66693..80d50c5 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/mapper/xml/LocationMapper.xml +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/mapper/xml/LocationMapper.xml @@ -3,24 +3,30 @@ <mapper namespace="org.jeecg.modules.wms.config.location.mapper.LocationMapper"> <select id="getAllLocation" resultType="org.jeecg.modules.wms.config.location.entity.Location"> - select max(row) as row,max(icolumn) as icolumn,max(layer) as layer,max(grid) as grid from location where warehouse_code=#{warehouseCode} AND location_type_code=#{type} + SELECT max(row) as row, + max(icolumn) as icolumn, + max(layer) as layer, + max(grid) as grid + FROM location + WHERE warehouse_code = #{warehouseCode} + AND location_type_code = #{type} </select> + <select id="getFirstRowOfZone" resultType="java.lang.Integer"> - select min(row) from location where warehouse_code=#{warehouseCode} and location_type_code = #{locationType} + select min(row) from location where warehouse_code=#{warehouseCode} and location_type_code = #{locationType} </select> + <select id="listEmptyContainerInLocation" parameterType="org.jeecg.modules.wms.config.location.entity.Location" - resultType="org.jeecg.modules.wms.config.location.entity.Location"> - SELECT * - FROM location t + resultType="org.jeecg.modules.wms.config.location.entity.Location"> + SELECT * + FROM location t <where> AND t.warehouse_code = #{location.warehouseCode} - AND t.status='empty' - AND t.container_code !='' + AND t.status = 'empty' + AND t.container_code != '' AND t.container_code is not NULL - AND t.container_code NOT in (SELECT h.container_code from task_header h WHERE status < 100 AND - warehouse_code=#{location.warehouseCode}) - and t.`code` in(select cc.location_code from container cc where cc.`status`='empty' and cc.warehouse_code - =#{location.warehouseCode}) + AND t.container_code NOT IN (SELECT h.container_code from task_header h WHERE status < 100 AND warehouse_code = #{location.warehouseCode}) + AND t.`code` IN (SELECT cc.location_code FROM container cc WHERE cc.`status`='empty' AND cc.warehouse_code = #{location.warehouseCode}) <if test="location.zoneCode != null and location.zoneCode !=''"> and t.zone_code = #{location.zoneCode} </if> diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/controller/HuahengBaseController.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/controller/HuahengBaseController.java index ef758e7..d313b3b 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/controller/HuahengBaseController.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/controller/HuahengBaseController.java @@ -4,14 +4,10 @@ import java.util.concurrent.TimeUnit; import javax.annotation.Nonnull; -import org.apache.poi.ss.formula.functions.T; import org.jeecg.common.api.vo.Result; -import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.utils.RedissonDistributedLocker; import org.springframework.beans.factory.annotation.Autowired; -import com.baomidou.mybatisplus.extension.service.IService; - import cn.hutool.core.date.SystemClock; import cn.hutool.core.util.StrUtil; import lombok.extern.slf4j.Slf4j; @@ -26,7 +22,7 @@ public class HuahengBaseController { private RedissonDistributedLocker redissonDistributedLocker; public interface MultiProcessListener { - Result<?> doProcess(); + Result<?> doProcess() throws Exception; } /** 等待时间 */ @@ -69,17 +65,20 @@ public class HuahengBaseController { final boolean tryLock = redissonDistributedLocker.tryLock(fullLockKey, TimeUnit.SECONDS, WAIT_TIME, LEASE_TIME); final long endTime = SystemClock.now(); if (!tryLock) { - log.error("[{}]获取分布式锁失败,lockKey = {},耗时 {}ms", taskName, fullLockKey, endTime - startTime); - throw new RuntimeException(StrUtil.format("[{}]获取分布式锁失败,lockKey = {},等待时间超出10秒", taskName, fullLockKey)); + log.error("[{}] 获取分布式锁失败 lockKey = {},等待锁耗时:{}ms", taskName, fullLockKey, endTime - startTime); + throw new RuntimeException(StrUtil.format("[{}] 获取分布式锁失败 lockKey = {},等待时间超出10秒", taskName, fullLockKey)); } // 注意:一定是获取锁成功后,才进行try{}finally{释放锁} try { - log.info("[{}]获取分布式锁成功,lockKey = {},耗时 {}ms", taskName, fullLockKey, endTime - startTime); + log.info("[{}] 开始分布式事务 lockKey = {},获取锁耗时: {}ms", taskName, fullLockKey, endTime - startTime); result = multiProcessListener.doProcess(); } catch (Exception e) { - throw new RuntimeException(StrUtil.format("[{}]执行分布式事务失败,lockKey = {}", taskName, fullLockKey), e); + final long finishTime = SystemClock.now(); + throw new RuntimeException(StrUtil.format("[{}] 执行分布式事务失败 lockKey = {},事务耗时:{}ms", taskName, fullLockKey, finishTime - endTime), e); } finally { redissonDistributedLocker.unlock(fullLockKey); + final long finishTime = SystemClock.now(); + log.info("[{}] 结束分布式事务 lockKey = {},事务耗时:{}ms", taskName, fullLockKey, finishTime - endTime); } return result; diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/controller/TestController.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/controller/TestController.java index 3578cfa..b9508c7 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/controller/TestController.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/controller/TestController.java @@ -1,15 +1,19 @@ package org.jeecg.modules.wms.framework.controller; +import java.security.NoSuchAlgorithmException; +import java.security.SecureRandom; +import java.util.Date; import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; import javax.servlet.http.HttpServletRequest; import org.jeecg.common.api.vo.Result; import org.jeecg.common.aspect.annotation.AutoLog; -import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; +import org.jeecg.modules.system.entity.SysDataLog; +import org.jeecg.modules.system.service.ISysDataLogService; import org.jeecg.utils.HuahengRedisUtil; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @@ -17,7 +21,8 @@ import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.TypeReference; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import lombok.extern.slf4j.Slf4j; @@ -34,43 +39,51 @@ public class TestController extends HuahengBaseController { @Autowired private HuahengRedisUtil redisUtil; + @Autowired + private ISysDataLogService sysDataLogService; + @AutoLog(value = "TestController-testRedis") @ResponseBody @PostMapping(value = "/testRedis") - public Result<?> testRedis(@RequestBody Map<String, String> paramMap, HttpServletRequest request) throws InterruptedException { - -// log.info(JSON.toJSONString(paramMap)); - String key = "testKey"; - Map<String, ReceiptHeader> receiptHeaderMap = new ConcurrentHashMap<String, ReceiptHeader>(); - ReceiptHeader value = new ReceiptHeader(); - value.setCode("001"); - receiptHeaderMap.put("receiptHeader1", value); - redisUtil.set(key, receiptHeaderMap); -// Map<String, ReceiptHeader> result = redisUtil.get(key, new TypeReference<Map<String, ReceiptHeader>>() {}); -// log.info("redisUtil.get -> " + JSON.toJSONString(result)); + public Result<?> testRedis(@RequestBody Map<String, String> paramMap, HttpServletRequest request) { + +// log.info("testRedis in paramMap:{}", JSON.toJSONString(paramMap)); +// String key = "testKey"; +// Map<String, ReceiptHeader> receiptHeaderMap = new ConcurrentHashMap<String, ReceiptHeader>(); +// ReceiptHeader receiptHeader = new ReceiptHeader(); +// receiptHeader.setCode("001"); +// receiptHeaderMap.put("receiptHeaderKey", receiptHeader); +// Map<String, ReceiptHeader> value = redisUtil.getAndSet(key, receiptHeaderMap, new TypeReference<Map<String, ReceiptHeader>>() {}, 10); // Long rxpireTime = redisUtil.getExpire(key); -// log.info("rxpireTime -> " + rxpireTime); -// redisUtil.expire(key, 100); +// log.info("redisUtil.getAndSet {} -> {} rxpireTime -> {}", key, JSON.toJSONString(value), rxpireTime); +// +// Thread.sleep(2000l); +// receiptHeaderMap = redisUtil.get(key, new TypeReference<Map<String, ReceiptHeader>>() {}); // rxpireTime = redisUtil.getExpire(key); -// log.info("rxpireTime -> " + rxpireTime); -// value.setCode("2222222222222222"); - redisUtil.delete(key); - Map<String, ReceiptHeader> result = redisUtil.getAndSet(key, receiptHeaderMap, new TypeReference<Map<String, ReceiptHeader>>() {}, 10); - Long rxpireTime = redisUtil.getExpire(key); - log.info("redisUtil.get -> {} rxpireTime -> {}", JSON.toJSONString(result), rxpireTime); - - Thread.sleep(2000l); - result = redisUtil.get(key, new TypeReference<Map<String, ReceiptHeader>>() {}); - rxpireTime = redisUtil.getExpire(key); - log.info("redisUtil.get sleep 2s -> {} rxpireTime -> {}", JSON.toJSONString(result), rxpireTime); - - Long count = redisUtil.decr("countKey", 10); - rxpireTime = redisUtil.getExpire("countKey"); - log.info("countKey decr count -> {} rxpireTime -> {}", count, rxpireTime); - count = redisUtil.decr("countKey", 100); - rxpireTime = redisUtil.getExpire("countKey"); - log.info("countKey decr count -> {} rxpireTime -> {}", count, rxpireTime); - +// log.info("redisUtil.get {} sleep 2s -> {} rxpireTime -> {}", key, JSON.toJSONString(value), rxpireTime); + + Result result = handleMultiProcess("testRedis", paramMap.get("username"), new MultiProcessListener() { + + @Override + @Transactional(timeout = 10) + public Result<?> doProcess() throws Exception { + LambdaUpdateWrapper<SysDataLog> updateWrapper = new UpdateWrapper().lambda(); + updateWrapper.set(SysDataLog::getUpdateTime, new Date()); + updateWrapper.eq(SysDataLog::getId, 10); + Thread.sleep(1000); + sysDataLogService.update(updateWrapper); + return new Result<>(); + } + + }); + +// Long count = redisUtil.decr("countKey", 10); +// rxpireTime = redisUtil.getExpire("countKey"); +// log.info("countKey decr count -> {} rxpireTime -> {}", count, rxpireTime); +// count = redisUtil.decr("countKey", 100); +// rxpireTime = redisUtil.getExpire("countKey"); +// log.info("countKey decr count -> {} rxpireTime -> {}", count, rxpireTime); + // Thread.sleep(2000l); // count = redisUtil.get("countKey", Long.class); // rxpireTime = redisUtil.getExpire("countKey"); @@ -95,8 +108,11 @@ public class TestController extends HuahengBaseController { // rxpireTime = redisUtil.getExpire("countKey"); // log.info("countKey sleep 10s get -> {} rxpireTime -> {}", count, rxpireTime); // log.info("countKey hasKey -> {}",redisUtil.hasKey("countKey")); - - return Result.OK(count); + return result; + } + + private int generateInt(int min, int max) throws NoSuchAlgorithmException { + return (int)(min + SecureRandom.getInstanceStrong().nextDouble() * (max - min + 1)); } } diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/home/service/impl/HomePageViewServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/home/service/impl/HomePageViewServiceImpl.java index 153be54..dcdf2ee 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/home/service/impl/HomePageViewServiceImpl.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/home/service/impl/HomePageViewServiceImpl.java @@ -4,6 +4,7 @@ import cn.hutool.core.util.ArrayUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.service.IService; import com.github.abel533.echarts.Option; import com.github.abel533.echarts.axis.Axis; import com.github.abel533.echarts.axis.CategoryAxis; @@ -145,20 +146,16 @@ public class HomePageViewServiceImpl implements HomePageViewService { @Override public Result<String> inventoryUtilization() { - // 查询所有容器 select限制字段速度更快 - LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery(); - locationLambdaQueryWrapper.select(Location::getContainerCode); - List<Location> locations = locationServiceImpl.list(locationLambdaQueryWrapper); - // 先存储总数 - int inStock = locations.size(); - - // 总库位删除为空的数量长度 == 有货数量 - locations.removeIf(location -> StringUtils.isEmpty(location.getContainerCode())); - - // 总数-有货数量 == 无货数量 - inStock = inStock - locations.size(); - + Integer allStock = locationServiceImpl.count(); + + // 有货数量 = 总库位删除为空的数量长度 + LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery(); + locationLambdaQueryWrapper.isNotNull(Location::getContainerCode).ne(Location::getContainerCode, ""); + int locationStock = locationServiceImpl.count(locationLambdaQueryWrapper); + + // 无货数量 = 总数 - 有货数量 + Integer inStock = allStock - locationStock; Option option = new Option(); // option.title("库存状态分布").title().x("center"); option.tooltip(Trigger.item).tooltip().formatter("{a} <br/>{b} : {c} ({d}%)"); @@ -187,7 +184,7 @@ public class HomePageViewServiceImpl implements HomePageViewService { pie.itemStyle().emphasis().setShadowColor("rgba(0, 0, 0, 0.4)"); option.legend().data().add("有货"); - pie.data().add(new ChartData("有货", Convert.toDouble(locations.size()))); + pie.data().add(new ChartData("有货", Convert.toDouble(locationStock))); option.legend().data().add("无货"); pie.data().add(new ChartData("无货", Convert.toDouble(inStock))); diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java index 00fe8cc..dd654e4 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java @@ -1076,6 +1076,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea */ @Transactional(rollbackFor = Exception.class) public Result completeReceiptTask(TaskHeader taskHeader) { + if (taskHeader == null) { + return Result.error("任务未找到,执行中止"); + } String warehouseCode = taskHeader.getWarehouseCode(); String fromLocationCode = taskHeader.getFromLocationCode(); String toLocationCode = taskHeader.getToLocationCode(); @@ -1084,9 +1087,6 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea int taskType = taskHeader.getTaskType(); List<TaskDetail> taskDetailList = taskDetailService.getTaskDetailListByTaskId(taskHeader.getId()); boolean success = false; - if (taskHeader == null) { - return Result.error("任务未找到,执行中止"); - } if (taskHeader.getStatus().equals(QuantityConstant.TASK_STATUS_COMPLETED)) { return Result.ok("任务(" + taskHeader.getId() + ")任务已经是完成的!"); } @@ -1234,6 +1234,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea */ @Transactional(rollbackFor = Exception.class) public Result completeShipmentTask(TaskHeader taskHeader) { + if (taskHeader == null) { + return Result.error("完成出库任务未找到,执行中止"); + } String warehouseCode = taskHeader.getWarehouseCode(); String fromLocationCode = taskHeader.getFromLocationCode(); String toLocationCode = taskHeader.getToLocationCode(); @@ -1242,9 +1245,6 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea int taskType = taskHeader.getTaskType(); List<TaskDetail> taskDetailList = taskDetailService.getTaskDetailListByTaskId(taskHeader.getId()); boolean success = false; - if (taskHeader == null) { - return Result.error("完成出库任务未找到,执行中止"); - } if (taskHeader.getStatus().equals(QuantityConstant.TASK_STATUS_COMPLETED)) { return Result.ok("完成出库任务,(" + taskHeader.getId() + ")任务已经是完成的!"); } diff --git a/huaheng-wms-core/src/main/resources/application-dev.yml b/huaheng-wms-core/src/main/resources/application-dev.yml index 7995b02..ff37593 100644 --- a/huaheng-wms-core/src/main/resources/application-dev.yml +++ b/huaheng-wms-core/src/main/resources/application-dev.yml @@ -47,7 +47,7 @@ spring: org: quartz: scheduler: - instanceName: Scheduler_Dev + instanceName: dev instanceId: AUTO jobStore: class: org.quartz.impl.jdbcjobstore.JobStoreTX @@ -167,10 +167,12 @@ mybatis-plus: # 默认数据库表下划线命名 table-underline: true configuration: + map-underscore-to-camel-case: true + auto-mapping-behavior: full # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用 - log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 返回类型为Map,显示null对应的字段 - call-setters-on-nulls: false + call-setters-on-nulls: true #jeecg专用配置 minidao: base-package: org.jeecg.modules.jmreport.* @@ -271,8 +273,8 @@ cas: #Mybatis输出sql日志 logging: level: - org.jeecg.modules.base.mapper: debug org.jeecg.modules.wms: debug + org.springframework: info #swagger knife4j: #开启增强配置 diff --git a/huaheng-wms-core/src/main/resources/application-prod.yml b/huaheng-wms-core/src/main/resources/application-prod.yml index ece97a3..701a2a6 100644 --- a/huaheng-wms-core/src/main/resources/application-prod.yml +++ b/huaheng-wms-core/src/main/resources/application-prod.yml @@ -47,7 +47,7 @@ spring: org: quartz: scheduler: - instanceName: Scheduler_Prod + instanceName: prod instanceId: AUTO jobStore: class: org.quartz.impl.jdbcjobstore.JobStoreTX @@ -167,6 +167,8 @@ mybatis-plus: # 默认数据库表下划线命名 table-underline: true configuration: + map-underscore-to-camel-case: true + auto-mapping-behavior: full # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用 #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 返回类型为Map,显示null对应的字段 @@ -260,7 +262,8 @@ cas: #Mybatis输出sql日志 logging: level: - org.jeecg.modules.system.mapper: info + org.jeecg.modules.wms: info + org.springframework: info #swagger knife4j: #开启增强配置 diff --git a/huaheng-wms-core/src/main/resources/application-test.yml b/huaheng-wms-core/src/main/resources/application-test.yml index 4b6f427..fe4ff8d 100644 --- a/huaheng-wms-core/src/main/resources/application-test.yml +++ b/huaheng-wms-core/src/main/resources/application-test.yml @@ -47,7 +47,7 @@ spring: org: quartz: scheduler: - instanceName: Scheduler_Test + instanceName: test instanceId: AUTO jobStore: class: org.quartz.impl.jdbcjobstore.JobStoreTX @@ -167,10 +167,12 @@ mybatis-plus: # 默认数据库表下划线命名 table-underline: true configuration: + map-underscore-to-camel-case: true + auto-mapping-behavior: full # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用 - log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 返回类型为Map,显示null对应的字段 - call-setters-on-nulls: false + call-setters-on-nulls: true #jeecg专用配置 minidao: base-package: org.jeecg.modules.jmreport.* @@ -272,7 +274,8 @@ cas: #Mybatis输出sql日志 logging: level: - org.jeecg.modules.base.mapper: info + org.jeecg.modules.wms: debug + org.springframework: info #swagger knife4j: #开启增强配置 diff --git a/huaheng-wms-core/src/main/resources/logback-spring.xml b/huaheng-wms-core/src/main/resources/logback-spring.xml index 2592134..1fe1103 100644 --- a/huaheng-wms-core/src/main/resources/logback-spring.xml +++ b/huaheng-wms-core/src/main/resources/logback-spring.xml @@ -15,7 +15,7 @@ <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> <!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符 <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}:%L - %msg%n</pattern> --> - <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %highlight(%-5level) %cyan(%logger{50}:%L) - %msg%n</pattern> + <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}:%L - %msg%n</pattern> </encoder> </appender>