Просмотр исходного кода

Merge remote-tracking branch 'origin/dev-mysql' into dev-mysql

wangdy 8 лет назад
Родитель
Сommit
144b16f156

+ 6 - 2
src/main/java/com/uas/platform/b2c/common/account/v2/service/impl/UserServiceImpl.java

@@ -75,8 +75,12 @@ public class UserServiceImpl implements UserService {
         if (!StringUtils.isEmpty(user.getDialectUID())) {
         if (!StringUtils.isEmpty(user.getDialectUID())) {
             u.setUserUU(Long.valueOf(user.getDialectUID()));
             u.setUserUU(Long.valueOf(user.getDialectUID()));
         }
         }
-        u.setPwdSecLevel(user.getPwdSecLevel());
-        u.setLastLoginTime(user.getLastLoginTime());
+        if (user.getPwdSecLevel()!=null) {
+            u.setPwdSecLevel(user.getPwdSecLevel());
+        }
+        if(user.getLastLoginTime()!=null){
+            u.setLastLoginTime(user.getLastLoginTime());
+        }
         Enterprise enterprise = null;
         Enterprise enterprise = null;
         if(user.getSpaceDialectUID()!=null){
         if(user.getSpaceDialectUID()!=null){
             enterprise = enterpriseDao.findByUu(Long.valueOf(user.getSpaceDialectUID()));
             enterprise = enterpriseDao.findByUu(Long.valueOf(user.getSpaceDialectUID()));

+ 8 - 5
src/main/java/com/uas/platform/b2c/external/erp/prod/service/impl/ProdServiceImpl.java

@@ -13,6 +13,7 @@ import com.uas.platform.b2c.prod.store.dao.StoreInDao;
 import com.uas.platform.b2c.prod.store.model.StoreIn;
 import com.uas.platform.b2c.prod.store.model.StoreIn;
 import com.uas.platform.core.logging.BufferedLoggerManager;
 import com.uas.platform.core.logging.BufferedLoggerManager;
 import org.apache.log4j.Logger;
 import org.apache.log4j.Logger;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.CollectionUtils;
 import org.springframework.util.CollectionUtils;
 
 
@@ -49,15 +50,17 @@ public class ProdServiceImpl implements ProdService {
             List<Product> productExists = productDao.getProductByEnUUAndProdNum(enuu, prod.getPr_code());
             List<Product> productExists = productDao.getProductByEnUUAndProdNum(enuu, prod.getPr_code());
             Product product = ModelConverter.convert(prod);
             Product product = ModelConverter.convert(prod);
             if (!CollectionUtils.isEmpty(productExists)) {
             if (!CollectionUtils.isEmpty(productExists)) {
-                product.setId(productExists.get(0).getId());
-                product.setCmpUuId(null);// 将已存在的变更过物料uuid置为null,以便后续进行重新匹配
+                Product existProduct = productExists.get(0);
+                BeanUtils.copyProperties(product, productExists.get(0), "id");
+                existProduct.setCmpUuId(null);// 将已存在的变更过物料uuid置为null,以便后续进行重新匹配
+                products.add(existProduct);
+            } else {
+                products.add(product);
             }
             }
-            products.add(product);
         }
         }
         productDao.save(products);// 保存上传的物料
         productDao.save(products);// 保存上传的物料
 
 
-        logger.log("物料资料", "上传物料资料,数量:" + prods.size());
-        loggerOut.info("--------------" + SystemSession.getUser().getEnterprise().getEnName() + " 上传物料资料,数量:" + prods.size() + "---------------");
+        logger.log("物料资料",  SystemSession.getUser().getEnterprise().getEnName() + "上传物料资料,数量:" + prods.size());
         return "success";
         return "success";
     }
     }
 
 

+ 5 - 4
src/main/java/com/uas/platform/b2c/logistics/service/impl/AddressServiceImpl.java

@@ -148,6 +148,7 @@ public class AddressServiceImpl implements AddressService {
 					num =addressDao.getCountByUseruuTypeUsetypeAndDissociative(user.getUserUU(),address.getType(), address.getUsetype(), Type.PERSONAL.value());
 					num =addressDao.getCountByUseruuTypeUsetypeAndDissociative(user.getUserUU(),address.getType(), address.getUsetype(), Type.PERSONAL.value());
 				}
 				}
 			}else {
 			}else {
+				address.setUseruu(user.getUserUU());
 				address.setEnuu(user.getEnterprise().getUu());
 				address.setEnuu(user.getEnterprise().getUu());
 				address.setUsetype((short)2);
 				address.setUsetype((short)2);
 				num = addressDao.getCountByEnuuAndTypeAndUsetype(user.getEnterprise().getUu(), address.getType(), address.getUsetype());
 				num = addressDao.getCountByEnuuAndTypeAndUsetype(user.getEnterprise().getUu(), address.getType(), address.getUsetype());
@@ -156,13 +157,13 @@ public class AddressServiceImpl implements AddressService {
 		}
 		}
 		Long modifyId = address.getId();
 		Long modifyId = address.getId();
 		Address add = save(address);
 		Address add = save(address);
-		if (modifyId == null && add.getNum().intValue() == 1){
+		if (modifyId == null && add.getNum() == 1){
 			isSetTop = true;
 			isSetTop = true;
 		}
 		}
 		if(modifyId == null || isSetTop) { //只有新增加的地址 或者需要被置顶的地址 才需要重新排序。
 		if(modifyId == null || isSetTop) { //只有新增加的地址 或者需要被置顶的地址 才需要重新排序。
 			setTop(add.getId(), isSetTop);
 			setTop(add.getId(), isSetTop);
 		}
 		}
-		if (address.getNum().intValue() == 1 && !isSetTop) { //取消默认地址的时候需要重新排序
+		if (address.getNum() == 1 && !isSetTop) { //取消默认地址的时候需要重新排序
 			setTop(add.getId(), isSetTop);
 			setTop(add.getId(), isSetTop);
 		}
 		}
 		return add;
 		return add;
@@ -173,9 +174,9 @@ public class AddressServiceImpl implements AddressService {
 		List<Address> address = new ArrayList<Address>();
 		List<Address> address = new ArrayList<Address>();
 		if (send) {
 		if (send) {
 			if (enuu != null) {
 			if (enuu != null) {
-				address = addressDao.findByUseruuAndEnuuAndTypeAndUsetypeOrderByNumAsc(useruu, enuu, Type.Address_Sending_Code.value(), (short)1);
+				address = addressDao.findByEnuuAndTypeAndUsetypeOrderByNumAsc(enuu, Type.Address_Sending_Code.value(), (short)2);
 			} else {
 			} else {
-				address = addressDao.findByUseruuAndTypeAndUsetypeAndDissociative(useruu, Type.Address_Sending_Code.value(), (short)1, Type.PERSONAL.value());
+				address = addressDao.findByUseruuAndTypeAndUsetypeAndDissociative(useruu, Type.Address_Sending_Code.value(), (short)2, Type.PERSONAL.value());
 			}
 			}
 		} else {
 		} else {
 			if (enuu != null) {
 			if (enuu != null) {

+ 1 - 1
src/main/resources/prod/account.properties

@@ -11,7 +11,7 @@ sso.cookie.secure=true
 sso.cookie.httponly=true
 sso.cookie.httponly=true
 sso.login.url=https://account.ubtob.com/sso/login
 sso.login.url=https://account.ubtob.com/sso/login
 sso.logout.url=https://account.ubtob.com/sso/logout
 sso.logout.url=https://account.ubtob.com/sso/logout
-sso.register.url=http://account.ubtob.com/sso/register
+sso.register.url=https://account.ubtob.com/sso/register
 
 
 #cross domain
 #cross domain
 sso.ask.url=https://account.ubtob.com/sso/login/ask
 sso.ask.url=https://account.ubtob.com/sso/login/ask

+ 6 - 0
src/main/webapp/resources/view/vendor/modal/recommend_product_modal.html

@@ -1,4 +1,10 @@
 <style>
 <style>
+    .modal {
+        top: 0;
+        left: 0;
+        margin-left: 0;
+        margin-top: 0;
+    }
 .modal-dialog{
 .modal-dialog{
     width: 795px;
     width: 795px;
 }
 }