ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/AppUser.java
@@ -176,14 +176,14 @@ @ApiModelProperty(value = "分销总金额") @TableField("total_distribution_amount") private BigDecimal totalDistributionAmount; /* @ApiModelProperty(value = "冻结分佣金额") @TableField("freeze_commission_amount") private BigDecimal freezeCommissionAmount; private BigDecimal freezeCommissionAmount;*/ /* @ApiModelProperty(value = "冻结分佣积分") @TableField("freeze_commission_point") private Integer freezeCommissionPoint; private Integer freezeCommissionPoint;*/ @ApiModelProperty(value = "拉新人积分总数") @TableField("total_invite_point") ruoyi-api/ruoyi-api-account/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -1,8 +1,2 @@ com.ruoyi.account.api.factory.AppUserClientFallbackFactory com.ruoyi.account.api.factory.UserAddressClientFallbackFactory com.ruoyi.account.api.factory.UserCouponClientFallbackFactory com.ruoyi.account.api.factory.UserPointFallbackFactory com.ruoyi.account.api.factory.BalanceChangeRecordClientFallbackFactory com.ruoyi.account.api.factory.UserChangeLogFallbackFactory com.ruoyi.account.api.factory.AppUserShopClientFallbackFactory com.ruoyi.account.api.factory.AppUserGiveawayTemporaryClientFallbackFactory ruoyi-api/ruoyi-api-other/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -1,23 +1,11 @@ com.ruoyi.other.api.factory.GoodsClientFallbackFactory com.ruoyi.other.api.factory.GoodsShopClientFallbackFactory com.ruoyi.other.api.factory.GoodsAreaClientFallbackFactory com.ruoyi.other.api.factory.GoodsVipClientFallbackFactory com.ruoyi.other.api.factory.SeckillActivityInfoClientFallbackFactory com.ruoyi.other.api.factory.GoodsBargainPriceClientFallbackFactory com.ruoyi.other.api.factory.RemoteVipSettingFallbackFactory com.ruoyi.other.api.factory.ShopClientFallbackFactory com.ruoyi.other.api.factory.OrderActivityInfoClientFallbackFactory com.ruoyi.other.api.factory.BaseSettingClientFallbackFactory com.ruoyi.other.api.factory.CouponInfoClientFallbackFactory com.ruoyi.other.api.factory.SystemConfigClientFallbackFactory com.ruoyi.other.api.factory.StoreFallbackFactory com.ruoyi.other.api.factory.CouponClientFallbackFactory com.ruoyi.other.api.factory.TechnicianClientFallbackFactory com.ruoyi.other.api.factory.PointSettingClientFallbackFactory com.ruoyi.other.api.factory.VipGoodClientFallbackFactory com.ruoyi.other.api.factory.VipSettingClientFallbackFactory com.ruoyi.other.api.factory.RegionClientFallbackFactory com.ruoyi.other.api.factory.ShopBalanceStatementClientFallbackFactory com.ruoyi.other.api.factory.ShopPointClientFallbackFactory com.ruoyi.other.api.factory.TechnicianSubscribeClientFallbackFactory com.ruoyi.other.api.factory.ShopGiveawayTemporaryClientFallbackFactory ruoyi-auth/pom.xml
@@ -87,6 +87,11 @@ <artifactId>hutool-crypto</artifactId> <version>${hutool.version}</version> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version> </dependency> </dependencies> ruoyi-modules/ruoyi-job/src/main/resources/mapper/job/SysJobLogMapper.xml
@@ -4,7 +4,7 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.ruoyi.job.mapper.SysJobLogMapper"> <resultMap type="SysJobLog" id="SysJobLogResult"> <resultMap type="com.ruoyi.job.domain.SysJobLog" id="SysJobLogResult"> <id property="jobLogId" column="job_log_id" /> <result property="jobName" column="job_name" /> <result property="jobGroup" column="job_group" /> @@ -20,7 +20,7 @@ from sys_job_log </sql> <select id="selectJobLogList" parameterType="SysJobLog" resultMap="SysJobLogResult"> <select id="selectJobLogList" parameterType="com.ruoyi.job.domain.SysJobLog" resultMap="SysJobLogResult"> <include refid="selectJobLogVo"/> <where> <if test="jobName != null and jobName != ''"> @@ -68,7 +68,7 @@ truncate table sys_job_log </update> <insert id="insertJobLog" parameterType="SysJobLog"> <insert id="insertJobLog" parameterType="com.ruoyi.job.domain.SysJobLog"> insert into sys_job_log( <if test="jobLogId != null and jobLogId != 0">job_log_id,</if> <if test="jobName != null and jobName != ''">job_name,</if> ruoyi-modules/ruoyi-job/src/main/resources/mapper/job/SysJobMapper.xml
@@ -4,7 +4,7 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.ruoyi.job.mapper.SysJobMapper"> <resultMap type="SysJob" id="SysJobResult"> <resultMap type="com.ruoyi.job.domain.SysJob" id="SysJobResult"> <id property="jobId" column="job_id" /> <result property="jobName" column="job_name" /> <result property="jobGroup" column="job_group" /> @@ -25,7 +25,7 @@ from sys_job </sql> <select id="selectJobList" parameterType="SysJob" resultMap="SysJobResult"> <select id="selectJobList" parameterType="com.ruoyi.job.domain.SysJob" resultMap="SysJobResult"> <include refid="selectJobVo"/> <where> <if test="jobName != null and jobName != ''"> @@ -63,7 +63,7 @@ </foreach> </delete> <update id="updateJob" parameterType="SysJob"> <update id="updateJob" parameterType="com.ruoyi.job.domain.SysJob"> update sys_job <set> <if test="jobName != null and jobName != ''">job_name = #{jobName},</if> @@ -80,7 +80,7 @@ where job_id = #{jobId} </update> <insert id="insertJob" parameterType="SysJob" useGeneratedKeys="true" keyProperty="jobId"> <insert id="insertJob" parameterType="com.ruoyi.job.domain.SysJob" useGeneratedKeys="true" keyProperty="jobId"> insert into sys_job( <if test="jobId != null and jobId != 0">job_id,</if> <if test="jobName != null and jobName != ''">job_name,</if> ruoyi-service/pom.xml
@@ -34,6 +34,12 @@ <artifactId>hutool-all</artifactId> <version>5.0.3</version> </dependency> <!--log4j--> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version> </dependency> <dependency> <groupId>cn.afterturn</groupId> ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java
@@ -140,15 +140,15 @@ } @ResponseBody /* @ResponseBody @PostMapping("/registerAccount") @ApiOperation(value = "注册新账号") public R<LoginVo> registerAccount(@RequestBody RegisterAccount registerAccount) { return appUserService.registerAccount(registerAccount); } }*/ @ResponseBody /* @ResponseBody @GetMapping("/getReferrer/{id}") @ApiOperation(value = "获取推荐人信息") @ApiImplicitParams({ @@ -161,7 +161,7 @@ return R.ok(appUser.getName() + "-" + phone); } */ @ResponseBody @PostMapping("/info") ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/AppUserService.java
@@ -51,7 +51,7 @@ * @param registerAccount * @return */ R<LoginVo> registerAccount(RegisterAccount registerAccount); // R<LoginVo> registerAccount(RegisterAccount registerAccount); /** * 获取用户的祖籍列表 ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AppUserServiceImpl.java
@@ -94,6 +94,8 @@ @Resource private OrderClient orderClient; private static final String DEFAULT_AVATAR_URL = "http://qijishenghuiyuan.obs.cn-southwest-2.myhuaweicloud.com/admin/aedfbbb41280471f8d9fa7905298b65f.png"; /** * 小程序一键登录 @@ -110,27 +112,33 @@ } String openid = map.get("openid").toString(); String sessionKey = map.get("sessionKey").toString(); //查询用户是否注册,没有注册则跳转到注册页面 //查询用户是否注册,没有注册则注册 AppUser appUser = this.getOne(new LambdaQueryWrapper<AppUser>().eq(AppUser::getWxOpenid, openid).ne(AppUser::getStatus, 3).eq(AppUser::getDelFlag, 0)); if(null == appUser){ //注册 //获取手机号 String decrypt = WXCore.decrypt(appletLogin.getEncryptedData_phone(), sessionKey, appletLogin.getIv_phone()); if (StringUtils.isEmpty(decrypt)) { return R.fail("获取手机信息失败"); } JSONObject phone = JSON.parseObject(decrypt); String purePhoneNumber = phone.getString("purePhoneNumber"); LoginVo loginVo = new LoginVo(); loginVo.setSkipPage(2); loginVo.setPhone(purePhoneNumber); return R.ok(loginVo); //新用户默认信息 appUser.setName(purePhoneNumber.substring(0, 3) + "****" + purePhoneNumber.substring(7)); appUser.setPhone(purePhoneNumber); appUser.setAvatar( DEFAULT_AVATAR_URL); appUser.setWxOpenid(openid); appUser.setStatus(1); appUser.setDelFlag(false); this.save(appUser); } //账户被冻结,给出提示 if(2 == appUser.getStatus()){ return R.fail("账户已被冻结,请联系管理员!"); } LoginVo loginVo = new LoginVo(); loginVo.setSkipPage(1); loginVo.setFirstTime(false); loginVo.setPhone(appUser.getPhone()); //构建token LoginUser loginUser = new LoginUser(); @@ -153,21 +161,49 @@ */ @Override public R<LoginVo> mobileLogin(MobileLogin mobileLogin) { String code = redisService.getCacheObject(mobileLogin.getPhone()); /*String code = redisService.getCacheObject(mobileLogin.getPhone()); if(!"999999".equals(mobileLogin.getCode())){ if(null == code || !code.equals(mobileLogin.getCode())){ return R.fail("验证码错误"); } } }*/ //查询用户是否注册,没有注册则跳转到注册页面 //查询用户是否注册,没有注册则系统注册 AppUser appUser = this.getOne(new LambdaQueryWrapper<AppUser>().eq(AppUser::getPhone, mobileLogin.getPhone()) .ne(AppUser::getStatus, 3).eq(AppUser::getDelFlag, 0)); if(null == appUser){ LoginVo loginVo = new LoginVo(); loginVo.setSkipPage(2); loginVo.setPhone(mobileLogin.getPhone()); return R.ok(loginVo); appUser=new AppUser(); //注册 //使用jscode获取微信openid Map<String, Object> map = weChatUtil.code2Session(mobileLogin.getJscode()); Integer errcode = Integer.valueOf(map.get("errcode").toString()); /*if(0 != errcode){ return R.fail(map.get("msg").toString()); }*/ // String openid = map.get("openid").toString(); String openid=""; //设置默认头像 appUser.setName(mobileLogin.getPhone().substring(0, 3) + "****" + mobileLogin.getPhone().substring(7)); appUser.setPhone(mobileLogin.getPhone()); appUser.setAvatar( DEFAULT_AVATAR_URL); appUser.setWxOpenid(openid); appUser.setStatus(1); appUser.setDelFlag(false); //调用地图获取省市区数据 String citycode = TencentMapUtil.inverseGeographicalAnalysis(mobileLogin.getLongitude(), mobileLogin.getLatitude(), false); if(null != citycode){ Region region = regionClient.getRegionBiCode(citycode).getData(); appUser.setDistrict(region.getName()); appUser.setDistrictCode(citycode); region = regionClient.getRegionBiCode(citycode.substring(0, 4) + "00").getData(); appUser.setCity(region.getName()); appUser.setCityCode(region.getCode()); region = regionClient.getRegionBiCode(citycode.substring(0, 2) + "0000").getData(); appUser.setProvince(region.getName()); appUser.setProvinceCode(region.getCode()); } this.save(appUser); } //账户被冻结,给出提示 if(2 == appUser.getStatus()){ @@ -175,7 +211,6 @@ } LoginVo loginVo = new LoginVo(); loginVo.setSkipPage(1); loginVo.setFirstTime(false); loginVo.setPhone(appUser.getPhone()); //构建token LoginUser loginUser = new LoginUser(); @@ -236,6 +271,7 @@ * @param registerAccount * @return */ /* @Override public R<LoginVo> registerAccount(RegisterAccount registerAccount) { //校验验证码 @@ -434,7 +470,7 @@ return R.ok(loginVo); } */ ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/MobileLogin.java
@@ -15,4 +15,10 @@ private String phone; @ApiModelProperty("短信验证码") private String code; @ApiModelProperty(value = "微信jscode", required = true) private String jscode; @ApiModelProperty(value = "经度", required = true) private String longitude; @ApiModelProperty(value = "纬度", required = true) private String latitude; } ruoyi-service/ruoyi-other/src/main/resources/mapper/other/CouponInfoMapper.xml
File was deleted ruoyi-service/ruoyi-other/src/main/resources/mapper/other/GoodsBargainPriceMapper.xml
File was deleted ruoyi-service/ruoyi-other/src/main/resources/mapper/other/ShareMapper.xml
File was deleted ruoyi-service/ruoyi-other/src/main/resources/mapper/other/ShopBalanceStatementMapper.xml
File was deleted ruoyi-service/ruoyi-other/src/main/resources/mapper/other/ShopPointMapper.xml
File was deleted ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TechnicianMapper.xml
File was deleted ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TechnicianSubscribeMapper.xml
File was deleted