diff --git a/dl-module-base/pom.xml b/dl-module-base/pom.xml index 49b21e0f..f373003a 100644 --- a/dl-module-base/pom.xml +++ b/dl-module-base/pom.xml @@ -15,6 +15,11 @@ 点亮业务基础库 + + cn.iocoder.boot + yudao-module-system-biz + ${revision} + cn.iocoder.boot yudao-module-system-api diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java b/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java index 60b04b6b..763140e8 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java @@ -9,6 +9,10 @@ public class BaseConstants { public static final String CUS_TYPE_CORP_ATTN = "04"; /**政企客户*/ public static final String CUS_TYPE_CORP = "03"; + /**私人客户*/ + public static final String CUS_TYPE_PRIVATE = "01"; + /**代办客户*/ + public static final String CUS_TYPE_AGENT = "02"; /**客户标识*/ public static final String CUS_SIGN_CUSTOMER = "customer"; /**车辆标识*/ @@ -23,8 +27,12 @@ public class BaseConstants { public static final String SIGN_UPDATE = "update"; /**默认密码*/ public static final String PASSWORD_DEFAULT = "123456"; - /**租户下部门名称*/ + /**租户下部门名称--政企客户*/ public static final String DEPT_NAME_CORP_NAME = "政企客户"; + /**租户下部门名称--私人客户*/ + public static final String DEPT_NAME_PRIVATE_NAME = "私人客户"; + /**租户下部门名称--代办客户*/ + public static final String DEPT_NAME_AGENT_NAME = "代办客户"; /**私家车*/ public static final String CAR_CATEGORY_PRIVATE = "01"; /**货车*/ diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/common/WechatCommon.java b/dl-module-base/src/main/java/cn/iocoder/yudao/common/WechatCommon.java new file mode 100644 index 00000000..dcdf51c0 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/common/WechatCommon.java @@ -0,0 +1,27 @@ +package cn.iocoder.yudao.common; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +@Component +public class WechatCommon { + /** + * 微信公众号APPID + */ + @Value(value = "${wx.mp.app-id}") + public String APP_ID; + /** + * 微信公众号秘钥 + */ + @Value(value = "${wx.mp.secret}") + public String APP_SECRET; + + /** + * 获取网页的token,后续还有+"&code=&grant_type=authorization_code" + **/ + public String getTokeUrl(){ + String appId = APP_ID; + String appSecret = APP_SECRET; + return "https://api.weixin.qq.com/sns/oauth2/access_token?appid=" + appId + "&secret=" + appSecret; + } +} diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/controller/AppCarBrandController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/controller/AppCarBrandController.java new file mode 100644 index 00000000..31c42fa7 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/controller/AppCarBrandController.java @@ -0,0 +1,32 @@ +package cn.iocoder.yudao.module.app.car.controller; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.custom.entity.CarBrand; +import cn.iocoder.yudao.module.custom.service.CarBrandService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import java.util.List; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "小程序 - 车辆品牌维护") +@RestController +@RequestMapping("/userClient/base/carBrand") +@Validated +public class AppCarBrandController { + + @Resource + private CarBrandService carBrandService; + + + @GetMapping("/list") + @Operation(summary = "获得全部车辆品牌") + public CommonResult> getCarBrandList() { + List carBrandList = carBrandService.getCarBrandList(); + return success(carBrandList); + } + + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/controller/AppCarMainController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/controller/AppCarMainController.java new file mode 100644 index 00000000..fd37be12 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/controller/AppCarMainController.java @@ -0,0 +1,82 @@ +package cn.iocoder.yudao.module.app.car.controller; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.app.car.entity.AppCarMain; +import cn.iocoder.yudao.module.app.car.service.AppCarMainService; +import cn.iocoder.yudao.module.app.car.vo.AppCarMainResVo; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.checkerframework.checker.units.qual.A; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + + +@Tag(name = "小程序 - 我的车辆") +@RestController +@RequestMapping("/userClient/base/myCar") +@Validated +public class AppCarMainController { + + @Autowired + private AppCarMainService carMainService; + + /** + * 创建车辆信息 + * + * @param carMain + * @return + */ + @PostMapping("/create") + @Operation(summary = "创建车辆信息") +// @PreAuthorize("@ss.hasPermission('base:car-main:create')") + public CommonResult createCarMain(@RequestBody AppCarMain carMain) { + return carMainService.createCarMain(carMain); + } + + /** + * 更新车辆信息 + * + * @param carMain + * @return + */ + @PutMapping("/update") + @Operation(summary = "更新车辆信息") +// @PreAuthorize("@ss.hasPermission('base:car-main:update')") + public CommonResult updateCarMain(@RequestBody AppCarMain carMain) { + return carMainService.updateCarMain(carMain); + } + + /** + * 删除车辆信息 + * + * @param id + * @return + */ + @DeleteMapping("/delete") + @Operation(summary = "删除车辆信息") + @Parameter(name = "id", description = "编号", required = true) +// @PreAuthorize("@ss.hasPermission('base:car-main:delete')") + public CommonResult deleteCarMain(@RequestParam("id") String id) { + return carMainService.deleteCarMain(id); + } + + /** + * 根据当前用户获得车辆信息 + * + * @return + */ + @GetMapping("/get") + @Operation(summary = "获得车辆信息") +// @PreAuthorize("@ss.hasPermission('base:car-main:query')") + public CommonResult> getCarMain() { + + List carMain = carMainService.getCarMain(); + return CommonResult.success(carMain); + } + + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/entity/AppCarMain.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/entity/AppCarMain.java new file mode 100644 index 00000000..84d76465 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/entity/AppCarMain.java @@ -0,0 +1,132 @@ +package cn.iocoder.yudao.module.app.car.entity; + +import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; +import java.math.BigDecimal; +import java.util.Date; + + +/** + * 车辆信息 DO + * + * @author 后台管理员 + */ +@TableName("base_car_main") +@Data +@EqualsAndHashCode(callSuper = true) +public class AppCarMain extends TenantBaseDO { + + /** + * 主键标识 + */ + @TableId(type = IdType.ASSIGN_UUID) + private String id; + /** + * 发动机号码 + */ + private String engineNumber; + /** + * 车架号 + */ + private String vin; + /** + * 车牌号 + */ + private String licenseNumber; + /** + * 车辆型号 + */ + private String carModel; + /** + * 保养日期 + */ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + private Date maintenanceDate; + /** + * 保养里程 + */ + private BigDecimal maintenanceMileage; + /** + * 年检日期 + */ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + private Date inspectionDate; + /** + * 保险日期 + */ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + private Date insuranceDate; + /** + * 二级维护时间 + */ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + private Date checkDate; + /** + * 下次保养日期 + */ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + private Date nextMaintenanceDate; + /** + * 下次保养里程 + */ + private BigDecimal nextMaintenanceMileage; + /** + * 下次年检日期 + */ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + private Date nextInspectionDate; + /** + * 保险到期日期 + */ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + private Date insuranceExpiryDate; + /** + * 下次二级维护时间 + */ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + private Date nextCheckDate; + /** + * 车辆品牌 + */ + private String carBrand; + /** + * 车辆性质:营运 非营运等 + */ + private String carNature; + /** + * 车辆类别:私家车 货车 教练车 公务车 出租车 + */ + private String carCategory; + /** + * 车辆注册日期 + */ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + private Date carRegisterDate; + /** + * 行驶证图片 + */ + private String carLicenseImg; + /** + * 最近办理业务 + */ + private String recentlyHandledBusiness; + /** + * 最近办理业务的时间 + */ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + private Date recentlyHandleBusinessTime; + /** + * 车辆型号(输入框) + */ + private String carModelInput; + /** + * 车辆品牌(输入框) + */ + private String carBrandInput; + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/mapper/AppCarMainMapper.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/mapper/AppCarMainMapper.java new file mode 100644 index 00000000..e75552bc --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/mapper/AppCarMainMapper.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.app.car.mapper; + +import cn.iocoder.yudao.module.app.car.entity.AppCarMain; +import cn.iocoder.yudao.module.app.car.vo.AppCarMainResVo; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +@Mapper +public interface AppCarMainMapper extends BaseMapper { + + +// 查询当前用户的所有车辆 + List getUserCarMain(@Param("userId") Long userId); + +} diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/service/AppCarMainService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/service/AppCarMainService.java new file mode 100644 index 00000000..069e9cf3 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/service/AppCarMainService.java @@ -0,0 +1,50 @@ +package cn.iocoder.yudao.module.app.car.service; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.app.car.entity.AppCarMain; +import cn.iocoder.yudao.module.app.car.vo.AppCarMainResVo; +import cn.iocoder.yudao.module.custom.vo.CarMainRespVO; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** + * 车辆信息 Service 接口 + * + * @author 后台管理员 + */ +public interface AppCarMainService extends IService { + + /** + * 创建车辆信息 + * + * @param carMain 创建信息 + * @return 编号 + */ + CommonResult createCarMain(AppCarMain carMain); + + /** + * 更新车辆信息 + * + * @param carMain 更新信息 + */ + CommonResult updateCarMain(AppCarMain carMain); + + /** + * 删除车辆信息 + * + * @param id 编号 + */ + CommonResult deleteCarMain(String id); + + /** + * 根据当前用户获得车辆信息 + * + * @return 车辆信息 + */ + List getCarMain(); + + + + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/service/impl/AppCarMainServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/service/impl/AppCarMainServiceImpl.java new file mode 100644 index 00000000..767847ac --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/service/impl/AppCarMainServiceImpl.java @@ -0,0 +1,114 @@ +package cn.iocoder.yudao.module.app.car.service.impl; + + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; +import cn.iocoder.yudao.module.app.car.entity.AppCarMain; +import cn.iocoder.yudao.module.app.car.mapper.AppCarMainMapper; +import cn.iocoder.yudao.module.app.car.service.AppCarMainService; +import cn.iocoder.yudao.module.app.car.vo.AppCarMainResVo; +import cn.iocoder.yudao.module.custom.entity.CustomerCar; +import cn.iocoder.yudao.module.custom.entity.CustomerMain; +import cn.iocoder.yudao.module.custom.mapper.CustomerCarMapper; +import cn.iocoder.yudao.module.custom.mapper.CustomerMainMapper; +import cn.iocoder.yudao.module.custom.vo.CarMainRespVO; +import cn.iocoder.yudao.module.label.service.BusiLabelService; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.HashMap; +import java.util.List; + +/** + * 车辆信息 Service 实现类 + * + * @author 后台管理员 + */ +@Service +public class AppCarMainServiceImpl extends ServiceImpl implements AppCarMainService { + + @Autowired + private CustomerCarMapper customerCarMapper; + @Autowired + private CustomerMainMapper customerMainMapper; + + /** + * 创建车辆信息 + * + * @param carMain 创建信息 + * @return + */ + @Override + @Transactional(rollbackFor = Exception.class) + public CommonResult createCarMain(AppCarMain carMain) { + + baseMapper.insert(carMain); +// 获取当前登录用户 + LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); +// 根据当前登录用户id 查询 base_customer_main 的id + HashMap m = new HashMap<>(); + m.put("user_id", loginUser.getId()); + List customerMains = customerMainMapper.selectByMap(m); +// 关联表添加数据 + CustomerCar customerCar = new CustomerCar(); + customerCar.setCarId(carMain.getId()); + customerCar.setCusId(customerMains.get(0).getId()); + customerCarMapper.insert(customerCar); + + // 返回 + return CommonResult.success("新增成功"); + } + + /** + * 更新车辆信息 + * + * @param carMain 更新信息 + */ + @Override + public CommonResult updateCarMain(AppCarMain carMain) { + baseMapper.updateById(carMain); + return CommonResult.success("修改成功"); + } + + /** + * 删除车辆信息 + * + * @param id 编号 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public CommonResult deleteCarMain(String id) { +// 删除主表 + baseMapper.deleteById(id); + LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<>(); + updateWrapper.eq(CustomerCar::getCarId, id); + CustomerCar customerCar = new CustomerCar(); + customerCar.setDeleted(true); +// 删除关联表 + customerCarMapper.update(customerCar, updateWrapper); + return CommonResult.success("删除成功"); + } + + /** + * 获得车辆信息 + * + * @return + */ + @Override + public List getCarMain() { + LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); + List userCarMain = super.baseMapper.getUserCarMain(loginUser.getId()); + + + return userCarMain; + } + + + + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/vo/AppCarMainResVo.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/vo/AppCarMainResVo.java new file mode 100644 index 00000000..096fa623 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/vo/AppCarMainResVo.java @@ -0,0 +1,13 @@ +package cn.iocoder.yudao.module.app.car.vo; + +import cn.iocoder.yudao.module.app.car.entity.AppCarMain; +import lombok.Data; + +@Data +public class AppCarMainResVo extends AppCarMain { + +// 品牌名称 + private String brandName; +// 品牌图片路径 + private String logoImg; +} diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/customer/CustomerAPI.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/customer/CustomerAPI.java new file mode 100644 index 00000000..ac651765 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/customer/CustomerAPI.java @@ -0,0 +1,67 @@ +package cn.iocoder.yudao.module.app.customer; + +import cn.iocoder.yudao.framework.common.exception.ServiceException; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.custom.service.CustomerMainService; +import cn.iocoder.yudao.module.custom.vo.CustomerMainSaveReqVO; +import cn.iocoder.yudao.module.system.api.user.dto.UserDTO; +import cn.iocoder.yudao.module.system.service.auth.AdminAuthService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import javax.validation.Valid; + +import static cn.iocoder.yudao.common.BaseConstants.SIGN_CREATE; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.error; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +/** + * 客户管理 + * + * @author : http://www.chiner.pro + * @date : 2024-7-31 + */ +@RestController +@RequestMapping("/base/custom-app") +@Tag(name = "客户管理-小程序端接口") +@Validated +public class CustomerAPI { + @Resource + private CustomerMainService customerMainService; + @Resource + private AdminAuthService loginService; + + /** + * 新增客户 + * + * @param saveReqVO 保存客户信息扩展实体 + * @return cn.iocoder.yudao.framework.common.pojo.CommonResult + * @author PQZ + * @date 15:42 2024/8/1 + **/ + @PostMapping("/register") + @Operation(summary = "客户自行注册") + public CommonResult createCustomerMain(@Valid @RequestBody CustomerMainSaveReqVO saveReqVO, HttpServletRequest request) { + //客户类型,统一为私人客户 + saveReqVO.setTypeCode("01"); + //客户来源,统一为04-维修 + saveReqVO.setDataFrom("04"); + //注册方式,统一为自主创建 + saveReqVO.setInviterType("01"); + try { + UserDTO userDTO = customerMainService.saveCustomer(saveReqVO,SIGN_CREATE); + //注册并登录 + return success(loginService.wxLoginByUserId(userDTO.getId(),userDTO.getUsername())); + }catch (ServiceException e){ + return error(e); + } + } +} diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/customer/admin/CustomerMainApi.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/customer/admin/CustomerMainApi.java new file mode 100644 index 00000000..c44359a5 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/customer/admin/CustomerMainApi.java @@ -0,0 +1,47 @@ +package cn.iocoder.yudao.module.app.customer.admin; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; +import cn.iocoder.yudao.module.conf.entity.BaseType; +import cn.iocoder.yudao.module.custom.entity.CustomerMain; +import cn.iocoder.yudao.module.custom.service.CustomerMainService; +import cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +/** + * 客户管理API + * @author PQZ + * @date 18:17 2024/9/24 +**/ +@RestController +@RequestMapping("/userClient/customer") +public class CustomerMainApi { + + @Resource + private CustomerMainService customerMainService; + + /** + * 查询当前登录客户信息 + * @author PQZ + * @date 17:24 2024/9/24 + * @return cn.iocoder.yudao.framework.common.pojo.CommonResult + **/ + @GetMapping("/getUserCustomer") + @Operation(summary = "获取当前登录用户的客户信息") + public CommonResult getUserCustomer() { + return success(customerMainService.getUserCustomer()); + } + +} diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/wechat/controller/WechatLoginController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/wechat/controller/WechatLoginController.java new file mode 100644 index 00000000..350f77e1 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/wechat/controller/WechatLoginController.java @@ -0,0 +1,52 @@ +package cn.iocoder.yudao.module.app.wechat.controller; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.app.wechat.service.WechatService; +import cn.iocoder.yudao.module.system.controller.admin.auth.vo.AuthLoginReqVO; +import cn.iocoder.yudao.module.system.controller.admin.auth.vo.AuthLoginRespVO; +import cn.iocoder.yudao.module.system.service.auth.AdminAuthService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.annotation.security.PermitAll; +import javax.validation.Valid; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +/** + * 微信登录控制层 + * + */ +@RestController +@RequestMapping("/userClient/weChat") +@Tag(name = "微信登录") +@Validated +public class WechatLoginController { + @Autowired + private WechatService wechatService; + @Resource + private AdminAuthService authService; + + /** + * 微信获取openId + * @author vinjor-M + * @date 9:53 2024/8/2 + * @param code 请求参数 + **/ + @GetMapping("/wechatLogin") + @Operation(summary = "微信获取openId") + public CommonResult createCompany(String code) { + return wechatService.loginByOpenId(code); + } + + @PostMapping("/login") + @PermitAll + @Operation(summary = "使用账号密码登录") + public CommonResult login(@RequestBody @Valid AuthLoginReqVO reqVO) { + return success(authService.login(reqVO)); + } +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/wechat/service/WechatService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/wechat/service/WechatService.java new file mode 100644 index 00000000..d08add78 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/wechat/service/WechatService.java @@ -0,0 +1,17 @@ +package cn.iocoder.yudao.module.app.wechat.service; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; + +/** + * @author vinjor-m + * @description 微信模块服务层 + **/ +public interface WechatService { + /** + * 微信自动登录 + * @author vinjor-M + * @date 23:53 2024/9/23 + * @param map 参数 + **/ + CommonResult loginByOpenId(String code); +} diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/wechat/service/impl/WechatServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/wechat/service/impl/WechatServiceImpl.java new file mode 100644 index 00000000..3cc6460a --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/wechat/service/impl/WechatServiceImpl.java @@ -0,0 +1,91 @@ +package cn.iocoder.yudao.module.app.wechat.service.impl; + +import cn.hutool.json.JSONObject; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.app.wechat.service.WechatService; +import cn.iocoder.yudao.module.system.api.user.AdminUserApi; +import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; +import cn.iocoder.yudao.module.system.controller.admin.auth.vo.AuthLoginReqVO; +import cn.iocoder.yudao.module.system.service.auth.AdminAuthService; +import cn.iocoder.yudao.util.WeChatLoginUtil; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.HashMap; +import java.util.Map; + +import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants.LOCKED; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +/** + * @Author vinjor-m + * @Description 微信模块服务层 + **/ +@Service +public class WechatServiceImpl implements WechatService { + @Autowired + private WeChatLoginUtil weChatLoginUtil; + @Autowired + private AdminUserApi adminUserApi; + @Resource + private AdminAuthService loginService; + /** + * 微信自动登录 + * + * @param code 参数 + * @return java.lang.String + * @author vinjor-M + * @date 23:53 2024/9/23 + **/ + @Override + public CommonResult loginByOpenId(String code) { + try { + //当前登录用户的openId + Map authMap = getWeChatOpenId(code); + String openId = authMap.getOrDefault("openId",null); + //默认租户180,查是否有user表数据 + AdminUserRespDTO userRespDTO = adminUserApi.getUserByOpenId(openId,null); + if(null==userRespDTO){ + //未找到用户,去注册 + return CommonResult.success(openId); + }else{ + //找到用户,登录并返回 + return success(loginService.wxLoginByUserId(userRespDTO.getId(),userRespDTO.getUsername())); + } + }catch (Exception e){ + e.printStackTrace(); + return CommonResult.error(LOCKED.getCode(),e.getMessage()); + } + } + + /** + * 获取openId + * @author vinjor-M + * @date 23:56 2024/9/23 + * @param code (静默/非静默)授权拿到的code + * @return java.util.Map + **/ + private Map getWeChatOpenId(String code) throws Exception { + Map rtnMap = new HashMap<>(2); + try { + //code为空为没有获取到code + if (StringUtils.isNotBlank(code)) { + JSONObject tokenJson = weChatLoginUtil.getTokenJson(code); + //获取到tokenJson后,解析tokenJson获取其openId + if (null != tokenJson && tokenJson.containsKey("openid")) { + rtnMap.put("openId",tokenJson.getStr("openid")); + rtnMap.put("token",tokenJson.getStr("access_token")); + }else{ + throw new Exception("code过期"); + } + }else{ + throw new Exception("没有code"); + } + return rtnMap; + } catch (Exception e) { + throw new Exception(e.getMessage()); + } + } +} diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerCouponController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerCouponController.java index 70951a5d..cc1fe147 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerCouponController.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerCouponController.java @@ -39,7 +39,6 @@ public class CustomerCouponController { **/ @PostMapping("/couponVerification") @Operation(summary = "核销用户卡券") - @PreAuthorize("@ss.hasPermission('base:customer-coupon:create')") public CommonResult createCustomerCoupon(@Valid @RequestBody CustomerCouponSaveReqVO saveReqVO) { customerCouponService.couponVerification(saveReqVO); return success(true); @@ -57,7 +56,6 @@ public class CustomerCouponController { @DeleteMapping("/delete") @Operation(summary = "删除用户卡券") @Parameter(name = "id", description = "编号", required = true) - @PreAuthorize("@ss.hasPermission('base:customer-coupon:delete')") public CommonResult deleteCustomerCoupon(@RequestParam("id") String id) { customerCouponService.deleteCustomerCoupon(id); return success(true); @@ -74,7 +72,6 @@ public class CustomerCouponController { @GetMapping("/get") @Operation(summary = "获得用户卡券") @Parameter(name = "id", description = "编号", required = true, example = "1024") - @PreAuthorize("@ss.hasPermission('base:customer-coupon:query')") public CommonResult getCustomerCoupon(@RequestParam("id") String id) { return success(customerCouponService.getCustomerCoupon(id)); } diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerMainController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerMainController.java index 9cfdc8b9..efb20f30 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerMainController.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CustomerMainController.java @@ -129,7 +129,6 @@ public class CustomerMainController { @GetMapping("/get") @Operation(summary = "获得客户管理") @Parameter(name = "id", description = "编号", required = true, example = "1024") - @PreAuthorize("@ss.hasPermission('base:customer-main:query')") public CommonResult getCustomerMain(@RequestParam("id") String id) { return success(customerMainService.getCustomerById(id)); } @@ -180,26 +179,5 @@ public class CustomerMainController { return success(true); } - /** - * 小程序客户注册 - * cusName,phoneNumber,birthday,sex,inviter - */ - @PostMapping("/addUniUser") - public CommonResult addUniUser(@Valid @RequestBody CustomerMainSaveReqVO saveReqVO) { - if(!saveReqVO.getCode().isEmpty()){ - String code = saveReqVO.getCode(); - JSONObject jsonObj = new JSONObject(); - String url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=" - +code+"&grant_type=authorization_code"; - String response = HttpRequest.get(url).execute().body(); - JSONObject json = JSONUtil.parseObj(response); - if (json.containsKey("access_token") && json.containsKey("openid")) { - String accessToken = json.getStr("access_token"); - String openid = json.getStr("openid"); - } - - } - return null; - } } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarBrandService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarBrandService.java index 819e5a5a..e41f01db 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarBrandService.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarBrandService.java @@ -8,6 +8,8 @@ import cn.iocoder.yudao.module.custom.vo.CarBrandRespVO; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + /** * 车辆品牌维护 Service 接口 * @@ -53,4 +55,6 @@ public interface CarBrandService extends IService { */ IPage getCarBrandPage(CarBrandReqVO pageReqVO); + List getCarBrandList(); + } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarModelService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarModelService.java index 793ee7bd..8376736c 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarModelService.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarModelService.java @@ -74,4 +74,5 @@ public interface CarModelService extends IService { */ List searchBrand(CarModelReqVO reqVO); + List getCarModelList(); } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CustomerMainService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CustomerMainService.java index 0280ebff..fa6761e9 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CustomerMainService.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CustomerMainService.java @@ -5,6 +5,7 @@ import cn.iocoder.yudao.module.custom.entity.CustomerMain; import cn.iocoder.yudao.module.custom.vo.CustomerMainPageReqVO; import cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO; import cn.iocoder.yudao.module.custom.vo.CustomerMainSaveReqVO; +import cn.iocoder.yudao.module.system.api.user.dto.UserDTO; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; @@ -38,7 +39,7 @@ public interface CustomerMainService extends IService { * @author PQZ * @date 15:46 2024/8/1 **/ - void saveCustomer(CustomerMainSaveReqVO saveReqVO, String sign); + UserDTO saveCustomer(CustomerMainSaveReqVO saveReqVO, String sign); /** * 根据客户id查询客户信息 @@ -50,6 +51,16 @@ public interface CustomerMainService extends IService { **/ CustomerMainRespVO getCustomerById(String id); + /** + * 获取当前登录用户的客户信息 + * @author PQZ + * @date 17:27 2024/9/24 + * @return cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO + **/ + CustomerMainRespVO getUserCustomer(); + + + /** * 根据经办人所属企业查询经办人信息 * diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarBrandServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarBrandServiceImpl.java index 4cb46d9e..6a479c4d 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarBrandServiceImpl.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarBrandServiceImpl.java @@ -12,6 +12,7 @@ import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import java.util.List; import java.util.UUID; /** @@ -86,4 +87,9 @@ public class CarBrandServiceImpl extends ServiceImpl i return baseMapper.findPage(page,pageReqVO); } + @Override + public List getCarBrandList() { + return baseMapper.selectList(null); + } + } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarModelServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarModelServiceImpl.java index 02d3aed0..8154d6c4 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarModelServiceImpl.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarModelServiceImpl.java @@ -123,6 +123,12 @@ public class CarModelServiceImpl extends ServiceImpl i return getChildModel(nameResult,reqVO.getModelName()); } + @Override + public List getCarModelList() { + List carModels = baseMapper.selectByMap(null); + return carModels; + } + /** * 根据父级品牌集合取所有的型号子选项 * diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CustomerActiveServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CustomerActiveServiceImpl.java index a1994ab7..413cdd7b 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CustomerActiveServiceImpl.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CustomerActiveServiceImpl.java @@ -147,6 +147,7 @@ public class CustomerActiveServiceImpl extends ServiceImpl lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.eq(CustomerMain::getUserId,loginUser.getId()).eq(BaseDO::getDeleted,'0'); + CustomerMain customerMain = getOne(lambdaQueryWrapper); + return getCustomerById(customerMain.getId()); + } + /** * 根据经办人所属企业查询经办人信息 * diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerActiveSaveReqVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerActiveSaveReqVO.java index 9df90275..c08dc23f 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerActiveSaveReqVO.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerActiveSaveReqVO.java @@ -14,6 +14,8 @@ import javax.validation.constraints.*; public class CustomerActiveSaveReqVO extends CustomerActive { /**充值金额*/ private BigDecimal topUpAmount; + /**充值金额*/ + private String accountType; /**选中的优惠券*/ private List selectCoupon; } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainSaveReqVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainSaveReqVO.java index 007e71b3..f5bd3d63 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainSaveReqVO.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CustomerMainSaveReqVO.java @@ -20,7 +20,7 @@ public class CustomerMainSaveReqVO extends CustomerMain { List labelList; /** - * Code + * 微信openId */ - private String Code; + private String openId; } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/controller/admin/RepairOrderInfoController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/controller/admin/RepairOrderInfoController.java index 286ed727..3a84dad1 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/controller/admin/RepairOrderInfoController.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/controller/admin/RepairOrderInfoController.java @@ -6,6 +6,7 @@ import cn.iocoder.yudao.module.order.entity.RepairOrderInfo; import cn.iocoder.yudao.module.order.service.RepairOrderInfoService; import cn.iocoder.yudao.module.order.vo.RepairOrderInfoPageReqVO; import cn.iocoder.yudao.module.order.vo.RepairOrderInfoRespVO; +import cn.iocoder.yudao.module.order.vo.RepairOrderInfoSaveReqVO; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import io.swagger.v3.oas.annotations.Operation; @@ -48,6 +49,21 @@ public class RepairOrderInfoController { return success(BeanUtils.toBean(orderInfo, RepairOrderInfoRespVO.class)); } + + + /** + * 更新订单信息 + * + * @param saveReqVO 订单信息 + */ + @PutMapping("/update") + @Operation(summary = "更新车辆信息") + @PreAuthorize("@ss.hasPermission('base:car-main:update')") + public CommonResult updateCarMain(@RequestBody RepairOrderInfoSaveReqVO saveReqVO) { + repairOrderInfoService.rechargeCallback(saveReqVO.getOrderNo()); + return success(true); + } + /** * 分页查询订单内容 * diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/service/RepairOrderInfoService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/service/RepairOrderInfoService.java index fcf746b8..3feb5323 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/service/RepairOrderInfoService.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/service/RepairOrderInfoService.java @@ -61,13 +61,7 @@ public interface RepairOrderInfoService extends IService { **/ RepairOrderInfo getOrderByOrderNo(String orderNo); - /** - * 获得维修模块 订单分页 - * - * @param pageReqVO 分页查询 - * @return 维修模块 订单分页 - */ - PageResult getOrderInfoPage(RepairOrderInfoPageReqVO pageReqVO); + /** * 分页查询订单信息 diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/service/impl/RepairOrderInfoServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/service/impl/RepairOrderInfoServiceImpl.java index 43fc1362..f160712e 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/service/impl/RepairOrderInfoServiceImpl.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/order/service/impl/RepairOrderInfoServiceImpl.java @@ -80,11 +80,13 @@ public class RepairOrderInfoServiceImpl extends ServiceImpl getOrderInfoPage(RepairOrderInfoPageReqVO pageReqVO) { - return null; - } /** * 分页查询订单信息 @@ -151,6 +149,7 @@ public class RepairOrderInfoServiceImpl extends ServiceImpl + + + + + + \ No newline at end of file diff --git a/dl-module-base/src/main/resources/mapper/custom/CustomerCouponMapper.xml b/dl-module-base/src/main/resources/mapper/custom/CustomerCouponMapper.xml index d35a7c11..da826a10 100644 --- a/dl-module-base/src/main/resources/mapper/custom/CustomerCouponMapper.xml +++ b/dl-module-base/src/main/resources/mapper/custom/CustomerCouponMapper.xml @@ -28,5 +28,6 @@ WHERE bcc.cus_id = #{cusId} AND bcc.deleted = 0 + AND bcc.is_valid = 1 \ No newline at end of file diff --git a/dl-module-base/src/main/resources/mapper/order/RepairOrderInfoMapper.xml b/dl-module-base/src/main/resources/mapper/order/RepairOrderInfoMapper.xml index 60ece770..92c826e1 100644 --- a/dl-module-base/src/main/resources/mapper/order/RepairOrderInfoMapper.xml +++ b/dl-module-base/src/main/resources/mapper/order/RepairOrderInfoMapper.xml @@ -20,7 +20,7 @@ and roi.order_no like concat('%', #{entity.orderNo}, '%') - and roi.goods_totle like concat('%', #{entity.goodsTitle}, '%') + and roi.goods_title like concat('%', #{entity.goodsTitle}, '%') and roi.goods_type = #{entity.goodsType} @@ -31,7 +31,11 @@ and roi.order_status = #{entity.orderStatus} + + and roi.pay_type = #{entity.payType} + + order by roi.create_time desc + select * from system_dept where name = #{name} + + diff --git a/yudao-module-system/yudao-module-system-biz/src/main/resources/mapper/SysUserMapper.xml b/yudao-module-system/yudao-module-system-biz/src/main/resources/mapper/SysUserMapper.xml index ed069135..9bc0a9cb 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/resources/mapper/SysUserMapper.xml +++ b/yudao-module-system/yudao-module-system-biz/src/main/resources/mapper/SysUserMapper.xml @@ -3,8 +3,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> + + UPDATE system_users SET open_id = #{openId} WHERE id = #{userId} + - SELECT distinct su.* FROM diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index c42fd801..b29532e3 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -185,12 +185,10 @@ debug: false --- #################### 微信公众号、小程序相关配置 #################### wx: mp: # 公众号配置(必填),参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-mp-spring-boot-starter/README.md 文档 -# app-id: wx041349c6f39b268b # 测试号(牛希尧提供的) -# secret: 5abee519483bc9f8cb37ce280e814bd0 - app-id: wx5b23ba7a5589ecbb # 测试号(自己的) - secret: 2a7b3b20c537e52e74afd395eb85f61f -# app-id: wxa69ab825b163be19 # 测试号(Kongdy 提供的) -# secret: bd4f9fab889591b62aeac0d7b8d8b4a0 +# app-id: wx8653afe16dffec37 # 蓝安 +# secret: ab94673dd0cca78abd0a453d0aac9f98 + app-id: wxb1f71e5e0c5f9ee7 # 点亮 + secret: 2e9864a6b224feb6fba4ab73b70212cd # 存储配置,解决 AccessToken 的跨节点的共享 config-storage: type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取 diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml index cee7bbe6..2dad28aa 100644 --- a/yudao-server/src/main/resources/application.yaml +++ b/yudao-server/src/main/resources/application.yaml @@ -223,6 +223,7 @@ yudao: - /admin-api/system/config/configKey/** - /websocket/** - /userClient/pay/** + - /userClient/weChat/** - /admin-api/websocket/** - /admin-api/rescue/wxLoginRescue - /admin-api/rescue/wxLoginJc @@ -280,7 +281,9 @@ yudao: - /admin-api/rescue/loginJcApp - /admin-api/system/tenant/getListByWebsite - /admin-api/websocket/** + - /admin-api/system/dict-data/type - /userClient/pay/** + - /userClient/weChat/** ignore-tables: - system_tenant - system_tenant_package