|
|
@@ -26,6 +26,7 @@ import com.uas.platform.core.model.PageInfo;
|
|
|
import com.uas.platform.core.persistence.criteria.CriterionExpression;
|
|
|
import com.uas.platform.core.persistence.criteria.LogicalExpression;
|
|
|
import com.uas.platform.core.persistence.criteria.SimpleExpression;
|
|
|
+import com.uas.platform.core.util.AgentUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.domain.Page;
|
|
|
import org.springframework.data.domain.Pageable;
|
|
|
@@ -39,6 +40,7 @@ import javax.persistence.criteria.CriteriaBuilder;
|
|
|
import javax.persistence.criteria.CriteriaQuery;
|
|
|
import javax.persistence.criteria.Predicate;
|
|
|
import javax.persistence.criteria.Root;
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
import java.util.Date;
|
|
|
import java.util.Iterator;
|
|
|
import java.util.List;
|
|
|
@@ -62,6 +64,7 @@ public class StoreApplyServiceImpl implements StoreApplyService {
|
|
|
|
|
|
private final CommonDao commonDao;
|
|
|
|
|
|
+
|
|
|
@Autowired
|
|
|
public StoreApplyServiceImpl(StoreApplyDao storeApplyDao, EnterpriseDao enterpriseDao, StoreInService storeInService,
|
|
|
StoreBrandInfoDao brandInfoDao, CommonDao commonDao) {
|
|
|
@@ -74,7 +77,7 @@ public class StoreApplyServiceImpl implements StoreApplyService {
|
|
|
|
|
|
@Override
|
|
|
@Transactional
|
|
|
- public ResultMap applyShop(StoreApply storeApply) {
|
|
|
+ public ResultMap applyShop(HttpServletRequest request, StoreApply storeApply) {
|
|
|
// 验证开铺申请信息
|
|
|
if (storeApply == null || storeApply.getType() == null || CollectionUtils.isEmpty(storeApply.getQualifications())) {
|
|
|
return new ResultMap(CodeType.NO_INFO, "请提交完整开铺申请信息");
|
|
|
@@ -147,6 +150,9 @@ public class StoreApplyServiceImpl implements StoreApplyService {
|
|
|
EnterpriseSimple enterpriseSimple = EnterpriseSimple.translateSimple(enterprise);
|
|
|
storeApply.setEnterprise(enterpriseSimple);
|
|
|
|
|
|
+ String ip = AgentUtils.getIp(request);
|
|
|
+ storeApply.setIpAddress(ip);
|
|
|
+
|
|
|
// 更新资质信息
|
|
|
List<Qualification> qualifications = storeApply.getQualifications();
|
|
|
for (Qualification qualification : qualifications) {
|