From e809f5955584e600d8612540ea814977c49774c2 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期三, 27 八月 2025 23:51:54 +0800
Subject: [PATCH] 修改bug

---
 ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCompanyController.java |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCompanyController.java b/ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCompanyController.java
index 77c2f1f..81a1d5a 100644
--- a/ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCompanyController.java
+++ b/ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCompanyController.java
@@ -334,6 +334,12 @@
     @RequestMapping(value = "/add")
     @ResponseBody
     public Object add(TCompany tCompany,@RequestParam String subArr,String account,String password) {
+		String name = tCompany.getName();
+		name = name.replaceAll("& lt;", "<");
+		name = name.replaceAll("& gt;", ">");
+		name = name.replaceAll("& #40;", "(");
+		name = name.replaceAll("& #41;", ")");
+		tCompany.setName(name);
 	    //判断账号是否已存在
 	    int count = userService.selectCount(new EntityWrapper<User>().eq("account", account));
 	    if (count > 0) {
@@ -356,6 +362,7 @@
 		    CreateEnterpriseRequest request = new CreateEnterpriseRequest();
 		    request.setName(tCompany.getName());
 		    request.setNickName(tCompany.getName());
+			request.setUscc(tCompany.getIdentifier());
 		    request.setIndustry_code("123456");
 		    request.setMobile(account);
 		    CreateEnterprise enterprise = EnterpriseUtil.createEnterprise(request);
@@ -523,6 +530,12 @@
     @RequestMapping(value = "/update")
     @ResponseBody
     public Object update(TCompany tCompany,@RequestParam String subArr,String account,String password,Integer userId) {
+		String name = tCompany.getName();
+		name = name.replaceAll("& lt;", "<");
+		name = name.replaceAll("& gt;", ">");
+		name = name.replaceAll("& #40;", "(");
+		name = name.replaceAll("& #41;", ")");
+		tCompany.setName(name);
 	    User user = userService.selectById(userId);
 	    if(null != user && ToolUtil.isNotEmpty(password)){
 		    user.setPassword(ShiroKit.md5(password, user.getSalt()));
@@ -556,6 +569,12 @@
     @RequestMapping(value = "/updateFranchisee")
     @ResponseBody
     public Object updateFranchisee(TCompany tCompany,String account,String password,Integer userId) {
+		String name = tCompany.getName();
+		name = name.replaceAll("& lt;", "<");
+		name = name.replaceAll("& gt;", ">");
+		name = name.replaceAll("& #40;", "(");
+		name = name.replaceAll("& #41;", ")");
+		tCompany.setName(name);
 	    tCompany.setUpdateTime(new Date());
 	    tCompany.setVersion(tCompany.getVersion() + 1);
 	    tCompanyService.updateById(tCompany);
@@ -573,6 +592,12 @@
     @RequestMapping(value = "/addFranchisee")
     @ResponseBody
     public Object addFranchisee(TCompany tCompany,String account,String password) {
+		String name = tCompany.getName();
+		name = name.replaceAll("& lt;", "<");
+		name = name.replaceAll("& gt;", ">");
+		name = name.replaceAll("& #40;", "(");
+		name = name.replaceAll("& #41;", ")");
+		tCompany.setName(name);
 	    //判断账号是否已存在
 	    int count = userService.selectCount(new EntityWrapper<User>().eq("account", account));
 	    if (count > 0) {
@@ -595,6 +620,7 @@
 		    CreateEnterpriseRequest request = new CreateEnterpriseRequest();
 		    request.setName(tCompany.getName());
 		    request.setNickName(tCompany.getName());
+			request.setUscc(tCompany.getIdentifier());
 		    request.setIndustry_code("123456");
 		    request.setMobile(account);
 		    CreateEnterprise enterprise = EnterpriseUtil.createEnterprise(request);

--
Gitblit v1.7.1