Commit 34872f46 by Wangmin

修改APPID

parent 945bcede
...@@ -281,8 +281,8 @@ management: ...@@ -281,8 +281,8 @@ management:
--- # 小程序设置 --- # 小程序设置
wechat: wechat:
applet: applet:
appid: wxe9c227afec04271d appid: wx6cc2fd1bca9472ae
secret: 1edb961b25799225b894e2e6f6989651 secret: 2edf95828b1a19fc5149f6650cde71f1
token: #微信小程序消息服务器配置的token token: #微信小程序消息服务器配置的token
aesKey: #微信小程序消息服务器配置的EncodingAESKey aesKey: #微信小程序消息服务器配置的EncodingAESKey
msgDataFormat: JSON msgDataFormat: JSON
......
...@@ -40,7 +40,7 @@ public class WechatLoginBo { ...@@ -40,7 +40,7 @@ public class WechatLoginBo {
* 加密算法初始向量 * 加密算法初始向量
* <p>参见:wx.getUserProfile success回调函#iv属性 * <p>参见:wx.getUserProfile success回调函#iv属性
*/ */
@NotBlank(message = "encryptedData不能为空") @NotBlank(message = "iv不能为空")
private String iv; private String iv;
} }
...@@ -13,10 +13,9 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; ...@@ -13,10 +13,9 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.pz.common.utils.StringUtils; import com.pz.common.utils.StringUtils;
import com.pz.merchant.domain.bo.EmployeesListBo; import com.pz.merchant.domain.bo.EmployeesListBo;
import com.pz.merchant.domain.bo.SetEmployeeWorkingHourBo; import com.pz.merchant.domain.bo.SetEmployeeWorkingHourBo;
import com.pz.merchant.domain.vo.EmployeesListVo; import com.pz.merchant.domain.vo.*;
import com.pz.merchant.domain.vo.OrderInfoVO;
import com.pz.merchant.domain.vo.TodayOrderListVo;
import com.pz.merchant.mapper.CompanyMapper; import com.pz.merchant.mapper.CompanyMapper;
import com.pz.merchant.service.ISonOrderService;
import com.pz.system.domain.TotalOrder; import com.pz.system.domain.TotalOrder;
import com.pz.system.mapper.CityMapper; import com.pz.system.mapper.CityMapper;
import com.pz.system.mapper.SysUserMapper; import com.pz.system.mapper.SysUserMapper;
...@@ -24,7 +23,6 @@ import com.pz.system.mapper.TotalOrderMapper; ...@@ -24,7 +23,6 @@ import com.pz.system.mapper.TotalOrderMapper;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.pz.merchant.domain.bo.EmployeesBo; import com.pz.merchant.domain.bo.EmployeesBo;
import com.pz.merchant.domain.vo.EmployeesVo;
import com.pz.merchant.domain.Employees; import com.pz.merchant.domain.Employees;
import com.pz.merchant.mapper.EmployeesMapper; import com.pz.merchant.mapper.EmployeesMapper;
import com.pz.merchant.service.IEmployeesService; import com.pz.merchant.service.IEmployeesService;
...@@ -42,11 +40,12 @@ import java.util.*; ...@@ -42,11 +40,12 @@ import java.util.*;
public class EmployeesServiceImpl implements IEmployeesService { public class EmployeesServiceImpl implements IEmployeesService {
private final EmployeesMapper baseMapper; private final EmployeesMapper baseMapper;
private final CompanyMapper companyMapper; private final CompanyMapper companyMapper;
private final SysUserMapper sysUserMapper; private final SysUserMapper sysUserMapper;
private final CityMapper cityMapper; private final CityMapper cityMapper;
private final TotalOrderMapper totalOrderMapper; private final TotalOrderMapper totalOrderMapper;
private final SonOrderServiceBuilder sonOrderServiceBuilder;
/** /**
* 查询陪诊员 * 查询陪诊员
*/ */
...@@ -141,13 +140,14 @@ public class EmployeesServiceImpl implements IEmployeesService { ...@@ -141,13 +140,14 @@ public class EmployeesServiceImpl implements IEmployeesService {
/** /**
* 需求广场 * 需求广场
*
* @param bo * @param bo
* @param pageQuery * @param pageQuery
* @return * @return
*/ */
@Override @Override
public TableDataInfo<EmployeesVo> queryPageAppNeed(EmployeesBo bo, PageQuery pageQuery) { public TableDataInfo<EmployeesVo> queryPageAppNeed(EmployeesBo bo, PageQuery pageQuery) {
Page<EmployeesVo> result = baseMapper.selectEmployees(bo,pageQuery); Page<EmployeesVo> result = baseMapper.selectEmployees(bo, pageQuery);
Optional.ofNullable(result.getRecords()).ifPresent(EmployeesVo -> { Optional.ofNullable(result.getRecords()).ifPresent(EmployeesVo -> {
EmployeesVo.forEach(t -> { EmployeesVo.forEach(t -> {
List<TotalOrder> totalOrder = totalOrderMapper.selectList(Wrappers.<TotalOrder>lambdaQuery() List<TotalOrder> totalOrder = totalOrderMapper.selectList(Wrappers.<TotalOrder>lambdaQuery()
...@@ -163,13 +163,14 @@ public class EmployeesServiceImpl implements IEmployeesService { ...@@ -163,13 +163,14 @@ public class EmployeesServiceImpl implements IEmployeesService {
/** /**
* 排行榜 * 排行榜
*
* @param bo * @param bo
* @param pageQuery * @param pageQuery
* @return * @return
*/ */
@Override @Override
public TableDataInfo<EmployeesVo> queryPageAppRanking(EmployeesBo bo, PageQuery pageQuery) { public TableDataInfo<EmployeesVo> queryPageAppRanking(EmployeesBo bo, PageQuery pageQuery) {
Page<EmployeesVo> result = baseMapper.selectEmployees(bo,pageQuery); Page<EmployeesVo> result = baseMapper.selectEmployees(bo, pageQuery);
Optional.ofNullable(result.getRecords()).ifPresent(EmployeesVo -> { Optional.ofNullable(result.getRecords()).ifPresent(EmployeesVo -> {
EmployeesVo.forEach(t -> { EmployeesVo.forEach(t -> {
List<TotalOrder> totalOrder = totalOrderMapper.selectList(Wrappers.<TotalOrder>lambdaQuery() List<TotalOrder> totalOrder = totalOrderMapper.selectList(Wrappers.<TotalOrder>lambdaQuery()
...@@ -188,12 +189,12 @@ public class EmployeesServiceImpl implements IEmployeesService { ...@@ -188,12 +189,12 @@ public class EmployeesServiceImpl implements IEmployeesService {
* 查询陪诊员详情 * 查询陪诊员详情
*/ */
@Override @Override
public EmployeesVo queryByApp(Integer id){ public EmployeesVo queryByApp(Integer id) {
EmployeesVo employeesVo = baseMapper.selectEmployeesById(id); EmployeesVo employeesVo = baseMapper.selectEmployeesById(id);
List<TotalOrder> totalOrder = totalOrderMapper.selectList(Wrappers.<TotalOrder>lambdaQuery() List<TotalOrder> totalOrder = totalOrderMapper.selectList(Wrappers.<TotalOrder>lambdaQuery()
.eq(TotalOrder::getEmId, employeesVo.getId()) .eq(TotalOrder::getEmId, employeesVo.getId())
.eq(TotalOrder::getIsSatisfaction, 1) .eq(TotalOrder::getIsSatisfaction, 1)
.orderByDesc(TotalOrder::getId)); .orderByDesc(TotalOrder::getId));
employeesVo.setTotalOrderVo(totalOrder); employeesVo.setTotalOrderVo(totalOrder);
return employeesVo; return employeesVo;
} }
...@@ -239,6 +240,15 @@ public class EmployeesServiceImpl implements IEmployeesService { ...@@ -239,6 +240,15 @@ public class EmployeesServiceImpl implements IEmployeesService {
public TodayOrderListVo queryEmployeesInfo(Integer emId) { public TodayOrderListVo queryEmployeesInfo(Integer emId) {
TodayOrderListVo result = baseMapper.selectEmployeesInfoById(emId); TodayOrderListVo result = baseMapper.selectEmployeesInfoById(emId);
List<OrderInfoVO> orders = baseMapper.selectTodayOrderByEid(emId); List<OrderInfoVO> orders = baseMapper.selectTodayOrderByEid(emId);
// 根据不同子订单装载就诊人员信息和子订单状态
orders.forEach(suborder -> {
ISonOrderService orderService = sonOrderServiceBuilder.getSonOrderService(suborder.getBid());
SonOrderVo orderStatus;
if (orderService != null && (orderStatus = orderService.getSonOrderInfoByTotalId(suborder.getOrderId())) != null) {
suborder.setUserName(orderStatus.getUserName());
suborder.setSonOrderStatus(orderStatus.getOrderStatus());
}
});
result.setTodayOrderList(orders); result.setTodayOrderList(orders);
result.setTodayOrderNum(orders.size()); result.setTodayOrderNum(orders.size());
return result; return result;
......
package com.pz.merchant.service.impl;
import com.pz.common.utils.spring.SpringUtils;
import com.pz.merchant.service.ISonOrderService;
import com.pz.system.service.impl.*;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.util.HashMap;
/**
* 子订单业务构造器
* <p>created in 2023/9/12 10:08
*
* @author WangMin
* @version 1.0
*/
@Component
@ConditionalOnBean({
DbwzOrderServiceImpl.class, YypzOrderServiceImpl.class, ZqghOrderServiceImpl.class,
DbmyOrderServiceImpl.class, ZyphOrderServiceImpl.class, DbghOrderServiceImpl.class})
public class SonOrderServiceBuilder {
private HashMap<Integer, ISonOrderService> sonOrderHashMap;
@PostConstruct
public void loadSonOrderService() {
DbwzOrderServiceImpl dbwzOrderService = SpringUtils.getBean(DbwzOrderServiceImpl.class);
YypzOrderServiceImpl yypzOrderService = SpringUtils.getBean(YypzOrderServiceImpl.class);
ZqghOrderServiceImpl zqghOrderService = SpringUtils.getBean(ZqghOrderServiceImpl.class);
DbmyOrderServiceImpl dbmyOrderService = SpringUtils.getBean(DbmyOrderServiceImpl.class);
ZyphOrderServiceImpl zyphOrderService = SpringUtils.getBean(ZyphOrderServiceImpl.class);
DbghOrderServiceImpl dbghOrderService = SpringUtils.getBean(DbghOrderServiceImpl.class);
sonOrderHashMap = new HashMap<>(8);
sonOrderHashMap.put(1, yypzOrderService);
sonOrderHashMap.put(2, dbghOrderService);
sonOrderHashMap.put(3, dbwzOrderService);
sonOrderHashMap.put(4, zyphOrderService);
sonOrderHashMap.put(5, dbmyOrderService);
sonOrderHashMap.put(6, zqghOrderService);
}
/**
* 根据业务ID获取对应子订单业务
*
* @param businessId 业务ID
* @return 子订单业务
*/
public ISonOrderService getSonOrderService(int businessId) {
return sonOrderHashMap.get(businessId);
}
}
package com.pz.system.mapper; package com.pz.system.mapper;
import com.pz.merchant.domain.vo.SonOrderVo;
import com.pz.system.domain.ZqghOrder; import com.pz.system.domain.ZqghOrder;
import com.pz.system.domain.vo.ZqghOrderVo; import com.pz.system.domain.vo.ZqghOrderVo;
import com.pz.common.core.mapper.BaseMapperPlus; import com.pz.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Mapper;
/** /**
* 诊前挂号订单Mapper接口 * 诊前挂号订单Mapper接口
...@@ -10,6 +12,14 @@ import com.pz.common.core.mapper.BaseMapperPlus; ...@@ -10,6 +12,14 @@ import com.pz.common.core.mapper.BaseMapperPlus;
* @author ruoyi * @author ruoyi
* @date 2023-09-12 * @date 2023-09-12
*/ */
@Mapper
public interface ZqghOrderMapper extends BaseMapperPlus<ZqghOrderMapper, ZqghOrder, ZqghOrderVo> { public interface ZqghOrderMapper extends BaseMapperPlus<ZqghOrderMapper, ZqghOrder, ZqghOrderVo> {
/**
* 根据主订单ID查询子订单相关信息
* @param totalId 主订单ID
* @return 子订单相关信息
*/
SonOrderVo selectSonOrderInfoByTotalId(Integer totalId);
} }
...@@ -7,6 +7,8 @@ import com.pz.common.core.domain.PageQuery; ...@@ -7,6 +7,8 @@ import com.pz.common.core.domain.PageQuery;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.pz.merchant.domain.vo.SonOrderVo;
import com.pz.merchant.service.ISonOrderService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.pz.system.domain.bo.ZqghOrderBo; import com.pz.system.domain.bo.ZqghOrderBo;
...@@ -27,7 +29,7 @@ import java.util.Collection; ...@@ -27,7 +29,7 @@ import java.util.Collection;
*/ */
@RequiredArgsConstructor @RequiredArgsConstructor
@Service @Service
public class ZqghOrderServiceImpl implements IZqghOrderService { public class ZqghOrderServiceImpl implements IZqghOrderService, ISonOrderService {
private final ZqghOrderMapper baseMapper; private final ZqghOrderMapper baseMapper;
...@@ -35,7 +37,7 @@ public class ZqghOrderServiceImpl implements IZqghOrderService { ...@@ -35,7 +37,7 @@ public class ZqghOrderServiceImpl implements IZqghOrderService {
* 查询诊前挂号订单 * 查询诊前挂号订单
*/ */
@Override @Override
public ZqghOrderVo queryById(Integer id){ public ZqghOrderVo queryById(Integer id) {
return baseMapper.selectVoById(id); return baseMapper.selectVoById(id);
} }
...@@ -100,8 +102,8 @@ public class ZqghOrderServiceImpl implements IZqghOrderService { ...@@ -100,8 +102,8 @@ public class ZqghOrderServiceImpl implements IZqghOrderService {
/** /**
* 保存前的数据校验 * 保存前的数据校验
*/ */
private void validEntityBeforeSave(ZqghOrder entity){ private void validEntityBeforeSave(ZqghOrder entity) {
//TODO 做一些数据校验,如唯一约束 // TODO 做一些数据校验,如唯一约束
} }
/** /**
...@@ -109,9 +111,14 @@ public class ZqghOrderServiceImpl implements IZqghOrderService { ...@@ -109,9 +111,14 @@ public class ZqghOrderServiceImpl implements IZqghOrderService {
*/ */
@Override @Override
public Boolean deleteWithValidByIds(Collection<Integer> ids, Boolean isValid) { public Boolean deleteWithValidByIds(Collection<Integer> ids, Boolean isValid) {
if(isValid){ if (isValid) {
//TODO 做一些业务上的校验,判断是否需要校验 // TODO 做一些业务上的校验,判断是否需要校验
} }
return baseMapper.deleteBatchIds(ids) > 0; return baseMapper.deleteBatchIds(ids) > 0;
} }
@Override
public SonOrderVo getSonOrderInfoByTotalId(Integer totalId) {
return baseMapper.selectSonOrderInfoByTotalId(totalId);
}
} }
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.pz.system.mapper.ZqghOrderMapper">
<select id="selectSonOrderInfoByTotalId" resultType="com.pz.merchant.domain.vo.SonOrderVo">
select user.nick_name as userName,
zqgh_order.status as orderStatus
from zqgh_order
left join total_order on total_order.id = zqgh_order.order_id
left join sys_user as user on user.user_id = total_order.uid
where zqgh_order.order_id = #{id}
</select>
</mapper>
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