Pu Zhibing
14 小时以前 954dd6d15ad6a32098f252e7db52459231566b2b
提交代码
15个文件已修改
112 ■■■■ 已修改文件
driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/api/DriverController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/service/impl/DriverServiceImpl.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/service/impl/DriverWorkServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/util/qianyuntong/QianYunTongConfig.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
driver/guns-admin/src/main/resources/application-prod.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
driver/guns-admin/src/main/resources/application-test.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/QianYunTongConfig.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tSystemConfigExtractionRules.html 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigExtractionRules.html 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
user/guns-admin/src/main/java/com/supersavedriving/user/modular/api/AppUserController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
user/guns-admin/src/main/java/com/supersavedriving/user/modular/system/service/impl/DriverServiceImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
user/guns-admin/src/main/java/com/supersavedriving/user/modular/system/util/qianyuntong/QianYunTongConfig.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
user/guns-admin/src/main/resources/application-prod.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
user/guns-admin/src/main/resources/application-test.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zuul/src/main/java/com/sinata/zuul/ZuulApplication.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/api/DriverController.java
@@ -221,7 +221,7 @@
                    return ResponseWarpper.success(ResultUtil.error("账号已冻结"));
                }
            }
            String numberRandom = UUIDUtil.getNumberRandom(4);
            String numberRandom = UUIDUtil.getNumberRandom(5);
            SendSmsRequest request = new SendSmsRequest();
            request.setDestAddress(phone);
            request.setTemplateId("TPL202410290001");
@@ -1185,8 +1185,8 @@
            name = UUIDUtil.getRandomCode() + name.substring(name.lastIndexOf("."));
            File file1 = FileUtil.writeFromStream(inputStream, new File(filePath + name));
            HttpRequest post = HttpUtil.createPost(adminUrl + "/upload/image");
            HttpRequest form = post.form("file", file1);
            HttpResponse execute = form.execute();
            post.form("file", file1);
            HttpResponse execute = post.execute();
            int status = execute.getStatus();
            if(200 != status){
                throw new RuntimeException("上传图片异常");
driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/service/impl/DriverServiceImpl.java
@@ -27,6 +27,7 @@
import com.supersavedriving.driver.modular.system.util.weChat.WeChatUtil;
import com.supersavedriving.driver.modular.system.util.weChat.model.Code2Session;
import com.supersavedriving.driver.modular.system.warpper.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.authc.SimpleAuthenticationInfo;
import org.apache.shiro.authc.UsernamePasswordToken;
@@ -67,6 +68,7 @@
* @author pzb
* @Date 2023/2/8 18:52
*/
@Slf4j
@Service
public class DriverServiceImpl extends ServiceImpl<DriverMapper, Driver> implements IDriverService {
@@ -223,8 +225,8 @@
        String pictureName = "driver_" + driverId + ".png";
        File file = FileUtil.writeFromStream(release, new File(filePath + pictureName));
        HttpRequest post = HttpUtil.createPost(adminUrl + "/upload/image");
        HttpRequest form = post.form("file", file);
        HttpResponse execute = form.execute();
        post.form("file", file);
        HttpResponse execute = post.execute();
        int status = execute.getStatus();
        if(200 != status){
            throw new RuntimeException("上传图片异常");
@@ -237,8 +239,8 @@
        String pictureName = "driver_" + driverId + ".png";
        File file = FileUtil.writeFromStream(release, new File(filePath + pictureName));
        HttpRequest post = HttpUtil.createPost(adminUrl + "/upload/image");
        HttpRequest form = post.form("file", file);
        HttpResponse execute = form.execute();
        post.form("file", file);
        HttpResponse execute = post.execute();
        int status = execute.getStatus();
        if(200 != status){
            throw new RuntimeException("上传图片异常");
@@ -366,6 +368,11 @@
        return ResultUtil.success(tokenWarpper);
    }
    public static void main(String[] args) {
        String s = ShiroKit.md5(MD5AndKL.MD5("123456"), "i#sm4");
        System.out.println(s);
    }
    /**
     * 司机密码登录
@@ -603,6 +610,7 @@
        Double lat = driverPositionWarpper.getLat();
        Integer driverId = driverPositionWarpper.getDriverId();
        Integer orderId = driverPositionWarpper.getOrderId();
        log.info("存储地理空间:{}", driverPositionWarpper);
        redisUtil.setStrValue("daijia:DRIVER" + driverId, lon + "," + lat, 30);
        Query query = Query.query(Criteria.where("driverId").is(driverId));
        Location old = this.mongoTemplate.findOne(query, Location.class);
driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/service/impl/DriverWorkServiceImpl.java
@@ -132,7 +132,7 @@
        SystemConfig systemConfig = systemConfigService.selectOne(new EntityWrapper<SystemConfig>().eq("type", 6)
                .eq("companyType",1)
                .eq("companyId",1)
                .last("LIMIT 1"));
                .last(" LIMIT 0, 1"));
        Double num1 = JSON.parseObject(systemConfig.getContent()).getDouble("num1");
        List<Driver> drivers = driverService.selectList(new EntityWrapper<Driver>().eq("approvalStatus", 2).eq("status", 1).lt("balance", num1));
        for (Driver driver : drivers) {
driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/util/qianyuntong/QianYunTongConfig.java
@@ -179,20 +179,20 @@
            this.setApiUrl("https://test-zhongtai.stqcloud.com:10070");
            this.setBucketName("bucuTest0625");
            this.setAppId("wxcc3c9058e2b294db");
            this.setEndPoint("http://119.4.112.68:27741/v1");
            this.setEndPoint("http://10.30.52.45:27741/v1");
            this.setAccount("d8bef0a04db511f0b79d01a3e2b7587e");
            this.setAccessKey("TYMFTFD5SIIT15DCCUD7");
            this.setSecretKey("AoI1dkH3yoAvXoaQlREO3ed9mwQJFluLTliS9T1z");
        }
        if("prod".equals(activeProfile)){
            this.setAppkey("10001104");
            this.setPrivateKeyPath("/root/server/app/key/private_key.pem");
            this.setPrivateKeyPath("/etraffic/server/private_key.pem");
            this.setUserName("xiwang");
            this.setStatus("1");
            this.setApiUrl("http://jjzhongtai.stqcloud.com:10010");
            this.setBucketName("qyt20250702");
            this.setAppId("wxcc3c9058e2b294db");
            this.setEndPoint("http://119.4.112.68:27741/v1");
            this.setEndPoint("http://10.30.52.45:27741/v1");
            this.setAccount("d8bef0a04db511f0b79d01a3e2b7587e");
            this.setAccessKey("TYMFTFD5SIIT15DCCUD7");
            this.setSecretKey("AoI1dkH3yoAvXoaQlREO3ed9mwQJFluLTliS9T1z");
driver/guns-admin/src/main/resources/application-prod.yml
@@ -2,7 +2,7 @@
  port: 7007
guns:
  swagger-open: true              #是否开启swagger (true/false)
  swagger-open: false              #是否开启swagger (true/false)
  kaptcha-open: false             #是否开启登录时验证码 (true/false)
#  file-upload-path: d:/tmp       #文件上传目录(不配置的话为java.io.tmpdir目录)
  spring-session-open: false      #是否开启spring session,如果是多机环境需要开启(true/false)
driver/guns-admin/src/main/resources/application-test.yml
@@ -2,7 +2,7 @@
  port: 7007
guns:
  swagger-open: true              #是否开启swagger (true/false)
  swagger-open: false              #是否开启swagger (true/false)
  kaptcha-open: false             #是否开启登录时验证码 (true/false)
#  file-upload-path: d:/tmp       #文件上传目录(不配置的话为java.io.tmpdir目录)
  spring-session-open: false      #是否开启spring session,如果是多机环境需要开启(true/false)
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/QianYunTongConfig.java
@@ -186,7 +186,7 @@
        }
        if("prod".equals(activeProfile)){
            this.setAppkey("10001104");
            this.setPrivateKeyPath("/root/server/app/key/private_key.pem");
            this.setPrivateKeyPath("/etraffic/server/private_key.pem");
            this.setUserName("xiwang");
            this.setStatus("1");
            this.setApiUrl("http://jjzhongtai.stqcloud.com:10010");
management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tSystemConfigExtractionRules.html
@@ -36,6 +36,25 @@
                                <button class="switch-btn active" value="2" onclick="switchTab(this, '按单')">按单</button>
                            @}
                        </div>
                        @if(type == 1){
                            <div id="month" class="initialLevel col-sm-12 control-label form-group" style="text-align: left" >
                                <div class="initialLevel col-sm-3 control-label form-group"  >
                                    <span class="control-label" >抽成,每月平台抽取分公司</span>
                                    <input class="control-label" id="num2" name="num2" value="${num2}" type="number" min="0" style="height: 30px;width: 80px">
                                    <span class="control-label" >元</span>
                                </div>
                            </div>
                        @}
                        @if(type == 2){
                            <div id="monad" class="initialLevel col-sm-12 control-label form-group" style="text-align: left" >
                                <div class="initialLevel col-sm-3 control-label form-group"  >
                                    <span class="control-label" >抽成,每单平台抽取分公司</span>
                                    <input class="control-label" id="num3" name="num3" value="${num3}" type="number" min="0" style="height: 30px;width: 80px">
                                    <span class="control-label" >元</span>
                                </div>
                            </div>
                        @}
                        <div class="row btn-group-m-t">
                            <div class="col-sm-10" style="text-align: center">
                                <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TSystemConfig.extractionRulesSubmit()"/>
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigExtractionRules.html
@@ -31,7 +31,39 @@
                            <button class="switch-btn active" value="1" onclick="switchTab(this, '包月')">包月</button>
                            <button class="switch-btn" value="2" onclick="switchTab(this, '按单')">按单</button>
                        </div>
                        @if(roleType == 1){
                            <div id="month" class="initialLevel col-sm-12 control-label form-group month" style="text-align: left" >
                                <div class="initialLevel col-sm-3 control-label form-group"  >
                                    <span class="control-label" >抽成,每月平台抽取分公司</span>
                                    <input class="control-label" id="num2" name="num2" value="${num2}" type="number" min="0" style="height: 30px;width: 80px">
                                    <span class="control-label" >元</span>
                                </div>
                            </div>
                            <div id="monad" hidden="hidden" class="initialLevel col-sm-12 control-label form-group monad" style="text-align: left" >
                                <div class="initialLevel col-sm-3 control-label form-group"  >
                                    <span class="control-label" >抽成,每单平台抽取分公司</span>
                                    <input class="control-label" id="num3" name="num3" value="${num3}" type="number" min="0" style="height: 30px;width: 80px">
                                    <span class="control-label" >元</span>
                                </div>
                            </div>
                        @}
                        @if(roleType == 2){
                            <div id="month" class="initialLevel col-sm-12 control-label form-group month" style="text-align: left" >
                                <div class="initialLevel col-sm-3 control-label form-group"  >
                                    <span class="control-label" >抽成,每月分公司抽取司机</span>
                                    <input class="control-label" id="num2" name="num2" value="${num2}" type="number" min="0" style="height: 30px;width: 80px">
                                    <span class="control-label" >元</span>
                                </div>
                            </div>
                            <div id="monad" hidden="hidden" class="initialLevel col-sm-12 control-label form-group monad" style="text-align: left" >
                                <div class="initialLevel col-sm-3 control-label form-group"  >
                                    <span class="control-label" >抽成,每单分公司抽取司机</span>
                                    <input class="control-label" id="num3" name="num3" value="${num3}" type="number" min="0" style="height: 30px;width: 80px">
                                    <span class="control-label" >元</span>
                                </div>
                            </div>
                        @}
                        <div class="row btn-group-m-t">
                            <div class="col-sm-10" style="text-align: center">
                                <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TSystemConfig.extractionRulesSubmit()"/>
user/guns-admin/src/main/java/com/supersavedriving/user/modular/api/AppUserController.java
@@ -296,8 +296,8 @@
            name = UUIDUtil.getRandomCode() + name.substring(name.lastIndexOf("."));
            File file1 = FileUtil.writeFromStream(inputStream, new File(filePath + name));
            HttpRequest post = HttpUtil.createPost(adminUrl + "/upload/image");
            HttpRequest form = post.form("file", file1);
            HttpResponse execute = form.execute();
            post.form("file", file1);
            HttpResponse execute = post.execute();
            int status = execute.getStatus();
            if(200 != status){
                throw new RuntimeException("上传图片异常");
user/guns-admin/src/main/java/com/supersavedriving/user/modular/system/service/impl/DriverServiceImpl.java
@@ -20,6 +20,7 @@
import com.supersavedriving.user.modular.system.util.weChat.WeChatUtil;
import com.supersavedriving.user.modular.system.warpper.DriverRegisterWarpper;
import com.supersavedriving.user.modular.system.warpper.NearbyDriverWarpper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.geo.Circle;
@@ -43,6 +44,7 @@
* @author pzb
* @Date 2023/2/8 18:52
*/
@Slf4j
@Service
public class DriverServiceImpl extends ServiceImpl<DriverMapper, Driver> implements IDriverService {
@@ -101,6 +103,7 @@
        // 构造query对象
        Query query = Query.query(Criteria.where("location").withinSphere(circle));
        List<Location> locations = mongoTemplate.find(query, Location.class);
        log.info("地理空间检索结果:{}", locations);
        List<Integer> collect = locations.stream().map(Location::getDriverId).collect(Collectors.toList());
        if(collect.size() == 0){
            return list;
@@ -263,8 +266,8 @@
        String pictureName = "driver_" + driverId + ".png";
        File file = FileUtil.writeFromStream(release, new File(filePath + pictureName));
        HttpRequest post = HttpUtil.createPost(adminUrl + "/upload/image");
        HttpRequest form = post.form("file", file);
        HttpResponse execute = form.execute();
        post.form("file", file);
        HttpResponse execute = post.execute();
        int status = execute.getStatus();
        if(200 != status){
            throw new RuntimeException("上传图片异常");
user/guns-admin/src/main/java/com/supersavedriving/user/modular/system/util/qianyuntong/QianYunTongConfig.java
@@ -179,20 +179,20 @@
            this.setApiUrl("https://test-zhongtai.stqcloud.com:10070");
            this.setBucketName("bucuTest0625");
            this.setAppId("wxcc3c9058e2b294db");
            this.setEndPoint("http://119.4.112.68:27741/v1");
            this.setEndPoint("http://10.30.52.45:27741/v1");
            this.setAccount("d8bef0a04db511f0b79d01a3e2b7587e");
            this.setAccessKey("TYMFTFD5SIIT15DCCUD7");
            this.setSecretKey("AoI1dkH3yoAvXoaQlREO3ed9mwQJFluLTliS9T1z");
        }
        if("prod".equals(activeProfile)){
            this.setAppkey("10001104");
            this.setPrivateKeyPath("/root/server/app/key/private_key.pem");
            this.setPrivateKeyPath("/etraffic/server/private_key.pem");
            this.setUserName("xiwang");
            this.setStatus("1");
            this.setApiUrl("http://jjzhongtai.stqcloud.com:10010");
            this.setBucketName("qyt20250702");
            this.setAppId("wxcc3c9058e2b294db");
            this.setEndPoint("http://119.4.112.68:27741/v1");
            this.setEndPoint("http://10.30.52.45:27741/v1");
            this.setAccount("d8bef0a04db511f0b79d01a3e2b7587e");
            this.setAccessKey("TYMFTFD5SIIT15DCCUD7");
            this.setSecretKey("AoI1dkH3yoAvXoaQlREO3ed9mwQJFluLTliS9T1z");
user/guns-admin/src/main/resources/application-prod.yml
@@ -2,7 +2,7 @@
  port: 7006
guns:
  swagger-open: true              #是否开启swagger (true/false)
  swagger-open: false              #是否开启swagger (true/false)
  kaptcha-open: false             #是否开启登录时验证码 (true/false)
#  file-upload-path: d:/tmp       #文件上传目录(不配置的话为java.io.tmpdir目录)
  spring-session-open: false      #是否开启spring session,如果是多机环境需要开启(true/false)
user/guns-admin/src/main/resources/application-test.yml
@@ -2,7 +2,7 @@
  port: 7006
guns:
  swagger-open: true              #是否开启swagger (true/false)
  swagger-open: false              #是否开启swagger (true/false)
  kaptcha-open: false             #是否开启登录时验证码 (true/false)
#  file-upload-path: d:/tmp       #文件上传目录(不配置的话为java.io.tmpdir目录)
  spring-session-open: false      #是否开启spring session,如果是多机环境需要开启(true/false)
zuul/src/main/java/com/sinata/zuul/ZuulApplication.java
@@ -97,8 +97,8 @@
        public List<SwaggerResource> get() {
            List resource=new ArrayList<>();
            //name可以随便写,location前缀要与zuul配置的path一致。zuul开了token验证,要加上token,否则不用加?token=1
            resource.add(swaggerResource("user","/user-server/v2/api-docs","1.0"));
            resource.add(swaggerResource("driver","/driver-server/v2/api-docs","1.0"));
//            resource.add(swaggerResource("user","/user-server/v2/api-docs","1.0"));
//            resource.add(swaggerResource("driver","/driver-server/v2/api-docs","1.0"));
            return resource;
        }