Commit da5af0eb authored by 赵啸非's avatar 赵啸非

添加更新默认用户角色

parent 217f7231
...@@ -7,7 +7,7 @@ import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFacto ...@@ -7,7 +7,7 @@ import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFacto
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.ErrorHandler; import org.springframework.util.ErrorHandler;
@Component //@Component
@Slf4j @Slf4j
public class RabbitLoggingErrorHandler implements ErrorHandler { public class RabbitLoggingErrorHandler implements ErrorHandler {
......
...@@ -12,7 +12,7 @@ import org.springframework.stereotype.Service; ...@@ -12,7 +12,7 @@ import org.springframework.stereotype.Service;
* @description: * @description:
**/ **/
@Slf4j @Slf4j
@Service //@Service
public class SimpleDynamicListener implements ChannelAwareMessageListener { public class SimpleDynamicListener implements ChannelAwareMessageListener {
@Override @Override
......
...@@ -148,6 +148,7 @@ public class H5LoginController extends BaseCRUDJsonBodyMappingController<UserSer ...@@ -148,6 +148,7 @@ public class H5LoginController extends BaseCRUDJsonBodyMappingController<UserSer
data.put("phone", userEntity.getPhone()); data.put("phone", userEntity.getPhone());
data.put("userName", userEntity.getRealName()); data.put("userName", userEntity.getRealName());
data.put("userType", userEntity.getUserType()); data.put("userType", userEntity.getUserType());
data.put("companyId", userEntity.getCompanyId());
userEntity.setLoginTime(System.currentTimeMillis()); userEntity.setLoginTime(System.currentTimeMillis());
userEntity.setToken(IdUtil.fastSimpleUUID()); userEntity.setToken(IdUtil.fastSimpleUUID());
userEntity.setExpireTime(DateUtils.addCurrDate(3).getTime()); userEntity.setExpireTime(DateUtils.addCurrDate(3).getTime());
...@@ -245,6 +246,7 @@ public class H5LoginController extends BaseCRUDJsonBodyMappingController<UserSer ...@@ -245,6 +246,7 @@ public class H5LoginController extends BaseCRUDJsonBodyMappingController<UserSer
data.put("phone", userEntity.getPhone()); data.put("phone", userEntity.getPhone());
data.put("userName", userEntity.getRealName()); data.put("userName", userEntity.getRealName());
data.put("userType", userEntity.getUserType()); data.put("userType", userEntity.getUserType());
data.put("companyId", userEntity.getCompanyId());
userEntity.setLoginTime(System.currentTimeMillis()); userEntity.setLoginTime(System.currentTimeMillis());
userEntity.setToken(IdUtil.fastSimpleUUID()); userEntity.setToken(IdUtil.fastSimpleUUID());
userEntity.setExpireTime(DateUtils.addCurrDate(7).getTime()); userEntity.setExpireTime(DateUtils.addCurrDate(7).getTime());
......
package com.mortals.xhx.module.park.service.impl; package com.mortals.xhx.module.park.service.impl;
import com.mortals.framework.model.PageInfo; import com.mortals.framework.model.PageInfo;
import com.mortals.xhx.module.declare.model.DeclareEntity;
import com.mortals.xhx.module.declare.model.DeclareQuery;
import com.mortals.xhx.module.declare.service.DeclareService;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import java.util.List;
import java.util.function.Function; import java.util.function.Function;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
...@@ -10,15 +18,29 @@ import com.mortals.xhx.module.park.dao.ParkDao; ...@@ -10,15 +18,29 @@ import com.mortals.xhx.module.park.dao.ParkDao;
import com.mortals.xhx.module.park.model.ParkEntity; import com.mortals.xhx.module.park.model.ParkEntity;
import com.mortals.xhx.module.park.service.ParkService; import com.mortals.xhx.module.park.service.ParkService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
/** /**
* ParkService * ParkService
* 园区基本信息 service实现 * 园区基本信息 service实现
* *
* @author zxfei * @author zxfei
* @date 2025-04-27 * @date 2025-04-27
*/ */
@Service("parkService") @Service("parkService")
@Slf4j @Slf4j
public class ParkServiceImpl extends AbstractCRUDServiceImpl<ParkDao, ParkEntity, Long> implements ParkService { public class ParkServiceImpl extends AbstractCRUDServiceImpl<ParkDao, ParkEntity, Long> implements ParkService {
@Autowired
private DeclareService declareService;
@Override
protected void updateAfter(ParkEntity entity, Context context) throws AppException {
super.updateAfter(entity, context);
List<DeclareEntity> declareEntities = declareService.find(new DeclareQuery().parkId(entity.getId()));
for (DeclareEntity declareEntity : declareEntities) {
declareEntity.setParkName(entity.getName());
}
declareService.update(declareEntities, context);
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment