|
|
@@ -13,6 +13,8 @@ import org.jeecg.modules.hpposition.entity.PositionAddress;
|
|
|
import org.jeecg.modules.hpposition.mapper.PositionMapper;
|
|
|
import org.jeecg.modules.hpposition.service.IPositionAddressService;
|
|
|
import org.jeecg.modules.hpposition.service.IPositionService;
|
|
|
+import org.jeecg.modules.message.entity.Message;
|
|
|
+import org.jeecg.modules.message.service.IMessageService;
|
|
|
import org.jeecg.modules.util.TokenUtil;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
@@ -39,6 +41,8 @@ import java.util.Map;
|
|
|
public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> implements IPositionService {
|
|
|
@Resource
|
|
|
private PositionMapper positionMapper;
|
|
|
+ @Resource
|
|
|
+ private IMessageService iMessageService;
|
|
|
@Autowired
|
|
|
private IPositionAddressService positionAddressService;
|
|
|
@Value("${jeecg.c_port.path}")
|
|
|
@@ -558,4 +562,36 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> i
|
|
|
public List<String> findListByUserId(String userId) {
|
|
|
return positionMapper.findListByUserId(userId);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 审批
|
|
|
+ * @param
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public boolean updateById1(Position position) {
|
|
|
+ boolean ok= false;
|
|
|
+ try {
|
|
|
+ ok = updateById(position);
|
|
|
+ position=getById(position.getId());
|
|
|
+ Message message=new Message();
|
|
|
+ message.setUserId(position.getUserId());
|
|
|
+ message.setPositionId(position.getId());
|
|
|
+ if(position.getAuthenticationStatus()==2){
|
|
|
+ message.setTitle("岗位认证通过审核");
|
|
|
+ message.setContent("您的岗位信息已通过审核");
|
|
|
+ }else if(position.getAuthenticationStatus()==3){
|
|
|
+ message.setTitle("岗位认证未通过审核");
|
|
|
+ message.setContent("您的岗位信息未通过审核");
|
|
|
+ }
|
|
|
+ message.setMessageTime(new Date());
|
|
|
+ message.setType(3);
|
|
|
+ message.setIsRead(0);
|
|
|
+ message.setDelFlag("0");
|
|
|
+ ok=iMessageService.save(message);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return ok;
|
|
|
+ }
|
|
|
}
|